@amd-gaia/agent-ui 0.17.5 → 0.18.0
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-BKq2diFF.js +550 -0
- package/dist/assets/index-dpq7GLUN.css +1 -0
- package/dist/index.html +2 -2
- package/main.cjs +91 -1
- package/package.json +2 -2
- package/services/backend-installer-progress-dialog.cjs +79 -45
- package/services/backend-installer.cjs +138 -17
- package/dist/assets/index-CdffaS1a.js +0 -438
- package/dist/assets/index-CzObDlwu.css +0 -1
|
@@ -1,438 +0,0 @@
|
|
|
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 eu=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 $m={exports:{}},ju={},Ym={exports:{}},Ce={};/**
|
|
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"),OE=Symbol.for("react.portal"),PE=Symbol.for("react.fragment"),ME=Symbol.for("react.strict_mode"),FE=Symbol.for("react.profiler"),jE=Symbol.for("react.provider"),BE=Symbol.for("react.context"),UE=Symbol.for("react.forward_ref"),HE=Symbol.for("react.suspense"),zE=Symbol.for("react.memo"),$E=Symbol.for("react.lazy"),nf=Symbol.iterator;function YE(e){return e===null||typeof e!="object"?null:(e=nf&&e[nf]||e["@@iterator"],typeof e=="function"?e:null)}var Vm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wm=Object.assign,qm={};function Oi(e,t,n){this.props=e,this.context=t,this.refs=qm,this.updater=n||Vm}Oi.prototype.isReactComponent={};Oi.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")};Oi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qm(){}Qm.prototype=Oi.prototype;function Ac(e,t,n){this.props=e,this.context=t,this.refs=qm,this.updater=n||Vm}var vc=Ac.prototype=new Qm;vc.constructor=Ac;Wm(vc,Oi.prototype);vc.isPureReactComponent=!0;var rf=Array.isArray,Gm=Object.prototype.hasOwnProperty,wc={current:null},Km={key:!0,ref:!0,__self:!0,__source:!0};function Xm(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)Gm.call(t,r)&&!Km.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),d=0;d<u;d++)o[d]=arguments[d+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:wc.current}}function VE(e,t){return{$$typeof:Js,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ic(e){return typeof e=="object"&&e!==null&&e.$$typeof===Js}function WE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var sf=/\/+/g;function bl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?WE(""+e.key):t.toString(36)}function Fa(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 OE:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+bl(a,0):r,rf(i)?(n="",e!=null&&(n=e.replace(sf,"$&/")+"/"),Fa(i,t,n,"",function(d){return d})):i!=null&&(Ic(i)&&(i=VE(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(sf,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",rf(e))for(var u=0;u<e.length;u++){s=e[u];var o=r+bl(s,u);a+=Fa(s,t,n,o,i)}else if(o=YE(e),typeof o=="function")for(e=o.call(e),u=0;!(s=e.next()).done;)s=s.value,o=r+bl(s,u++),a+=Fa(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 fa(e,t,n){if(e==null)return e;var r=[],i=0;return Fa(e,r,"","",function(s){return t.call(n,s,i++)}),r}function qE(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 It={current:null},ja={transition:null},QE={ReactCurrentDispatcher:It,ReactCurrentBatchConfig:ja,ReactCurrentOwner:wc};function Jm(){throw Error("act(...) is not supported in production builds of React.")}Ce.Children={map:fa,forEach:function(e,t,n){fa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fa(e,function(){t++}),t},toArray:function(e){return fa(e,function(t){return t})||[]},only:function(e){if(!Ic(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Component=Oi;Ce.Fragment=PE;Ce.Profiler=FE;Ce.PureComponent=Ac;Ce.StrictMode=ME;Ce.Suspense=HE;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QE;Ce.act=Jm;Ce.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=Wm({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=wc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(o in t)Gm.call(t,o)&&!Km.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 d=0;d<o;d++)u[d]=arguments[d+2];r.children=u}return{$$typeof:Js,type:e.type,key:i,ref:s,props:r,_owner:a}};Ce.createContext=function(e){return e={$$typeof:BE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:jE,_context:e},e.Consumer=e};Ce.createElement=Xm;Ce.createFactory=function(e){var t=Xm.bind(null,e);return t.type=e,t};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:UE,render:e}};Ce.isValidElement=Ic;Ce.lazy=function(e){return{$$typeof:$E,_payload:{_status:-1,_result:e},_init:qE}};Ce.memo=function(e,t){return{$$typeof:zE,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=ja.transition;ja.transition={};try{e()}finally{ja.transition=t}};Ce.unstable_act=Jm;Ce.useCallback=function(e,t){return It.current.useCallback(e,t)};Ce.useContext=function(e){return It.current.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e){return It.current.useDeferredValue(e)};Ce.useEffect=function(e,t){return It.current.useEffect(e,t)};Ce.useId=function(){return It.current.useId()};Ce.useImperativeHandle=function(e,t,n){return It.current.useImperativeHandle(e,t,n)};Ce.useInsertionEffect=function(e,t){return It.current.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return It.current.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return It.current.useMemo(e,t)};Ce.useReducer=function(e,t,n){return It.current.useReducer(e,t,n)};Ce.useRef=function(e){return It.current.useRef(e)};Ce.useState=function(e){return It.current.useState(e)};Ce.useSyncExternalStore=function(e,t,n){return It.current.useSyncExternalStore(e,t,n)};Ce.useTransition=function(){return It.current.useTransition()};Ce.version="18.3.1";Ym.exports=Ce;var _=Ym.exports;const vs=Fu(_);/**
|
|
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 GE=_,KE=Symbol.for("react.element"),XE=Symbol.for("react.fragment"),JE=Object.prototype.hasOwnProperty,ZE=GE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,e2={key:!0,ref:!0,__self:!0,__source:!0};function Zm(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)JE.call(t,r)&&!e2.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:KE,type:e,key:s,ref:a,props:i,_owner:ZE.current}}ju.Fragment=XE;ju.jsx=Zm;ju.jsxs=Zm;$m.exports=ju;var l=$m.exports,po={},e0={exports:{}},Jt={},t0={exports:{}},n0={};/**
|
|
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 y=I.length;I.push(B);e:for(;0<y;){var ee=y-1>>>1,ce=I[ee];if(0<i(ce,B))I[ee]=B,I[y]=ce,y=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],y=I.pop();if(y!==B){I[0]=y;e:for(var ee=0,ce=I.length,N=ce>>>1;ee<N;){var fe=2*(ee+1)-1,ye=I[fe],ge=fe+1,Oe=I[ge];if(0>i(ye,y))ge<ce&&0>i(Oe,ye)?(I[ee]=Oe,I[ge]=y,ee=ge):(I[ee]=ye,I[fe]=y,ee=fe);else if(ge<ce&&0>i(Oe,y))I[ee]=Oe,I[ge]=y,ee=ge;else break e}}return B}function i(I,B){var y=I.sortIndex-B.sortIndex;return y!==0?y: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=[],d=[],f=1,h=null,p=3,m=!1,E=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,g=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(d);B!==null;){if(B.callback===null)r(d);else if(B.startTime<=I)r(d),B.sortIndex=B.expirationTime,t(o,B);else break;B=n(d)}}function L(I){if(x=!1,k(I),!E)if(n(o)!==null)E=!0,Ne(M);else{var B=n(d);B!==null&&ne(L,B.startTime-I)}}function M(I,B){E=!1,x&&(x=!1,g(R),R=-1),m=!0;var y=p;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,p=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(d);fe!==null&&ne(L,fe.startTime-B),N=!1}return N}finally{h=null,p=y,m=!1}}var S=!1,O=null,R=-1,Y=5,v=-1;function z(){return!(e.unstable_now()-v<Y)}function K(){if(O!==null){var I=e.unstable_now();v=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 ue=new MessageChannel,oe=ue.port2;ue.port1.onmessage=K,de=function(){oe.postMessage(null)}}else de=function(){w(K,0)};function Ne(I){O=I,S||(S=!0,de())}function ne(I,B){R=w(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(){E||m||(E=!0,Ne(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 p},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(I){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var y=p;p=B;try{return I()}finally{p=y}},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 y=p;p=I;try{return B()}finally{p=y}},e.unstable_scheduleCallback=function(I,B,y){var ee=e.unstable_now();switch(typeof y=="object"&&y!==null?(y=y.delay,y=typeof y=="number"&&0<y?ee+y:ee):y=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=y+ce,I={id:f++,callback:B,priorityLevel:I,startTime:y,expirationTime:ce,sortIndex:-1},y>ee?(I.sortIndex=y,t(d,I),n(o)===null&&I===n(d)&&(x?(g(R),R=-1):x=!0,ne(L,y-ee))):(I.sortIndex=ce,t(o,I),E||m||(E=!0,Ne(M))),I},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(I){var B=p;return function(){var y=p;p=B;try{return I.apply(this,arguments)}finally{p=y}}}})(n0);t0.exports=n0;var t2=t0.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 n2=_,Xt=t2;function Q(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 r0=new Set,ws={};function Vr(e,t){ki(e,t),ki(e+"Capture",t)}function ki(e,t){for(ws[e]=t,e=0;e<t.length;e++)r0.add(t[e])}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),go=Object.prototype.hasOwnProperty,r2=/^[: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]*$/,af={},uf={};function i2(e){return go.call(uf,e)?!0:go.call(af,e)?!1:r2.test(e)?uf[e]=!0:(af[e]=!0,!1)}function s2(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 a2(e,t,n,r){if(t===null||typeof t>"u"||s2(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 Lt(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 Lt(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 Lt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new Lt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new Lt(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 Lt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new Lt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new Lt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new Lt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new Lt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Lc=/[\-:]([a-z])/g;function Dc(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(Lc,Dc);pt[t]=new Lt(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(Lc,Dc);pt[t]=new Lt(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(Lc,Dc);pt[t]=new Lt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new Lt(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new Lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new Lt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rc(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")&&(a2(t,n,i,r)&&(n=null),r||i===null?i2(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=n2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ha=Symbol.for("react.element"),ri=Symbol.for("react.portal"),ii=Symbol.for("react.fragment"),Oc=Symbol.for("react.strict_mode"),Eo=Symbol.for("react.profiler"),i0=Symbol.for("react.provider"),s0=Symbol.for("react.context"),Pc=Symbol.for("react.forward_ref"),To=Symbol.for("react.suspense"),yo=Symbol.for("react.suspense_list"),Mc=Symbol.for("react.memo"),tr=Symbol.for("react.lazy"),a0=Symbol.for("react.offscreen"),lf=Symbol.iterator;function $i(e){return e===null||typeof e!="object"?null:(e=lf&&e[lf]||e["@@iterator"],typeof e=="function"?e:null)}var Qe=Object.assign,_l;function rs(e){if(_l===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_l=t&&t[1]||""}return`
|
|
34
|
-
`+_l+e}var kl=!1;function Sl(e,t){if(!e||kl)return"";kl=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.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{kl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rs(e):""}function u2(e){switch(e.tag){case 5:return rs(e.type);case 16:return rs("Lazy");case 13:return rs("Suspense");case 19:return rs("SuspenseList");case 0:case 2:case 15:return e=Sl(e.type,!1),e;case 11:return e=Sl(e.type.render,!1),e;case 1:return e=Sl(e.type,!0),e;default:return""}}function xo(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 ii:return"Fragment";case ri:return"Portal";case Eo:return"Profiler";case Oc:return"StrictMode";case To:return"Suspense";case yo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s0:return(e.displayName||"Context")+".Consumer";case i0:return(e._context.displayName||"Context")+".Provider";case Pc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mc:return t=e.displayName||null,t!==null?t:xo(e.type)||"Memo";case tr:t=e._payload,e=e._init;try{return xo(e(t))}catch{}}return null}function l2(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 xo(t);case 8:return t===Oc?"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 u0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function o2(e){var t=u0(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 ma(e){e._valueTracker||(e._valueTracker=o2(e))}function l0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=u0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tu(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 bo(e,t){var n=t.checked;return Qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function of(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 o0(e,t){t=t.checked,t!=null&&Rc(e,"checked",t,!1)}function _o(e,t){o0(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")?ko(e,t.type,n):t.hasOwnProperty("defaultValue")&&ko(e,t.type,gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cf(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 ko(e,t,n){(t!=="number"||tu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var is=Array.isArray;function gi(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 So(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function df(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(is(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gr(n)}}function c0(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 ff(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d0(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 Co(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pa,f0=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(pa=pa||document.createElement("div"),pa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Is(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var os={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},c2=["Webkit","ms","Moz","O"];Object.keys(os).forEach(function(e){c2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),os[t]=os[e]})});function h0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||os.hasOwnProperty(e)&&os[e]?(""+t).trim():t+"px"}function m0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=h0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var d2=Qe({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 No(e,t){if(t){if(d2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Ao(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 vo=null;function Fc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wo=null,Ei=null,Ti=null;function hf(e){if(e=ta(e)){if(typeof wo!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=$u(t),wo(e.stateNode,e.type,t))}}function p0(e){Ei?Ti?Ti.push(e):Ti=[e]:Ei=e}function g0(){if(Ei){var e=Ei,t=Ti;if(Ti=Ei=null,hf(e),t)for(e=0;e<t.length;e++)hf(t[e])}}function E0(e,t){return e(t)}function T0(){}var Cl=!1;function y0(e,t,n){if(Cl)return e(t,n);Cl=!0;try{return E0(e,t,n)}finally{Cl=!1,(Ei!==null||Ti!==null)&&(T0(),g0())}}function Ls(e,t){var n=e.stateNode;if(n===null)return null;var r=$u(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(Q(231,t,typeof n));return n}var Io=!1;if($n)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){Io=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Io=!1}function f2(e,t,n,r,i,s,a,u,o){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(f){this.onError(f)}}var cs=!1,nu=null,ru=!1,Lo=null,h2={onError:function(e){cs=!0,nu=e}};function m2(e,t,n,r,i,s,a,u,o){cs=!1,nu=null,f2.apply(h2,arguments)}function p2(e,t,n,r,i,s,a,u,o){if(m2.apply(this,arguments),cs){if(cs){var d=nu;cs=!1,nu=null}else throw Error(Q(198));ru||(ru=!0,Lo=d)}}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 x0(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 mf(e){if(Wr(e)!==e)throw Error(Q(188))}function g2(e){var t=e.alternate;if(!t){if(t=Wr(e),t===null)throw Error(Q(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 mf(i),e;if(s===r)return mf(i),t;s=s.sibling}throw Error(Q(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(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function b0(e){return e=g2(e),e!==null?_0(e):null}function _0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_0(e);if(t!==null)return t;e=e.sibling}return null}var k0=Xt.unstable_scheduleCallback,pf=Xt.unstable_cancelCallback,E2=Xt.unstable_shouldYield,T2=Xt.unstable_requestPaint,Xe=Xt.unstable_now,y2=Xt.unstable_getCurrentPriorityLevel,jc=Xt.unstable_ImmediatePriority,S0=Xt.unstable_UserBlockingPriority,iu=Xt.unstable_NormalPriority,x2=Xt.unstable_LowPriority,C0=Xt.unstable_IdlePriority,Bu=null,Ln=null;function b2(e){if(Ln&&typeof Ln.onCommitFiberRoot=="function")try{Ln.onCommitFiberRoot(Bu,e,void 0,(e.current.flags&128)===128)}catch{}}var gn=Math.clz32?Math.clz32:S2,_2=Math.log,k2=Math.LN2;function S2(e){return e>>>=0,e===0?32:31-(_2(e)/k2|0)|0}var ga=64,Ea=4194304;function ss(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 su(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=ss(u):(s&=a,s!==0&&(r=ss(s)))}else a=n&~i,a!==0?r=ss(a):s!==0&&(r=ss(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-gn(t),i=1<<n,r|=e[n],t&=~i;return r}function C2(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 N2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-gn(s),u=1<<a,o=i[a];o===-1?(!(u&n)||u&r)&&(i[a]=C2(u,t)):o<=t&&(e.expiredLanes|=u),s&=~u}}function Do(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function N0(){var e=ga;return ga<<=1,!(ga&4194240)&&(ga=64),e}function Nl(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-gn(t),e[t]=n}function A2(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-gn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Bc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var De=0;function A0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var v0,Uc,w0,I0,L0,Ro=!1,Ta=[],lr=null,or=null,cr=null,Ds=new Map,Rs=new Map,rr=[],v2="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 gf(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":Ds.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rs.delete(t.pointerId)}}function Vi(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&&Uc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function w2(e,t,n,r,i){switch(t){case"focusin":return lr=Vi(lr,e,t,n,r,i),!0;case"dragenter":return or=Vi(or,e,t,n,r,i),!0;case"mouseover":return cr=Vi(cr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ds.set(s,Vi(Ds.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Rs.set(s,Vi(Rs.get(s)||null,e,t,n,r,i)),!0}return!1}function D0(e){var t=Ir(e.target);if(t!==null){var n=Wr(t);if(n!==null){if(t=n.tag,t===13){if(t=x0(n),t!==null){e.blockedOn=t,L0(e.priority,function(){w0(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=Oo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vo=r,n.target.dispatchEvent(r),vo=null}else return t=ta(n),t!==null&&Uc(t),e.blockedOn=n,!1;t.shift()}return!0}function Ef(e,t,n){Ba(e)&&n.delete(t)}function I2(){Ro=!1,lr!==null&&Ba(lr)&&(lr=null),or!==null&&Ba(or)&&(or=null),cr!==null&&Ba(cr)&&(cr=null),Ds.forEach(Ef),Rs.forEach(Ef)}function Wi(e,t){e.blockedOn===t&&(e.blockedOn=null,Ro||(Ro=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,I2)))}function Os(e){function t(i){return Wi(i,e)}if(0<Ta.length){Wi(Ta[0],e);for(var n=1;n<Ta.length;n++){var r=Ta[n];r.blockedOn===e&&(r.blockedOn=null)}}for(lr!==null&&Wi(lr,e),or!==null&&Wi(or,e),cr!==null&&Wi(cr,e),Ds.forEach(t),Rs.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);)D0(n),n.blockedOn===null&&rr.shift()}var yi=qn.ReactCurrentBatchConfig,au=!0;function L2(e,t,n,r){var i=De,s=yi.transition;yi.transition=null;try{De=1,Hc(e,t,n,r)}finally{De=i,yi.transition=s}}function D2(e,t,n,r){var i=De,s=yi.transition;yi.transition=null;try{De=4,Hc(e,t,n,r)}finally{De=i,yi.transition=s}}function Hc(e,t,n,r){if(au){var i=Oo(e,t,n,r);if(i===null)Ml(e,t,r,uu,n),gf(e,r);else if(w2(i,e,t,n,r))r.stopPropagation();else if(gf(e,r),t&4&&-1<v2.indexOf(e)){for(;i!==null;){var s=ta(i);if(s!==null&&v0(s),s=Oo(e,t,n,r),s===null&&Ml(e,t,r,uu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ml(e,t,r,null,n)}}var uu=null;function Oo(e,t,n,r){if(uu=null,e=Fc(r),e=Ir(e),e!==null)if(t=Wr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=x0(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 uu=e,null}function R0(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(y2()){case jc:return 1;case S0:return 4;case iu:case x2:return 16;case C0:return 536870912;default:return 16}default:return 16}}var sr=null,zc=null,Ua=null;function O0(){if(Ua)return Ua;var e,t=zc,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 ya(){return!0}function Tf(){return!1}function Zt(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)?ya:Tf,this.isPropagationStopped=Tf,this}return Qe(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=ya)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ya)},persist:function(){},isPersistent:ya}),t}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$c=Zt(Pi),ea=Qe({},Pi,{view:0,detail:0}),R2=Zt(ea),Al,vl,qi,Uu=Qe({},ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yc,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!==qi&&(qi&&e.type==="mousemove"?(Al=e.screenX-qi.screenX,vl=e.screenY-qi.screenY):vl=Al=0,qi=e),Al)},movementY:function(e){return"movementY"in e?e.movementY:vl}}),yf=Zt(Uu),O2=Qe({},Uu,{dataTransfer:0}),P2=Zt(O2),M2=Qe({},ea,{relatedTarget:0}),wl=Zt(M2),F2=Qe({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),j2=Zt(F2),B2=Qe({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),U2=Zt(B2),H2=Qe({},Pi,{data:0}),xf=Zt(H2),z2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$2={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"},Y2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Y2[e])?!!t[e]:!1}function Yc(){return V2}var W2=Qe({},ea,{key:function(e){if(e.key){var t=z2[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"?$2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yc,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}}),q2=Zt(W2),Q2=Qe({},Uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bf=Zt(Q2),G2=Qe({},ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yc}),K2=Zt(G2),X2=Qe({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),J2=Zt(X2),Z2=Qe({},Uu,{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}),eT=Zt(Z2),tT=[9,13,27,32],Vc=$n&&"CompositionEvent"in window,ds=null;$n&&"documentMode"in document&&(ds=document.documentMode);var nT=$n&&"TextEvent"in window&&!ds,P0=$n&&(!Vc||ds&&8<ds&&11>=ds),_f=" ",kf=!1;function M0(e,t){switch(e){case"keyup":return tT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function rT(e,t){switch(e){case"compositionend":return F0(t);case"keypress":return t.which!==32?null:(kf=!0,_f);case"textInput":return e=t.data,e===_f&&kf?null:e;default:return null}}function iT(e,t){if(si)return e==="compositionend"||!Vc&&M0(e,t)?(e=O0(),Ua=zc=sr=null,si=!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 P0&&t.locale!=="ko"?null:t.data;default:return null}}var sT={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 Sf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sT[e.type]:t==="textarea"}function j0(e,t,n,r){p0(r),t=lu(t,"onChange"),0<t.length&&(n=new $c("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var fs=null,Ps=null;function aT(e){G0(e,0)}function Hu(e){var t=li(e);if(l0(t))return e}function uT(e,t){if(e==="change")return t}var B0=!1;if($n){var Il;if($n){var Ll="oninput"in document;if(!Ll){var Cf=document.createElement("div");Cf.setAttribute("oninput","return;"),Ll=typeof Cf.oninput=="function"}Il=Ll}else Il=!1;B0=Il&&(!document.documentMode||9<document.documentMode)}function Nf(){fs&&(fs.detachEvent("onpropertychange",U0),Ps=fs=null)}function U0(e){if(e.propertyName==="value"&&Hu(Ps)){var t=[];j0(t,Ps,e,Fc(e)),y0(aT,t)}}function lT(e,t,n){e==="focusin"?(Nf(),fs=t,Ps=n,fs.attachEvent("onpropertychange",U0)):e==="focusout"&&Nf()}function oT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hu(Ps)}function cT(e,t){if(e==="click")return Hu(t)}function dT(e,t){if(e==="input"||e==="change")return Hu(t)}function fT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:fT;function Ms(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(!go.call(t,i)||!xn(e[i],t[i]))return!1}return!0}function Af(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vf(e,t){var n=Af(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=Af(n)}}function H0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function z0(){for(var e=window,t=tu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tu(e.document)}return t}function Wc(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 hT(e){var t=z0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&H0(n.ownerDocument.documentElement,n)){if(r!==null&&Wc(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=vf(n,s);var a=vf(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 mT=$n&&"documentMode"in document&&11>=document.documentMode,ai=null,Po=null,hs=null,Mo=!1;function wf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mo||ai==null||ai!==tu(r)||(r=ai,"selectionStart"in r&&Wc(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}),hs&&Ms(hs,r)||(hs=r,r=lu(Po,"onSelect"),0<r.length&&(t=new $c("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ai)))}function xa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ui={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionend:xa("Transition","TransitionEnd")},Dl={},$0={};$n&&($0=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);function zu(e){if(Dl[e])return Dl[e];if(!ui[e])return e;var t=ui[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $0)return Dl[e]=t[n];return e}var Y0=zu("animationend"),V0=zu("animationiteration"),W0=zu("animationstart"),q0=zu("transitionend"),Q0=new Map,If="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){Q0.set(e,t),Vr(t,[e])}for(var Rl=0;Rl<If.length;Rl++){var Ol=If[Rl],pT=Ol.toLowerCase(),gT=Ol[0].toUpperCase()+Ol.slice(1);yr(pT,"on"+gT)}yr(Y0,"onAnimationEnd");yr(V0,"onAnimationIteration");yr(W0,"onAnimationStart");yr("dblclick","onDoubleClick");yr("focusin","onFocus");yr("focusout","onBlur");yr(q0,"onTransitionEnd");ki("onMouseEnter",["mouseout","mouseover"]);ki("onMouseLeave",["mouseout","mouseover"]);ki("onPointerEnter",["pointerout","pointerover"]);ki("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 as="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(" "),ET=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function Lf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,p2(r,t,void 0,e),e.currentTarget=null}function G0(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,d=u.currentTarget;if(u=u.listener,o!==s&&i.isPropagationStopped())break e;Lf(i,u,d),s=o}else for(a=0;a<r.length;a++){if(u=r[a],o=u.instance,d=u.currentTarget,u=u.listener,o!==s&&i.isPropagationStopped())break e;Lf(i,u,d),s=o}}}if(ru)throw e=Lo,ru=!1,Lo=null,e}function He(e,t){var n=t[Ho];n===void 0&&(n=t[Ho]=new Set);var r=e+"__bubble";n.has(r)||(K0(t,e,2,!1),n.add(r))}function Pl(e,t,n){var r=0;t&&(r|=4),K0(n,e,r,t)}var ba="_reactListening"+Math.random().toString(36).slice(2);function Fs(e){if(!e[ba]){e[ba]=!0,r0.forEach(function(n){n!=="selectionchange"&&(ET.has(n)||Pl(n,!1,e),Pl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ba]||(t[ba]=!0,Pl("selectionchange",!1,t))}}function K0(e,t,n,r){switch(R0(t)){case 1:var i=L2;break;case 4:i=D2;break;default:i=Hc}n=i.bind(null,t,n,e),i=void 0,!Io||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 Ml(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=Ir(u),a===null)return;if(o=a.tag,o===5||o===6){r=s=a;continue e}u=u.parentNode}}r=r.return}y0(function(){var d=s,f=Fc(n),h=[];e:{var p=Q0.get(e);if(p!==void 0){var m=$c,E=e;switch(e){case"keypress":if(Ha(n)===0)break e;case"keydown":case"keyup":m=q2;break;case"focusin":E="focus",m=wl;break;case"focusout":E="blur",m=wl;break;case"beforeblur":case"afterblur":m=wl;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":m=yf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=P2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=K2;break;case Y0:case V0:case W0:m=j2;break;case q0:m=J2;break;case"scroll":m=R2;break;case"wheel":m=eT;break;case"copy":case"cut":case"paste":m=U2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=bf}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?p!==null?p+"Capture":null:p;x=[];for(var T=d,k;T!==null;){k=T;var L=k.stateNode;if(k.tag===5&&L!==null&&(k=L,g!==null&&(L=Ls(T,g),L!=null&&x.push(js(T,L,k)))),w)break;T=T.return}0<x.length&&(p=new m(p,E,null,n,f),h.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==vo&&(E=n.relatedTarget||n.fromElement)&&(Ir(E)||E[Yn]))break e;if((m||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,m?(E=n.relatedTarget||n.toElement,m=d,E=E?Ir(E):null,E!==null&&(w=Wr(E),E!==w||E.tag!==5&&E.tag!==6)&&(E=null)):(m=null,E=d),m!==E)){if(x=yf,L="onMouseLeave",g="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(x=bf,L="onPointerLeave",g="onPointerEnter",T="pointer"),w=m==null?p:li(m),k=E==null?p:li(E),p=new x(L,T+"leave",m,n,f),p.target=w,p.relatedTarget=k,L=null,Ir(f)===d&&(x=new x(g,T+"enter",E,n,f),x.target=k,x.relatedTarget=w,L=x),w=L,m&&E)t:{for(x=m,g=E,T=0,k=x;k;k=Jr(k))T++;for(k=0,L=g;L;L=Jr(L))k++;for(;0<T-k;)x=Jr(x),T--;for(;0<k-T;)g=Jr(g),k--;for(;T--;){if(x===g||g!==null&&x===g.alternate)break t;x=Jr(x),g=Jr(g)}x=null}else x=null;m!==null&&Df(h,p,m,x,!1),E!==null&&w!==null&&Df(h,w,E,x,!0)}}e:{if(p=d?li(d):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var M=uT;else if(Sf(p))if(B0)M=dT;else{M=oT;var S=lT}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(M=cT);if(M&&(M=M(e,d))){j0(h,M,n,f);break e}S&&S(e,p,d),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&ko(p,"number",p.value)}switch(S=d?li(d):window,e){case"focusin":(Sf(S)||S.contentEditable==="true")&&(ai=S,Po=d,hs=null);break;case"focusout":hs=Po=ai=null;break;case"mousedown":Mo=!0;break;case"contextmenu":case"mouseup":case"dragend":Mo=!1,wf(h,n,f);break;case"selectionchange":if(mT)break;case"keydown":case"keyup":wf(h,n,f)}var O;if(Vc)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else si?M0(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(P0&&n.locale!=="ko"&&(si||R!=="onCompositionStart"?R==="onCompositionEnd"&&si&&(O=O0()):(sr=f,zc="value"in sr?sr.value:sr.textContent,si=!0)),S=lu(d,R),0<S.length&&(R=new xf(R,e,null,n,f),h.push({event:R,listeners:S}),O?R.data=O:(O=F0(n),O!==null&&(R.data=O)))),(O=nT?rT(e,n):iT(e,n))&&(d=lu(d,"onBeforeInput"),0<d.length&&(f=new xf("onBeforeInput","beforeinput",null,n,f),h.push({event:f,listeners:d}),f.data=O))}G0(h,t)})}function js(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ls(e,n),s!=null&&r.unshift(js(e,s,i)),s=Ls(e,t),s!=null&&r.push(js(e,s,i))),e=e.return}return r}function Jr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Df(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var u=n,o=u.alternate,d=u.stateNode;if(o!==null&&o===r)break;u.tag===5&&d!==null&&(u=d,i?(o=Ls(n,s),o!=null&&a.unshift(js(n,o,u))):i||(o=Ls(n,s),o!=null&&a.push(js(n,o,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var TT=/\r\n?/g,yT=/\u0000|\uFFFD/g;function Rf(e){return(typeof e=="string"?e:""+e).replace(TT,`
|
|
38
|
-
`).replace(yT,"")}function _a(e,t,n){if(t=Rf(t),Rf(e)!==t&&n)throw Error(Q(425))}function ou(){}var Fo=null,jo=null;function Bo(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 Uo=typeof setTimeout=="function"?setTimeout:void 0,xT=typeof clearTimeout=="function"?clearTimeout:void 0,Of=typeof Promise=="function"?Promise:void 0,bT=typeof queueMicrotask=="function"?queueMicrotask:typeof Of<"u"?function(e){return Of.resolve(null).then(e).catch(_T)}:Uo;function _T(e){setTimeout(function(){throw e})}function Fl(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),Os(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Os(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 Pf(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 Mi=Math.random().toString(36).slice(2),wn="__reactFiber$"+Mi,Bs="__reactProps$"+Mi,Yn="__reactContainer$"+Mi,Ho="__reactEvents$"+Mi,kT="__reactListeners$"+Mi,ST="__reactHandles$"+Mi;function Ir(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=Pf(e);e!==null;){if(n=e[wn])return n;e=Pf(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 li(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function $u(e){return e[Bs]||null}var zo=[],oi=-1;function xr(e){return{current:e}}function ze(e){0>oi||(e.current=zo[oi],zo[oi]=null,oi--)}function Be(e,t){oi++,zo[oi]=e.current,e.current=t}var Er={},St=xr(Er),jt=xr(!1),jr=Er;function Si(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 Bt(e){return e=e.childContextTypes,e!=null}function cu(){ze(jt),ze(St)}function Mf(e,t,n){if(St.current!==Er)throw Error(Q(168));Be(St,t),Be(jt,n)}function X0(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(Q(108,l2(e)||"Unknown",i));return Qe({},n,r)}function du(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Er,jr=St.current,Be(St,e),Be(jt,jt.current),!0}function Ff(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=X0(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,ze(jt),ze(St),Be(St,e)):ze(jt),Be(jt,n)}var Fn=null,Yu=!1,jl=!1;function J0(e){Fn===null?Fn=[e]:Fn.push(e)}function CT(e){Yu=!0,J0(e)}function br(){if(!jl&&Fn!==null){jl=!0;var e=0,t=De;try{var n=Fn;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Fn=null,Yu=!1}catch(i){throw Fn!==null&&(Fn=Fn.slice(e+1)),k0(jc,br),i}finally{De=t,jl=!1}}return null}var ci=[],di=0,fu=null,hu=0,en=[],tn=0,Br=null,Bn=1,Un="";function Ar(e,t){ci[di++]=hu,ci[di++]=fu,fu=e,hu=t}function Z0(e,t,n){en[tn++]=Bn,en[tn++]=Un,en[tn++]=Br,Br=e;var r=Bn;e=Un;var i=32-gn(r)-1;r&=~(1<<i),n+=1;var s=32-gn(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Bn=1<<32-gn(t)+i|n<<i|r,Un=s+e}else Bn=1<<s|n<<i|r,Un=e}function qc(e){e.return!==null&&(Ar(e,1),Z0(e,1,0))}function Qc(e){for(;e===fu;)fu=ci[--di],ci[di]=null,hu=ci[--di],ci[di]=null;for(;e===Br;)Br=en[--tn],en[tn]=null,Un=en[--tn],en[tn]=null,Bn=en[--tn],en[tn]=null}var Gt=null,Qt=null,Ve=!1,pn=null;function ep(e,t){var n=an(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 jf(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,Gt=e,Qt=dr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gt=e,Qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Br!==null?{id:Bn,overflow:Un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=an(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Gt=e,Qt=null,!0):!1;default:return!1}}function $o(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yo(e){if(Ve){var t=Qt;if(t){var n=t;if(!jf(e,t)){if($o(e))throw Error(Q(418));t=dr(n.nextSibling);var r=Gt;t&&jf(e,t)?ep(r,n):(e.flags=e.flags&-4097|2,Ve=!1,Gt=e)}}else{if($o(e))throw Error(Q(418));e.flags=e.flags&-4097|2,Ve=!1,Gt=e}}}function Bf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gt=e}function ka(e){if(e!==Gt)return!1;if(!Ve)return Bf(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bo(e.type,e.memoizedProps)),t&&(t=Qt)){if($o(e))throw tp(),Error(Q(418));for(;t;)ep(e,t),t=dr(t.nextSibling)}if(Bf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qt=dr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qt=null}}else Qt=Gt?dr(e.stateNode.nextSibling):null;return!0}function tp(){for(var e=Qt;e;)e=dr(e.nextSibling)}function Ci(){Qt=Gt=null,Ve=!1}function Gc(e){pn===null?pn=[e]:pn.push(e)}var NT=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(Q(309));var r=n.stateNode}if(!r)throw Error(Q(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(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function Sa(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uf(e){var t=e._init;return t(e._payload)}function np(e){function t(g,T){if(e){var k=g.deletions;k===null?(g.deletions=[T],g.flags|=16):k.push(T)}}function n(g,T){if(!e)return null;for(;T!==null;)t(g,T),T=T.sibling;return null}function r(g,T){for(g=new Map;T!==null;)T.key!==null?g.set(T.key,T):g.set(T.index,T),T=T.sibling;return g}function i(g,T){return g=pr(g,T),g.index=0,g.sibling=null,g}function s(g,T,k){return g.index=k,e?(k=g.alternate,k!==null?(k=k.index,k<T?(g.flags|=2,T):k):(g.flags|=2,T)):(g.flags|=1048576,T)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function u(g,T,k,L){return T===null||T.tag!==6?(T=Vl(k,g.mode,L),T.return=g,T):(T=i(T,k),T.return=g,T)}function o(g,T,k,L){var M=k.type;return M===ii?f(g,T,k.props.children,L,k.key):T!==null&&(T.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===tr&&Uf(M)===T.type)?(L=i(T,k.props),L.ref=Qi(g,T,k),L.return=g,L):(L=Qa(k.type,k.key,k.props,null,g.mode,L),L.ref=Qi(g,T,k),L.return=g,L)}function d(g,T,k,L){return T===null||T.tag!==4||T.stateNode.containerInfo!==k.containerInfo||T.stateNode.implementation!==k.implementation?(T=Wl(k,g.mode,L),T.return=g,T):(T=i(T,k.children||[]),T.return=g,T)}function f(g,T,k,L,M){return T===null||T.tag!==7?(T=Mr(k,g.mode,L,M),T.return=g,T):(T=i(T,k),T.return=g,T)}function h(g,T,k){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Vl(""+T,g.mode,k),T.return=g,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ha:return k=Qa(T.type,T.key,T.props,null,g.mode,k),k.ref=Qi(g,null,T),k.return=g,k;case ri:return T=Wl(T,g.mode,k),T.return=g,T;case tr:var L=T._init;return h(g,L(T._payload),k)}if(is(T)||$i(T))return T=Mr(T,g.mode,k,null),T.return=g,T;Sa(g,T)}return null}function p(g,T,k,L){var M=T!==null?T.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return M!==null?null:u(g,T,""+k,L);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case ha:return k.key===M?o(g,T,k,L):null;case ri:return k.key===M?d(g,T,k,L):null;case tr:return M=k._init,p(g,T,M(k._payload),L)}if(is(k)||$i(k))return M!==null?null:f(g,T,k,L,null);Sa(g,k)}return null}function m(g,T,k,L,M){if(typeof L=="string"&&L!==""||typeof L=="number")return g=g.get(k)||null,u(T,g,""+L,M);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case ha:return g=g.get(L.key===null?k:L.key)||null,o(T,g,L,M);case ri:return g=g.get(L.key===null?k:L.key)||null,d(T,g,L,M);case tr:var S=L._init;return m(g,T,k,S(L._payload),M)}if(is(L)||$i(L))return g=g.get(k)||null,f(T,g,L,M,null);Sa(T,L)}return null}function E(g,T,k,L){for(var M=null,S=null,O=T,R=T=0,Y=null;O!==null&&R<k.length;R++){O.index>R?(Y=O,O=null):Y=O.sibling;var v=p(g,O,k[R],L);if(v===null){O===null&&(O=Y);break}e&&O&&v.alternate===null&&t(g,O),T=s(v,T,R),S===null?M=v:S.sibling=v,S=v,O=Y}if(R===k.length)return n(g,O),Ve&&Ar(g,R),M;if(O===null){for(;R<k.length;R++)O=h(g,k[R],L),O!==null&&(T=s(O,T,R),S===null?M=O:S.sibling=O,S=O);return Ve&&Ar(g,R),M}for(O=r(g,O);R<k.length;R++)Y=m(O,g,R,k[R],L),Y!==null&&(e&&Y.alternate!==null&&O.delete(Y.key===null?R:Y.key),T=s(Y,T,R),S===null?M=Y:S.sibling=Y,S=Y);return e&&O.forEach(function(z){return t(g,z)}),Ve&&Ar(g,R),M}function x(g,T,k,L){var M=$i(k);if(typeof M!="function")throw Error(Q(150));if(k=M.call(k),k==null)throw Error(Q(151));for(var S=M=null,O=T,R=T=0,Y=null,v=k.next();O!==null&&!v.done;R++,v=k.next()){O.index>R?(Y=O,O=null):Y=O.sibling;var z=p(g,O,v.value,L);if(z===null){O===null&&(O=Y);break}e&&O&&z.alternate===null&&t(g,O),T=s(z,T,R),S===null?M=z:S.sibling=z,S=z,O=Y}if(v.done)return n(g,O),Ve&&Ar(g,R),M;if(O===null){for(;!v.done;R++,v=k.next())v=h(g,v.value,L),v!==null&&(T=s(v,T,R),S===null?M=v:S.sibling=v,S=v);return Ve&&Ar(g,R),M}for(O=r(g,O);!v.done;R++,v=k.next())v=m(O,g,R,v.value,L),v!==null&&(e&&v.alternate!==null&&O.delete(v.key===null?R:v.key),T=s(v,T,R),S===null?M=v:S.sibling=v,S=v);return e&&O.forEach(function(K){return t(g,K)}),Ve&&Ar(g,R),M}function w(g,T,k,L){if(typeof k=="object"&&k!==null&&k.type===ii&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case ha:e:{for(var M=k.key,S=T;S!==null;){if(S.key===M){if(M=k.type,M===ii){if(S.tag===7){n(g,S.sibling),T=i(S,k.props.children),T.return=g,g=T;break e}}else if(S.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===tr&&Uf(M)===S.type){n(g,S.sibling),T=i(S,k.props),T.ref=Qi(g,S,k),T.return=g,g=T;break e}n(g,S);break}else t(g,S);S=S.sibling}k.type===ii?(T=Mr(k.props.children,g.mode,L,k.key),T.return=g,g=T):(L=Qa(k.type,k.key,k.props,null,g.mode,L),L.ref=Qi(g,T,k),L.return=g,g=L)}return a(g);case ri: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(g,T.sibling),T=i(T,k.children||[]),T.return=g,g=T;break e}else{n(g,T);break}else t(g,T);T=T.sibling}T=Wl(k,g.mode,L),T.return=g,g=T}return a(g);case tr:return S=k._init,w(g,T,S(k._payload),L)}if(is(k))return E(g,T,k,L);if($i(k))return x(g,T,k,L);Sa(g,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,T!==null&&T.tag===6?(n(g,T.sibling),T=i(T,k),T.return=g,g=T):(n(g,T),T=Vl(k,g.mode,L),T.return=g,g=T),a(g)):n(g,T)}return w}var Ni=np(!0),rp=np(!1),mu=xr(null),pu=null,fi=null,Kc=null;function Xc(){Kc=fi=pu=null}function Jc(e){var t=mu.current;ze(mu),e._currentValue=t}function Vo(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 xi(e,t){pu=e,Kc=fi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function ln(e){var t=e._currentValue;if(Kc!==e)if(e={context:e,memoizedValue:t,next:null},fi===null){if(pu===null)throw Error(Q(308));fi=e,pu.dependencies={lanes:0,firstContext:e}}else fi=fi.next=e;return t}var Lr=null;function Zc(e){Lr===null?Lr=[e]:Lr.push(e)}function ip(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zc(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 ed(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sp(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,ve&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,Zc(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,Bc(e,n)}}function Hf(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 gu(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,d=o.next;o.next=null,a===null?s=d:a.next=d,a=o;var f=e.alternate;f!==null&&(f=f.updateQueue,u=f.lastBaseUpdate,u!==a&&(u===null?f.firstBaseUpdate=d:u.next=d,f.lastBaseUpdate=o))}if(s!==null){var h=i.baseState;a=0,f=d=o=null,u=s;do{var p=u.lane,m=u.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:m,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var E=e,x=u;switch(p=t,m=n,x.tag){case 1:if(E=x.payload,typeof E=="function"){h=E.call(m,h,p);break e}h=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=x.payload,p=typeof E=="function"?E.call(m,h,p):E,p==null)break e;h=Qe({},h,p);break e;case 2:nr=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[u]:p.push(u))}else m={eventTime:m,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},f===null?(d=f=m,o=h):f=f.next=m,a|=p;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;p=u,u=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(o=h),i.baseState=o,i.firstBaseUpdate=d,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);Hr|=a,e.lanes=a,e.memoizedState=h}}function zf(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(Q(191,i));i.call(r)}}}var na={},Dn=xr(na),Us=xr(na),Hs=xr(na);function Dr(e){if(e===na)throw Error(Q(174));return e}function td(e,t){switch(Be(Hs,t),Be(Us,e),Be(Dn,na),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Co(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Co(t,e)}ze(Dn),Be(Dn,t)}function Ai(){ze(Dn),ze(Us),ze(Hs)}function ap(e){Dr(Hs.current);var t=Dr(Dn.current),n=Co(t,e.type);t!==n&&(Be(Us,e),Be(Dn,n))}function nd(e){Us.current===e&&(ze(Dn),ze(Us))}var We=xr(0);function Eu(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 Bl=[];function rd(){for(var e=0;e<Bl.length;e++)Bl[e]._workInProgressVersionPrimary=null;Bl.length=0}var $a=qn.ReactCurrentDispatcher,Ul=qn.ReactCurrentBatchConfig,Ur=0,qe=null,tt=null,at=null,Tu=!1,ms=!1,zs=0,AT=0;function xt(){throw Error(Q(321))}function id(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 sd(e,t,n,r,i,s){if(Ur=s,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$a.current=e===null||e.memoizedState===null?LT:DT,e=n(r,i),ms){s=0;do{if(ms=!1,zs=0,25<=s)throw Error(Q(301));s+=1,at=tt=null,t.updateQueue=null,$a.current=RT,e=n(r,i)}while(ms)}if($a.current=yu,t=tt!==null&&tt.next!==null,Ur=0,at=tt=qe=null,Tu=!1,t)throw Error(Q(300));return e}function ad(){var e=zs!==0;return zs=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 on(){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(Q(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 $s(e,t){return typeof t=="function"?t(e):t}function Hl(e){var t=on(),n=t.queue;if(n===null)throw Error(Q(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,d=s;do{var f=d.lane;if((Ur&f)===f)o!==null&&(o=o.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var h={lane:f,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};o===null?(u=o=h,a=r):o=o.next=h,qe.lanes|=f,Hr|=f}d=d.next}while(d!==null&&d!==s);o===null?a=r:o.next=u,xn(r,t.memoizedState)||(Ft=!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,Hr|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function zl(e){var t=on(),n=t.queue;if(n===null)throw Error(Q(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)||(Ft=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function up(){}function lp(e,t){var n=qe,r=on(),i=t(),s=!xn(r.memoizedState,i);if(s&&(r.memoizedState=i,Ft=!0),r=r.queue,ud(dp.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||at!==null&&at.memoizedState.tag&1){if(n.flags|=2048,Ys(9,cp.bind(null,n,r,i,t),void 0,null),lt===null)throw Error(Q(349));Ur&30||op(n,t,i)}return i}function op(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 cp(e,t,n,r){t.value=n,t.getSnapshot=r,fp(t)&&hp(e)}function dp(e,t,n){return n(function(){fp(t)&&hp(e)})}function fp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function hp(e){var t=Vn(e,1);t!==null&&En(t,e,1,-1)}function $f(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:$s,lastRenderedState:e},t.queue=e,e=e.dispatch=IT.bind(null,qe,e),[t.memoizedState,e]}function Ys(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 mp(){return on().memoizedState}function Ya(e,t,n,r){var i=Nn();qe.flags|=e,i.memoizedState=Ys(1|t,n,void 0,r===void 0?null:r)}function Vu(e,t,n,r){var i=on();r=r===void 0?null:r;var s=void 0;if(tt!==null){var a=tt.memoizedState;if(s=a.destroy,r!==null&&id(r,a.deps)){i.memoizedState=Ys(t,n,s,r);return}}qe.flags|=e,i.memoizedState=Ys(1|t,n,s,r)}function Yf(e,t){return Ya(8390656,8,e,t)}function ud(e,t){return Vu(2048,8,e,t)}function pp(e,t){return Vu(4,2,e,t)}function gp(e,t){return Vu(4,4,e,t)}function Ep(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 Tp(e,t,n){return n=n!=null?n.concat([e]):null,Vu(4,4,Ep.bind(null,t,e),n)}function ld(){}function yp(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&id(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xp(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&id(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function bp(e,t,n){return Ur&21?(xn(n,t)||(n=N0(),qe.lanes|=n,Hr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ft=!0),e.memoizedState=n)}function vT(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=Ul.transition;Ul.transition={};try{e(!1),t()}finally{De=n,Ul.transition=r}}function _p(){return on().memoizedState}function wT(e,t,n){var r=mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kp(e))Sp(t,n);else if(n=ip(e,t,n,r),n!==null){var i=wt();En(n,e,r,i),Cp(n,t,r)}}function IT(e,t,n){var r=mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kp(e))Sp(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,Zc(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=ip(e,t,i,r),n!==null&&(i=wt(),En(n,e,r,i),Cp(n,t,r))}}function kp(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Sp(e,t){ms=Tu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bc(e,n)}}var yu={readContext:ln,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},LT={readContext:ln,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:ln,useEffect:Yf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ya(4194308,4,Ep.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=wT.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:$f,useDebugValue:ld,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=$f(!1),t=e[0];return e=vT.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(Q(407));n=n()}else{if(n=t(),lt===null)throw Error(Q(349));Ur&30||op(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Yf(dp.bind(null,r,s,e),[e]),r.flags|=2048,Ys(9,cp.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-gn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=AT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},DT={readContext:ln,useCallback:yp,useContext:ln,useEffect:ud,useImperativeHandle:Tp,useInsertionEffect:pp,useLayoutEffect:gp,useMemo:xp,useReducer:Hl,useRef:mp,useState:function(){return Hl($s)},useDebugValue:ld,useDeferredValue:function(e){var t=on();return bp(t,tt.memoizedState,e)},useTransition:function(){var e=Hl($s)[0],t=on().memoizedState;return[e,t]},useMutableSource:up,useSyncExternalStore:lp,useId:_p,unstable_isNewReconciler:!1},RT={readContext:ln,useCallback:yp,useContext:ln,useEffect:ud,useImperativeHandle:Tp,useInsertionEffect:pp,useLayoutEffect:gp,useMemo:xp,useReducer:zl,useRef:mp,useState:function(){return zl($s)},useDebugValue:ld,useDeferredValue:function(e){var t=on();return tt===null?t.memoizedState=e:bp(t,tt.memoizedState,e)},useTransition:function(){var e=zl($s)[0],t=on().memoizedState;return[e,t]},useMutableSource:up,useSyncExternalStore:lp,useId:_p,unstable_isNewReconciler:!1};function hn(e,t){if(e&&e.defaultProps){t=Qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Wo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wu={isMounted:function(e){return(e=e._reactInternals)?Wr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=mr(e),s=zn(r,i);s.payload=t,n!=null&&(s.callback=n),t=fr(e,s,i),t!==null&&(En(t,e,i,r),za(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),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&&(En(t,e,i,r),za(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=mr(e),i=zn(n,r);i.tag=2,t!=null&&(i.callback=t),t=fr(e,i,r),t!==null&&(En(t,e,r,n),za(t,e,r))}};function Vf(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?!Ms(n,r)||!Ms(i,s):!0}function Np(e,t,n){var r=!1,i=Er,s=t.contextType;return typeof s=="object"&&s!==null?s=ln(s):(i=Bt(t)?jr:St.current,r=t.contextTypes,s=(r=r!=null)?Si(e,i):Er),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Wf(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&&Wu.enqueueReplaceState(t,t.state,null)}function qo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ed(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=ln(s):(s=Bt(t)?jr:St.current,i.context=Si(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Wo(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&&Wu.enqueueReplaceState(i,i.state,null),gu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function vi(e,t){try{var n="",r=t;do n+=u2(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 $l(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var OT=typeof WeakMap=="function"?WeakMap:Map;function Ap(e,t,n){n=zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bu||(bu=!0,ic=r),Qo(e,t)},n}function vp(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(){Qo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Qo(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 qf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new OT;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=QT.bind(null,e,t,n),t.then(e,e))}function Qf(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 Gf(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 PT=qn.ReactCurrentOwner,Ft=!1;function At(e,t,n,r){t.child=e===null?rp(t,null,n,r):Ni(t,e.child,n,r)}function Kf(e,t,n,r,i){n=n.render;var s=t.ref;return xi(t,i),r=sd(e,t,n,r,s,i),n=ad(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Ve&&n&&qc(t),t.flags|=1,At(e,t,r,i),t.child)}function Xf(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!gd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,wp(e,t,s,r,i)):(e=Qa(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:Ms,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 wp(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ms(s,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ft=!0);else return t.lanes=e.lanes,Wn(e,t,i)}return Go(e,t,n,r,i)}function Ip(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(mi,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(mi,qt),qt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Be(mi,qt),qt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Be(mi,qt),qt|=r;return At(e,t,i,n),t.child}function Lp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Go(e,t,n,r,i){var s=Bt(n)?jr:St.current;return s=Si(t,s),xi(t,i),n=sd(e,t,n,r,s,i),r=ad(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Ve&&r&&qc(t),t.flags|=1,At(e,t,n,i),t.child)}function Jf(e,t,n,r,i){if(Bt(n)){var s=!0;du(t)}else s=!1;if(xi(t,i),t.stateNode===null)Va(e,t),Np(t,n,r),qo(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var o=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=ln(d):(d=Bt(n)?jr:St.current,d=Si(t,d));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!==d)&&Wf(t,a,r,d),nr=!1;var p=t.memoizedState;a.state=p,gu(t,r,a,i),o=t.memoizedState,u!==r||p!==o||jt.current||nr?(typeof f=="function"&&(Wo(t,n,f,r),o=t.memoizedState),(u=nr||Vf(t,n,u,r,p,o,d))?(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=d,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,sp(e,t),u=t.memoizedProps,d=t.type===t.elementType?u:hn(t.type,u),a.props=d,h=t.pendingProps,p=a.context,o=n.contextType,typeof o=="object"&&o!==null?o=ln(o):(o=Bt(n)?jr:St.current,o=Si(t,o));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==h||p!==o)&&Wf(t,a,r,o),nr=!1,p=t.memoizedState,a.state=p,gu(t,r,a,i);var E=t.memoizedState;u!==h||p!==E||jt.current||nr?(typeof m=="function"&&(Wo(t,n,m,r),E=t.memoizedState),(d=nr||Vf(t,n,d,r,p,E,o)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,E,o),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,E,o)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),a.props=r,a.state=E,a.context=o,r=d):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ko(e,t,n,r,s,i)}function Ko(e,t,n,r,i,s){Lp(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Ff(t,n,!1),Wn(e,t,s);r=t.stateNode,PT.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ni(t,e.child,null,s),t.child=Ni(t,null,u,s)):At(e,t,u,s),t.memoizedState=r.state,i&&Ff(t,n,!0),t.child}function Dp(e){var t=e.stateNode;t.pendingContext?Mf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mf(e,t.context,!1),td(e,t.containerInfo)}function Zf(e,t,n,r,i){return Ci(),Gc(i),t.flags|=256,At(e,t,n,r),t.child}var Xo={dehydrated:null,treeContext:null,retryLane:0};function Jo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rp(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 Yo(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=Gu(a,r,0,null),e=Mr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Jo(n),t.memoizedState=Xo,e):od(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return MT(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=Mr(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?Jo(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=Xo,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 od(e,t){return t=Gu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ca(e,t,n,r){return r!==null&&Gc(r),Ni(t,e.child,null,n),e=od(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function MT(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=$l(Error(Q(422))),Ca(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Gu({mode:"visible",children:r.children},i,0,null),s=Mr(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ni(t,e.child,null,a),t.child.memoizedState=Jo(a),t.memoizedState=Xo,s);if(!(t.mode&1))return Ca(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,s=Error(Q(419)),r=$l(s,r,void 0),Ca(e,t,a,r)}if(u=(a&e.childLanes)!==0,Ft||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),En(r,e,i,-1))}return pd(),r=$l(Error(Q(421))),Ca(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=GT.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Qt=dr(i.nextSibling),Gt=t,Ve=!0,pn=null,e!==null&&(en[tn++]=Bn,en[tn++]=Un,en[tn++]=Br,Bn=e.id,Un=e.overflow,Br=t),t=od(t,r.children),t.flags|=4096,t)}function eh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Vo(e.return,t,n)}function Yl(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 Op(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&&eh(e,n,t);else if(e.tag===19)eh(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&&Eu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Yl(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&&Eu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Yl(t,!0,n,null,s);break;case"together":Yl(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),Hr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(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 FT(e,t,n){switch(t.tag){case 3:Dp(t),Ci();break;case 5:ap(t);break;case 1:Bt(t.type)&&du(t);break;case 4:td(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Be(mu,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?Rp(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 Op(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,Ip(e,t,n)}return Wn(e,t,n)}var Pp,Zo,Mp,Fp;Pp=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}};Zo=function(){};Mp=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Dr(Dn.current);var s=null;switch(n){case"input":i=bo(e,i),r=bo(e,r),s=[];break;case"select":i=Qe({},i,{value:void 0}),r=Qe({},r,{value:void 0}),s=[];break;case"textarea":i=So(e,i),r=So(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ou)}No(n,r);var a;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var u=i[d];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ws.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var o=r[d];if(u=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&o!==u&&(o!=null||u!=null))if(d==="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(d,n)),n=o;else d==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,u=u?u.__html:void 0,o!=null&&u!==o&&(s=s||[]).push(d,o)):d==="children"?typeof o!="string"&&typeof o!="number"||(s=s||[]).push(d,""+o):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ws.hasOwnProperty(d)?(o!=null&&d==="onScroll"&&He("scroll",e),s||u===o||(s=[])):(s=s||[]).push(d,o))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}};Fp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gi(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 jT(e,t,n){var r=t.pendingProps;switch(Qc(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 Bt(t.type)&&cu(),bt(t),null;case 3:return r=t.stateNode,Ai(),ze(jt),ze(St),rd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ka(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pn!==null&&(uc(pn),pn=null))),Zo(e,t),bt(t),null;case 5:nd(t);var i=Dr(Hs.current);if(n=t.type,e!==null&&t.stateNode!=null)Mp(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return bt(t),null}if(e=Dr(Dn.current),ka(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[wn]=t,r[Bs]=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<as.length;i++)He(as[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":of(r,s),He("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},He("invalid",r);break;case"textarea":df(r,s),He("invalid",r)}No(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&&_a(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(s.suppressHydrationWarning!==!0&&_a(r.textContent,u,e),i=["children",""+u]):ws.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&He("scroll",r)}switch(n){case"input":ma(r),cf(r,s,!0);break;case"textarea":ma(r),ff(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ou)}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=d0(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[Bs]=r,Pp(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ao(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<as.length;i++)He(as[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":of(e,r),i=bo(e,r),He("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Qe({},r,{value:void 0}),He("invalid",e);break;case"textarea":df(e,r),i=So(e,r),He("invalid",e);break;default:i=r}No(n,i),u=i;for(s in u)if(u.hasOwnProperty(s)){var o=u[s];s==="style"?m0(e,o):s==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&f0(e,o)):s==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&Is(e,o):typeof o=="number"&&Is(e,""+o):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ws.hasOwnProperty(s)?o!=null&&s==="onScroll"&&He("scroll",e):o!=null&&Rc(e,s,o,a))}switch(n){case"input":ma(e),cf(e,r,!1);break;case"textarea":ma(e),ff(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?gi(e,!!r.multiple,s,!1):r.defaultValue!=null&&gi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ou)}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)Fp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Dr(Hs.current),Dr(Dn.current),ka(t)){if(r=t.stateNode,n=t.memoizedProps,r[wn]=t,(s=r.nodeValue!==n)&&(e=Gt,e!==null))switch(e.tag){case 3:_a(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_a(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&&Qt!==null&&t.mode&1&&!(t.flags&128))tp(),Ci(),t.flags|=98560,s=!1;else if(s=ka(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(Q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Q(317));s[wn]=t}else Ci(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bt(t),s=!1}else pn!==null&&(uc(pn),pn=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):pd())),t.updateQueue!==null&&(t.flags|=4),bt(t),null);case 4:return Ai(),Zo(e,t),e===null&&Fs(t.stateNode.containerInfo),bt(t),null;case 10:return Jc(t.type._context),bt(t),null;case 17:return Bt(t.type)&&cu(),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)Gi(s,!1);else{if(nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Eu(e),a!==null){for(t.flags|=128,Gi(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()>wi&&(t.flags|=128,r=!0,Gi(s,!1),t.lanes=4194304)}else{if(!r)if(e=Eu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ve)return bt(t),null}else 2*Xe()-s.renderingStartTime>wi&&n!==1073741824&&(t.flags|=128,r=!0,Gi(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 md(),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(Q(156,t.tag))}function BT(e,t){switch(Qc(t),t.tag){case 1:return Bt(t.type)&&cu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),ze(jt),ze(St),rd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nd(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Ci()}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 Jc(t.type._context),null;case 22:case 23:return md(),null;case 24:return null;default:return null}}var Na=!1,_t=!1,UT=typeof WeakSet=="function"?WeakSet:Set,ie=null;function hi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(e,t,r)}else n.current=null}function ec(e,t,n){try{n()}catch(r){Ge(e,t,r)}}var th=!1;function HT(e,t){if(Fo=au,e=z0(),Wc(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,d=0,f=0,h=e,p=null;t:for(;;){for(var m;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),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++d===i&&(u=a),p===s&&++f===r&&(o=a),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=u===-1||o===-1?null:{start:u,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(jo={focusedElem:e,selectionRange:n},au=!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 E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var x=E.memoizedProps,w=E.memoizedState,g=t.stateNode,T=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:hn(t.type,x),w);g.__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(Q(163))}}catch(L){Ge(t,t.return,L)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return E=th,th=!1,E}function ps(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&&ec(t,n,s)}i=i.next}while(i!==r)}}function qu(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 tc(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 jp(e){var t=e.alternate;t!==null&&(e.alternate=null,jp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[Bs],delete t[Ho],delete t[kT],delete t[ST])),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 Bp(e){return e.tag===5||e.tag===3||e.tag===4}function nh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bp(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 nc(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=ou));else if(r!==4&&(e=e.child,e!==null))for(nc(e,t,n),e=e.sibling;e!==null;)nc(e,t,n),e=e.sibling}function rc(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(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}var ft=null,mn=!1;function Gn(e,t,n){for(n=n.child;n!==null;)Up(e,t,n),n=n.sibling}function Up(e,t,n){if(Ln&&typeof Ln.onCommitFiberUnmount=="function")try{Ln.onCommitFiberUnmount(Bu,n)}catch{}switch(n.tag){case 5:_t||hi(n,t);case 6:var r=ft,i=mn;ft=null,Gn(e,t,n),ft=r,mn=i,ft!==null&&(mn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(mn?(e=ft,n=n.stateNode,e.nodeType===8?Fl(e.parentNode,n):e.nodeType===1&&Fl(e,n),Os(e)):Fl(ft,n.stateNode));break;case 4:r=ft,i=mn,ft=n.stateNode.containerInfo,mn=!0,Gn(e,t,n),ft=r,mn=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)&&ec(n,t,a),i=i.next}while(i!==r)}Gn(e,t,n);break;case 1:if(!_t&&(hi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Ge(n,t,u)}Gn(e,t,n);break;case 21:Gn(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,Gn(e,t,n),_t=r):Gn(e,t,n);break;default:Gn(e,t,n)}}function rh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new UT),t.forEach(function(r){var i=KT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function dn(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,mn=!1;break e;case 3:ft=u.stateNode.containerInfo,mn=!0;break e;case 4:ft=u.stateNode.containerInfo,mn=!0;break e}u=u.return}if(ft===null)throw Error(Q(160));Up(s,a,i),ft=null,mn=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(d){Ge(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hp(t,e),t=t.sibling}function Hp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dn(t,e),Cn(e),r&4){try{ps(3,e,e.return),qu(3,e)}catch(x){Ge(e,e.return,x)}try{ps(5,e,e.return)}catch(x){Ge(e,e.return,x)}}break;case 1:dn(t,e),Cn(e),r&512&&n!==null&&hi(n,n.return);break;case 5:if(dn(t,e),Cn(e),r&512&&n!==null&&hi(n,n.return),e.flags&32){var i=e.stateNode;try{Is(i,"")}catch(x){Ge(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&&o0(i,s),Ao(u,a);var d=Ao(u,s);for(a=0;a<o.length;a+=2){var f=o[a],h=o[a+1];f==="style"?m0(i,h):f==="dangerouslySetInnerHTML"?f0(i,h):f==="children"?Is(i,h):Rc(i,f,h,d)}switch(u){case"input":_o(i,s);break;case"textarea":c0(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?gi(i,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?gi(i,!!s.multiple,s.defaultValue,!0):gi(i,!!s.multiple,s.multiple?[]:"",!1))}i[Bs]=s}catch(x){Ge(e,e.return,x)}}break;case 6:if(dn(t,e),Cn(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){Ge(e,e.return,x)}}break;case 3:if(dn(t,e),Cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(x){Ge(e,e.return,x)}break;case 4:dn(t,e),Cn(e);break;case 13:dn(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||(fd=Xe())),r&4&&rh(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(d=_t)||f,dn(t,e),_t=d):dn(t,e),Cn(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!f&&e.mode&1)for(ie=e,f=e.child;f!==null;){for(h=ie=f;ie!==null;){switch(p=ie,m=p.child,p.tag){case 0:case 11:case 14:case 15:ps(4,p,p.return);break;case 1:hi(p,p.return);var E=p.stateNode;if(typeof E.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(x){Ge(r,n,x)}}break;case 5:hi(p,p.return);break;case 22:if(p.memoizedState!==null){sh(h);continue}}m!==null?(m.return=p,ie=m):sh(h)}f=f.sibling}e:for(f=null,h=e;;){if(h.tag===5){if(f===null){f=h;try{i=h.stateNode,d?(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=h0("display",a))}catch(x){Ge(e,e.return,x)}}}else if(h.tag===6){if(f===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(x){Ge(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:dn(t,e),Cn(e),r&4&&rh(e);break;case 21:break;default:dn(t,e),Cn(e)}}function Cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Bp(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Is(i,""),r.flags&=-33);var s=nh(e);rc(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,u=nh(e);nc(e,u,a);break;default:throw Error(Q(161))}}catch(o){Ge(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zT(e,t,n){ie=e,zp(e)}function zp(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||Na;if(!a){var u=i.alternate,o=u!==null&&u.memoizedState!==null||_t;u=Na;var d=_t;if(Na=a,(_t=o)&&!d)for(ie=i;ie!==null;)a=ie,o=a.child,a.tag===22&&a.memoizedState!==null?ah(i):o!==null?(o.return=a,ie=o):ah(i);for(;s!==null;)ie=s,zp(s),s=s.sibling;ie=i,Na=u,_t=d}ih(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ie=s):ih(e)}}function ih(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||qu(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:hn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&zf(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}zf(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 d=t.alternate;if(d!==null){var f=d.memoizedState;if(f!==null){var h=f.dehydrated;h!==null&&Os(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}_t||t.flags&512&&tc(t)}catch(p){Ge(t,t.return,p)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function sh(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 ah(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qu(4,t)}catch(o){Ge(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){Ge(t,i,o)}}var s=t.return;try{tc(t)}catch(o){Ge(t,s,o)}break;case 5:var a=t.return;try{tc(t)}catch(o){Ge(t,a,o)}}}catch(o){Ge(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 $T=Math.ceil,xu=qn.ReactCurrentDispatcher,cd=qn.ReactCurrentOwner,un=qn.ReactCurrentBatchConfig,ve=0,lt=null,et=null,mt=0,qt=0,mi=xr(0),nt=0,Vs=null,Hr=0,Qu=0,dd=0,gs=null,Mt=null,fd=0,wi=1/0,Mn=null,bu=!1,ic=null,hr=null,Aa=!1,ar=null,_u=0,Es=0,sc=null,Wa=-1,qa=0;function wt(){return ve&6?Xe():Wa!==-1?Wa:Wa=Xe()}function mr(e){return e.mode&1?ve&2&&mt!==0?mt&-mt:NT.transition!==null?(qa===0&&(qa=N0()),qa):(e=De,e!==0||(e=window.event,e=e===void 0?16:R0(e.type)),e):1}function En(e,t,n,r){if(50<Es)throw Es=0,sc=null,Error(Q(185));Zs(e,n,r),(!(ve&2)||e!==lt)&&(e===lt&&(!(ve&2)&&(Qu|=n),nt===4&&ir(e,mt)),Ut(e,r),n===1&&ve===0&&!(t.mode&1)&&(wi=Xe()+500,Yu&&br()))}function Ut(e,t){var n=e.callbackNode;N2(e,t);var r=su(e,e===lt?mt:0);if(r===0)n!==null&&pf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&pf(n),t===1)e.tag===0?CT(uh.bind(null,e)):J0(uh.bind(null,e)),bT(function(){!(ve&6)&&br()}),n=null;else{switch(A0(r)){case 1:n=jc;break;case 4:n=S0;break;case 16:n=iu;break;case 536870912:n=C0;break;default:n=iu}n=Kp(n,$p.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $p(e,t){if(Wa=-1,qa=0,ve&6)throw Error(Q(327));var n=e.callbackNode;if(bi()&&e.callbackNode!==n)return null;var r=su(e,e===lt?mt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ku(e,r);else{t=r;var i=ve;ve|=2;var s=Vp();(lt!==e||mt!==t)&&(Mn=null,wi=Xe()+500,Pr(e,t));do try{WT();break}catch(u){Yp(e,u)}while(!0);Xc(),xu.current=s,ve=i,et!==null?t=0:(lt=null,mt=0,t=nt)}if(t!==0){if(t===2&&(i=Do(e),i!==0&&(r=i,t=ac(e,i))),t===1)throw n=Vs,Pr(e,0),ir(e,r),Ut(e,Xe()),n;if(t===6)ir(e,r);else{if(i=e.current.alternate,!(r&30)&&!YT(i)&&(t=ku(e,r),t===2&&(s=Do(e),s!==0&&(r=s,t=ac(e,s))),t===1))throw n=Vs,Pr(e,0),ir(e,r),Ut(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:vr(e,Mt,Mn);break;case 3:if(ir(e,r),(r&130023424)===r&&(t=fd+500-Xe(),10<t)){if(su(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Uo(vr.bind(null,e,Mt,Mn),t);break}vr(e,Mt,Mn);break;case 4:if(ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-gn(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*$T(r/1960))-r,10<r){e.timeoutHandle=Uo(vr.bind(null,e,Mt,Mn),r);break}vr(e,Mt,Mn);break;case 5:vr(e,Mt,Mn);break;default:throw Error(Q(329))}}}return Ut(e,Xe()),e.callbackNode===n?$p.bind(null,e):null}function ac(e,t){var n=gs;return e.current.memoizedState.isDehydrated&&(Pr(e,t).flags|=256),e=ku(e,t),e!==2&&(t=Mt,Mt=n,t!==null&&uc(t)),e}function uc(e){Mt===null?Mt=e:Mt.push.apply(Mt,e)}function YT(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&=~dd,t&=~Qu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gn(t),r=1<<n;e[n]=-1,t&=~r}}function uh(e){if(ve&6)throw Error(Q(327));bi();var t=su(e,0);if(!(t&1))return Ut(e,Xe()),null;var n=ku(e,t);if(e.tag!==0&&n===2){var r=Do(e);r!==0&&(t=r,n=ac(e,r))}if(n===1)throw n=Vs,Pr(e,0),ir(e,t),Ut(e,Xe()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,Mt,Mn),Ut(e,Xe()),null}function hd(e,t){var n=ve;ve|=1;try{return e(t)}finally{ve=n,ve===0&&(wi=Xe()+500,Yu&&br())}}function zr(e){ar!==null&&ar.tag===0&&!(ve&6)&&bi();var t=ve;ve|=1;var n=un.transition,r=De;try{if(un.transition=null,De=1,e)return e()}finally{De=r,un.transition=n,ve=t,!(ve&6)&&br()}}function md(){qt=mi.current,ze(mi)}function Pr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xT(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(Qc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&cu();break;case 3:Ai(),ze(jt),ze(St),rd();break;case 5:nd(r);break;case 4:Ai();break;case 13:ze(We);break;case 19:ze(We);break;case 10:Jc(r.type._context);break;case 22:case 23:md()}n=n.return}if(lt=e,et=e=pr(e.current,null),mt=qt=t,nt=0,Vs=null,dd=Qu=Hr=0,Mt=gs=null,Lr!==null){for(t=0;t<Lr.length;t++)if(n=Lr[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}Lr=null}return e}function Yp(e,t){do{var n=et;try{if(Xc(),$a.current=yu,Tu){for(var r=qe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Tu=!1}if(Ur=0,at=tt=qe=null,ms=!1,zs=0,cd.current=null,n===null||n.return===null){nt=1,Vs=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 d=o,f=u,h=f.tag;if(!(f.mode&1)&&(h===0||h===11||h===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=Qf(a);if(m!==null){m.flags&=-257,Gf(m,a,u,s,t),m.mode&1&&qf(s,d,t),t=m,o=d;var E=t.updateQueue;if(E===null){var x=new Set;x.add(o),t.updateQueue=x}else E.add(o);break e}else{if(!(t&1)){qf(s,d,t),pd();break e}o=Error(Q(426))}}else if(Ve&&u.mode&1){var w=Qf(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Gf(w,a,u,s,t),Gc(vi(o,u));break e}}s=o=vi(o,u),nt!==4&&(nt=2),gs===null?gs=[s]:gs.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Ap(s,o,t);Hf(s,g);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=vp(s,u,t);Hf(s,L);break e}}s=s.return}while(s!==null)}qp(n)}catch(M){t=M,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function Vp(){var e=xu.current;return xu.current=yu,e===null?yu:e}function pd(){(nt===0||nt===3||nt===2)&&(nt=4),lt===null||!(Hr&268435455)&&!(Qu&268435455)||ir(lt,mt)}function ku(e,t){var n=ve;ve|=2;var r=Vp();(lt!==e||mt!==t)&&(Mn=null,Pr(e,t));do try{VT();break}catch(i){Yp(e,i)}while(!0);if(Xc(),ve=n,xu.current=r,et!==null)throw Error(Q(261));return lt=null,mt=0,nt}function VT(){for(;et!==null;)Wp(et)}function WT(){for(;et!==null&&!E2();)Wp(et)}function Wp(e){var t=Gp(e.alternate,e,qt);e.memoizedProps=e.pendingProps,t===null?qp(e):et=t,cd.current=null}function qp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=BT(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=jT(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=un.transition;try{un.transition=null,De=1,qT(e,t,n,r)}finally{un.transition=i,De=r}return null}function qT(e,t,n,r){do bi();while(ar!==null);if(ve&6)throw Error(Q(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(Q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(A2(e,s),e===lt&&(et=lt=null,mt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Aa||(Aa=!0,Kp(iu,function(){return bi(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=un.transition,un.transition=null;var a=De;De=1;var u=ve;ve|=4,cd.current=null,HT(e,n),Hp(n,e),hT(jo),au=!!Fo,jo=Fo=null,e.current=n,zT(n),T2(),ve=u,De=a,un.transition=s}else e.current=n;if(Aa&&(Aa=!1,ar=e,_u=i),s=e.pendingLanes,s===0&&(hr=null),b2(n.stateNode),Ut(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(bu)throw bu=!1,e=ic,ic=null,e;return _u&1&&e.tag!==0&&bi(),s=e.pendingLanes,s&1?e===sc?Es++:(Es=0,sc=e):Es=0,br(),null}function bi(){if(ar!==null){var e=A0(_u),t=un.transition,n=De;try{if(un.transition=null,De=16>e?16:e,ar===null)var r=!1;else{if(e=ar,ar=null,_u=0,ve&6)throw Error(Q(331));var i=ve;for(ve|=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 d=u[o];for(ie=d;ie!==null;){var f=ie;switch(f.tag){case 0:case 11:case 15:ps(8,f,s)}var h=f.child;if(h!==null)h.return=f,ie=h;else for(;ie!==null;){f=ie;var p=f.sibling,m=f.return;if(jp(f),f===d){ie=null;break}if(p!==null){p.return=m,ie=p;break}ie=m}}}var E=s.alternate;if(E!==null){var x=E.child;if(x!==null){E.child=null;do{var w=x.sibling;x.sibling=null,x=w}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:ps(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,ie=g;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:qu(9,u)}}catch(M){Ge(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(ve=i,br(),Ln&&typeof Ln.onPostCommitFiberRoot=="function")try{Ln.onPostCommitFiberRoot(Bu,e)}catch{}r=!0}return r}finally{De=n,un.transition=t}}return!1}function lh(e,t,n){t=vi(n,t),t=Ap(e,t,1),e=fr(e,t,1),t=wt(),e!==null&&(Zs(e,1,t),Ut(e,t))}function Ge(e,t,n){if(e.tag===3)lh(e,e,n);else for(;t!==null;){if(t.tag===3){lh(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=vi(n,e),e=vp(t,e,1),t=fr(t,e,1),e=wt(),t!==null&&(Zs(t,1,e),Ut(t,e));break}}t=t.return}}function QT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,lt===e&&(mt&n)===n&&(nt===4||nt===3&&(mt&130023424)===mt&&500>Xe()-fd?Pr(e,0):dd|=n),Ut(e,t)}function Qp(e,t){t===0&&(e.mode&1?(t=Ea,Ea<<=1,!(Ea&130023424)&&(Ea=4194304)):t=1);var n=wt();e=Vn(e,t),e!==null&&(Zs(e,t,n),Ut(e,n))}function GT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qp(e,n)}function KT(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(Q(314))}r!==null&&r.delete(t),Qp(e,n)}var Gp;Gp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ft=!1,FT(e,t,n);Ft=!!(e.flags&131072)}else Ft=!1,Ve&&t.flags&1048576&&Z0(t,hu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Va(e,t),e=t.pendingProps;var i=Si(t,St.current);xi(t,n),i=sd(null,t,r,e,i,n);var s=ad();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,Bt(r)?(s=!0,du(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ed(t),i.updater=Wu,t.stateNode=i,i._reactInternals=t,qo(t,r,e,n),t=Ko(null,t,r,!0,s,n)):(t.tag=0,Ve&&s&&qc(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=JT(r),e=hn(r,e),i){case 0:t=Go(null,t,r,e,n);break e;case 1:t=Jf(null,t,r,e,n);break e;case 11:t=Kf(null,t,r,e,n);break e;case 14:t=Xf(null,t,r,hn(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hn(r,i),Go(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hn(r,i),Jf(e,t,r,i,n);case 3:e:{if(Dp(t),e===null)throw Error(Q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,sp(e,t),gu(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=vi(Error(Q(423)),t),t=Zf(e,t,r,n,i);break e}else if(r!==i){i=vi(Error(Q(424)),t),t=Zf(e,t,r,n,i);break e}else for(Qt=dr(t.stateNode.containerInfo.firstChild),Gt=t,Ve=!0,pn=null,n=rp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ci(),r===i){t=Wn(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return ap(t),e===null&&Yo(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Bo(r,i)?a=null:s!==null&&Bo(r,s)&&(t.flags|=32),Lp(e,t),At(e,t,a,n),t.child;case 6:return e===null&&Yo(t),null;case 13:return Rp(e,t,n);case 4:return td(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ni(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:hn(r,i),Kf(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(mu,r._currentValue),r._currentValue=a,s!==null)if(xn(s.value,a)){if(s.children===i.children&&!jt.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 d=s.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?o.next=o:(o.next=f.next,f.next=o),d.pending=o}}s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Vo(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(Q(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Vo(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,xi(t,n),i=ln(i),r=r(i),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,i=hn(r,t.pendingProps),i=hn(r.type,i),Xf(e,t,r,i,n);case 15:return wp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hn(r,i),Va(e,t),t.tag=1,Bt(r)?(e=!0,du(t)):e=!1,xi(t,n),Np(t,r,i),qo(t,r,i,n),Ko(null,t,r,!0,e,n);case 19:return Op(e,t,n);case 22:return Ip(e,t,n)}throw Error(Q(156,t.tag))};function Kp(e,t){return k0(e,t)}function XT(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 an(e,t,n,r){return new XT(e,t,n,r)}function gd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function JT(e){if(typeof e=="function")return gd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pc)return 11;if(e===Mc)return 14}return 2}function pr(e,t){var n=e.alternate;return n===null?(n=an(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 Qa(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")gd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ii:return Mr(n.children,i,s,t);case Oc:a=8,i|=8;break;case Eo:return e=an(12,n,t,i|2),e.elementType=Eo,e.lanes=s,e;case To:return e=an(13,n,t,i),e.elementType=To,e.lanes=s,e;case yo:return e=an(19,n,t,i),e.elementType=yo,e.lanes=s,e;case a0:return Gu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case i0:a=10;break e;case s0:a=9;break e;case Pc:a=11;break e;case Mc:a=14;break e;case tr:a=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=an(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Mr(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Gu(e,t,n,r){return e=an(22,e,r,t),e.elementType=a0,e.lanes=n,e.stateNode={isHidden:!1},e}function Vl(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function Wl(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ZT(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=Nl(0),this.expirationTimes=Nl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ed(e,t,n,r,i,s,a,u,o){return e=new ZT(e,t,n,u,o),t===1?(t=1,s===!0&&(t|=8)):t=0,s=an(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ed(s),e}function ey(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ri,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Xp(e){if(!e)return Er;e=e._reactInternals;e:{if(Wr(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(Bt(n))return X0(e,n,t)}return t}function Jp(e,t,n,r,i,s,a,u,o){return e=Ed(n,r,!0,e,i,s,a,u,o),e.context=Xp(null),n=e.current,r=wt(),i=mr(n),s=zn(r,i),s.callback=t??null,fr(n,s,i),e.current.lanes=i,Zs(e,i,r),Ut(e,r),e}function Ku(e,t,n,r){var i=t.current,s=wt(),a=mr(i);return n=Xp(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&&(En(e,i,a,s),za(e,i,a)),a}function Su(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 oh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Td(e,t){oh(e,t),(e=e.alternate)&&oh(e,t)}function ty(){return null}var Zp=typeof reportError=="function"?reportError:function(e){console.error(e)};function yd(e){this._internalRoot=e}Xu.prototype.render=yd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Ku(e,t,null,null)};Xu.prototype.unmount=yd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zr(function(){Ku(null,e,null,null)}),t[Yn]=null}};function Xu(e){this._internalRoot=e}Xu.prototype.unstable_scheduleHydration=function(e){if(e){var t=I0();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&&D0(e)}};function xd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ju(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ch(){}function ny(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var d=Su(a);s.call(d)}}var a=Jp(t,r,e,0,null,!1,!1,"",ch);return e._reactRootContainer=a,e[Yn]=a.current,Fs(e.nodeType===8?e.parentNode:e),zr(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var d=Su(o);u.call(d)}}var o=Ed(e,0,!1,null,null,!1,!1,"",ch);return e._reactRootContainer=o,e[Yn]=o.current,Fs(e.nodeType===8?e.parentNode:e),zr(function(){Ku(t,o,n,r)}),o}function Zu(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=Su(a);u.call(o)}}Ku(t,a,e,i)}else a=ny(n,t,e,i,r);return Su(a)}v0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ss(t.pendingLanes);n!==0&&(Bc(t,n|1),Ut(t,Xe()),!(ve&6)&&(wi=Xe()+500,br()))}break;case 13:zr(function(){var r=Vn(e,1);if(r!==null){var i=wt();En(r,e,1,i)}}),Td(e,1)}};Uc=function(e){if(e.tag===13){var t=Vn(e,134217728);if(t!==null){var n=wt();En(t,e,134217728,n)}Td(e,134217728)}};w0=function(e){if(e.tag===13){var t=mr(e),n=Vn(e,t);if(n!==null){var r=wt();En(n,e,t,r)}Td(e,t)}};I0=function(){return De};L0=function(e,t){var n=De;try{return De=e,t()}finally{De=n}};wo=function(e,t,n){switch(t){case"input":if(_o(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=$u(r);if(!i)throw Error(Q(90));l0(r),_o(r,i)}}}break;case"textarea":c0(e,n);break;case"select":t=n.value,t!=null&&gi(e,!!n.multiple,t,!1)}};E0=hd;T0=zr;var ry={usingClientEntryPoint:!1,Events:[ta,li,$u,p0,g0,hd]},Ki={findFiberByHostInstance:Ir,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iy={bundleType:Ki.bundleType,version:Ki.version,rendererPackageName:Ki.rendererPackageName,rendererConfig:Ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=b0(e),e===null?null:e.stateNode},findFiberByHostInstance:Ki.findFiberByHostInstance||ty,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 va=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!va.isDisabled&&va.supportsFiber)try{Bu=va.inject(iy),Ln=va}catch{}}Jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ry;Jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xd(t))throw Error(Q(200));return ey(e,t,null,n)};Jt.createRoot=function(e,t){if(!xd(e))throw Error(Q(299));var n=!1,r="",i=Zp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ed(e,1,!1,null,null,n,!1,r,i),e[Yn]=t.current,Fs(e.nodeType===8?e.parentNode:e),new yd(t)};Jt.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=b0(t),e=e===null?null:e.stateNode,e};Jt.flushSync=function(e){return zr(e)};Jt.hydrate=function(e,t,n){if(!Ju(t))throw Error(Q(200));return Zu(null,e,t,!0,n)};Jt.hydrateRoot=function(e,t,n){if(!xd(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=Zp;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Jp(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 Xu(t)};Jt.render=function(e,t,n){if(!Ju(t))throw Error(Q(200));return Zu(null,e,t,!1,n)};Jt.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(Q(40));return e._reactRootContainer?(zr(function(){Zu(null,null,e,!1,function(){e._reactRootContainer=null,e[Yn]=null})}),!0):!1};Jt.unstable_batchedUpdates=hd;Jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Zu(e,t,n,!1,r)};Jt.version="18.3.1-next-f1338f8080-20240426";function e1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e1)}catch(e){console.error(e)}}e1(),e0.exports=Jt;var sy=e0.exports,dh=sy;po.createRoot=dh.createRoot,po.hydrateRoot=dh.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 ay={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 uy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),le=(e,t)=>{const n=_.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:u="",children:o,...d},f)=>_.createElement("svg",{ref:f,...ay,width:i,height:i,stroke:r,strokeWidth:a?Number(s)*24/Number(i):s,className:["lucide",`lucide-${uy(e)}`,u].join(" "),...d},[...t.map(([h,p])=>_.createElement(h,p)),...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 Tn=le("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=le("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 ly=le("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 oy=le("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
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 fh=le("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"}]]);/**
|
|
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 ei=le("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"}]]);/**
|
|
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 lc=le("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"}]]);/**
|
|
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 cy=le("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"}]]);/**
|
|
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 dy=le("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"}]]);/**
|
|
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 Ws=le("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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 ra=le("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
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 bd=le("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 ia=le("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 t1=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
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 fy=le("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"}]]);/**
|
|
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 hy=le("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
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 el=le("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"}]]);/**
|
|
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 my=le("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"}]]);/**
|
|
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 Xi=le("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"}]]);/**
|
|
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 py=le("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"}]]);/**
|
|
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 $r=le("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"}]]);/**
|
|
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 gy=le("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"}]]);/**
|
|
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 In=le("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"}]]);/**
|
|
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 n1=le("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"}]]);/**
|
|
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 Hn=le("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"}]]);/**
|
|
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 hh=le("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"}]]);/**
|
|
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 r1=le("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"}]]);/**
|
|
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 i1=le("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"}]]);/**
|
|
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 Ey=le("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"}]]);/**
|
|
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 Ty=le("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"}]]);/**
|
|
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 yy=le("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"}]]);/**
|
|
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 xy=le("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"}]]);/**
|
|
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 by=le("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"}]]);/**
|
|
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 sn=le("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 _y=le("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"}]]);/**
|
|
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 s1=le("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"}]]);/**
|
|
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 ky=le("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"}]]);/**
|
|
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 Sy=le("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"}]]);/**
|
|
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 Cy=le("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"}]]);/**
|
|
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 Ny=le("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
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 Ay=le("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"}]]);/**
|
|
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 vy=le("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"}]]);/**
|
|
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 wy=le("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"}]]);/**
|
|
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 Iy=le("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"}]]);/**
|
|
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 _d=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 a1=le("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"}]]);/**
|
|
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 Rr=le("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 Ly=le("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
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 Dy=le("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"}]]);/**
|
|
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 Ry=le("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"}]]);/**
|
|
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 u1=le("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
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 Oy=le("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
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 mh=le("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]);/**
|
|
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 Py=le("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"}]]);/**
|
|
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 My=le("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"}]]);/**
|
|
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 Cu=le("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
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 Nu=le("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"}]]);/**
|
|
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 qs=le("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"}]]);/**
|
|
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 Fy=le("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"}]]);/**
|
|
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 jy=le("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"}]]);/**
|
|
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 ht=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
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 l1=le("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),By={},ph=e=>{let t;const n=new Set,r=(f,h)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const m=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(E=>E(t,m))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(By?"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()}},d=t=e(r,i,o);return o},Uy=e=>e?ph(e):ph;var o1={exports:{}},c1={},d1={exports:{}},f1={};/**
|
|
361
|
-
* @license React
|
|
362
|
-
* use-sync-external-store-shim.production.js
|
|
363
|
-
*
|
|
364
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
365
|
-
*
|
|
366
|
-
* This source code is licensed under the MIT license found in the
|
|
367
|
-
* LICENSE file in the root directory of this source tree.
|
|
368
|
-
*/var Ii=_;function Hy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zy=typeof Object.is=="function"?Object.is:Hy,$y=Ii.useState,Yy=Ii.useEffect,Vy=Ii.useLayoutEffect,Wy=Ii.useDebugValue;function qy(e,t){var n=t(),r=$y({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Vy(function(){i.value=n,i.getSnapshot=t,ql(i)&&s({inst:i})},[e,n,t]),Yy(function(){return ql(i)&&s({inst:i}),e(function(){ql(i)&&s({inst:i})})},[e]),Wy(n),n}function ql(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zy(e,n)}catch{return!0}}function Qy(e,t){return t()}var Gy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Qy:qy;f1.useSyncExternalStore=Ii.useSyncExternalStore!==void 0?Ii.useSyncExternalStore:Gy;d1.exports=f1;var Ky=d1.exports;/**
|
|
369
|
-
* @license React
|
|
370
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
371
|
-
*
|
|
372
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
373
|
-
*
|
|
374
|
-
* This source code is licensed under the MIT license found in the
|
|
375
|
-
* LICENSE file in the root directory of this source tree.
|
|
376
|
-
*/var tl=_,Xy=Ky;function Jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zy=typeof Object.is=="function"?Object.is:Jy,ex=Xy.useSyncExternalStore,tx=tl.useRef,nx=tl.useEffect,rx=tl.useMemo,ix=tl.useDebugValue;c1.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=tx(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=rx(function(){function o(m){if(!d){if(d=!0,f=m,m=r(m),i!==void 0&&a.hasValue){var E=a.value;if(i(E,m))return h=E}return h=m}if(E=h,Zy(f,m))return E;var x=r(m);return i!==void 0&&i(E,x)?(f=m,E):(f=m,h=x)}var d=!1,f,h,p=n===void 0?null:n;return[function(){return o(t())},p===null?void 0:function(){return o(p())}]},[t,n,r,i]);var u=ex(e,s[0],s[1]);return nx(function(){a.hasValue=!0,a.value=u},[u]),ix(u),u};o1.exports=c1;var sx=o1.exports;const ax=Fu(sx),h1={},{useDebugValue:ux}=vs,{useSyncExternalStoreWithSelector:lx}=ax;let gh=!1;const ox=e=>e;function cx(e,t=ox,n){(h1?"production":void 0)!=="production"&&n&&!gh&&(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"),gh=!0);const r=lx(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ux(r),r}const Eh=e=>{(h1?"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"?Uy(e):e,n=(r,i)=>cx(t,r,i);return Object.assign(n,t),n},m1=e=>e?Eh(e):Eh,_e=m1((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+`
|
|
377
|
-
`:"")+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})})),dx=/^https?:\/\/(127\.0\.0\.1|localhost):\d+\/api$/,fx="http://localhost:4200/api";function p1(){if(typeof window>"u")return"/api";if(window.location.protocol==="file:"){const e=new URLSearchParams(window.location.search).get("api");return e&&dx.test(e)?e:fx}return"/api"}const hx={api:"#4fc3f7",store:"#ce93d8",chat:"#81c784",stream:"#ffb74d",ui:"#90a4ae",doc:"#a1887f",system:"#e57373",nav:"#fff176"},mx={api:"fetch",store:"state",chat:"chat",stream:"stream",ui:"ui",doc:"docs",system:"sys",nav:"nav"},Ga=(()=>{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 Ji(){const e=new Date;return e.toLocaleTimeString("en-US",{hour12:!1})+"."+String(e.getMilliseconds()).padStart(3,"0")}function Kn(e){const t=hx[e]||"#ccc",r=`%c[${mx[e]||e}]`,i=`color: ${t}; font-weight: bold;`,s="color: #888; font-weight: normal;";return{info:(a,...u)=>{if(!Ga)return;const o=Ji();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=Ji();console.warn(`${r} %c${o} %c${a}`,i,s,"color: inherit;",...u)},error:(a,...u)=>{const o=Ji();console.error(`${r} %c${o} %c${a}`,i,s,"color: inherit;",...u)},debug:(a,...u)=>{if(!Ga)return;const o=Ji();console.debug(`${r} %c${o} %c${a}`,i,s,"color: #999;",...u)},timed:(a,u,...o)=>{if(!Ga)return;const d=Math.round(performance.now()-u),f=Ji(),h=d>2e3?"color: #e57373;":d>500?"color: #ffb74d;":"color: #81c784;";o.length>0?console.log(`${r} %c${f} %c${a} %c(${d}ms)`,i,s,"color: inherit;",h,...o):console.log(`${r} %c${f} %c${a} %c(${d}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 px(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(Ga?"%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 nl=p1();function g1(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:case 503:return"Service unavailable. Is the backend running?";default:return t||`Request failed (HTTP ${e})`}}async function we(e,t,n){const r=`${nl}${t}`,i=P.api.time();P.api.info(`${e} ${r}`,n!==void 0?{body:n}:"");const s={method:e,headers:n!==void 0?{"Content-Type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0};let a;try{a=await fetch(r,s)}catch(d){throw P.api.error(`${e} ${r} - network error`,d),d}if(!a.ok){const d=await a.text().catch(()=>"");P.api.error(`${e} ${r} - HTTP ${a.status}`,{errorText:d});let f=d;try{f=JSON.parse(d).detail||d}catch{}throw new Error(g1(a.status,f))}if(!(a.headers.get("content-type")||"").includes("application/json")){P.api.timed(`${e} ${r} -> ${a.status} (no body)`,i);return}const o=await a.json();return P.api.timed(`${e} ${r} -> ${a.status}`,i,o),o}async function kd(){return we("GET","/system/status")}async function gx(){return we("GET","/settings")}async function Ex(e){return we("PUT","/settings",e)}async function Tx(e,t){return we("POST","/system/load-model",{model_name:e,ctx_size:t})}async function yx(e,t=!1){return we("POST","/system/download-model",{model_name:e,force:t})}async function Sd(){return we("GET","/agents")}async function xx(){return we("GET","/sessions")}async function oc(e={}){return we("POST","/sessions",e)}async function Ql(e,t){return we("PUT",`/sessions/${e}`,t)}async function E1(e){return we("DELETE",`/sessions/${e}`)}async function us(e){return we("GET",`/sessions/${e}/messages`)}async function bx(e){return we("GET",`/sessions/${e}/export?format=markdown`)}async function _x(e,t){return we("DELETE",`/sessions/${e}/messages/${t}`)}async function kx(e,t){return we("DELETE",`/sessions/${e}/messages/${t}/and-below`)}const Sx=new Set(["status","step","thinking","plan","tool_start","tool_end","tool_result","tool_args","tool_confirm","agent_error","permission_request"]);function Cx(e,t,n,r,i,s){let a;typeof n=="function"?a={onChunk:n,onAgentEvent:()=>{},onDone:()=>{},onError:p=>{P.stream.error("Unhandled stream error",p)}}:a=n;const u=new AbortController,o=P.stream.time();let d=0,f=0,h=0;return P.stream.info(`Starting SSE stream for session=${e}`,{messageLength:t.length}),fetch(`${nl}/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 p=>{var g,T;if(P.stream.info(`SSE connection opened -> HTTP ${p.status}`),!p.ok){const k=await p.text().catch(()=>"");P.stream.error(`SSE connection failed: HTTP ${p.status}`,k),a.onError(new Error(`HTTP ${p.status}: ${k}`));return}const m=(g=p.body)==null?void 0:g.getReader();if(!m){P.stream.error("No response body reader available"),a.onError(new Error("No response body"));return}const E=new TextDecoder;let x="",w=!1;try{for(;;){const{done:k,value:L}=await m.read();if(k){P.stream.debug("SSE reader done (stream ended)");break}x+=E.decode(L,{stream:!0});const M=x.split(`
|
|
378
|
-
`);x=M.pop()||"";for(const S of M)if(S.startsWith("data: ")){const O=S.slice(6).trim();if(!O)continue;try{const R=JSON.parse(O);R.type==="chunk"?(d++,f+=(R.content||"").length,(d<=3||d%50===0)&&P.stream.debug(`Chunk #${d} (+${(R.content||"").length} chars)`),a.onChunk(R)):R.type==="answer"?a.onChunk(R):R.type==="done"?(w=!0,P.stream.timed(`Stream complete: ${d} chunks, ${f} chars, ${h} agent events`,o),a.onDone(R)):R.type==="error"?(P.stream.error("Stream error event:",R.content),a.onError(new Error(R.content||"Unknown error"))):R.type==="agent_created"?(P.stream.info(`Agent created: ${R.agent_id}`),(T=a.onAgentCreated)==null||T.call(a,R)):Sx.has(R.type)?(h++,P.stream.debug(`Agent event: ${R.type}`,R),a.onAgentEvent(R)):P.stream.warn(`Unknown SSE event type: ${R.type}`,R)}catch{P.stream.warn("Malformed SSE data, skipping",{raw:O.slice(0,100)})}}}}finally{m.releaseLock()}w||(P.stream.timed(`SSE connection closed without done event: ${d} chunks, ${h} agent events`,o),a.onDone({type:"done"}))}).catch(p=>{p.name==="AbortError"?P.stream.warn(`Stream aborted by user after ${d} chunks`):(P.stream.error("Stream fetch error",p),a.onError(p))}),u}async function Nx(e,t,n,r){return we("POST","/chat/confirm",{session_id:e,confirm_id:t,action:n,remember:r})}async function T1(e,t){return we("POST","/chat/confirm-tool",{session_id:e,approved:t})}async function ti(){return we("GET","/documents")}async function y1(e){return we("POST","/documents/upload-path",{filepath:e})}async function x1(e){const t=`${nl}/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(g1(i.status,u))}const s=await i.json();return P.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function Ax(e){return we("DELETE",`/documents/${e}`)}async function vx(e){return we("GET",`/documents/${e}/status`)}async function wx(e){return we("POST",`/documents/${e}/cancel`)}async function Au(e,t){return we("POST",`/sessions/${e}/documents`,{document_id:t})}async function Ix(e,t){return we("DELETE",`/sessions/${e}/documents/${t}`)}async function Lx(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return we("GET",`/files/browse${t}`)}async function Dx(e,t=!0){return we("POST","/documents/index-folder",{folder_path:e,recursive:t})}async function Cd(e,t=!0){return we("POST","/files/open",{path:e,reveal:t})}async function Th(e){const t=`${nl}/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 Rx(e,t,n){const r=new URLSearchParams({query:e});return t&&r.set("file_types",t),r.set("max_results",String(n)),we("GET",`/files/search?${r}`)}async function Ox(e,t){const n=new URLSearchParams({path:e});return we("GET",`/files/preview?${n}`)}async function Px(){return we("POST","/tunnel/start")}async function Mx(){return we("POST","/tunnel/stop")}async function b1(){return we("GET","/tunnel/status")}async function Fx(){return we("GET","/mcp/status")}const _1=""+new URL("gaia-robot-NKaQnEIp.png",import.meta.url).href;function yh({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(Nu,{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(Nu,{size:13})})]})}function jx({onNewTask:e,tunnelActive:t,tunnelLoading:n,onMobileToggle:r}){const{sessions:i,currentSessionId:s,setCurrentSession:a,removeSession:u,addSession:o,setMessages:d,theme:f,toggleTheme:h,setShowSettings:p,sidebarOpen:m,setSidebarOpen:E,setLoadingMessages:x,sidebarCollapsed:w,toggleSidebarCollapsed:g,sidebarWidth:T,setSidebarWidth:k,addPendingDelete:L,removePendingDelete:M}=_e(),[S,O]=_.useState(""),[R,Y]=_.useState(null),[v,z]=_.useState(null),[K,de]=_.useState(!1),[ue,oe]=_.useState(null),Ne=_.useRef(null),ne=_.useRef(null),I=_.useRef(null);_.useEffect(()=>{const se=()=>{var D;w?(g(),requestAnimationFrame(()=>{var W;return(W=ne.current)==null?void 0:W.focus()})):(D=ne.current)==null||D.focus()};return window.addEventListener("gaia:focus-search",se),()=>window.removeEventListener("gaia:focus-search",se)},[w,g]);const B=S?i.filter(se=>se.title.toLowerCase().includes(S.toLowerCase())):i,y=_.useMemo(()=>{if(S)return null;const se=new Date,D=new Date(se.getFullYear(),se.getMonth(),se.getDate()).getTime(),W=D-864e5,U=D-7*864e5,te=[{label:"Today",sessions:[]},{label:"Yesterday",sessions:[]},{label:"Previous 7 Days",sessions:[]},{label:"Older",sessions:[]}];for(const he of B){const Te=new Date(he.updated_at).getTime();Te>=D?te[0].sessions.push(he):Te>=W?te[1].sessions.push(he):Te>=U?te[2].sessions.push(he):te[3].sessions.push(he)}return te.filter(he=>he.sessions.length>0)},[B,S]),ee=_.useCallback(async se=>{var W;if(se===s)return;const D=((W=i.find(U=>U.id===se))==null?void 0:W.title)||"?";P.nav.info(`Selecting session: "${D}" (${se})`),a(se),d([]),x(!0),window.innerWidth<=768&&E(!1);try{const U=await us(se);if(!(_e.getState().currentSessionId===se)){P.nav.debug(`Discarding stale message load for session=${se} (user switched away)`);return}d(U.messages||[]),P.nav.info(`Loaded ${(U.messages||[]).length} message(s) for "${D}"`)}catch(U){P.nav.error(`Failed to load messages for session ${se}`,U),d([])}finally{x(!1)}},[s,i,a,d,E,x]),ce=_.useCallback(async(se,D)=>{se.stopPropagation(),se.preventDefault();const W=i.find(te=>te.id===D),U=(W==null?void 0:W.title)||"?";if(R===D){P.chat.info(`Deleting session: "${U}" (${D})`),Y(null),z(D),L(D),E1(D).then(()=>{P.chat.info(`Session deleted from backend: "${U}"`),M(D)}).catch(he=>{P.chat.warn(`Backend delete failed for "${U}"`,he),M(D)}),ue!=null&&ue.timer&&clearTimeout(ue.timer);const te=setTimeout(()=>{oe(null)},5e3);W&&oe({session:W,timer:te}),setTimeout(()=>{u(D),z(null)},250);return}P.chat.debug(`Delete pending confirmation for: "${U}" (${D})`),Y(D),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>Y(te=>te===D?null:te),3e3)},[R,i,u,ue,L,M]),N=_.useCallback(()=>{if(!ue)return;clearTimeout(ue.timer);const{session:se}=ue;P.chat.info(`Undo delete: re-creating "${se.title}"`),M(se.id),oc({title:se.title}).then(D=>{o(D),P.chat.info(`Undo delete: re-created "${D.title}" (new id=${D.id})`)}).catch(D=>{P.chat.warn(`Undo delete failed for "${se.title}"`,D)}),oe(null)},[ue,o,M]);_.useEffect(()=>{if(!R)return;const se=()=>Y(null);return window.addEventListener("click",se,{once:!0}),()=>window.removeEventListener("click",se)},[R]);const fe=_.useCallback((se,D)=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),ee(D))},[ee]),ye=_.useRef(null),ge=_.useCallback(se=>{se.preventDefault(),de(!0),P.ui.debug("Sidebar resize started");const D=se.clientX,W=T,U=he=>{const Te=he.clientX-D;k(W+Te)},te=()=>{de(!1),document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",te),document.body.style.cursor="",document.body.style.userSelect="",ye.current=null,P.ui.debug("Sidebar resize ended")};ye.current=te,document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",U),document.addEventListener("mouseup",te)},[T,k]);_.useEffect(()=>()=>{ye.current&&ye.current(),I.current&&clearTimeout(I.current)},[]);const Oe=se=>{const D=new Date(se),U=new Date().getTime()-D.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 Te=Math.floor(he/24);return Te<7?`${Te}d`:D.toLocaleDateString(void 0,{month:"short",day:"numeric"})},gt=typeof window<"u"&&window.innerWidth<=768?void 0:{width:w?56:T,minWidth:w?56:T};return l.jsxs("aside",{ref:Ne,className:`sidebar ${m?"open":""} ${w?"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:_1,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.5"]}),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(_d,{size:18})}),l.jsx("button",{className:"collapse-btn",onClick:g,title:w?"Expand sidebar":"Collapse sidebar","aria-label":w?"Expand sidebar":"Collapse sidebar",children:w?l.jsx(vy,{size:18}):l.jsx(Ay,{size:18})})]})]}),l.jsxs("div",{className:"sidebar-search",children:[l.jsx(Rr,{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"}),y?y.map(se=>l.jsxs("div",{children:[l.jsx("div",{className:"session-group-label",children:se.label}),se.sessions.map(D=>l.jsx(yh,{session:D,isActive:D.id===s,isPendingDelete:R===D.id,isDeleting:v===D.id,onSelect:ee,onKeyDown:fe,onDelete:ce,formatTime:Oe},D.id))]},se.label)):B.map(se=>l.jsx(yh,{session:se,isActive:se.id===s,isPendingDelete:R===se.id,isDeleting:v===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.5"]})]}),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(u1,{size:17})}),l.jsx("button",{className:"btn-icon",onClick:()=>p(!0),title:"Settings","aria-label":"Settings",children:l.jsx(Dy,{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(Py,{size:17}):l.jsx(Ny,{size:17})})]})]}),!w&&l.jsx("div",{className:"sidebar-resize-handle",onMouseDown:ge,title:"Drag to resize sidebar","aria-hidden":"true"}),ue&&l.jsxs("div",{className:"toast toast-undo",role:"status",children:["Deleted “",ue.session.title,"”",l.jsx("span",{className:"toast-action",onClick:N,children:"Undo"})]})]})}function xh(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 k1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Bx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ux=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hx={};function bh(e,t){return(Hx.jsx?Ux:Bx).test(e)}const zx=/[ \t\n\f\r]/g;function $x(e){return typeof e=="object"?e.type==="text"?_h(e.value):!1:_h(e)}function _h(e){return e.replace(zx,"")===""}class sa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}sa.prototype.normal={};sa.prototype.property={};sa.prototype.space=void 0;function S1(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new sa(n,r,t)}function Qs(e){return e.toLowerCase()}class Ht{constructor(t,n){this.attribute=n,this.property=t}}Ht.prototype.attribute="";Ht.prototype.booleanish=!1;Ht.prototype.boolean=!1;Ht.prototype.commaOrSpaceSeparated=!1;Ht.prototype.commaSeparated=!1;Ht.prototype.defined=!1;Ht.prototype.mustUseProperty=!1;Ht.prototype.number=!1;Ht.prototype.overloadedBoolean=!1;Ht.prototype.property="";Ht.prototype.spaceSeparated=!1;Ht.prototype.space=void 0;let Yx=0;const Ee=qr(),Ze=qr(),cc=qr(),G=qr(),je=qr(),_i=qr(),Wt=qr();function qr(){return 2**++Yx}const dc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:Ze,commaOrSpaceSeparated:Wt,commaSeparated:_i,number:G,overloadedBoolean:cc,spaceSeparated:je},Symbol.toStringTag,{value:"Module"})),Gl=Object.keys(dc);class Nd extends Ht{constructor(t,n,r,i){let s=-1;if(super(t,n),kh(this,"space",i),typeof r=="number")for(;++s<Gl.length;){const a=Gl[s];kh(this,Gl[s],(r&dc[a])===dc[a])}}}Nd.prototype.defined=!0;function kh(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 Nd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Qs(r)]=r,n[Qs(s.attribute)]=r}return new sa(t,n,e.space)}const C1=Fi({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:je,ariaCurrent:null,ariaDescribedBy:je,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:je,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:je,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:je,ariaLevel:G,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:je,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:je,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Ze,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function N1(e,t){return t in e?e[t]:t}function A1(e,t){return N1(e,t.toLowerCase())}const Vx=Fi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_i,acceptCharset:je,accessKey:je,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:je,autoFocus:Ee,autoPlay:Ee,blocking:je,capture:null,charSet:null,checked:Ee,cite:null,className:je,cols:G,colSpan:null,content:null,contentEditable:Ze,controls:Ee,controlsList:je,coords:G|_i,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:cc,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:je,height:G,hidden:cc,high:G,href:null,hrefLang:null,htmlFor:je,httpEquiv:je,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:je,itemRef:je,itemScope:Ee,itemType:je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,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:G,pattern:null,ping:je,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:je,required:Ee,reversed:Ee,rows:G,rowSpan:G,sandbox:je,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:Ze,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:je,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,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:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Ze,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:A1}),Wx=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:Wt,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:je,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:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:_i,g2:_i,glyphName:_i,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:Wt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,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:G,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:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wt,rev:Wt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wt,requiredFeatures:Wt,requiredFonts:Wt,requiredFormats:Wt,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:Wt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wt,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:N1}),v1=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()}}),w1=Fi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:A1}),I1=Fi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qx={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"},Qx=/[A-Z]/g,Sh=/-[a-z]/g,Gx=/^data[-\w.:]+$/i;function rl(e,t){const n=Qs(t);let r=t,i=Ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Gx.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Sh,Xx);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Sh.test(s)){let a=s.replace(Qx,Kx);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Nd}return new i(r,t)}function Kx(e){return"-"+e.toLowerCase()}function Xx(e){return e.charAt(1).toUpperCase()}const aa=S1([C1,Vx,v1,w1,I1],"html"),_r=S1([C1,Wx,v1,w1,I1],"svg");function Ch(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function L1(e){return e.join(" ").trim()}var Ad={},Nh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Jx=/\n/g,Zx=/^\s*/,eb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,tb=/^:\s*/,nb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,rb=/^[;\s]*/,ib=/^\s+|\s+$/g,sb=`
|
|
379
|
-
`,Ah="/",vh="*",wr="",ab="comment",ub="declaration";function lb(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(E){var x=E.match(Jx);x&&(n+=x.length);var w=E.lastIndexOf(sb);r=~w?E.length-w:r+E.length}function s(){var E={line:n,column:r};return function(x){return x.position=new a(E),d(),x}}function a(E){this.start=E,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(E){var x=new Error(t.source+":"+n+":"+r+": "+E);if(x.reason=E,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function o(E){var x=E.exec(e);if(x){var w=x[0];return i(w),e=e.slice(w.length),x}}function d(){o(Zx)}function f(E){var x;for(E=E||[];x=h();)x!==!1&&E.push(x);return E}function h(){var E=s();if(!(Ah!=e.charAt(0)||vh!=e.charAt(1))){for(var x=2;wr!=e.charAt(x)&&(vh!=e.charAt(x)||Ah!=e.charAt(x+1));)++x;if(x+=2,wr===e.charAt(x-1))return u("End of comment missing");var w=e.slice(2,x-2);return r+=2,i(w),e=e.slice(x),r+=2,E({type:ab,comment:w})}}function p(){var E=s(),x=o(eb);if(x){if(h(),!o(tb))return u("property missing ':'");var w=o(nb),g=E({type:ub,property:wh(x[0].replace(Nh,wr)),value:w?wh(w[0].replace(Nh,wr)):wr});return o(rb),g}}function m(){var E=[];f(E);for(var x;x=p();)x!==!1&&(E.push(x),f(E));return E}return d(),m()}function wh(e){return e?e.replace(ib,wr):wr}var ob=lb,cb=eu&&eu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ad,"__esModule",{value:!0});Ad.default=fb;const db=cb(ob);function fb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,db.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 il={};Object.defineProperty(il,"__esModule",{value:!0});il.camelCase=void 0;var hb=/^--[a-zA-Z0-9_-]+$/,mb=/-([a-z])/g,pb=/^[^-]+$/,gb=/^-(webkit|moz|ms|o|khtml)-/,Eb=/^-(ms)-/,Tb=function(e){return!e||pb.test(e)||hb.test(e)},yb=function(e,t){return t.toUpperCase()},Ih=function(e,t){return"".concat(t,"-")},xb=function(e,t){return t===void 0&&(t={}),Tb(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Eb,Ih):e=e.replace(gb,Ih),e.replace(mb,yb))};il.camelCase=xb;var bb=eu&&eu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_b=bb(Ad),kb=il;function fc(e,t){var n={};return!e||typeof e!="string"||(0,_b.default)(e,function(r,i){r&&i&&(n[(0,kb.camelCase)(r,t)]=i)}),n}fc.default=fc;var Sb=fc;const Cb=Fu(Sb),sl=D1("end"),Rn=D1("start");function D1(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 Nb(e){const t=Rn(e),n=sl(e);if(t&&n)return{start:t,end:n}}function Ts(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lh(e.position):"start"in e||"end"in e?Lh(e):"line"in e||"column"in e?hc(e):""}function hc(e){return Dh(e&&e.line)+":"+Dh(e&&e.column)}function Lh(e){return hc(e&&e.start)+"-"+hc(e&&e.end)}function Dh(e){return e&&typeof e=="number"?e:1}class Ct 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=Ts(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}}Ct.prototype.file="";Ct.prototype.name="";Ct.prototype.reason="";Ct.prototype.message="";Ct.prototype.stack="";Ct.prototype.column=void 0;Ct.prototype.line=void 0;Ct.prototype.ancestors=void 0;Ct.prototype.cause=void 0;Ct.prototype.fatal=void 0;Ct.prototype.place=void 0;Ct.prototype.ruleId=void 0;Ct.prototype.source=void 0;const vd={}.hasOwnProperty,Ab=new Map,vb=/[A-Z]/g,wb=new Set(["table","tbody","thead","tfoot","tr"]),Ib=new Set(["td","th"]),R1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Lb(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=Bb(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=jb(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:aa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=O1(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function O1(e,t,n){if(t.type==="element")return Db(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Rb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Pb(e,t,n);if(t.type==="mdxjsEsm")return Ob(e,t);if(t.type==="root")return Mb(e,t,n);if(t.type==="text")return Fb(e,t)}function Db(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=M1(e,t.tagName,!1),a=Ub(e,t);let u=Id(e,t);return wb.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!$x(o):!0})),P1(e,a,s,t),wd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Rb(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)}Gs(e,t.position)}function Ob(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Gs(e,t.position)}function Pb(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:M1(e,t.name,!0),a=Hb(e,t),u=Id(e,t);return P1(e,a,s,t),wd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Mb(e,t,n){const r={};return wd(r,Id(e,t)),e.create(t,e.Fragment,r,n)}function Fb(e,t){return t.value}function P1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jb(e,t,n){return r;function r(i,s,a,u){const d=Array.isArray(a.children)?n:t;return u?d(s,a,u):d(s,a)}}function Bb(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 Ub(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&vd.call(t.properties,i)){const s=zb(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Ib.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 Hb(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 Gs(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 Gs(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Id(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ab;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 d=i.get(o)||0;a=o+"-"+d,i.set(o,d+1)}}const u=O1(e,s,a);u!==void 0&&n.push(u)}return n}function zb(e,t,n){const r=rl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?k1(n):L1(n)),r.property==="style"){let i=typeof n=="object"?n:$b(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Yb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?qx[r.property]||r.property:r.attribute,n]}}function $b(e,t){try{return Cb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ct("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=R1+"#cannot-parse-style-attribute",i}}function M1(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=bh(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=bh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return vd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Gs(e)}function Gs(e,t){const n=new Ct("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=R1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Yb(e){const t={};let n;for(n in e)vd.call(e,n)&&(t[Vb(n)]=e[n]);return t}function Vb(e){let t=e.replace(vb,Wb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Wb(e){return"-"+e.toLowerCase()}const Kl={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"]},qb={};function Ld(e,t){const n=qb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return F1(e,r,i)}function F1(e,t,n){if(Qb(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 Rh(e.children,t,n)}return Array.isArray(e)?Rh(e,t,n):""}function Rh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=F1(e[i],t,n);return r.join("")}function Qb(e){return!!(e&&typeof e=="object")}const Oh=document.createElement("i");function Dd(e){const t="&"+e+";";Oh.innerHTML=t;const n=Oh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Kt(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 nn(e,t){return e.length>0?(Kt(e,e.length,0,t),e):t}const Ph={}.hasOwnProperty;function j1(e){const t={};let n=-1;for(;++n<e.length;)Gb(t,e[n]);return t}function Gb(e,t){let n;for(n in t){const i=(Ph.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Ph.call(i,a)||(i[a]=[]);const u=s[a];Kb(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Kb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Kt(e,0,0,r)}function B1(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 vt=kr(/[A-Za-z]/),kt=kr(/[\dA-Za-z]/),Xb=kr(/[#-'*+\--9=?A-Z^-~]/);function vu(e){return e!==null&&(e<32||e===127)}const mc=kr(/\d/),Jb=kr(/[\dA-Fa-f]/),Zb=kr(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function Se(e){return e===-2||e===-1||e===32}const al=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 ji(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&kt(e.charCodeAt(n+1))&&kt(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 Se(o)?(e.enter(n),u(o)):t(o)}function u(o){return Se(o)&&s++<i?(e.consume(o),u):(e.exit(n),t(o))}}const e_={tokenize:t_};function t_(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 n_={tokenize:r_},Mh={tokenize:i_};function r_(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,d)(k)}return d(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}g(r);let O=L;for(;O<t.events.length;)t.events[O][1].end={...S},O++;return Kt(t.events,M+1,0,t.events.slice(L)),t.events.length=O,d(k)}return u(k)}function d(k){if(r===n.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return E(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mh,f,h)(k)}function f(k){return i&&T(),g(r),p(k)}function h(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,E(k)}function p(k){return t.containerState={},e.attempt(Mh,m,E)(k)}function m(k){return r++,n.push([t.currentConstruct,t.containerState]),p(k)}function E(k){if(k===null){i&&T(),g(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){w(e.exit("chunkFlow"),!0),g(0),e.consume(k);return}return me(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),x)}function w(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 R=O,Y,v;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(Y){v=t.events[R][1].end;break}Y=!0}for(g(r),S=O;S<t.events.length;)t.events[S][1].end={...v},S++;Kt(t.events,R+1,0,t.events.slice(O)),t.events.length=S}}function g(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 i_(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 Li(e){if(e===null||Me(e)||Yr(e))return 1;if(al(e))return 2}function ul(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 pc={name:"attention",resolveAll:s_,tokenize:a_};function s_(e,t){let n=-1,r,i,s,a,u,o,d,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},p={...e[n][1].start};Fh(h,-o),Fh(p,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:p},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},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=nn(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=nn(d,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),d=nn(d,ul(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=nn(d,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,d=nn(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Kt(e,r-1,n-r+3,d),n=r+d.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function a_(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Li(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 d=e.exit("attentionSequence"),f=Li(o),h=!f||f===2&&i||n.includes(o),p=!i||i===2&&f||n.includes(r);return d._open=!!(s===42?h:h&&(i||!p)),d._close=!!(s===42?p:p&&(f||!h)),t(o)}}function Fh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const u_={name:"autolink",tokenize:l_};function l_(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return vt(m)?(e.consume(m),a):m===64?n(m):d(m)}function a(m){return m===43||m===45||m===46||kt(m)?(r=1,u(m)):d(m)}function u(m){return m===58?(e.consume(m),r=0,o):(m===43||m===45||m===46||kt(m))&&r++<32?(e.consume(m),u):(r=0,d(m))}function o(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||vu(m)?n(m):(e.consume(m),o)}function d(m){return m===64?(e.consume(m),f):Xb(m)?(e.consume(m),d):n(m)}function f(m){return kt(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,f):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||kt(m))&&r++<63){const E=m===45?p:h;return e.consume(m),E}return n(m)}}const ua={partial:!0,tokenize:o_};function o_(e,t,n){return r;function r(s){return Se(s)?Ae(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||me(s)?t(s):n(s)}}const U1={continuation:{tokenize:d_},exit:f_,name:"blockQuote",tokenize:c_};function c_(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 Se(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function d_(e,t,n){const r=this;return i;function i(a){return Se(a)?Ae(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(U1,t,n)(a)}}function f_(e){e.exit("blockQuote")}const H1={name:"characterEscape",tokenize:h_};function h_(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 Zb(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const z1={name:"characterReference",tokenize:m_};function m_(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"),d):(e.enter("characterReferenceValue"),s=31,a=kt,f(h))}function d(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Jb,f):(e.enter("characterReferenceValue"),s=7,a=mc,f(h))}function f(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return a===kt&&!Dd(r.sliceSerialize(p))?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 jh={partial:!0,tokenize:g_},Bh={concrete:!0,name:"codeFenced",tokenize:p_};function p_(e,t,n){const r=this,i={partial:!0,tokenize:M};let s=0,a=0,u;return o;function o(S){return d(S)}function d(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"),Se(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(jh,x,L)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||me(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):Se(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,m,"whitespace")(S)):S===96&&S===u?n(S):(e.consume(S),p)}function m(S){return S===null||me(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(S))}function E(S){return S===null||me(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===u?n(S):(e.consume(S),E)}function x(S){return e.attempt(i,L,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return s>0&&Se(S)?Ae(e,T,"linePrefix",s+1)(S):T(S)}function T(S){return S===null||me(S)?e.check(jh,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,R){let Y=0;return v;function v(oe){return S.enter("lineEnding"),S.consume(oe),S.exit("lineEnding"),z}function z(oe){return S.enter("codeFencedFence"),Se(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)):R(oe)}function de(oe){return oe===u?(Y++,S.consume(oe),de):Y>=a?(S.exit("codeFencedFenceSequence"),Se(oe)?Ae(S,ue,"whitespace")(oe):ue(oe)):R(oe)}function ue(oe){return oe===null||me(oe)?(S.exit("codeFencedFence"),O(oe)):R(oe)}}}function g_(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 Xl={name:"codeIndented",tokenize:T_},E_={partial:!0,tokenize:y_};function T_(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),Ae(e,s,"linePrefix",5)(d)}function s(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(d):n(d)}function a(d){return d===null?o(d):me(d)?e.attempt(E_,a,o)(d):(e.enter("codeFlowValue"),u(d))}function u(d){return d===null||me(d)?(e.exit("codeFlowValue"),a(d)):(e.consume(d),u)}function o(d){return e.exit("codeIndented"),t(d)}}function y_(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 x_={name:"codeText",previous:__,resolve:b_,tokenize:k_};function b_(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 __(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function k_(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"),d(h))}function d(h){return h===null||h===32||h===96||me(h)?(e.exit("codeTextData"),o(h)):(e.consume(h),d)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",d(h))}}class S_{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&&Zi(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),Zi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zi(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);Zi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zi(this.left,n.reverse())}}}function Zi(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 $1(e){const t={};let n=-1,r,i,s,a,u,o,d;const f=new S_(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,C_(f,n)),n=t[n],d=!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 Kt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!d}function C_(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=[],d={};let f,h,p=-1,m=n,E=0,x=0;const w=[x];for(;m;){for(;e.get(++i)[1]!==m;);s.push(i),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(null),h&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(x=p+1,w.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):w.pop(),p=w.length;p--;){const g=u.slice(w[p],w[p+1]),T=s.pop();o.push([T,T+g.length-1]),e.splice(T,2,g)}for(o.reverse(),p=-1;++p<o.length;)d[E+o[p][0]]=E+o[p][1],E+=o[p][1]-o[p][0]-1;return d}const N_={resolve:v_,tokenize:w_},A_={partial:!0,tokenize:I_};function v_(e){return $1(e),e}function w_(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(A_,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 I_(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 Y1(e,t,n,r,i,s,a,u,o){const d=o||Number.POSITIVE_INFINITY;let f=0;return h;function h(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),p):g===null||g===32||g===41||vu(g)?n(g):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(g))}function p(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===62?(e.exit("chunkString"),e.exit(u),p(g)):g===null||g===60||me(g)?n(g):(e.consume(g),g===92?E:m)}function E(g){return g===60||g===62||g===92?(e.consume(g),m):m(g)}function x(g){return!f&&(g===null||g===41||Me(g))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(g)):f<d&&g===40?(e.consume(g),f++,x):g===41?(e.consume(g),f--,x):g===null||g===32||g===40||vu(g)?n(g):(e.consume(g),g===92?w:x)}function w(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function V1(e,t,n,r,i,s){const a=this;let u=0,o;return d;function d(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(s),f}function f(m){return u>999||m===null||m===91||m===93&&!o||m===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(s),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||me(m)||u++>999?(e.exit("chunkString"),f(m)):(e.consume(m),o||(o=!Se(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),u++,h):h(m)}}function W1(e,t,n,r,i,s){let a;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,o):n(p)}function o(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),d(p))}function d(p){return p===a?(e.exit(s),o(a)):p===null?n(p):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ae(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===a||p===null||me(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?h:f)}function h(p){return p===a||p===92?(e.consume(p),f):f(p)}}function ys(e,t){let n;return r;function r(i){return me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Se(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const L_={name:"definition",tokenize:R_},D_={partial:!0,tokenize:O_};function R_(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return V1.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o):n(m)}function o(m){return Me(m)?ys(e,d)(m):d(m)}function d(m){return Y1(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(D_,h,h)(m)}function h(m){return Se(m)?Ae(e,p,"whitespace")(m):p(m)}function p(m){return m===null||me(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function O_(e,t,n){return r;function r(u){return Me(u)?ys(e,i)(u):n(u)}function i(u){return W1(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return Se(u)?Ae(e,a,"whitespace")(u):a(u)}function a(u){return u===null||me(u)?t(u):n(u)}}const P_={name:"hardBreakEscape",tokenize:M_};function M_(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 F_={name:"headingAtx",resolve:j_,tokenize:B_};function j_(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"},Kt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function B_(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)):Se(f)?Ae(e,u,"whitespace")(f):(e.enter("atxHeadingText"),d(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),u(f))}function d(f){return f===null||f===35||Me(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),d)}}const U_=["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"],Uh=["pre","script","style","textarea"],H_={concrete:!0,name:"htmlFlow",resolveTo:Y_,tokenize:V_},z_={partial:!0,tokenize:q_},$_={partial:!0,tokenize:W_};function Y_(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 V_(e,t,n){const r=this;let i,s,a,u,o;return d;function d(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),p):N===47?(e.consume(N),s=!0,x):N===63?(e.consume(N),i=3,r.interrupt?t:y):vt(N)?(e.consume(N),a=String.fromCharCode(N),w):n(N)}function p(N){return N===45?(e.consume(N),i=2,m):N===91?(e.consume(N),i=5,u=0,E):vt(N)?(e.consume(N),i=4,r.interrupt?t:y):n(N)}function m(N){return N===45?(e.consume(N),r.interrupt?t:y):n(N)}function E(N){const fe="CDATA[";return N===fe.charCodeAt(u++)?(e.consume(N),u===fe.length?r.interrupt?t:K:E):n(N)}function x(N){return vt(N)?(e.consume(N),a=String.fromCharCode(N),w):n(N)}function w(N){if(N===null||N===47||N===62||Me(N)){const fe=N===47,ye=a.toLowerCase();return!fe&&!s&&Uh.includes(ye)?(i=1,r.interrupt?t(N):K(N)):U_.includes(a.toLowerCase())?(i=6,fe?(e.consume(N),g):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||kt(N)?(e.consume(N),a+=String.fromCharCode(N),w):n(N)}function g(N){return N===62?(e.consume(N),r.interrupt?t:K):n(N)}function T(N){return Se(N)?(e.consume(N),T):v(N)}function k(N){return N===47?(e.consume(N),v):N===58||N===95||vt(N)?(e.consume(N),L):Se(N)?(e.consume(N),k):v(N)}function L(N){return N===45||N===46||N===58||N===95||kt(N)?(e.consume(N),L):M(N)}function M(N){return N===61?(e.consume(N),S):Se(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):Se(N)?(e.consume(N),S):R(N)}function O(N){return N===o?(e.consume(N),o=null,Y):N===null||me(N)?n(N):(e.consume(N),O)}function R(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),R)}function Y(N){return N===47||N===62||Se(N)?k(N):n(N)}function v(N){return N===62?(e.consume(N),z):n(N)}function z(N){return N===null||me(N)?K(N):Se(N)?(e.consume(N),z):n(N)}function K(N){return N===45&&i===2?(e.consume(N),Ne):N===60&&i===1?(e.consume(N),ne):N===62&&i===4?(e.consume(N),ee):N===63&&i===3?(e.consume(N),y):N===93&&i===5?(e.consume(N),B):me(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(z_,ce,de)(N)):N===null||me(N)?(e.exit("htmlFlowData"),de(N)):(e.consume(N),K)}function de(N){return e.check($_,ue,ce)(N)}function ue(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 Ne(N){return N===45?(e.consume(N),y):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 Uh.includes(fe)?(e.consume(N),ee):K(N)}return vt(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),I):K(N)}function B(N){return N===93?(e.consume(N),y):K(N)}function y(N){return N===62?(e.consume(N),ee):N===45&&i===2?(e.consume(N),y):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 W_(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 q_(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ua,t,n)}}const Q_={name:"htmlText",tokenize:G_};function G_(e,t,n){const r=this;let i,s,a;return u;function u(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),o}function o(y){return y===33?(e.consume(y),d):y===47?(e.consume(y),M):y===63?(e.consume(y),k):vt(y)?(e.consume(y),R):n(y)}function d(y){return y===45?(e.consume(y),f):y===91?(e.consume(y),s=0,E):vt(y)?(e.consume(y),T):n(y)}function f(y){return y===45?(e.consume(y),m):n(y)}function h(y){return y===null?n(y):y===45?(e.consume(y),p):me(y)?(a=h,ne(y)):(e.consume(y),h)}function p(y){return y===45?(e.consume(y),m):h(y)}function m(y){return y===62?Ne(y):y===45?p(y):h(y)}function E(y){const ee="CDATA[";return y===ee.charCodeAt(s++)?(e.consume(y),s===ee.length?x:E):n(y)}function x(y){return y===null?n(y):y===93?(e.consume(y),w):me(y)?(a=x,ne(y)):(e.consume(y),x)}function w(y){return y===93?(e.consume(y),g):x(y)}function g(y){return y===62?Ne(y):y===93?(e.consume(y),g):x(y)}function T(y){return y===null||y===62?Ne(y):me(y)?(a=T,ne(y)):(e.consume(y),T)}function k(y){return y===null?n(y):y===63?(e.consume(y),L):me(y)?(a=k,ne(y)):(e.consume(y),k)}function L(y){return y===62?Ne(y):k(y)}function M(y){return vt(y)?(e.consume(y),S):n(y)}function S(y){return y===45||kt(y)?(e.consume(y),S):O(y)}function O(y){return me(y)?(a=O,ne(y)):Se(y)?(e.consume(y),O):Ne(y)}function R(y){return y===45||kt(y)?(e.consume(y),R):y===47||y===62||Me(y)?Y(y):n(y)}function Y(y){return y===47?(e.consume(y),Ne):y===58||y===95||vt(y)?(e.consume(y),v):me(y)?(a=Y,ne(y)):Se(y)?(e.consume(y),Y):Ne(y)}function v(y){return y===45||y===46||y===58||y===95||kt(y)?(e.consume(y),v):z(y)}function z(y){return y===61?(e.consume(y),K):me(y)?(a=z,ne(y)):Se(y)?(e.consume(y),z):Y(y)}function K(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,de):me(y)?(a=K,ne(y)):Se(y)?(e.consume(y),K):(e.consume(y),ue)}function de(y){return y===i?(e.consume(y),i=void 0,oe):y===null?n(y):me(y)?(a=de,ne(y)):(e.consume(y),de)}function ue(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Me(y)?Y(y):(e.consume(y),ue)}function oe(y){return y===47||y===62||Me(y)?Y(y):n(y)}function Ne(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function ne(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),I}function I(y){return Se(y)?Ae(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):B(y)}function B(y){return e.enter("htmlTextData"),a(y)}}const Rd={name:"labelEnd",resolveAll:Z_,resolveTo:ek,tokenize:tk},K_={tokenize:nk},X_={tokenize:rk},J_={tokenize:ik};function Z_(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&&Kt(e,0,e.length,n),e}function ek(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}},d={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",d,t]],u=nn(u,e.slice(s+1,s+r+3)),u=nn(u,[["enter",f,t]]),u=nn(u,ul(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=nn(u,[["exit",f,t],e[a-2],e[a-1],["exit",d,t]]),u=nn(u,e.slice(a+1)),u=nn(u,[["exit",o,t]]),Kt(e,s,e.length,u),e}function tk(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(p){return s?s._inactive?h(p):(a=r.parser.defined.includes(yn(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(K_,f,a?f:h)(p):p===91?e.attempt(X_,f,a?d:h)(p):a?f(p):h(p)}function d(p){return e.attempt(J_,f,h)(p)}function f(p){return t(p)}function h(p){return s._balanced=!0,n(p)}}function nk(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)?ys(e,s)(h):s(h)}function s(h){return h===41?f(h):Y1(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Me(h)?ys(e,o)(h):f(h)}function u(h){return n(h)}function o(h){return h===34||h===39||h===40?W1(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function d(h){return Me(h)?ys(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 rk(e,t,n){const r=this;return i;function i(u){return V1.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 ik(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 sk={name:"labelStartImage",resolveAll:Rd.resolveAll,tokenize:ak};function ak(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 uk={name:"labelStartLink",resolveAll:Rd.resolveAll,tokenize:lk};function lk(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 Jl={name:"lineEnding",tokenize:ok};function ok(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Ka={name:"thematicBreak",tokenize:ck};function ck(e,t,n){let r=0,i;return s;function s(d){return e.enter("thematicBreak"),a(d)}function a(d){return i=d,u(d)}function u(d){return d===i?(e.enter("thematicBreakSequence"),o(d)):r>=3&&(d===null||me(d))?(e.exit("thematicBreak"),t(d)):n(d)}function o(d){return d===i?(e.consume(d),r++,o):(e.exit("thematicBreakSequence"),Se(d)?Ae(e,u,"whitespace")(d):u(d))}}const Pt={continuation:{tokenize:mk},exit:gk,name:"list",tokenize:hk},dk={partial:!0,tokenize:Ek},fk={partial:!0,tokenize:pk};function hk(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(m){const E=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:mc(m)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Ka,n,d)(m):d(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(m)}return n(m)}function o(m){return mc(m)&&++a<10?(e.consume(m),o):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),d(m)):n(m)}function d(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ua,r.interrupt?n:f,e.attempt(dk,p,h))}function f(m){return r.containerState.initialBlankLine=!0,s++,p(m)}function h(m){return Se(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function mk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ua,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||!Se(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(fk,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(Pt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function pk(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 gk(e){e.exit(this.containerState.type)}function Ek(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!Se(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Hh={name:"setextUnderline",resolveTo:Tk,tokenize:yk};function Tk(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 yk(e,t,n){const r=this;let i;return s;function s(d){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=d,a(d)):n(d)}function a(d){return e.enter("setextHeadingLineSequence"),u(d)}function u(d){return d===i?(e.consume(d),u):(e.exit("setextHeadingLineSequence"),Se(d)?Ae(e,o,"lineSuffix")(d):o(d))}function o(d){return d===null||me(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const xk={tokenize:bk};function bk(e){const t=this,n=e.attempt(ua,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(N_,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 _k={resolveAll:Q1()},kk=q1("string"),Sk=q1("text");function q1(e){return{resolveAll:Q1(e==="text"?Ck: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 d(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 d(f)?(n.exit("data"),s(f)):(n.consume(f),o)}function d(f){if(f===null)return!0;const h=i[f];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function Q1(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 Ck(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 d=i[s];if(typeof d=="string"){for(a=d.length;d.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(d===-2)o=!0,u++;else if(d!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const d={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={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Nk={42:Pt,43:Pt,45:Pt,48:Pt,49:Pt,50:Pt,51:Pt,52:Pt,53:Pt,54:Pt,55:Pt,56:Pt,57:Pt,62:U1},Ak={91:L_},vk={[-2]:Xl,[-1]:Xl,32:Xl},wk={35:F_,42:Ka,45:[Hh,Ka],60:H_,61:Hh,95:Ka,96:Bh,126:Bh},Ik={38:z1,92:H1},Lk={[-5]:Jl,[-4]:Jl,[-3]:Jl,33:sk,38:z1,42:pc,60:[u_,Q_],91:uk,92:[P_,H1],93:Rd,95:pc,96:x_},Dk={null:[pc,_k]},Rk={null:[42,95]},Ok={null:[]},Pk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Rk,contentInitial:Ak,disable:Ok,document:Nk,flow:wk,flowInitial:vk,insideSpan:Dk,string:Ik,text:Lk},Symbol.toStringTag,{value:"Module"}));function Mk(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})},d={code:null,containerState:{},defineSkip:x,events:[],now:E,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let f=t.tokenize.call(d,o);return t.resolveAll&&s.push(t),d;function h(z){return a=nn(a,z),w(),a[a.length-1]!==null?[]:(R(t,0),d.events=ul(s,d.events,d),d.events)}function p(z,K){return jk(m(z),K)}function m(z){return Fk(a,z)}function E(){const{_bufferIndex:z,_index:K,line:de,column:ue,offset:oe}=r;return{_bufferIndex:z,_index:K,line:de,column:ue,offset:oe}}function x(z){i[z.line]=z.column,v()}function w(){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;)g(K.charCodeAt(r._bufferIndex));else g(K)}}function g(z){f=f(z)}function T(z){me(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,v()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=z}function k(z,K){const de=K||{};return de.type=z,de.start=E(),d.events.push(["enter",de,d]),u.push(de),de}function L(z){const K=u.pop();return K.end=E(),d.events.push(["exit",K,d]),K}function M(z,K){R(z,K.from)}function S(z,K){K.restore()}function O(z,K){return de;function de(ue,oe,Ne){let ne,I,B,y;return Array.isArray(ue)?ce(ue):"tokenize"in ue?ce([ue]):ee(ue);function ee(ge){return Oe;function Oe(rt){const gt=rt!==null&&ge[rt],se=rt!==null&&ge.null,D=[...Array.isArray(gt)?gt:gt?[gt]:[],...Array.isArray(se)?se:se?[se]:[]];return ce(D)(rt)}}function ce(ge){return ne=ge,I=0,ge.length===0?Ne:N(ge[I])}function N(ge){return Oe;function Oe(rt){return y=Y(),B=ge,ge.partial||(d.currentConstruct=ge),ge.name&&d.parser.constructs.disable.null.includes(ge.name)?ye():ge.tokenize.call(K?Object.assign(Object.create(d),K):d,o,fe,ye)(rt)}}function fe(ge){return z(B,y),oe}function ye(ge){return y.restore(),++I<ne.length?N(ne[I]):Ne}}}function R(z,K){z.resolveAll&&!s.includes(z)&&s.push(z),z.resolve&&Kt(d.events,K,d.events.length-K,z.resolve(d.events.slice(K),d)),z.resolveTo&&(d.events=z.resolveTo(d.events,d))}function Y(){const z=E(),K=d.previous,de=d.currentConstruct,ue=d.events.length,oe=Array.from(u);return{from:ue,restore:Ne};function Ne(){r=z,d.previous=K,d.currentConstruct=de,d.events.length=ue,u=oe,v()}}function v(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Fk(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 jk(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=`
|
|
380
|
-
`;break}case-3:{a=`\r
|
|
381
|
-
`;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 Bk(e){const r={constructs:j1([Pk,...(e||{}).extensions||[]]),content:i(e_),defined:[],document:i(n_),flow:i(xk),lazy:{},string:i(kk),text:i(Sk)};return r;function i(s){return a;function a(u){return Mk(r,s,u)}}}function Uk(e){for(;!$1(e););return e}const zh=/[\0\t\n\r]/g;function Hk(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const o=[];let d,f,h,p,m;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(zh.lastIndex=h,d=zh.exec(s),p=d&&d.index!==void 0?d.index:s.length,m=s.charCodeAt(p),!d){t=s.slice(h);break}if(m===10&&h===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),h<p&&(o.push(s.slice(h,p)),e+=p-h),m){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=p+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const zk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $k(e){return e.replace(zk,Yk)}function Yk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return B1(n.slice(s?2:1),s?16:10)}return Dd(n)||e}const G1={}.hasOwnProperty;function Vk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Wk(n)(Uk(Bk(n).document().write(Hk()(e,t,!0))))}function Wk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(zt),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(he),blockQuote:s(se),characterEscape:Y,characterReference:Y,codeFenced:s(D),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(D,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(Te),hardBreakTrailing:s(Te),htmlFlow:s($e,a),htmlFlowData:Y,htmlText:s($e,a),htmlTextData:Y,image:s(Et),label:a,link:s(zt),listItem:s(Sr),listItemValue:p,listOrdered:s(cn,h),listUnordered:s(cn),paragraph:s(gl),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(he),strong:s(El),thematicBreak:s(Cr)},exit:{atxHeading:o(),atxHeadingSequence:M,autolink:o(),autolinkEmail:gt,autolinkProtocol:rt,blockQuote:o(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:ge,characterReference:Oe,codeFenced:o(w),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:E,codeFlowValue:v,codeIndented:o(g),codeText:o(oe),codeTextData:v,data:v,definition:o(),definitionDestinationString:L,definitionLabelString:T,definitionTitleString:k,emphasis:o(),hardBreakEscape:o(K),hardBreakTrailing:o(K),htmlFlow:o(de),htmlFlowData:v,htmlText:o(ue),htmlTextData:v,image:o(ne),label:B,labelText:I,lineEnding:z,link:o(Ne),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:fe,resourceDestinationString:y,resourceTitleString:ee,resource:ce,setextHeading:o(R),setextHeadingLineSequence:O,setextHeadingText:S,strong:o(),thematicBreak:o()}};K1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let X={type:"root",children:[]};const pe={stack:[X],tokenStack:[],config:t,enter:u,exit:d,buffer:a,resume:f,data:n},xe=[];let Ie=-1;for(;++Ie<$.length;)if($[Ie][1].type==="listOrdered"||$[Ie][1].type==="listUnordered")if($[Ie][0]==="enter")xe.push(Ie);else{const Dt=xe.pop();Ie=i($,Dt,Ie)}for(Ie=-1;++Ie<$.length;){const Dt=t[$[Ie][0]];G1.call(Dt,$[Ie][1].type)&&Dt[$[Ie][1].type].call(Object.assign({sliceSerialize:$[Ie][2].sliceSerialize},pe),$[Ie][1])}if(pe.tokenStack.length>0){const Dt=pe.tokenStack[pe.tokenStack.length-1];(Dt[1]||$h).call(pe,void 0,Dt[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 xe=X-1,Ie=-1,Dt=!1,ot,ct,_n,kn;for(;++xe<=pe;){const Tt=$[xe];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=xe),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=xe;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",Dt=!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||xe,0,["exit",ot,Tt[2]]),xe++,pe++}if(Tt[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};ot=yt,$.splice(xe,0,["enter",yt,Tt[2]]),xe++,pe++,_n=void 0,kn=!0}}}return $[X][1]._spread=Dt,pe}function s($,X){return pe;function pe(xe){u.call(this,$(xe),xe),X&&X.call(this,xe)}}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),d.call(this,pe)}}function d($,X){const pe=this.stack.pop(),xe=this.tokenStack.pop();if(xe)xe[0].type!==$.type&&(X?X.call(this,$,xe[0]):(xe[1]||$h).call(this,$,xe[0]));else throw new Error("Cannot close `"+$.type+"` ("+Ts({start:$.start,end:$.end})+"): it’s not open");pe.position.end=Xn($.end)}function f(){return Ld(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p($){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 m(){const $=this.resume(),X=this.stack[this.stack.length-1];X.lang=$}function E(){const $=this.resume(),X=this.stack[this.stack.length-1];X.meta=$}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){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 g(){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 R(){this.data.setextHeadingSlurpLineEnding=void 0}function Y($){const pe=this.stack[this.stack.length-1].children;let xe=pe[pe.length-1];(!xe||xe.type!=="text")&&(xe=Tl(),xe.position={start:Xn($.start),end:void 0},pe.push(xe)),this.stack.push(xe)}function v($){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,$),v.call(this,$))}function K(){this.data.atHardBreak=!0}function de(){const $=this.resume(),X=this.stack[this.stack.length-1];X.value=$}function ue(){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 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 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=$k(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 xe=$.children;pe.children=xe}else pe.alt=X}function y(){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 ye($){this.data.characterReferenceType=$.type}function ge($){const X=this.sliceSerialize($),pe=this.data.characterReferenceType;let xe;pe?(xe=B1(X,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):xe=Dd(X);const Ie=this.stack[this.stack.length-1];Ie.value+=xe}function Oe($){const X=this.stack.pop();X.position.end=Xn($.end)}function rt($){v.call(this,$);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize($)}function gt($){v.call(this,$);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize($)}function se(){return{type:"blockquote",children:[]}}function D(){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 Te(){return{type:"break"}}function $e(){return{type:"html",value:""}}function Et(){return{type:"image",title:null,url:"",alt:null}}function zt(){return{type:"link",title:null,url:"",children:[]}}function cn($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Sr($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function gl(){return{type:"paragraph",children:[]}}function El(){return{type:"strong",children:[]}}function Tl(){return{type:"text",value:""}}function Cr(){return{type:"thematicBreak"}}}function Xn(e){return{line:e.line,column:e.column,offset:e.offset}}function K1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?K1(e,r):qk(e,r)}}function qk(e,t){let n;for(n in t)if(G1.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 $h(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ts({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ts({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ts({start:t.start,end:t.end})+") is still open")}function Qk(e){const t=this;t.parser=n;function n(r){return Vk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Gk(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 Kk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
382
|
-
`}]}function Xk(e,t){const n=t.value?t.value+`
|
|
383
|
-
`:"",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 Jk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ji(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 d={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,d),e.applyData(t,d)}function tS(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 nS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function X1(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 rS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return X1(e,t);const i={src:ji(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 iS(e,t){const n={src:ji(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 sS(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 aS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return X1(e,t);const i={href:ji(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 uS(e,t){const n={href:ji(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 lS(e,t,n){const r=e.all(t),i=n?oS(n):J1(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:`
|
|
384
|
-
`}),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:`
|
|
385
|
-
`});const d={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,d),e.applyData(t,d)}function oS(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=J1(n[r])}return t}function J1(e){const t=e.spread;return t??e.children.length>1}function cS(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 dS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function hS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mS(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=sl(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 pS(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 d=[];for(;++o<u;){const h=t.children[o],p={},m=a?a[o]:void 0;m&&(p.align=m);let E={type:"element",tagName:s,properties:p,children:[]};h&&(E.children=e.all(h),e.patch(h,E),E=e.applyData(h,E)),d.push(E)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,f),e.applyData(t,f)}function gS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Yh=9,Vh=32;function ES(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Wh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Wh(t.slice(i),i>0,!1)),s.join("")}function Wh(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Yh||s===Vh;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Yh||s===Vh;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function TS(e,t){const n={type:"text",value:ES(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xS={blockquote:Gk,break:Kk,code:Xk,delete:Jk,emphasis:Zk,footnoteReference:eS,heading:tS,html:nS,imageReference:rS,image:iS,inlineCode:sS,linkReference:aS,link:uS,listItem:lS,list:cS,paragraph:dS,root:fS,strong:hS,table:mS,tableCell:gS,tableRow:pS,text:TS,thematicBreak:yS,toml:wa,yaml:wa,definition:wa,footnoteDefinition:wa};function wa(){}const Z1=-1,ll=0,xs=1,wu=2,Od=3,Pd=4,Md=5,Fd=6,eg=7,tg=8,qh=typeof self=="object"?self:globalThis,bS=(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 ll:case Z1:return n(a,i);case xs:{const u=n([],i);for(const o of a)u.push(r(o));return u}case wu:{const u=n({},i);for(const[o,d]of a)u[r(o)]=r(d);return u}case Od:return n(new Date(a),i);case Pd:{const{source:u,flags:o}=a;return n(new RegExp(u,o),i)}case Md:{const u=n(new Map,i);for(const[o,d]of a)u.set(r(o),r(d));return u}case Fd:{const u=n(new Set,i);for(const o of a)u.add(r(o));return u}case eg:{const{name:u,message:o}=a;return n(new qh[u](o),i)}case tg: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 qh[s](a),i)};return r},Qh=e=>bS(new Map,e)(0),Zr="",{toString:_S}={},{keys:kS}=Object,es=e=>{const t=typeof e;if(t!=="object"||!e)return[ll,t];const n=_S.call(e).slice(8,-1);switch(n){case"Array":return[xs,Zr];case"Object":return[wu,Zr];case"Date":return[Od,Zr];case"RegExp":return[Pd,Zr];case"Map":return[Md,Zr];case"Set":return[Fd,Zr];case"DataView":return[xs,n]}return n.includes("Array")?[xs,n]:n.includes("Error")?[eg,n]:[wu,n]},Ia=([e,t])=>e===ll&&(t==="function"||t==="symbol"),SS=(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]=es(a);switch(u){case ll:{let f=a;switch(o){case"bigint":u=tg,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([Z1],a)}return i([u,f],a)}case xs:{if(o){let p=a;return o==="DataView"?p=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(a)),i([o,[...p]],a)}const f=[],h=i([u,f],a);for(const p of a)f.push(s(p));return h}case wu:{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 p of kS(a))(e||!Ia(es(a[p])))&&f.push([s(p),s(a[p])]);return h}case Od:return i([u,a.toISOString()],a);case Pd:{const{source:f,flags:h}=a;return i([u,{source:f,flags:h}],a)}case Md:{const f=[],h=i([u,f],a);for(const[p,m]of a)(e||!(Ia(es(p))||Ia(es(m))))&&f.push([s(p),s(m)]);return h}case Fd:{const f=[],h=i([u,f],a);for(const p of a)(e||!Ia(es(p)))&&f.push(s(p));return h}}const{message:d}=a;return i([u,{name:o,message:d}],a)};return s},Gh=(e,{json:t,lossy:n}={})=>{const r=[];return SS(!(t||n),!!t,new Map,r)(e),r},Di=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qh(Gh(e,t)):structuredClone(e):(e,t)=>Qh(Gh(e,t));function CS(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 NS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function AS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CS,r=e.options.footnoteBackLabel||NS,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 d=e.footnoteById.get(e.footnoteOrder[o]);if(!d)continue;const f=e.all(d),h=String(d.identifier).toUpperCase(),p=ji(h.toLowerCase());let m=0;const E=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++m<=x;){E.length>0&&E.push({type:"text",value:" "});let T=typeof n=="string"?n:n(o,m);typeof T=="string"&&(T={type:"text",value:T}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,m),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const T=w.children[w.children.length-1];T&&T.type==="text"?T.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...E)}else f.push(...E);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(d,g),u.push(g)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Di(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
386
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
387
|
-
`}]}}const ol=function(e){if(e==null)return LS;if(typeof e=="function")return cl(e);if(typeof e=="object")return Array.isArray(e)?vS(e):wS(e);if(typeof e=="string")return IS(e);throw new Error("Expected function, string, or object as test")};function vS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ol(e[n]);return cl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function wS(e){const t=e;return cl(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function IS(e){return cl(t);function t(n){return n&&n.type===e}}function cl(e){return t;function t(n,r,i){return!!(DS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function LS(){return!0}function DS(e){return e!==null&&typeof e=="object"&&"type"in e}const ng=[],RS=!0,gc=!1,OS="skip";function rg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ol(i),a=r?-1:1;u(e,void 0,[])();function u(o,d,f){const h=o&&typeof o=="object"?o:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=ng,E,x,w;if((!t||s(o,d,f[f.length-1]||void 0))&&(m=PS(n(o,f)),m[0]===gc))return m;if("children"in o&&o.children){const g=o;if(g.children&&m[0]!==OS)for(x=(r?g.children.length:-1)+a,w=f.concat(g);x>-1&&x<g.children.length;){const T=g.children[x];if(E=u(T,x,w)(),E[0]===gc)return E;x=typeof E[1]=="number"?E[1]:x+a}}return m}}}function PS(e){return Array.isArray(e)?e:typeof e=="number"?[RS,e]:e==null?ng:[e]}function dl(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),rg(e,s,u,i);function u(o,d){const f=d[d.length-1],h=f?f.children.indexOf(o):void 0;return a(o,h,f)}}const Ec={}.hasOwnProperty,MS={};function FS(e,t){const n=t||MS,r=new Map,i=new Map,s=new Map,a={...xS,...n.handlers},u={all:d,applyData:BS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:o,options:n,patch:jS,wrap:HS};return dl(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();h.has(p)||h.set(p,f)}}),u;function o(f,h){const p=f.type,m=u.handlers[p];if(Ec.call(u.handlers,p)&&m)return m(u,f,h);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in f){const{children:x,...w}=f,g=Di(w);return g.children=u.all(f),g}return Di(f)}return(u.options.unknownHandler||US)(u,f,h)}function d(f){const h=[];if("children"in f){const p=f.children;let m=-1;for(;++m<p.length;){const E=u.one(p[m],f);if(E){if(m&&p[m-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Kh(E.value)),!Array.isArray(E)&&E.type==="element")){const x=E.children[0];x&&x.type==="text"&&(x.value=Kh(x.value))}Array.isArray(E)?h.push(...E):h.push(E)}}}return h}}function jS(e,t){e.position&&(t.position=Nb(e))}function BS(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,Di(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function US(e,t){const n=t.data||{},r="value"in t&&!(Ec.call(n,"hProperties")||Ec.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 HS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
388
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
389
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
390
|
-
`}),n}function Kh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xh(e,t){const n=FS(e,t),r=n.one(e,void 0),i=AS(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
391
|
-
`},i),s}function zS(e,t){return e&&"run"in e?async function(n,r){const i=Xh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xh(n,{file:r,...e||t})}}function Jh(e){if(e)throw e}var Xa=Object.prototype.hasOwnProperty,ig=Object.prototype.toString,Zh=Object.defineProperty,em=Object.getOwnPropertyDescriptor,tm=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ig.call(t)==="[object Array]"},nm=function(t){if(!t||ig.call(t)!=="[object Object]")return!1;var n=Xa.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Xa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Xa.call(t,i)},rm=function(t,n){Zh&&n.name==="__proto__"?Zh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},im=function(t,n){if(n==="__proto__")if(Xa.call(t,n)){if(em)return em(t,n).value}else return;return t[n]},$S=function e(){var t,n,r,i,s,a,u=arguments[0],o=1,d=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<d;++o)if(t=arguments[o],t!=null)for(n in t)r=im(u,n),i=im(t,n),u!==i&&(f&&i&&(nm(i)||(s=tm(i)))?(s?(s=!1,a=r&&tm(r)?r:[]):a=r&&nm(r)?r:{},rm(u,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&rm(u,{name:n,newValue:i}));return u};const Zl=Fu($S);function Tc(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 YS(){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,...d){const f=e[++s];let h=-1;if(o){a(o);return}for(;++h<i.length;)(d[h]===null||d[h]===void 0)&&(d[h]=i[h]);i=d,f?VS(f,u)(...d):a(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function VS(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(d){const f=d;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 An={basename:WS,dirname:qS,extname:QS,join:GS,sep:"/"};function WS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');la(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 qS(e){if(la(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 QS(e){la(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 GS(...e){let t=-1,n;for(;++t<e.length;)la(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":KS(n)}function KS(e){la(e);const t=e.codePointAt(0)===47;let n=XS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function XS(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 la(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JS={cwd:ZS};function ZS(){return"/"}function yc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function e3(e){if(typeof e=="string")e=new URL(e);else if(!yc(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 t3(e)}function t3(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 eo=["history","path","basename","stem","extname","dirname"];class sg{constructor(t){let n;t?yc(t)?n={path:t}:typeof t=="string"||n3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":JS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<eo.length;){const s=eo[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)eo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){no(t,"basename"),to(t,"basename"),this.path=An.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(t){sm(this.basename,"dirname"),this.path=An.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(t){if(to(t,"extname"),sm(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=An.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yc(t)&&(t=e3(t)),no(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(t){no(t,"stem"),to(t,"stem"),this.path=An.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 Ct(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 to(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function no(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function n3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const r3=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},i3={}.hasOwnProperty;class jd extends r3{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=YS()}copy(){const t=new jd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(so("data",this.frozen),this.namespace[t]=n,this):i3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(so("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=La(t),r=this.parser||this.Parser;return ro("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ro("process",this.parser||this.Parser),io("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=La(t),o=r.parse(u);r.run(o,u,function(f,h,p){if(f||!h||!p)return d(f);const m=h,E=r.stringify(m,p);u3(E)?p.value=E:p.result=E,d(f,p)});function d(f,h){f||!h?a(f):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),ro("processSync",this.parser||this.Parser),io("processSync",this.compiler||this.Compiler),this.process(t,i),um("processSync","process",n),r;function i(s,a){n=!0,Jh(s),r=a}}run(t,n,r){am(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=La(n);i.run(t,o,d);function d(f,h,p){const m=h||t;f?u(f):a?a(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),um("runSync","run",r),i;function s(a,u){Jh(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=La(n),i=this.compiler||this.Compiler;return io("stringify",i),am(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(so("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(d){if(typeof d=="function")o(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[f,...h]=d;o(f,h)}else a(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function a(d){if(!("plugins"in d)&&!("settings"in d))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(d.plugins),d.settings&&(i.settings=Zl(!0,i.settings,d.settings))}function u(d){let f=-1;if(d!=null)if(Array.isArray(d))for(;++f<d.length;){const h=d[f];s(h)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function o(d,f){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===d){p=h;break}if(p===-1)r.push([d,...f]);else if(f.length>0){let[m,...E]=f;const x=r[p][1];Tc(x)&&Tc(m)&&(m=Zl(!0,x,m)),r[p]=[d,m,...E]}}}}const s3=new jd().freeze();function ro(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function io(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function so(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 am(e){if(!Tc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function um(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function La(e){return a3(e)?e:new sg(e)}function a3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function u3(e){return typeof e=="string"||l3(e)}function l3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",lm=[],om={allowDangerousHtml:!0},c3=/^(https?|ircs?|mailto|xmpp)$/i,d3=[{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 f3(e){const t=h3(e),n=m3(e);return p3(t.runSync(t.parse(n),n),e)}function h3(e){const t=e.rehypePlugins||lm,n=e.remarkPlugins||lm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...om}:om;return s3().use(Qk).use(n).use(zS,r).use(t)}function m3(e){const t=e.children||"",n=new sg;return typeof t=="string"&&(n.value=t),n}function p3(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||g3;for(const f of d3)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+o3+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),dl(e,d),Lb(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function d(f,h,p){if(f.type==="raw"&&p&&typeof h=="number")return a?p.children.splice(h,1):p.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let m;for(m in Kl)if(Object.hasOwn(Kl,m)&&Object.hasOwn(f.properties,m)){const E=f.properties[m],x=Kl[m];(x===null||x.includes(f.tagName))&&(f.properties[m]=o(String(E||""),m,f))}}if(f.type==="element"){let m=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(f,h,p)),m&&p&&typeof h=="number")return u&&f.children?p.children.splice(h,1,...f.children):p.children.splice(h,1),h}}}function g3(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||c3.test(e.slice(0,t))?e:""}const cm=/[#.]/g;function E3(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){cm.lastIndex=i;const u=cm.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 ag(e,t,n){const r=n?b3(n):void 0;function i(s,a,...u){let o;if(s==null){o={type:"root",children:[]};const d=a;u.unshift(d)}else{o=E3(s,t);const d=o.tagName.toLowerCase(),f=r?r.get(d):void 0;if(o.tagName=f||d,T3(a))u.unshift(a);else for(const[h,p]of Object.entries(a))y3(e,o.properties,h,p)}for(const d of u)xc(o.children,d);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function T3(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 y3(e,t,n,r){const i=rl(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=Ch(r):i.commaSeparated?s=xh(r):i.commaOrSpaceSeparated?s=Ch(xh(r).join(" ")):s=dm(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?x3(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(dm(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function xc(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)xc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?xc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function dm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Qs(n)===Qs(t)))return!0}return n}function x3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function b3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const _3=["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"],k3=ag(aa,"div"),S3=ag(_r,"g",_3);function C3(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=fm(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=fm(t,u),d=o===-1?t.length+1:o+1;if(u===d)break;n.push(d)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function fm(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
392
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Or={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/"},ug={}.hasOwnProperty,N3=Object.prototype;function A3(e,t){const n=t||{};return Bd({file:n.file||void 0,location:!1,schema:n.space==="svg"?_r:aa,verbose:n.verbose||!1},e)}function Bd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ja(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:lg(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=C3(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"},Ja(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ja(e,r,n),n}default:return n=v3(e,t),n}}function lg(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Bd(e,t[n]);r.push(i)}return r}function v3(e,t){const n=e.schema;e.schema=t.namespaceURI===Or.svg?_r:aa;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;ug.call(N3,o)||(i[o]=u.value)}const a=(e.schema.space==="svg"?S3:k3)(t.tagName,i,lg(e,t.childNodes));if(Ja(e,t,a),a.tagName==="template"){const u=t,o=u.sourceCodeLocation,d=o&&o.startTag&&pi(o.startTag),f=o&&o.endTag&&pi(o.endTag),h=Bd(e,u.content);d&&f&&e.file&&(h.position={start:d.end,end:f.start}),a.content=h}return e.schema=n,a}function Ja(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=w3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function w3(e,t,n){const r=pi(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)ug.call(n.attrs,a)&&(s[rl(e.schema,a).property]=pi(n.attrs[a]));n.startTag;const u=pi(n.startTag),o=n.endTag?pi(n.endTag):void 0,d={opening:u};o&&(d.closing=o),d.properties=s,t.data={position:d}}}return r}function pi(e){const t=hm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=hm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function hm(e){return e.line&&e.column?e:void 0}const mm={}.hasOwnProperty;function og(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&mm.call(i,e)){const o=String(i[e]);a=mm.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 I3={},L3={}.hasOwnProperty,cg=og("type",{handlers:{root:R3,element:j3,text:M3,comment:F3,doctype:P3}});function D3(e,t){const r=(t||I3).space;return cg(e,r==="svg"?_r:aa)}function R3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ud(e.children,n,t),Bi(e,n),n}function O3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ud(e.children,n,t),Bi(e,n),n}function P3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Bi(e,t),t}function M3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Bi(e,t),t}function F3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Bi(e,t),t}function j3(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"&&L3.call(e.properties,s)){const o=B3(r,s,e.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Or[a],childNodes:[],parentNode:null};return u.childNodes=Ud(e.children,u,r),Bi(e,u),e.tagName==="template"&&e.content&&(u.content=O3(e.content,r)),u}function B3(e,t,n){const r=rl(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?k1(n):L1(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=Or[r.space]}return i}function Ud(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=cg(e[r],n);s.parentNode=t,i.push(s)}return i}function Bi(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 U3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],H3=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 b;(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"})(b||(b={}));const Ot={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function dg(e){return e>=55296&&e<=57343}function z3(e){return e>=56320&&e<=57343}function $3(e,t){return(e-55296)*1024+9216+t}function fg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function hg(e){return e>=64976&&e<=65007||H3.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 Y3=65536;class V3{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=Y3,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(z3(n))return this.pos++,this._addGap(),$3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.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,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.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,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,dg(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){fg(t)?this._err(H.controlCharacterInInputStream):hg(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 ke;(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"})(ke||(ke={}));function mg(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 W3=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))),q3=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 Q3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=q3.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 G3=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 bc(e){return e>=ut.ZERO&&e<=ut.NINE}function K3(e){return e>=ut.UPPER_A&&e<=ut.UPPER_F||e>=ut.LOWER_A&&e<=ut.LOWER_F}function X3(e){return e>=ut.UPPER_A&&e<=ut.UPPER_Z||e>=ut.LOWER_A&&e<=ut.LOWER_Z||bc(e)}function J3(e){return e===ut.EQUALS||X3(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 jn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(jn||(jn={}));class Z3{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=jn.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)|G3)===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(bc(i)||K3(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(bc(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===jn.Strict)return 0;return this.emitCodePoint(Q3(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=eC(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===jn.Attribute&&(s===0||J3(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!==jn.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!==jn.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 eC(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,d=e[o];if(d<r)a=o+1;else if(d>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 Fr;(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"})(Fr||(Fr={}));var rn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rn||(rn={}));var j;(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"})(j||(j={}));var c;(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"})(c||(c={}));const tC=new Map([[j.A,c.A],[j.ADDRESS,c.ADDRESS],[j.ANNOTATION_XML,c.ANNOTATION_XML],[j.APPLET,c.APPLET],[j.AREA,c.AREA],[j.ARTICLE,c.ARTICLE],[j.ASIDE,c.ASIDE],[j.B,c.B],[j.BASE,c.BASE],[j.BASEFONT,c.BASEFONT],[j.BGSOUND,c.BGSOUND],[j.BIG,c.BIG],[j.BLOCKQUOTE,c.BLOCKQUOTE],[j.BODY,c.BODY],[j.BR,c.BR],[j.BUTTON,c.BUTTON],[j.CAPTION,c.CAPTION],[j.CENTER,c.CENTER],[j.CODE,c.CODE],[j.COL,c.COL],[j.COLGROUP,c.COLGROUP],[j.DD,c.DD],[j.DESC,c.DESC],[j.DETAILS,c.DETAILS],[j.DIALOG,c.DIALOG],[j.DIR,c.DIR],[j.DIV,c.DIV],[j.DL,c.DL],[j.DT,c.DT],[j.EM,c.EM],[j.EMBED,c.EMBED],[j.FIELDSET,c.FIELDSET],[j.FIGCAPTION,c.FIGCAPTION],[j.FIGURE,c.FIGURE],[j.FONT,c.FONT],[j.FOOTER,c.FOOTER],[j.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[j.FORM,c.FORM],[j.FRAME,c.FRAME],[j.FRAMESET,c.FRAMESET],[j.H1,c.H1],[j.H2,c.H2],[j.H3,c.H3],[j.H4,c.H4],[j.H5,c.H5],[j.H6,c.H6],[j.HEAD,c.HEAD],[j.HEADER,c.HEADER],[j.HGROUP,c.HGROUP],[j.HR,c.HR],[j.HTML,c.HTML],[j.I,c.I],[j.IMG,c.IMG],[j.IMAGE,c.IMAGE],[j.INPUT,c.INPUT],[j.IFRAME,c.IFRAME],[j.KEYGEN,c.KEYGEN],[j.LABEL,c.LABEL],[j.LI,c.LI],[j.LINK,c.LINK],[j.LISTING,c.LISTING],[j.MAIN,c.MAIN],[j.MALIGNMARK,c.MALIGNMARK],[j.MARQUEE,c.MARQUEE],[j.MATH,c.MATH],[j.MENU,c.MENU],[j.META,c.META],[j.MGLYPH,c.MGLYPH],[j.MI,c.MI],[j.MO,c.MO],[j.MN,c.MN],[j.MS,c.MS],[j.MTEXT,c.MTEXT],[j.NAV,c.NAV],[j.NOBR,c.NOBR],[j.NOFRAMES,c.NOFRAMES],[j.NOEMBED,c.NOEMBED],[j.NOSCRIPT,c.NOSCRIPT],[j.OBJECT,c.OBJECT],[j.OL,c.OL],[j.OPTGROUP,c.OPTGROUP],[j.OPTION,c.OPTION],[j.P,c.P],[j.PARAM,c.PARAM],[j.PLAINTEXT,c.PLAINTEXT],[j.PRE,c.PRE],[j.RB,c.RB],[j.RP,c.RP],[j.RT,c.RT],[j.RTC,c.RTC],[j.RUBY,c.RUBY],[j.S,c.S],[j.SCRIPT,c.SCRIPT],[j.SEARCH,c.SEARCH],[j.SECTION,c.SECTION],[j.SELECT,c.SELECT],[j.SOURCE,c.SOURCE],[j.SMALL,c.SMALL],[j.SPAN,c.SPAN],[j.STRIKE,c.STRIKE],[j.STRONG,c.STRONG],[j.STYLE,c.STYLE],[j.SUB,c.SUB],[j.SUMMARY,c.SUMMARY],[j.SUP,c.SUP],[j.TABLE,c.TABLE],[j.TBODY,c.TBODY],[j.TEMPLATE,c.TEMPLATE],[j.TEXTAREA,c.TEXTAREA],[j.TFOOT,c.TFOOT],[j.TD,c.TD],[j.TH,c.TH],[j.THEAD,c.THEAD],[j.TITLE,c.TITLE],[j.TR,c.TR],[j.TRACK,c.TRACK],[j.TT,c.TT],[j.U,c.U],[j.UL,c.UL],[j.SVG,c.SVG],[j.VAR,c.VAR],[j.WBR,c.WBR],[j.XMP,c.XMP]]);function Ui(e){var t;return(t=tC.get(e))!==null&&t!==void 0?t:c.UNKNOWN}const q=c,nC={[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},_c=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.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 rC(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function ls(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function iC(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function Zn(e){return iC(e)||ls(e)}function pm(e){return Zn(e)||rC(e)}function Da(e){return e+32}function pg(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function gm(e){return pg(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function sC(e){return e===b.NULL?H.nullCharacterReference:e>1114111?H.characterReferenceOutsideUnicodeRange:dg(e)?H.surrogateCharacterReference:hg(e)?H.noncharacterCharacterReference:fg(e)||e===b.CARRIAGE_RETURN?H.controlCharacterReference:null}class aC{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 V3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Z3(W3,(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=sC(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:ke.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ke.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ke.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(mg(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=Ui(t.tagName),t.type===ke.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 ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ke.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:ke.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=pg(t)?ke.WHITESPACE_CHARACTER:t===b.NULL?ke.NULL_CHARACTER:ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?jn.Attribute:jn.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 b.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case b.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 b.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(H.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.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 b.GREATER_THAN_SIGN:{this._err(H.missingEndTagName),this.state=C.DATA;break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.tagName+=Ye;break}case b.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ls(t)?Da(t):t)}}_stateRcdataLessThanSign(t){t===b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case b.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===b.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 b.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case b.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===b.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.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 b.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case b.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Ye);break}case b.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Ye);break}case b.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.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(Ot.SCRIPT,!1)&&gm(this.preprocessor.peek(Ot.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ot.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 b.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case b.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ye);break}case b.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ye);break}case b.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.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(Ot.SCRIPT,!1)&&gm(this.preprocessor.peek(Ot.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ot.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(H.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.name+=Ye;break}default:this.currentAttr.name+=String.fromCodePoint(ls(t)?Da(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.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 b.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=Ye;break}case b.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=Ye;break}case b.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=Ye;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(H.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case b.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 b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case b.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 b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.data+=Ye;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ot.DASH_DASH,!0)?(this._createCommentToken(Ot.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(Ot.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ot.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Ot.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(H.cdataInHtmlContent),this._createCommentToken(Ot.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 b.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case b.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 b.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(H.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case b.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 b.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.data+=Ye;break}case b.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 b.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(H.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case b.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 b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.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 b.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(H.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.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(ls(t))this._createDoctypeToken(String.fromCharCode(Da(t))),this.state=C.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(H.unexpectedNullCharacter),this._createDoctypeToken(Ye),this.state=C.DOCTYPE_NAME;break}case b.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 b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.name+=Ye;break}case b.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ls(t)?Da(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ot.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ot.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(H.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(H.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(H.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(H.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.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 b.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.publicId+=Ye;break}case b.GREATER_THAN_SIGN:{this._err(H.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.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 b.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.publicId+=Ye;break}case b.GREATER_THAN_SIGN:{this._err(H.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(H.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(H.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(H.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(H.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(H.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(H.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case b.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 b.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.systemId+=Ye;break}case b.GREATER_THAN_SIGN:{this._err(H.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.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 b.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(H.unexpectedNullCharacter),n.systemId+=Ye;break}case b.GREATER_THAN_SIGN:{this._err(H.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.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 b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case b.NULL:{this._err(H.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(H.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=C.DATA;break}case b.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(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&pm(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){pm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(H.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const gg=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),Em=new Set([...gg,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),Iu=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),uC=new Set([...Iu,c.OL,c.UL]),lC=new Set([...Iu,c.BUTTON]),Tm=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),ym=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),oC=new Set([c.TR,c.TEMPLATE,c.HTML]),cC=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),dC=new Set([c.TABLE,c.TEMPLATE,c.HTML]),fC=new Set([c.TD,c.TH]);class hC{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=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===c.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(_c,V.HTML)}popUntilTableCellPopped(){this.popUntilPopped(fC,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(dC,V.HTML)}clearBackToTableBodyContext(){this.clearBackTo(cC,V.HTML)}clearBackToTableRowContext(){this.clearBackTo(oC,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]===c.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]===c.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(ym.has(i))return!1;break}case V.MATHML:{if(Tm.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Iu)}hasInListItemScope(t){return this.hasInDynamicScope(t,uC)}hasInButtonScope(t){return this.hasInDynamicScope(t,lC)}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(_c.has(n))return!0;if(Iu.has(n))return!1;break}case V.SVG:{if(ym.has(n))return!1;break}case V.MATHML:{if(Tm.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 c.TABLE:case c.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 c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.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 c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&gg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Em.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Em.has(this.currentTagId);)this.pop()}}const ao=3;var vn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vn||(vn={}));const xm={type:vn.Marker};class mC{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===vn.Marker)break;const{element:d}=o;if(this.treeAdapter.getTagName(d)===s&&this.treeAdapter.getNamespaceURI(d)===a){const f=this.treeAdapter.getAttrList(d);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ao)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ao)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>=ao&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(xm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:vn.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(xm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===vn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===vn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vn.Element&&n.element===t)}}const er={createDocument(){return{nodeName:"#document",mode:rn.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}}},Eg="html",pC="about:legacy-compat",gC="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Tg=["+//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//"],EC=[...Tg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],TC=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),yg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],yC=[...yg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function bm(e,t){return t.some(n=>e.startsWith(n))}function xC(e){return e.name===Eg&&e.publicId===null&&(e.systemId===null||e.systemId===pC)}function bC(e){if(e.name!==Eg)return rn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===gC)return rn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),TC.has(n))return rn.QUIRKS;let r=t===null?EC:Tg;if(bm(n,r))return rn.QUIRKS;if(r=t===null?yg:yC,bm(n,r))return rn.LIMITED_QUIRKS}return rn.NO_QUIRKS}const _m={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},_C="definitionurl",kC="definitionURL",SC=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])),CC=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}]]),NC=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])),AC=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function vC(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===Fr.COLOR||r===Fr.SIZE||r===Fr.FACE)||AC.has(t)}function xg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===_C){e.attrs[t].name=kC;break}}function bg(e){for(let t=0;t<e.attrs.length;t++){const n=SC.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Hd(e){for(let t=0;t<e.attrs.length;t++){const n=CC.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 wC(e){const t=NC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ui(e.tagName))}function IC(e,t){return t===V.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function LC(e,t,n){if(t===V.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Fr.ENCODING){const i=n[r].value.toLowerCase();return i===_m.TEXT_HTML||i===_m.APPLICATION_XML}}return t===V.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function DC(e,t,n,r){return(!r||r===V.HTML)&&LC(e,t,n)||(!r||r===V.MATHML)&&IC(e,t)}const RC="hidden",OC=8,PC=3;var A;(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"})(A||(A={}));const MC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_g=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),km={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:er,onParseError:null};class Sm{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=A.INITIAL,this.originalInsertionMode=A.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={...km,...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 aC(this.options,this),this.activeFormattingElements=new mC(this.treeAdapter),this.fragmentContextID=r?Ui(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new hC(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={...km,...n};t??(t=r.treeAdapter.createElement(j.TEMPLATE,V.HTML,[]));const i=r.treeAdapter.createElement("documentmock",V.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===c.TEMPLATE&&s.tmplInsertionModeStack.unshift(A.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:MC,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=A.TEXT}switchToPlaintextParsing(){this.insertionMode=A.TEXT,this.originalInsertionMode=A.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)===j.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 c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Je.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Je.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Je.SCRIPT_DATA;break}case c.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(j.HTML,V.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.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:d,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:o,endCol:d,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===ke.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===c.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===V.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,V.HTML)}_processToken(t){switch(t.type){case ke.CHARACTER:{this.onCharacter(t);break}case ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case ke.COMMENT:{this.onComment(t);break}case ke.DOCTYPE:{this.onDoctype(t);break}case ke.START_TAG:{this._processStartTag(t);break}case ke.END_TAG:{this.onEndTag(t);break}case ke.EOF:{this.onEof(t);break}case ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return DC(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===vn.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=A.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=A.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=A.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=A.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=A.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=A.IN_TABLE;return}case c.BODY:{this.insertionMode=A.IN_BODY;return}case c.FRAMESET:{this.insertionMode=A.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?A.AFTER_HEAD:A.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=A.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=A.IN_HEAD;return}break}}this.insertionMode=A.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=A.IN_SELECT_IN_TABLE;return}}this.insertionMode=A.IN_SELECT}_isElementCausesFosterParenting(t){return _g.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 c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===V.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.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 nC[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fA(this,t);return}switch(this.insertionMode){case A.INITIAL:{ts(this,t);break}case A.BEFORE_HTML:{bs(this,t);break}case A.BEFORE_HEAD:{_s(this,t);break}case A.IN_HEAD:{ks(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Ss(this,t);break}case A.AFTER_HEAD:{Cs(this,t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:{Sg(this,t);break}case A.TEXT:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{uo(this,t);break}case A.IN_TABLE_TEXT:{Ig(this,t);break}case A.IN_COLUMN_GROUP:{Lu(this,t);break}case A.AFTER_BODY:{Du(this,t);break}case A.AFTER_AFTER_BODY:{Za(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dA(this,t);return}switch(this.insertionMode){case A.INITIAL:{ts(this,t);break}case A.BEFORE_HTML:{bs(this,t);break}case A.BEFORE_HEAD:{_s(this,t);break}case A.IN_HEAD:{ks(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Ss(this,t);break}case A.AFTER_HEAD:{Cs(this,t);break}case A.TEXT:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{uo(this,t);break}case A.IN_COLUMN_GROUP:{Lu(this,t);break}case A.AFTER_BODY:{Du(this,t);break}case A.AFTER_AFTER_BODY:{Za(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){kc(this,t);return}switch(this.insertionMode){case A.INITIAL:case A.BEFORE_HTML:case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_TEMPLATE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{kc(this,t);break}case A.IN_TABLE_TEXT:{ns(this,t);break}case A.AFTER_BODY:{$C(this,t);break}case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{YC(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case A.INITIAL:{VC(this,t);break}case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:{this._err(t,H.misplacedDoctype);break}case A.IN_TABLE_TEXT:{ns(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)?hA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{ts(this,t);break}case A.BEFORE_HTML:{WC(this,t);break}case A.BEFORE_HEAD:{QC(this,t);break}case A.IN_HEAD:{bn(this,t);break}case A.IN_HEAD_NO_SCRIPT:{XC(this,t);break}case A.AFTER_HEAD:{ZC(this,t);break}case A.IN_BODY:{Nt(this,t);break}case A.IN_TABLE:{Ri(this,t);break}case A.IN_TABLE_TEXT:{ns(this,t);break}case A.IN_CAPTION:{GN(this,t);break}case A.IN_COLUMN_GROUP:{Yd(this,t);break}case A.IN_TABLE_BODY:{ml(this,t);break}case A.IN_ROW:{pl(this,t);break}case A.IN_CELL:{JN(this,t);break}case A.IN_SELECT:{Rg(this,t);break}case A.IN_SELECT_IN_TABLE:{eA(this,t);break}case A.IN_TEMPLATE:{nA(this,t);break}case A.AFTER_BODY:{iA(this,t);break}case A.IN_FRAMESET:{sA(this,t);break}case A.AFTER_FRAMESET:{uA(this,t);break}case A.AFTER_AFTER_BODY:{oA(this,t);break}case A.AFTER_AFTER_FRAMESET:{cA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?mA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{ts(this,t);break}case A.BEFORE_HTML:{qC(this,t);break}case A.BEFORE_HEAD:{GC(this,t);break}case A.IN_HEAD:{KC(this,t);break}case A.IN_HEAD_NO_SCRIPT:{JC(this,t);break}case A.AFTER_HEAD:{eN(this,t);break}case A.IN_BODY:{hl(this,t);break}case A.TEXT:{BN(this,t);break}case A.IN_TABLE:{Ks(this,t);break}case A.IN_TABLE_TEXT:{ns(this,t);break}case A.IN_CAPTION:{KN(this,t);break}case A.IN_COLUMN_GROUP:{XN(this,t);break}case A.IN_TABLE_BODY:{Sc(this,t);break}case A.IN_ROW:{Dg(this,t);break}case A.IN_CELL:{ZN(this,t);break}case A.IN_SELECT:{Og(this,t);break}case A.IN_SELECT_IN_TABLE:{tA(this,t);break}case A.IN_TEMPLATE:{rA(this,t);break}case A.AFTER_BODY:{Mg(this,t);break}case A.IN_FRAMESET:{aA(this,t);break}case A.AFTER_FRAMESET:{lA(this,t);break}case A.AFTER_AFTER_BODY:{Za(this,t);break}}}onEof(t){switch(this.insertionMode){case A.INITIAL:{ts(this,t);break}case A.BEFORE_HTML:{bs(this,t);break}case A.BEFORE_HEAD:{_s(this,t);break}case A.IN_HEAD:{ks(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Ss(this,t);break}case A.AFTER_HEAD:{Cs(this,t);break}case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{vg(this,t);break}case A.TEXT:{UN(this,t);break}case A.IN_TABLE_TEXT:{ns(this,t);break}case A.IN_TEMPLATE:{Pg(this,t);break}case A.AFTER_BODY:case A.IN_FRAMESET:case A.AFTER_FRAMESET:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{$d(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.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 A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.TEXT:case A.IN_COLUMN_GROUP:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{this._insertCharacters(t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:case A.AFTER_BODY:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{kg(this,t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{uo(this,t);break}case A.IN_TABLE_TEXT:{wg(this,t);break}}}}function FC(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):Ag(e,t),n}function jC(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 BC(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>=PC;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=UC(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function UC(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 HC(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ui(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&s===V.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function zC(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 zd(e,t){for(let n=0;n<OC;n++){const r=FC(e,t);if(!r)break;const i=jC(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=BC(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&HC(e,a,s),zC(e,i,r)}}function kc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function $C(e,t){e._appendCommentNode(t,e.openElements.items[0])}function YC(e,t){e._appendCommentNode(t,e.document)}function $d(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 VC(e,t){e._setDocumentType(t);const n=t.forceQuirks?rn.QUIRKS:bC(t);xC(t)||e._err(t,H.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=A.BEFORE_HTML}function ts(e,t){e._err(t,H.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rn.QUIRKS),e.insertionMode=A.BEFORE_HTML,e._processToken(t)}function WC(e,t){t.tagID===c.HTML?(e._insertElement(t,V.HTML),e.insertionMode=A.BEFORE_HEAD):bs(e,t)}function qC(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&bs(e,t)}function bs(e,t){e._insertFakeRootElement(),e.insertionMode=A.BEFORE_HEAD,e._processToken(t)}function QC(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.HEAD:{e._insertElement(t,V.HTML),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD;break}default:_s(e,t)}}function GC(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?_s(e,t):e._err(t,H.endTagWithoutMatchingOpenElement)}function _s(e,t){e._insertFakeElement(j.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD,e._processToken(t)}function bn(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case c.TITLE:{e._switchToTextParsing(t,Je.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Je.RAWTEXT):(e._insertElement(t,V.HTML),e.insertionMode=A.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,Je.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,Je.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=A.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(A.IN_TEMPLATE);break}case c.HEAD:{e._err(t,H.misplacedStartTagForHeadElement);break}default:ks(e,t)}}function KC(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=A.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{ks(e,t);break}case c.TEMPLATE:{Qr(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Qr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,H.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,H.endTagWithoutMatchingOpenElement)}function ks(e,t){e.openElements.pop(),e.insertionMode=A.AFTER_HEAD,e._processToken(t)}function XC(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{bn(e,t);break}case c.NOSCRIPT:{e._err(t,H.nestedNoscriptInHead);break}default:Ss(e,t)}}function JC(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=A.IN_HEAD;break}case c.BR:{Ss(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Ss(e,t){const n=t.type===ke.EOF?H.openElementsLeftAfterEof:H.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=A.IN_HEAD,e._processToken(t)}function ZC(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.BODY:{e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=A.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,V.HTML),e.insertionMode=A.IN_FRAMESET;break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{e._err(t,H.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),bn(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,H.misplacedStartTagForHeadElement);break}default:Cs(e,t)}}function eN(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{Cs(e,t);break}case c.TEMPLATE:{Qr(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Cs(e,t){e._insertFakeElement(j.BODY,c.BODY),e.insertionMode=A.IN_BODY,fl(e,t)}function fl(e,t){switch(t.type){case ke.CHARACTER:{Sg(e,t);break}case ke.WHITESPACE_CHARACTER:{kg(e,t);break}case ke.COMMENT:{kc(e,t);break}case ke.START_TAG:{Nt(e,t);break}case ke.END_TAG:{hl(e,t);break}case ke.EOF:{vg(e,t);break}}}function kg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Sg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function nN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function rN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,V.HTML),e.insertionMode=A.IN_FRAMESET)}function iN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function sN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&_c.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,V.HTML)}function aN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,V.HTML),n||(e.formElement=e.openElements.current))}function lN(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===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function oN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.tokenizer.state=Je.PLAINTEXT}function cN(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1}function dN(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(zd(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 fN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hN(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(zd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function pN(e,t){e.treeAdapter.getDocumentMode(e.document)!==rn.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=A.IN_TABLE}function Cg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ng(e){const t=mg(e,Fr.TYPE);return t!=null&&t.toLowerCase()===RC}function gN(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),Ng(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function EN(e,t){e._appendElement(t,V.HTML),t.ackSelfClosing=!0}function TN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function yN(e,t){t.tagName=j.IMG,t.tagID=c.IMG,Cg(e,t)}function xN(e,t){e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Je.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=A.TEXT}function bN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Je.RAWTEXT)}function _N(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Je.RAWTEXT)}function Cm(e,t){e._switchToTextParsing(t,Je.RAWTEXT)}function kN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===A.IN_TABLE||e.insertionMode===A.IN_CAPTION||e.insertionMode===A.IN_TABLE_BODY||e.insertionMode===A.IN_ROW||e.insertionMode===A.IN_CELL?A.IN_SELECT_IN_TABLE:A.IN_SELECT}function SN(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function CN(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,V.HTML)}function NN(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,V.HTML)}function AN(e,t){e._reconstructActiveFormattingElements(),xg(t),Hd(t),t.selfClosing?e._appendElement(t,V.MATHML):e._insertElement(t,V.MATHML),t.ackSelfClosing=!0}function vN(e,t){e._reconstructActiveFormattingElements(),bg(t),Hd(t),t.selfClosing?e._appendElement(t,V.SVG):e._insertElement(t,V.SVG),t.ackSelfClosing=!0}function Nm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function Nt(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:{fN(e,t);break}case c.A:{dN(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{sN(e,t);break}case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{iN(e,t);break}case c.LI:case c.DD:case c.DT:{lN(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{Cg(e,t);break}case c.HR:{TN(e,t);break}case c.RB:case c.RTC:{CN(e,t);break}case c.RT:case c.RP:{NN(e,t);break}case c.PRE:case c.LISTING:{aN(e,t);break}case c.XMP:{bN(e,t);break}case c.SVG:{vN(e,t);break}case c.HTML:{tN(e,t);break}case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:{bn(e,t);break}case c.BODY:{nN(e,t);break}case c.FORM:{uN(e,t);break}case c.NOBR:{hN(e,t);break}case c.MATH:{AN(e,t);break}case c.TABLE:{pN(e,t);break}case c.INPUT:{gN(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{EN(e,t);break}case c.IMAGE:{yN(e,t);break}case c.BUTTON:{cN(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{mN(e,t);break}case c.IFRAME:{_N(e,t);break}case c.SELECT:{kN(e,t);break}case c.OPTION:case c.OPTGROUP:{SN(e,t);break}case c.NOEMBED:case c.NOFRAMES:{Cm(e,t);break}case c.FRAMESET:{rN(e,t);break}case c.TEXTAREA:{xN(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?Cm(e,t):Nm(e,t);break}case c.PLAINTEXT:{oN(e,t);break}case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:Nm(e,t)}}function wN(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function IN(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,Mg(e,t))}function LN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function DN(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function RN(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(j.P,c.P),e._closePElement()}function ON(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function PN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function MN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function FN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function jN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Ag(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!==c.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 hl(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:{zd(e,t);break}case c.P:{RN(e);break}case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{LN(e,t);break}case c.LI:{ON(e);break}case c.DD:case c.DT:{PN(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{MN(e);break}case c.BR:{jN(e);break}case c.BODY:{wN(e,t);break}case c.HTML:{IN(e,t);break}case c.FORM:{DN(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{FN(e,t);break}case c.TEMPLATE:{Qr(e,t);break}default:Ag(e,t)}}function vg(e,t){e.tmplInsertionModeStack.length>0?Pg(e,t):$d(e,t)}function BN(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function UN(e,t){e._err(t,H.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function uo(e,t){if(e.openElements.currentTagId!==void 0&&_g.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=A.IN_TABLE_TEXT,t.type){case ke.CHARACTER:{Ig(e,t);break}case ke.WHITESPACE_CHARACTER:{wg(e,t);break}}else oa(e,t)}function HN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,V.HTML),e.insertionMode=A.IN_CAPTION}function zN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=A.IN_COLUMN_GROUP}function $N(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,c.COLGROUP),e.insertionMode=A.IN_COLUMN_GROUP,Yd(e,t)}function YN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=A.IN_TABLE_BODY}function VN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,c.TBODY),e.insertionMode=A.IN_TABLE_BODY,ml(e,t)}function WN(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function qN(e,t){Ng(t)?e._appendElement(t,V.HTML):oa(e,t),t.ackSelfClosing=!0}function QN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,V.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ri(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{VN(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{bn(e,t);break}case c.COL:{$N(e,t);break}case c.FORM:{QN(e,t);break}case c.TABLE:{WN(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{YN(e,t);break}case c.INPUT:{qN(e,t);break}case c.CAPTION:{HN(e,t);break}case c.COLGROUP:{zN(e,t);break}default:oa(e,t)}}function Ks(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{Qr(e,t);break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:oa(e,t)}}function oa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,fl(e,t),e.fosterParentingEnabled=n}function wg(e,t){e.pendingCharacterTokens.push(t)}function Ig(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ns(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)oa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Lg=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function GN(e,t){const n=t.tagID;Lg.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,Ri(e,t)):Nt(e,t)}function KN(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:{e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,n===c.TABLE&&Ks(e,t));break}case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:hl(e,t)}}function Yd(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.COL:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case c.TEMPLATE:{bn(e,t);break}default:Lu(e,t)}}function XN(e,t){switch(t.tagID){case c.COLGROUP:{e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TEMPLATE:{Qr(e,t);break}case c.COL:break;default:Lu(e,t)}}function Lu(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE,e._processToken(t))}function ml(e,t){switch(t.tagID){case c.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,V.HTML),e.insertionMode=A.IN_ROW;break}case c.TH:case c.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,c.TR),e.insertionMode=A.IN_ROW,pl(e,t);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Ri(e,t));break}default:Ri(e,t)}}function Sc(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Ks(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Ks(e,t)}}function pl(e,t){switch(t.tagID){case c.TH:case c.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,V.HTML),e.insertionMode=A.IN_CELL,e.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,ml(e,t));break}default:Ri(e,t)}}function Dg(e,t){switch(t.tagID){case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY);break}case c.TABLE:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Sc(e,t));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Sc(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Ks(e,t)}}function JN(e,t){const n=t.tagID;Lg.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),pl(e,t)):Nt(e,t)}function ZN(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Dg(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:hl(e,t)}}function Rg(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case c.OPTGROUP:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case c.HR:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break}case c.SCRIPT:case c.TEMPLATE:{bn(e,t);break}}}function Og(e,t){switch(t.tagID){case c.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break}case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break}case c.TEMPLATE:{Qr(e,t);break}}}function eA(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Rg(e,t)}function tA(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Og(e,t)}function nA(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{bn(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=A.IN_TABLE,e.insertionMode=A.IN_TABLE,Ri(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=A.IN_COLUMN_GROUP,e.insertionMode=A.IN_COLUMN_GROUP,Yd(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=A.IN_TABLE_BODY,e.insertionMode=A.IN_TABLE_BODY,ml(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=A.IN_ROW,e.insertionMode=A.IN_ROW,pl(e,t);break}default:e.tmplInsertionModeStack[0]=A.IN_BODY,e.insertionMode=A.IN_BODY,Nt(e,t)}}function rA(e,t){t.tagID===c.TEMPLATE&&Qr(e,t)}function Pg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):$d(e,t)}function iA(e,t){t.tagID===c.HTML?Nt(e,t):Du(e,t)}function Mg(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=A.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.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 Du(e,t)}function Du(e,t){e.insertionMode=A.IN_BODY,fl(e,t)}function sA(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.FRAMESET:{e._insertElement(t,V.HTML);break}case c.FRAME:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case c.NOFRAMES:{bn(e,t);break}}}function aA(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=A.AFTER_FRAMESET))}function uA(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.NOFRAMES:{bn(e,t);break}}}function lA(e,t){t.tagID===c.HTML&&(e.insertionMode=A.AFTER_AFTER_FRAMESET)}function oA(e,t){t.tagID===c.HTML?Nt(e,t):Za(e,t)}function Za(e,t){e.insertionMode=A.IN_BODY,fl(e,t)}function cA(e,t){switch(t.tagID){case c.HTML:{Nt(e,t);break}case c.NOFRAMES:{bn(e,t);break}}}function dA(e,t){t.chars=Ye,e._insertCharacters(t)}function fA(e,t){e._insertCharacters(t),e.framesetOk=!1}function Fg(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 hA(e,t){if(vC(t))Fg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===V.MATHML?xg(t):r===V.SVG&&(wC(t),bg(t)),Hd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function mA(e,t){if(t.tagID===c.P||t.tagID===c.BR){Fg(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}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const pA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,gA=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Am={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function jg(e,t){const n=NA(e),r=og("type",{handlers:{root:EA,element:TA,text:yA,comment:Ug,doctype:xA,raw:_A},unknown:kA}),i={parser:n?new Sm(Am):Sm.getFragmentParser(void 0,Am),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),Hi(i,Rn());const s=n?i.parser.document:i.parser.getFragment(),a=A3(s,{file:i.options.file});return i.stitches&&dl(a,"comment",function(u,o,d){const f=u;if(f.value.stitch&&d&&o!==void 0){const h=d.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 Bg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function EA(e,t){Bg(e.children,t)}function TA(e,t){SA(e,t),Bg(e.children,t),CA(e,t)}function yA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ke.CHARACTER,chars:e.value,location:ca(e)};Hi(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function xA(e,t){const n={type:ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ca(e)};Hi(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function bA(e,t){t.stitches=!0;const n=AA(e);if("children"in e&&"children"in n){const r=jg({type:"root",children:e.children},t.options);n.children=r.children}Ug({type:"comment",value:{stitch:n}},t)}function Ug(e,t){const n=e.value,r={type:ke.COMMENT,data:n,location:ca(e)};Hi(t,Rn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function _A(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,Hg(t,Rn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(pA,"<$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 kA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))bA(n,t);else{let r="";throw gA.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 Hi(e,t){Hg(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 Hg(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 SA(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Je.PLAINTEXT)return;Hi(t,Rn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Or.html;i===Or.html&&n==="svg"&&(i=Or.svg);const s=D3({...e,children:[]},{space:i===Or.svg?"svg":"html"}),a={type:ke.START_TAG,tagName:n,tagID:Ui(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:ca(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function CA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&U3.includes(n)||t.parser.tokenizer.state===Je.PLAINTEXT)return;Hi(t,sl(e));const r={type:ke.END_TAG,tagName:n,tagID:Ui(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ca(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 NA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ca(e){const t=Rn(e)||{line:void 0,column:void 0,offset:void 0},n=sl(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 AA(e){return"children"in e?Di({...e,children:[]}):Di(e)}function vA(e){return function(t,n){return jg(t,{...e,file:n})}}function vm(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 wA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function IA(e,t,n){const i=ol((n||{}).ignore||[]),s=LA(t);let a=-1;for(;++a<s.length;)rg(e,"text",u);function u(d,f){let h=-1,p;for(;++h<f.length;){const m=f[h],E=p?p.children:void 0;if(i(m,E?E.indexOf(m):void 0,p))return;p=m}if(p)return o(d,f)}function o(d,f){const h=f[f.length-1],p=s[a][0],m=s[a][1];let E=0;const w=h.children.indexOf(d);let g=!1,T=[];p.lastIndex=0;let k=p.exec(d.value);for(;k;){const L=k.index,M={index:k.index,input:k.input,stack:[...f,d]};let S=m(...k,M);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=L+1:(E!==L&&T.push({type:"text",value:d.value.slice(E,L)}),Array.isArray(S)?T.push(...S):S&&T.push(S),E=L+k[0].length,g=!0),!p.global)break;k=p.exec(d.value)}return g?(E<d.value.length&&T.push({type:"text",value:d.value.slice(E)}),h.children.splice(w,1,...T)):T=[d],w+T.length}}function LA(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([DA(i[0]),RA(i[1])])}return t}function DA(e){return typeof e=="string"?new RegExp(wA(e),"g"):e}function RA(e){return typeof e=="function"?e:function(){return e}}const lo="phrasing",oo=["autolink","link","image","label"];function OA(){return{transforms:[HA],enter:{literalAutolink:MA,literalAutolinkEmail:co,literalAutolinkHttp:co,literalAutolinkWww:co},exit:{literalAutolink:UA,literalAutolinkEmail:BA,literalAutolinkHttp:FA,literalAutolinkWww:jA}}}function PA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lo,notInConstruct:oo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lo,notInConstruct:oo},{character:":",before:"[ps]",after:"\\/",inConstruct:lo,notInConstruct:oo}]}}function MA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function co(e){this.config.enter.autolinkProtocol.call(this,e)}function FA(e){this.config.exit.autolinkProtocol.call(this,e)}function jA(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 BA(e){this.config.exit.autolinkEmail.call(this,e)}function UA(e){this.exit(e)}function HA(e){IA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$A]],{ignore:["link","linkReference"]})}function zA(e,t,n,r,i){let s="";if(!zg(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!YA(n)))return!1;const a=VA(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 $A(e,t,n,r){return!zg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function YA(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 VA(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=vm(e,"(");let s=vm(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 zg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yr(n)||al(n))&&(!t||n!==47)}$g.peek=ev;function WA(){this.buffer()}function qA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function QA(){this.buffer()}function GA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function KA(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 XA(e){this.exit(e)}function JA(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 ZA(e){this.exit(e)}function ev(){return"["}function $g(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 tv(){return{enter:{gfmFootnoteCallString:WA,gfmFootnoteCall:qA,gfmFootnoteDefinitionLabelString:QA,gfmFootnoteDefinition:GA},exit:{gfmFootnoteCallString:KA,gfmFootnoteCall:XA,gfmFootnoteDefinitionLabelString:JA,gfmFootnoteDefinition:ZA}}}function nv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$g},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let o=u.move("[^");const d=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?`
|
|
393
|
-
`:" ")+s.indentLines(s.containerFlow(r,u.current()),t?Yg:rv))),d(),o}}function rv(e,t,n){return t===0?e:Yg(e,t,n)}function Yg(e,t,n){return(n?"":" ")+e}const iv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vg.peek=ov;function sv(){return{canContainEols:["delete"],enter:{strikethrough:uv},exit:{strikethrough:lv}}}function av(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iv}],handlers:{delete:Vg}}}function uv(e){this.enter({type:"delete",children:[]},e)}function lv(e){this.exit(e)}function Vg(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 ov(){return"~"}function cv(e){return e.length}function dv(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cv,s=[],a=[],u=[],o=[];let d=0,f=-1;for(;++f<e.length;){const x=[],w=[];let g=-1;for(e[f].length>d&&(d=e[f].length);++g<e[f].length;){const T=fv(e[f][g]);if(n.alignDelimiters!==!1){const k=i(T);w[g]=k,(o[g]===void 0||k>o[g])&&(o[g]=k)}x.push(T)}a[f]=x,u[f]=w}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<d;)s[h]=wm(r[h]);else{const x=wm(r);for(;++h<d;)s[h]=x}h=-1;const p=[],m=[];for(;++h<d;){const x=s[h];let w="",g="";x===99?(w=":",g=":"):x===108?w=":":x===114&&(g=":");let T=n.alignDelimiters===!1?1:Math.max(1,o[h]-w.length-g.length);const k=w+"-".repeat(T)+g;n.alignDelimiters!==!1&&(T=w.length+T+g.length,T>o[h]&&(o[h]=T),m[h]=T),p[h]=k}a.splice(1,0,p),u.splice(1,0,m),f=-1;const E=[];for(;++f<a.length;){const x=a[f],w=u[f];h=-1;const g=[];for(;++h<d;){const T=x[h]||"";let k="",L="";if(n.alignDelimiters!==!1){const M=o[h]-(w[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&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||h)&&g.push(" "),n.alignDelimiters!==!1&&g.push(k),g.push(T),n.alignDelimiters!==!1&&g.push(L),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||h!==d-1)&&g.push("|")}E.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return E.join(`
|
|
394
|
-
`)}function fv(e){return e==null?"":String(e)}function wm(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 hv(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()),mv);return i(),a}function mv(e,t,n){return">"+(n?"":" ")+e}function pv(e,t){return Im(e,t.inConstruct,!0)&&!Im(e,t.notInConstruct,!1)}function Im(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 Lm(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
395
|
-
`&&pv(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
396
|
-
`}function gv(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 Ev(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 Tv(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 yv(e,t,n,r){const i=Tv(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Ev(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(s,xv);return h(),p}const u=n.createTracker(r),o=i.repeat(Math.max(gv(s,i)+1,3)),d=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:`
|
|
397
|
-
`,encode:["`"],...u.current()})),h()}return f+=u.move(`
|
|
398
|
-
`),s&&(f+=u.move(s+`
|
|
399
|
-
`)),f+=u.move(o),d(),f}function xv(e,t,n){return(n?"":" ")+e}function Vd(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 bv(e,t,n,r){const i=Vd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let d=o.move("[");return d+=o.move(n.safe(n.associationId(e),{before:d,after:"]",...o.current()})),d+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(n.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(u=n.enter("destinationRaw"),d+=o.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
400
|
-
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=o.move(" "+i),d+=o.move(n.safe(e.title,{before:d,after:i,...o.current()})),d+=o.move(i),u()),a(),d}function _v(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 Ru(e,t,n){const r=Li(e),i=Li(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}}Wg.peek=kv;function Wg(e,t,n,r){const i=_v(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 d=o.charCodeAt(0),f=Ru(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(o=Xs(d)+o.slice(1));const h=o.charCodeAt(o.length-1),p=Ru(r.after.charCodeAt(0),h,i);p.inside&&(o=o.slice(0,-1)+Xs(h));const m=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},u+o+m}function kv(e,t,n){return n.options.emphasis||"*"}function Sv(e,t){let n=!1;return dl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,gc}),!!((!e.depth||e.depth<3)&&Ld(e)&&(t.options.setext||n))}function Cv(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Sv(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.current(),before:`
|
|
401
|
-
`,after:`
|
|
402
|
-
`});return h(),f(),p+`
|
|
403
|
-
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
404
|
-
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");s.move(a+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
405
|
-
`,...s.current()});return/^[\t ]/.test(d)&&(d=Xs(d.charCodeAt(0))+d.slice(1)),d=d?a+" "+d:a,n.options.closeAtx&&(d+=" "+a),o(),u(),d}qg.peek=Nv;function qg(e){return e.value||""}function Nv(){return"<"}Qg.peek=Av;function Qg(e,t,n,r){const i=Vd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let d=o.move("![");return d+=o.move(n.safe(e.alt,{before:d,after:"]",...o.current()})),d+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(n.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(u=n.enter("destinationRaw"),d+=o.move(n.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=o.move(" "+i),d+=o.move(n.safe(e.title,{before:d,after:i,...o.current()})),d+=o.move(i),u()),d+=o.move(")"),a(),d}function Av(){return"!"}Gg.peek=vv;function Gg(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 d=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(d+"]["),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"||!d||d!==h?o+=u.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function vv(){return"!"}Kg.peek=wv;function Kg(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 d=o.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(o.index+1)}}return i+r+i}function wv(){return"`"}function Xg(e,t){const n=Ld(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))}Jg.peek=Iv;function Jg(e,t,n,r){const i=Vd(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,o;if(Xg(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 d=a.move("[");return d+=a.move(n.containerPhrasing(e,{before:d,after:"](",...a.current()})),d+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=a.move("<"),d+=a.move(n.safe(e.url,{before:d,after:">",...a.current()})),d+=a.move(">")):(o=n.enter("destinationRaw"),d+=a.move(n.safe(e.url,{before:d,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${s}`),d+=a.move(" "+i),d+=a.move(n.safe(e.title,{before:d,after:i,...a.current()})),d+=a.move(i),o()),d+=a.move(")"),u(),d}function Iv(e,t,n){return Xg(e,n)?"<":"["}Zg.peek=Lv;function Zg(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 d=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(d+"]["),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"||!d||d!==h?o+=u.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Lv(){return"["}function Wd(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 Dv(e){const t=Wd(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 Rv(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 eE(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 Ov(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Rv(n):Wd(n);const u=e.ordered?a==="."?")":".":Dv(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),eE(n)===a&&f){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=u),n.bulletCurrent=a;const d=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),d}function Pv(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 Mv(e,t,n,r){const i=Pv(n);let s=n.bulletCurrent||Wd(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"),d=n.indentLines(n.containerFlow(e,u.current()),f);return o(),d;function f(h,p,m){return p?(m?"":" ".repeat(a))+h:(m?s:s+" ".repeat(a-s.length))+h}}function Fv(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const jv=ol(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Bv(e,t,n,r){return(e.children.some(function(a){return jv(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Uv(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tE.peek=Hv;function tE(e,t,n,r){const i=Uv(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 d=o.charCodeAt(0),f=Ru(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(o=Xs(d)+o.slice(1));const h=o.charCodeAt(o.length-1),p=Ru(r.after.charCodeAt(0),h,i);p.inside&&(o=o.slice(0,-1)+Xs(h));const m=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},u+o+m}function Hv(e,t,n){return n.options.strong||"*"}function zv(e,t,n,r){return n.safe(e.value,r)}function $v(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 Yv(e,t,n){const r=(eE(n)+(n.options.ruleSpaces?" ":"")).repeat($v(n));return n.options.ruleSpaces?r.slice(0,-1):r}const nE={blockquote:hv,break:Lm,code:yv,definition:bv,emphasis:Wg,hardBreak:Lm,heading:Cv,html:qg,image:Qg,imageReference:Gg,inlineCode:Kg,link:Jg,linkReference:Zg,list:Ov,listItem:Mv,paragraph:Fv,root:Bv,strong:tE,text:zv,thematicBreak:Yv};function Vv(){return{enter:{table:Wv,tableData:Dm,tableHeader:Dm,tableRow:Qv},exit:{codeText:Gv,table:qv,tableData:fo,tableHeader:fo,tableRow:fo}}}function Wv(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 qv(e){this.exit(e),this.data.inTable=void 0}function Qv(e){this.enter({type:"tableRow",children:[]},e)}function fo(e){this.exit(e)}function Dm(e){this.enter({type:"tableCell",children:[]},e)}function Gv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kv));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kv(e,t){return t==="|"?t:e}function Xv(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
406
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:o,tableRow:u}};function a(m,E,x,w){return d(f(m,x,w),m.align)}function u(m,E,x,w){const g=h(m,x,w),T=d([g]);return T.slice(0,T.indexOf(`
|
|
407
|
-
`))}function o(m,E,x,w){const g=x.enter("tableCell"),T=x.enter("phrasing"),k=x.containerPhrasing(m,{...w,before:s,after:s});return T(),g(),k}function d(m,E){return dv(m,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function f(m,E,x){const w=m.children;let g=-1;const T=[],k=E.enter("table");for(;++g<w.length;)T[g]=h(w[g],E,x);return k(),T}function h(m,E,x){const w=m.children;let g=-1;const T=[],k=E.enter("tableRow");for(;++g<w.length;)T[g]=o(w[g],m,E,x);return k(),T}function p(m,E,x){let w=nE.inlineCode(m,E,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function Jv(){return{exit:{taskListCheckValueChecked:Rm,taskListCheckValueUnchecked:Rm,paragraph:ew}}}function Zv(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tw}}}function Rm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ew(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 tw(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=nE.listItem(e,t,n,{...r,...u.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),o;function d(f){return f+a}}function nw(){return[OA(),tv(),sv(),Vv(),Jv()]}function rw(e){return{extensions:[PA(),nv(e),av(),Xv(e),Zv()]}}const iw={tokenize:cw,partial:!0},rE={tokenize:dw,partial:!0},iE={tokenize:fw,partial:!0},sE={tokenize:hw,partial:!0},sw={tokenize:mw,partial:!0},aE={name:"wwwAutolink",tokenize:lw,previous:lE},uE={name:"protocolAutolink",tokenize:ow,previous:oE},Qn={name:"emailAutolink",tokenize:uw,previous:cE},On={};function aw(){return{text:On}}let Nr=48;for(;Nr<123;)On[Nr]=Qn,Nr++,Nr===58?Nr=65:Nr===91&&(Nr=97);On[43]=Qn;On[45]=Qn;On[46]=Qn;On[95]=Qn;On[72]=[Qn,uE];On[104]=[Qn,uE];On[87]=[Qn,aE];On[119]=[Qn,aE];function uw(e,t,n){const r=this;let i,s;return a;function a(h){return!Cc(h)||!cE.call(r,r.previous)||qd(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return Cc(h)?(e.consume(h),u):h===64?(e.consume(h),o):n(h)}function o(h){return h===46?e.check(sw,f,d)(h):h===45||h===95||kt(h)?(s=!0,e.consume(h),o):f(h)}function d(h){return e.consume(h),i=!0,o}function f(h){return s&&i&&vt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function lw(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!lE.call(r,r.previous)||qd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iw,e.attempt(rE,e.attempt(iE,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function ow(e,t,n){const r=this;let i="",s=!1;return a;function a(h){return(h===72||h===104)&&oE.call(r,r.previous)&&!qd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(vt(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),u;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),o}return n(h)}function o(h){return h===47?(e.consume(h),s?d:(s=!0,o)):n(h)}function d(h){return h===null||vu(h)||Me(h)||Yr(h)||al(h)?n(h):e.attempt(rE,e.attempt(iE,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function cw(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 dw(e,t,n){let r,i,s;return a;function a(d){return d===46||d===95?e.check(sE,o,u)(d):d===null||Me(d)||Yr(d)||d!==45&&al(d)?o(d):(s=!0,e.consume(d),a)}function u(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),a}function o(d){return i||r||!s?n(d):t(d)}}function fw(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(sE,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 hw(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 vt(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):vt(u)?(e.consume(u),a):n(u)}}function mw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kt(s)?n(s):t(s)}}function lE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function oE(e){return!vt(e)}function cE(e){return!(e===47||Cc(e))}function Cc(e){return e===43||e===45||e===46||e===95||kt(e)}function qd(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 pw={tokenize:kw,partial:!0};function gw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xw,continuation:{tokenize:bw},exit:_w}},text:{91:{name:"gfmFootnoteCall",tokenize:yw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ew,resolveTo:Tw}}}}function Ew(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 d=yn(r.sliceSerialize({start:a.end,end:r.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Tw(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 yw(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",d)}function d(h){if(s>999||h===93&&!a||h===null||h===91||Me(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(yn(r.sliceSerialize(p)))?(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:d}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function xw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return o;function o(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(E)}function f(E){if(a>999||E===93&&!u||E===null||E===91||Me(E))return n(E);if(E===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=yn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Me(E)||(u=!0),a++,e.consume(E),E===92?h:f}function h(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}function p(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ae(e,m,"gfmFootnoteDefinitionWhitespace")):n(E)}function m(E){return t(E)}}function bw(e,t,n){return e.check(ua,t,e.attempt(pw,t,n))}function _w(e){e.exit("gfmFootnoteDefinition")}function kw(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 Sw(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 d=o;for(;d--;)if(a[d][0]==="exit"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[d][1].end.offset-a[d][1].start.offset){a[o][1].type="strikethroughSequence",a[d][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[d][1].start),end:Object.assign({},a[o][1].end)},h={type:"strikethroughText",start:Object.assign({},a[d][1].end),end:Object.assign({},a[o][1].start)},p=[["enter",f,u],["enter",a[d][1],u],["exit",a[d][1],u],["enter",h,u]],m=u.parser.constructs.insideSpan.null;m&&Kt(p,p.length,0,ul(m,a.slice(d+1,o),u)),Kt(p,p.length,0,[["exit",h,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",f,u]]),Kt(a,d-1,o-d+3,p),o=d+p.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 d=this.previous,f=this.events;let h=0;return p;function p(E){return d===126&&f[f.length-1][1].type!=="characterEscape"?o(E):(a.enter("strikethroughSequenceTemporary"),m(E))}function m(E){const x=Li(d);if(E===126)return h>1?o(E):(a.consume(E),h++,m);if(h<2&&!n)return o(E);const w=a.exit("strikethroughSequenceTemporary"),g=Li(E);return w._open=!g||g===2&&!!x,w._close=!x||x===2&&!!g,u(E)}}}class Cw{constructor(){this.map=[]}add(t,n,r){Nw(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 Nw(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 Aw(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 vw(){return{flow:{null:{name:"table",tokenize:ww,resolveAll:Iw}}}}function ww(e,t,n){const r=this;let i=0,s=0,a;return u;function u(v){let z=r.events.length-1;for(;z>-1;){const ue=r.events[z][1].type;if(ue==="lineEnding"||ue==="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(v):de(v)}function o(v){return e.enter("tableHead"),e.enter("tableRow"),d(v)}function d(v){return v===124||(a=!0,s+=1),f(v)}function f(v){return v===null?n(v):me(v)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m):n(v):Se(v)?Ae(e,f,"whitespace")(v):(s+=1,a&&(a=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(v)))}function h(v){return v===null||v===124||Me(v)?(e.exit("data"),f(v)):(e.consume(v),v===92?p:h)}function p(v){return v===92||v===124?(e.consume(v),h):h(v)}function m(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(e.enter("tableDelimiterRow"),a=!1,Se(v)?Ae(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):E(v))}function E(v){return v===45||v===58?w(v):v===124?(a=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),x):M(v)}function x(v){return Se(v)?Ae(e,w,"whitespace")(v):w(v)}function w(v){return v===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),g):v===45?(s+=1,g(v)):v===null||me(v)?L(v):M(v)}function g(v){return v===45?(e.enter("tableDelimiterFiller"),T(v)):M(v)}function T(v){return v===45?(e.consume(v),T):v===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(v))}function k(v){return Se(v)?Ae(e,L,"whitespace")(v):L(v)}function L(v){return v===124?E(v):v===null||me(v)?!a||i!==s?M(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(v)):M(v)}function M(v){return n(v)}function S(v){return e.enter("tableRow"),O(v)}function O(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),O):v===null||me(v)?(e.exit("tableRow"),t(v)):Se(v)?Ae(e,O,"whitespace")(v):(e.enter("data"),R(v))}function R(v){return v===null||v===124||Me(v)?(e.exit("data"),O(v)):(e.consume(v),v===92?Y:R)}function Y(v){return v===92||v===124?(e.consume(v),R):R(v)}}function Iw(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,o=0,d,f,h;const p=new Cw;for(;++n<e.length;){const m=e[n],E=m[1];m[0]==="enter"?E.type==="tableHead"?(u=!1,o!==0&&(Om(p,t,o,d,f),f=void 0,o=0),d={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},p.add(n,0,[["enter",d,t]])):E.type==="tableRow"||E.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({},E.start),end:Object.assign({},E.end)},p.add(n,0,[["enter",f,t]])),i=E.type==="tableDelimiterRow"?2:f?3:1):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=Ra(p,t,s,i,void 0,h),s=[0,0,0,0]),a[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],h=Ra(p,t,s,i,void 0,h)),s=a,a=[s[1],n,0,0])):E.type==="tableHead"?(u=!0,o=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],h=Ra(p,t,s,i,n,h)):a[1]!==0&&(h=Ra(p,t,a,i,n,h)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&Om(p,t,o,d,f),p.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=Aw(t.events,n))}return e}function Ra(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},ni(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=ni(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 d=ni(t.events,n[2]),f=ni(t.events,n[3]),h={type:u,start:Object.assign({},d),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],m=t.events[n[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,x=n[3]-n[2]-1;e.add(E,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},ni(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Om(e,t,n,r,i){const s=[],a=ni(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 ni(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Lw={name:"tasklistCheck",tokenize:Rw};function Dw(){return{text:{91:Lw}}}function Rw(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):Se(o)?e.check({tokenize:Ow},t,n)(o):n(o)}}function Ow(e,t,n){return Ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Pw(e){return j1([aw(),gw(),Sw(e),vw(),Dw()])}const Mw={};function Fw(e){const t=this,n=e||Mw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Pw(n)),s.push(nw()),a.push(rw(n))}const jw={search_file:{label:"Searched files",activeLabel:"Searching files",icon:Rr,color:"#3b82f6"},search_files:{label:"Searched files",activeLabel:"Searching files",icon:Rr,color:"#3b82f6"},search_file_content:{label:"Searched content",activeLabel:"Searching content",icon:Rr,color:"#3b82f6"},search_directory:{label:"Searched directory",activeLabel:"Searching directory",icon:Rr,color:"#3b82f6"},read_file:{label:"Read file",activeLabel:"Reading file",icon:In,color:"#8b5cf6"},write_file:{label:"Wrote file",activeLabel:"Writing file",icon:gy,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:fh,color:"#ec4899"},run_shell_command:{label:"Ran command",activeLabel:"Running command",icon:Cu,color:"#22c55e"},execute_code:{label:"Executed code",activeLabel:"Executing code",icon:fy,color:"#f59e0b"},query_documents:{label:"Queried documents",activeLabel:"Querying documents",icon:ei,color:"#06b6d4"},query_specific_file:{label:"Queried file",activeLabel:"Querying file",icon:ei,color:"#06b6d4"},search_indexed_chunks:{label:"Searched chunks",activeLabel:"Searching chunks",icon:ei,color:"#06b6d4"},semantic_search:{label:"Searched documents",activeLabel:"Searching documents",icon:ei,color:"#06b6d4"},evaluate_retrieval:{label:"Evaluated retrieval",activeLabel:"Evaluating retrieval",icon:ei,color:"#06b6d4"},index_document:{label:"Indexed document",activeLabel:"Indexing document",icon:Xi,color:"#f97316"},index_directory:{label:"Indexed directory",activeLabel:"Indexing directory",icon:Xi,color:"#f97316"},index_file:{label:"Indexed file",activeLabel:"Indexing file",icon:Xi,color:"#f97316"},list_indexed_documents:{label:"Listed documents",activeLabel:"Listing documents",icon:Xi,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:Xi,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:i1,color:"#14b8a6"},analyze_data:{label:"Analyzed data",activeLabel:"Analyzing data",icon:fh,color:"#ec4899"}},Pm={label:"Used tool",activeLabel:"Using tool",icon:jy,color:"#3b82f6"};function Bw(e){return e?e.startsWith("mcp_")?{label:"MCP tool",activeLabel:"Running MCP tool",icon:i1,color:"#7c3aed"}:jw[e]||Pm:Pm}function Uw({steps:e,isActive:t,variant:n="inline"}){const[r,i]=_.useState(!1),[s,a]=_.useState(new Set),u=_.useRef(0),o=_.useRef(new Map),d=_.useRef(t);_.useEffect(()=>{d.current=t},[t]),_.useEffect(()=>()=>{o.current.forEach(S=>clearTimeout(S)),o.current.clear()},[]);const f=_.useMemo(()=>{const S=[];for(const O of e){const R=S[S.length-1];if(O.type==="thinking"&&R&&R.type==="thinking"){const Y=(R.detail||"")+(O.detail||"");S[S.length-1]={...O,detail:Y||R.detail};continue}if(O.type==="status"&&R&&R.type==="status"&&O.active!==!1){S[S.length-1]={...O,label:O.label||R.label};continue}if(O.type==="thinking"&&R&&R.type==="status"&&R.active!==!1){S[S.length-1]={...R,type:"thinking",detail:O.detail||R.detail,active:O.active};continue}if(O.type==="status"&&R&&R.type==="thinking"){S[S.length-1]={...R,label:O.label||R.label,active:O.active??R.active};continue}S.push(O)}return S},[e]),h=f.filter(S=>S.type==="tool"),[p,m]=_.useState(""),[E,x]=_.useState("all"),w=_.useMemo(()=>!p&&E==="all"?f:f.filter(S=>{var O;return S.type!=="tool"?!0:!(p&&!((O=S.tool)!=null&&O.toLowerCase().includes(p.toLowerCase()))||E==="success"&&S.success!==!0||E==="error"&&S.success!==!1)}),[f,p,E]),T=f.filter(S=>S.type==="error").length>0;_.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 R=new Set(O);return S.forEach(Y=>R.add(Y)),R})},[f]);const k=_.useCallback(S=>{const O=o.current.get(S);O&&(clearTimeout(O),o.current.delete(S)),a(R=>{const Y=new Set(R);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(Tn,{size:14,className:"agent-icon-error"}):l.jsx(l1,{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(bd,{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:p,onChange:S=>m(S.target.value)}),l.jsxs("select",{className:"activity-filter-select","aria-label":"Filter by status",value:E,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:w.map(S=>S.type==="thinking"?l.jsx(Hw,{step:S},S.id):S.type==="status"?l.jsx(zw,{step:S},S.id):S.type==="tool"?l.jsx(Vw,{step:S,isExpanded:s.has(S.id),onToggle:()=>k(S.id)},S.id):S.type==="plan"?l.jsx(Ww,{step:S},S.id):S.type==="error"?l.jsx(qw,{step:S},S.id):null)})]})]})}function Hw({step:e}){const t=e.detail||e.label||"",n=_.useRef(null);return _.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 zw({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 $w(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=()=>{Cd(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 Yw({fileList:e}){const[t,n]=_.useState(!1),r=5,i=t?e.files:e.files.slice(0,r),s=e.total-r,a=(o,d)=>{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 ${d+1}`:`File ${d+1}`},u=o=>o.directory?String(o.directory):"";return l.jsxs("div",{className:"file-list-view",children:[i.map((o,d)=>l.jsxs("div",{className:"file-list-item",children:[l.jsx(n1,{size:11,className:"file-list-icon"}),l.jsx("span",{className:"file-list-name",children:a(o,d)}),u(o)&&l.jsx("span",{className:"file-list-dir",children:u(o)})]},d)),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 Vw({step:e,isExpanded:t,onToggle:n}){var o,d;const r=Bw(e.tool),i=r.icon,s=r.color,a=e.active?r.activeLabel:r.label,u=!!(e.detail||e.result||e.commandOutput||(d=(o=e.fileList)==null?void 0:o.files)!=null&&d.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(sn,{size:13,className:"flow-tool-spinner",style:{color:s}}):e.success===!1?l.jsx(Tn,{size:13,style:{color:"#ef4444"}}):e.success===!0?l.jsx(Ws,{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:Kw(e.detail)})]}),e.commandOutput&&l.jsx(Gw,{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:$w(e.result)})]}),e.retrievalChunks&&e.retrievalChunks.length>0&&l.jsx(Qw,{chunks:e.retrievalChunks}),e.fileList&&e.fileList.files.length>0&&l.jsx(Yw,{fileList:e.fileList})]})]})}function Ww({step:e}){const[t,n]=_.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(by,{size:12}),l.jsx("span",{children:"Plan"}),l.jsxs("span",{className:"flow-plan-count",children:["(",e.planSteps.length,")"]}),t?l.jsx(bd,{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 qw({step:e}){return l.jsxs("div",{className:"flow-error",children:[l.jsx(Tn,{size:13}),l.jsx("span",{children:e.detail||e.label||"An error occurred"})]})}function Qw({chunks:e}){const[t,n]=_.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(ei,{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 Gw({output:e}){const[t,n]=_.useState(!1),r=_.useRef(null);_.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=_.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(Cu,{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(el,{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 Kw(e){const t=e.includes(`
|
|
408
|
-
`)?e.split(`
|
|
409
|
-
`).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 Xw({active:e}){const t="Thinking...",[n,r]=_.useState(0),[i,s]=_.useState("typing"),a=_.useRef(e);return _.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]),_.useEffect(()=>{a.current&&!e&&s("erasing"),a.current=e},[e]),_.useEffect(()=>{if(i!=="erasing")return;if(n<=0){s("done");return}const u=setTimeout(()=>r(o=>o-1),20);return()=>clearTimeout(u)},[i,n]),_.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 Jw(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 Zw=/\s*\{\s*"?tool"?\s*:\s*"[^"]+"\s*,\s*"?tool_args"?\s*:\s*\{[^}]*\}\s*\}/g;function e6(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 d=e.slice(i,o+1);try{const f=JSON.parse(d);f.answer&&(n+=f.answer)}catch{const f=d.indexOf('"answer"');if(f!==-1){const h=d.indexOf(":",f+8);if(h!==-1){let p=h+1;for(;p<d.length&&/\s/.test(d[p]);)p++;if(p<d.length&&d[p]==='"'){let m=d.slice(p+1);m.endsWith('"}')?m=m.slice(0,-2):m.endsWith('"')&&(m=m.slice(0,-1)),n+=m.replace(/\\"/g,'"').replace(/\\n/g,`
|
|
410
|
-
`).replace(/\\\\/g,"\\")}}}}r=o+1}return n}const t6=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 n6(e){return e.replace(/```(\w*)[ \t]*\n([\s\S]*?)```/g,(t,n,r)=>{const i=n.toLowerCase();return i&&t6.has(i)?t:r.trim()})}function r6(e){if(!e)return e;let t=e;t=t.replace(Zw,""),t=e6(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,`
|
|
411
|
-
`),t=t.replace(/\\"/g,'"')),t=n6(t).trim(),t}function i6(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 Mm(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 s6(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function Fm({message:e,isStreaming:t,showTerminalCursor:n,agentSteps:r,agentStepsActive:i,onDelete:s,onResend:a,latencyMs:u,agentName:o}){var M,S,O;const d=e.role==="assistant"&&Jw(e.content),f=_.useMemo(()=>r6(e.content),[e.content]),[h,p]=_.useState(!1),[m,E]=_.useState(!1),x=_.useRef(null),w=_.useRef(null);_.useEffect(()=>()=>{x.current&&clearTimeout(x.current),w.current&&clearTimeout(w.current)},[]);const g=_.useCallback(()=>{var R;if((R=navigator.clipboard)!=null&&R.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)}p(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>p(!1),2e3)},[e.content]),T=_.useCallback(()=>{if(!m){E(!0),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>E(!1),3e3);return}E(!1),w.current&&clearTimeout(w.current),s==null||s(e.id)},[m,e.id,s]),k=_.useCallback(()=>{a==null||a(e)},[e,a]),L=e.created_at?`${e.role==="user"?"Sent":"Replied"} ${Mm(e.created_at)}`:void 0;return l.jsx("div",{className:`msg msg-${e.role} ${d?"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:_1,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(Xw,{active:!!i||!f}),!t&&e.created_at&&l.jsx("span",{className:"msg-timestamp",children:i6(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(a1,{size:12})}),l.jsx("button",{className:`msg-copy ${h?"copied":""}`,onClick:g,title:h?"Copied!":"Copy message","aria-label":h?"Copied to clipboard":"Copy message",children:h?l.jsx(ra,{size:12}):l.jsx(el,{size:12})}),s&&l.jsx("button",{className:`msg-action-btn msg-delete ${m?"confirm":""}`,onClick:T,title:m?"Click again to confirm":"Delete message","aria-label":m?"Confirm delete message":"Delete message",children:l.jsx(Nu,{size:12})})]})]}),l.jsxs("div",{className:"msg-body",children:[r&&r.length>0&&l.jsx(Uw,{steps:r,isActive:i??!1,variant:i?"inline":"summary"}),d&&l.jsxs("div",{className:"error-banner",children:[l.jsx(Tr,{size:14}),l.jsx("span",{children:"Something went wrong"})]}),l.jsx(d6,{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:Mm(e.created_at)}),u!=null&&u>0&&l.jsx("span",{title:"Total response time",children:s6(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 a6({lang:e,code:t}){const[n,r]=_.useState(!1),i=_.useRef(null);_.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const s=_.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(el,{size:13}),l.jsx("span",{children:n?"Copied":"Copy"})]})]}),l.jsx("pre",{children:l.jsx("code",{children:t})})]})}const u6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*\.\w{1,5}/gi,l6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])+/gi;function o6({path:e}){const t=n=>{n.preventDefault(),Cd(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 c6(e){const t=new RegExp(`(${u6.source}|${l6.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(o6,{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 vs.Children.map(e,t=>typeof t=="string"?c6(t):t)}function d6({content:e,showCursor:t}){return!e&&!t?null:!e&&t?l.jsx("span",{className:"cursor"}):l.jsxs("div",{className:"md-content",children:[l.jsx(f3,{remarkPlugins:[Fw],rehypePlugins:[vA],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=vs.Children.toArray(n)[0];if(vs.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),d=String((a==null?void 0:a.children)||"").replace(/\n$/,"");return l.jsx(a6,{lang:(o==null?void 0:o[1])||"",code:d})}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 f6=500,Ou="gaia_always_allow_tools",Pu=m1((e,t)=>({notifications:[],showPanel:!1,typeFilter:null,addNotification:n=>e(r=>({notifications:[n,...r.notifications].slice(0,f6)})),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(d=>d.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(d){console.error("[notificationStore] Failed to send permission response via IPC:",d);return}else if(a)try{await T1(a,r==="allow")}catch(d){console.error("[notificationStore] Failed to send permission response via REST:",d);return}if(r==="allow"&&i&&s!=null&&s.tool){const d=JSON.parse(localStorage.getItem(Ou)||"[]");d.includes(s.tool)||(d.push(s.tool),localStorage.setItem(Ou,JSON.stringify(d)))}e(d=>({notifications:d.notifications.map(f=>f.id===n?{...f,response:r,respondedAt:Date.now(),read:!0}:f)}))}})),h6=e=>e.notifications.find(t=>t.type==="permission_request"&&!t.response&&!t.dismissed)??null,dE="https://github.com/amd/gaia/issues/new",m6=[{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 Ns(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;for(const n of m6)if(n.extensions.has(t))return n;return null}const p6=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 Mu(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;return p6.has(t)}function fE(){const e="0.17.5",t=navigator.userAgent,n=navigator.platform||"unknown";return`**Environment:**
|
|
412
|
-
- GAIA Version: ${e}
|
|
413
|
-
- Platform: ${n}
|
|
414
|
-
- User Agent: ${t}
|
|
415
|
-
- Interface: Agent UI (Web)`}function jm(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?_","","---",fE(),"","_Submitted from GAIA Agent UI_"].join(`
|
|
416
|
-
`),r=new URLSearchParams({title:`[Feature] ${e}`,body:n,labels:"enhancement,agent-ui"});return`${dE}?${r.toString()}`}function Nc(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?_","","---",fE(),"","_Submitted from GAIA Agent UI_"].join(`
|
|
417
|
-
`),r=new URLSearchParams({title:`[Bug] ${e}`,body:n,labels:"bug,agent-ui"});return`${dE}?${r.toString()}`}function hE({filename:e,error:t,onDismiss:n,timeout:r=15e3}){var m;const i=_.useRef(null);_.useEffect(()=>(r>0&&(i.current=setTimeout(n,r)),()=>{i.current&&clearTimeout(i.current)}),[n,r]);const s=e.includes(".")?"."+((m=e.split(".").pop())==null?void 0:m.toLowerCase()):"",a=s?Ns(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 d,f,h,p=Tn;return u&&a?(d=`${a.label} files not supported`,f=a.message,h=jm(a.featureTitle),p=Tr):u?(d=`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=jm(`Support ${s} file indexing`),p=Tr):o?(d="Connection error",f="Could not reach the GAIA server. Make sure the backend is running.",h=Nc(`Upload connection error for ${e}`),p=Tn):(d=`Failed to index "${e}"`,f=t||"An unexpected error occurred during indexing.",h=Nc(`Indexing error: ${t.slice(0,80)}`),p=dy),l.jsxs("div",{className:"upload-error-toast",role:"alert",children:[l.jsx(p,{size:16}),l.jsxs("div",{className:"upload-error-content",children:[l.jsx("div",{className:"upload-error-title",children:d}),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(ht,{size:14})})]})}const g6=["Summarize a document","Find a file on my computer","Analyze a spreadsheet","Show my recent files"],E6=/\s*\{\s*"?(?:tool|thought|goal)"?\s*:\s*"[^"]*"[^}]*(?:"?tool_args"?\s*:\s*\{[^}]*\})?\s*\}/g;function T6(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,`
|
|
418
|
-
`).replace(/\\\\/g,"\\")}function ho(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 y6({sessionId:e,onCreateAgent:t,onAgentChange:n}){var Jd,Zd,ef;const{sessions:r,messages:i,setMessages:s,addMessage:a,removeMessage:u,removeMessagesFrom:o,updateSessionInList:d,isStreaming:f,streamingContent:h,setStreaming:p,setStreamContent:m,clearStreamContent:E,agentSteps:x,addAgentStep:w,updateLastAgentStep:g,appendThinkingContent:T,updateLastToolStep:k,clearAgentSteps:L,documents:M,setDocuments:S,setShowDocLibrary:O,setShowFileBrowser:R,isLoadingMessages:Y,setLoadingMessages:v,systemStatus:z,agents:K,activeAgentId:de,setActiveAgentId:ue}=_e(),{addNotification:oe}=Pu(),Ne=_e(F=>F.pendingPrompt),ne=r.find(F=>F.id===e),I=new Set((ne==null?void 0:ne.document_ids)??[]),B=M.filter(F=>I.has(F.id)),[y,ee]=_.useState(""),[ce,N]=_.useState(!1),[fe,ye]=_.useState(""),[ge,Oe]=_.useState(!1),[rt,gt]=_.useState(!1),[se,D]=_.useState([]),[W,U]=_.useState([]),[te,he]=_.useState(!1),[Te,$e]=_.useState(null),[Et,zt]=_.useState(!1),cn=_.useRef(null),Sr=(ne==null?void 0:ne.agent_type)||de,gl=(Jd=K.find(F=>F.id===(ne==null?void 0:ne.agent_type)))==null?void 0:Jd.name,El=(Zd=K.find(F=>F.id===de))==null?void 0:Zd.name;_.useEffect(()=>{if(!Et)return;const F=J=>{cn.current&&!cn.current.contains(J.target)&&zt(!1)};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[Et]);const Tl=_.useCallback(async F=>{if(zt(!1),F===Sr)return;const J=Sr;if(ue(F),i.length===0){d(e,{agent_type:F});try{await Ql(e,{agent_type:F})}catch{d(e,{agent_type:J}),ue(J)}}else n==null||n(F)},[Sr,i.length,e,ue,d,n]),[Cr,$]=_.useState(!1),X=_.useRef(""),pe=_.useRef([]),xe=_.useRef(!1);_.useEffect(()=>{h&&(X.current=h)},[h]),_.useEffect(()=>{x.length>0&&(pe.current=x.map(F=>({...F,active:!1})))},[x]),_.useEffect(()=>{if(!f&&xe.current){$(!0);const F=setTimeout(()=>{$(!1),X.current="",pe.current=[]},350);return()=>clearTimeout(F)}xe.current=f},[f]);const Ie=_.useRef(null),Dt=_.useRef(null),ot=_.useRef(null),ct=_.useRef(null),_n=_.useRef(0),kn=_.useRef(!1),Tt=_.useRef(()=>{}),yt=_.useRef(""),Ue=_.useRef(null),Gr=_.useRef(null),Gd=_.useRef(0),da=_.useRef(!0),Kd=_.useCallback(()=>{Ue.current=null,yt.current&&m(yt.current)},[m]),yl=_.useRef(null),Kr=_.useRef(0);_.useEffect(()=>{P.chat.info(`ChatView mounted for session=${e}, loading messages...`);const F=P.chat.time();v(!0);let J=!1;const ae=(re=!1)=>{us(e).then(be=>{if(J)return;const Le=(be.messages||[]).map(Rt=>({...Rt,agentSteps:Rt.agentSteps||Rt.agent_steps||void 0,stats:Rt.stats||Rt.inference_stats||void 0}));re?(s(Le),Kr.current=Le.length,P.chat.timed(`Loaded ${Le.length} message(s) for session=${e}`,F)):Le.length!==Kr.current&&!_e.getState().isStreaming&&(P.chat.info(`Messages changed externally: ${Kr.current} -> ${Le.length}`),s(Le),Kr.current=Le.length)}).catch(be=>{J||re&&(P.chat.error(`Failed to load messages for session=${e}`,be),s([]))}).finally(()=>{!J&&re&&v(!1)})};return ae(!0),yl.current=setInterval(()=>ae(!1),3e3),()=>{J=!0,yl.current&&clearInterval(yl.current)}},[e,s,v]),_.useEffect(()=>{ti().then(F=>S(F.documents||[])).catch(()=>{})},[S]),_.useEffect(()=>{const F=_e.getState().pendingPrompt;if(!F)return;P.chat.info(`Consuming pending prompt: "${F.slice(0,60)}"`),_e.getState().setPendingPrompt(null),ee(F);let J=!1;return requestAnimationFrame(()=>{J||Tt.current(F)}),()=>{J=!0}},[Ne]),_.useEffect(()=>{if(!da.current)return;const J=Date.now()-Gd.current,ae=100,re=()=>{var be;Gd.current=Date.now(),(be=Ie.current)==null||be.scrollIntoView({behavior:"smooth"})};J>=ae&&re(),Gr.current&&clearTimeout(Gr.current),Gr.current=setTimeout(re,ae)},[i,h,x]),_.useEffect(()=>{var F;(F=ot.current)==null||F.focus()},[e]),_.useEffect(()=>()=>{ct.current&&(ct.current.abort(),ct.current=null),Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),Gr.current&&(clearTimeout(Gr.current),Gr.current=null),yt.current="",U(F=>(F.forEach(J=>{J.url&&URL.revokeObjectURL(J.url)}),[]))},[e]);const gE=_.useCallback(()=>{const F=Dt.current;if(!F)return;const J=F.scrollHeight-F.scrollTop-F.clientHeight;da.current=J<=80,gt(J>200)},[]),EE=_.useCallback(()=>{var F;da.current=!0,(F=Ie.current)==null||F.scrollIntoView({behavior:"smooth"})},[]),xl=_.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 F=_e.getState(),J=yt.current||F.streamingContent;if(J){P.stream.info(`Saving partial response (${J.length} chars)`);const ae=F.agentSteps,re={id:Date.now()+1,session_id:e,role:"assistant",content:J,created_at:new Date().toISOString(),rag_sources:null,agentSteps:ae.length>0?[...ae]:void 0};a(re)}yt.current="",p(!1),E(),D([]),L()},[e,a,p,E,L]);_.useEffect(()=>{const F=J=>{J.key==="Escape"&&f&&(J.preventDefault(),xl()),J.key==="k"&&(J.ctrlKey||J.metaKey)&&(J.preventDefault(),window.dispatchEvent(new CustomEvent("gaia:focus-search")))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[f,xl]);const TE=F=>{ee(F.target.value);const J=F.target;J.style.height="auto",J.style.height=Math.min(J.scrollHeight,200)+"px"},yE=_.useCallback(async F=>{var re;const J=(re=F.clipboardData)==null?void 0:re.items;if(!J)return;const ae=[];for(const be of Array.from(J))be.type.startsWith("image/")&&ae.push(be);if(ae.length!==0){F.preventDefault();for(const be of ae){const Le=be.getAsFile();if(!Le)continue;const Rt=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,zi=URL.createObjectURL(Le),it={id:Rt,file:Le,name:Le.name||`screenshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,"-")}.png`,url:zi,uploading:!0,uploaded:!1,isImage:!0};U($t=>[...$t,it]),P.chat.info(`Pasted image: ${it.name} (${Le.size} bytes)`);try{const $t=await Th(Le);U(Yt=>Yt.map(Z=>Z.id===Rt?{...Z,uploading:!1,uploaded:!0,serverUrl:$t.url}:Z)),P.chat.info(`Upload complete: ${it.name} -> ${$t.url}`)}catch($t){P.chat.error(`Upload failed: ${it.name}`,$t),U(Yt=>Yt.map(Z=>Z.id===Rt?{...Z,uploading:!1,error:"Upload failed"}:Z))}}}},[]),xE=_.useCallback(async F=>{var ae;F.preventDefault(),F.stopPropagation(),Oe(!1);const J=(ae=F.dataTransfer)==null?void 0:ae.files;if(!(!J||J.length===0))for(const re of Array.from(J)){const be=re.type.startsWith("image/"),Le=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Rt=be?URL.createObjectURL(re):"",zi={id:Le,file:re,name:re.name,url:Rt,uploading:!0,uploaded:!1,isImage:be};U(it=>[...it,zi]),P.chat.info(`Dropped file: ${re.name} (${re.size} bytes, image=${be})`);try{const it=await Th(re);U($t=>$t.map(Yt=>Yt.id===Le?{...Yt,uploading:!1,uploaded:!0,serverUrl:it.url}:Yt)),P.chat.info(`Upload complete: ${re.name} -> ${it.url}`)}catch(it){P.chat.error(`Upload failed: ${re.name}`,it),U($t=>$t.map(Yt=>Yt.id===Le?{...Yt,uploading:!1,error:"Upload failed"}:Yt))}}},[]),bE=_.useCallback(F=>{U(J=>{const ae=J.find(re=>re.id===F);return ae!=null&&ae.url&&URL.revokeObjectURL(ae.url),J.filter(re=>re.id!==F)})},[]),Xr=_.useCallback(async F=>{const J=(F||y).trim(),ae=W.length>0&&W.some(Z=>Z.uploaded);da.current=!0;const re=(z==null?void 0:z.init_state)==="initializing";if(!J&&!ae||f||re){!J&&!ae&&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 be=J;const Le=W.filter(Z=>Z.uploaded&&Z.serverUrl);if(Le.length>0){const Z=Le.map(Fe=>Fe.isImage?``:`[${Fe.name}](${Fe.serverUrl})`).join(`
|
|
419
|
-
`);be=be?`${be}
|
|
420
|
-
|
|
421
|
-
${Z}`:Z}P.chat.info(`Sending message to session=${e}`,{length:be.length,preview:be.slice(0,80)}),ee(""),ot.current&&(ot.current.style.height="auto",ot.current.focus()),U(Z=>(Z.forEach(Fe=>{Fe.url&&URL.revokeObjectURL(Fe.url)}),[]));const Rt={id:Date.now(),session_id:e,role:"user",content:be,created_at:new Date().toISOString(),rag_sources:null};a(Rt),p(!0),E(),L(),D([]),_n.current=0,kn.current=!1,P.stream.info("Starting agent stream...");const zi=P.stream.time();let it="",$t=!1;yt.current="";const Yt=Cx(e,be,{onChunk:Z=>{const Fe=Z.content||"";if(Fe){Z.type==="answer"?it=Fe:(kn.current&&it.length>0&&(it+=`
|
|
422
|
-
|
|
423
|
-
`,kn.current=!1),it+=Fe);let Re=it.replace(E6,"").trim();if(Re=T6(Re),Re){const Ke=Re.lastIndexOf("{");if(Ke>-1){const Vt=Re.slice(Ke);/^\{\s*"(?:thought|answer|goal|tool)"/.test(Vt)&&(Vt.match(/\{/g)||[]).length>(Vt.match(/\}/g)||[]).length&&(Re=Re.slice(0,Ke).trim())}}yt.current=Re,Ue.current===null&&(Ue.current=requestAnimationFrame(Kd))}},onAgentEvent:Z=>{var Re,Ke,Vt;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(Ou)||"[]").includes(Pe)){Nx(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(Ou)||"[]").includes(Pe)){T1(e,!0).catch(Sn=>console.error("[ChatView] auto-confirm failed:",Sn));return}const{addNotification:Pn}=Pu.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"&&((Vt=Z.result_data.files)==null?void 0:Vt.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=_e.getState().agentSteps,dt=Pe[Pe.length-1];if(dt&&dt.type==="thinking"){T(Z.content||"");return}const Pn=ho(Z,_n);Pn&&w(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=_e.getState().agentSteps,Sn=Pn[Pn.length-1];if(Sn&&Sn.type==="status"&&Sn.active){g({label:dt||"Working",detail:dt});return}if(Sn&&Sn.type==="thinking"&&Sn.active){g({label:dt||"Thinking"});return}const tf=ho(Z,_n);tf&&w(tf)}return}if(Z.type==="step")return;const Fe=ho(Z,_n);Fe&&(w(Fe),Z.type==="tool_start"&&(kn.current=!0))},onDone:Z=>{if($t)return;$t=!0,Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),yt.current="";const Fe=Z.content||it;P.chat.timed(`Agent response complete: ${Fe.length} chars`,zi);const Re=_e.getState().agentSteps.map(Ke=>({...Ke,active:!1}));if(Fe){Kr.current=_e.getState().messages.length+1;const Ke={id:Z.message_id||Date.now()+1,session_id:e,role:"assistant",content:Fe,created_at:new Date().toISOString(),rag_sources:null,agentSteps:Re.length>0?Re:void 0,stats:Z.stats||void 0};a(Ke)}if(D(Re),p(!1),E(),L(),ot.current&&ot.current.focus(),setTimeout(()=>{us(e).then(Ke=>{if(_e.getState().currentSessionId!==e)return;const Vt=(Ke.messages||[]).map(Pe=>({...Pe,agentSteps:Pe.agentSteps||Pe.agent_steps||void 0,stats:Pe.stats||Pe.inference_stats||void 0}));s(Vt),Kr.current=Vt.length}).catch(()=>{})},300),ne&&ne.title==="New Task"){const Ke=J.slice(0,50)+(J.length>50?"...":"");Ql(e,{title:Ke}).then(()=>d(e,{title:Ke})).catch(Vt=>P.chat.error("Auto-title failed",Vt))}},onError:Z=>{Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),yt.current="",P.chat.error(`Chat error for session=${e}`,Z);let Fe;const Re=Z.message||"",Ke=`
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
*Unexpected error?* [Report it on GitHub](${Nc(Re.slice(0,80))})`;Re.includes("Lemonade")||Re.includes("LLM")||Re.includes("Could not get response")?Fe="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")?Fe="Cannot connect to the GAIA server. Make sure the backend is running:\n\n```\ngaia chat --ui\n```"+Ke:Re.includes("500")?Fe="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")?Fe=`The request timed out. The query may be too complex — try breaking it into simpler questions.
|
|
427
|
-
|
|
428
|
-
If Lemonade Server is running but responses are slow, the model may need more resources.`+Ke:Fe=`Error: ${Re}`+Ke;const Vt={id:Date.now()+2,session_id:e,role:"assistant",content:Fe,created_at:new Date().toISOString(),rag_sources:null};a(Vt),p(!1),E(),L()},onAgentCreated:()=>{Sd().then(Z=>_e.getState().setAgents(Z.agents||[])).catch(()=>{})}},void 0,void 0,de);ct.current=Yt},[y,W,f,e,ne,a,s,p,Kd,E,d,w,g,T,k,L,de]);Tt.current=Xr,_.useEffect(()=>{!f&&ot.current&&ot.current.focus()},[f]);const _E=_.useCallback(async F=>{f||(P.chat.info(`Deleting message ${F} from session=${e}`),$e(F),setTimeout(async()=>{u(F),$e(null);try{await _x(e,F)}catch(J){P.chat.error(`Failed to delete message ${F}`,J),us(e).then(ae=>{_e.getState().currentSessionId===e&&s(ae.messages||[])}).catch(()=>{})}},250))},[e,f,u,s]),kE=_.useCallback(async F=>{if(f||F.role!=="user")return;const J=F.content;P.chat.info(`Resending message ${F.id} from session=${e}`,{preview:J.slice(0,80)}),o(F.id);try{await kx(e,F.id)}catch(ae){P.chat.error(`Failed to delete messages from ${F.id}`,ae),us(e).then(re=>{_e.getState().currentSessionId===e&&s(re.messages||[])}).catch(()=>{});return}Xr(J)},[e,f,o,s,Xr]),SE=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Xr())},CE=()=>{ye((ne==null?void 0:ne.title)||""),N(!0)},Xd=async()=>{fe.trim()&&fe!==(ne==null?void 0:ne.title)&&(await Ql(e,{title:fe.trim()}),d(e,{title:fe.trim()})),N(!1)},NE=async()=>{try{const F=await bx(e),J=new Blob([F.content],{type:"text/markdown"}),ae=URL.createObjectURL(J),re=document.createElement("a");re.href=ae;const be=((ne==null?void 0:ne.title)||"chat").replace(/[/\\:*?"<>|]/g,"_").slice(0,100);re.download=`${be}.md`,re.click(),URL.revokeObjectURL(ae)}catch(F){P.chat.error("Export failed",F)}},AE=_.useCallback(async(F,J)=>{F.stopPropagation();const ae=M.find(re=>re.id===J);P.doc.info(`Detaching document from session: ${(ae==null?void 0:ae.filename)||J}`);try{await Ix(e,J);const re=_e.getState().sessions.find(Le=>Le.id===e),be=((re==null?void 0:re.document_ids)??[]).filter(Le=>Le!==J);d(e,{document_ids:be}),be.length<=3&&he(!1),P.doc.info(`Detached document from session: ${(ae==null?void 0:ae.filename)||J}`)}catch(re){P.doc.error(`Failed to detach document: ${(ae==null?void 0:ae.filename)||J}`,re)}},[M,e,d]),vE=_.useCallback(async F=>{if(F.preventDefault(),F.stopPropagation(),Oe(!1),F.dataTransfer.files.length!==0)for(const J of Array.from(F.dataTransfer.files)){P.doc.info(`Dropped on chat view: ${J.name}`);try{const ae=await x1(J);if(e&&(ae!=null&&ae.id))try{await Au(e,ae.id);const re=_e.getState().sessions.find(Le=>Le.id===e),be=(re==null?void 0:re.document_ids)??[];be.includes(ae.id)||d(e,{document_ids:[...be,ae.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(ae){P.doc.error(`Upload failed: ${J.name}`,ae)}}},[e,d]),wE=F=>{F.preventDefault(),F.stopPropagation(),Oe(!0)},IE=F=>{F.preventDefault(),F.stopPropagation(),Oe(!1)},LE=F=>{ee(F),Xr(F)},DE=!Y&&i.length===0&&!f,RE=_.useMemo(()=>{const F=new Map;let J;for(const ae of i)if(ae.role==="user"&&ae.created_at)J=new Date(ae.created_at).getTime();else if(ae.role==="assistant"&&ae.created_at&&J!==void 0){const re=new Date(ae.created_at).getTime();re>J&&F.set(ae.id,re-J),J=void 0}return F},[i]);return l.jsxs("main",{className:`chat-view ${ge?"drag-active":""}`,onDrop:vE,onDragOver:wE,onDragLeave:IE,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:F=>ye(F.target.value),onBlur:Xd,onKeyDown:F=>F.key==="Enter"&&Xd(),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:CE,title:"Rename","aria-label":"Rename chat",children:l.jsx(Iy,{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(wy,{size:15})}),l.jsx("button",{className:"btn-icon-sm",onClick:()=>R(!0),title:"Browse files","aria-label":"Browse files",children:l.jsx(hh,{size:15})}),l.jsx("button",{className:"btn-icon-sm",onClick:NE,title:"Export","aria-label":"Export chat",children:l.jsx($r,{size:15})})]})]}),B.length>0&&(()=>{const F=[...B].sort((re,be)=>{const Le=re.last_accessed_at||re.indexed_at||"";return(be.last_accessed_at||be.indexed_at||"").localeCompare(Le)}),J=te?F:F.slice(0,3),ae=F.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(Ws,{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:be=>AE(be,re.id),title:`Remove ${re.filename} from this session`,"aria-label":`Remove ${re.filename} from this session`,children:l.jsx(ht,{size:10})})]},re.id)),!te&&ae>0&&l.jsxs("button",{className:"doc-pill-more",onClick:re=>{re.stopPropagation(),he(!0)},title:"Show all indexed files","aria-label":`Show ${ae} more files`,children:["+",ae," more"]}),te&&ae>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:Dt,onScroll:gE,children:[Y&&l.jsx("div",{className:"skeleton-messages","aria-label":"Loading messages",children:[0,1,2].map(F=>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"}),F!==2&&l.jsx("div",{className:"skeleton-line"})]})]},F))}),DE&&l.jsxs("div",{className:"empty-chat",children:[l.jsx("div",{className:"empty-chat-icon",children:l.jsx(Sy,{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:g6.map(F=>l.jsx("button",{className:"empty-chat-chip",onClick:()=>LE(F),children:F},F))})]}),i.map((F,J)=>{const ae=!f&&!Cr&&F.role==="assistant"&&i.slice(J+1).every(Le=>Le.role!=="assistant");if(Cr&&F.role==="assistant"&&J===i.length-1)return null;const be=RE.get(F.id);return l.jsx("div",{className:Te===F.id?"msg-deleting":void 0,children:l.jsx(Fm,{message:F,showTerminalCursor:ae,agentSteps:F.role==="assistant"?F.agentSteps:void 0,onDelete:f?void 0:_E,onResend:!f&&F.role==="user"?kE:void 0,latencyMs:be,agentName:F.role==="assistant"?gl:void 0})},F.id)}),(f||Cr)&&l.jsx("div",{className:`streaming-bubble ${Cr?"stream-ending":"stream-active"}`,children:l.jsx(Fm,{message:{id:-1,session_id:e,role:"assistant",content:(f?h:X.current)||"",created_at:"",rag_sources:null},isStreaming:f,showTerminalCursor:Cr,agentSteps:f?x:pe.current,agentStepsActive:f&&x.some(F=>F.active),agentName:El})}),l.jsx("div",{ref:Ie})]}),rt&&l.jsx("button",{className:"scroll-bottom-btn",onClick:EE,title:"Scroll to bottom","aria-label":"Scroll to bottom",children:l.jsx(ly,{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:xE,onDragOver:F=>{F.preventDefault(),F.stopPropagation()},children:[l.jsxs("div",{className:"input-content",children:[W.length>0&&l.jsx("div",{className:"attachment-strip",children:W.map(F=>l.jsxs("div",{className:`attachment-preview ${F.error?"attachment-error":""}`,children:[F.isImage&&F.url?l.jsx("img",{src:F.url,alt:F.name,className:"attachment-thumb"}):l.jsx("div",{className:"attachment-file-icon",children:l.jsx(In,{size:16})}),l.jsx("span",{className:"attachment-name",title:F.name,children:F.name.length>20?F.name.slice(0,17)+"...":F.name}),F.uploading&&l.jsx("span",{className:"attachment-spinner"}),F.error&&l.jsx("span",{className:"attachment-error-text",children:F.error}),l.jsx("button",{className:"attachment-remove",onClick:()=>bE(F.id),title:"Remove","aria-label":`Remove ${F.name}`,children:l.jsx(ht,{size:12})})]},F.id))}),l.jsx("textarea",{ref:ot,className:"msg-input",value:y,onChange:TE,onKeyDown:SE,onPaste:yE,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:()=>R(!0),title:"Browse files","aria-label":"Browse files",children:l.jsx(hh,{size:15})}),f?l.jsx("button",{className:"stop-btn",onClick:xl,title:"Stop generating","aria-label":"Stop generating",children:l.jsx(Oy,{size:14})}):l.jsx("button",{className:"send-btn",onClick:()=>Xr(),disabled:!y.trim()&&!W.some(F=>F.uploaded),title:"Send (Enter)","aria-label":"Send message",children:l.jsx(Ly,{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(_d,{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:cn,children:[l.jsxs("button",{className:"agent-picker-btn",onClick:()=>!f&&zt(F=>!F),title:"Switch agent","aria-label":"Switch agent",disabled:f,children:[l.jsx(lc,{size:10}),l.jsx("span",{children:((ef=K.find(F=>F.id===Sr))==null?void 0:ef.name)||"Agent"}),l.jsx(bd,{size:10})]}),Et&&l.jsx("div",{className:"agent-picker-dropdown",children:K.map(F=>l.jsxs("button",{className:`agent-picker-option${F.id===Sr?" active":""}`,onClick:()=>Tl(F.id),children:[l.jsx(lc,{size:12}),l.jsx("span",{children:F.name})]},F.id))})]}),l.jsx("span",{className:"input-footer-sep"})]}),l.jsxs("span",{className:"input-footer-item",children:[l.jsx(s1,{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 Bm="GAIA",Oa="Your private AI assistant, running 100% locally on AMD Ryzen AI",x6=65,b6=350;function mE(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 _6=["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 k6({onNewTask:e,onSendPrompt:t,onCreateAgent:n}){const{systemStatus:r,agents:i,activeAgentId:s,setActiveAgentId:a}=_e(),u=_.useMemo(()=>{var R;const O=i.find(Y=>Y.id===s);return(R=O==null?void 0:O.conversation_starters)!=null&&R.length?O.conversation_starters:_6},[i,s]),[o,d]=_.useState(""),[f,h]=_.useState(!1),[p,m]=_.useState(""),[E,x]=_.useState(!1),[w,g]=_.useState("title"),[T,k]=_.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 _.useEffect(()=>{let O=0;const R=setInterval(()=>{O++,O<=Bm.length?d(Bm.slice(0,O)):(clearInterval(R),h(!0))},x6);return()=>clearInterval(R)},[]),_.useEffect(()=>{if(!f)return;let O=!1;const R=setTimeout(()=>{if(O)return;g("subtitle");let v=0;const z=()=>{if(!O)if(v++,v<=Oa.length){m(Oa.slice(0,v));const K=Oa[v-1],de=v>1?Oa[v-2]:"",ue=mE(K,de);Y.current=setTimeout(z,ue)}else x(!0),g("done")};z()},b6),Y={current:null};return()=>{O=!0,clearTimeout(R),Y.current&&clearTimeout(Y.current)}},[f]),_.useEffect(()=>{if(!E)return;const O=setTimeout(()=>k(!0),200);return()=>clearTimeout(O)},[E]),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,w==="title"&&l.jsx("span",{className:`terminal-cursor${f?" blink":""}`})]}),l.jsx("p",{className:"welcome-sub",children:l.jsxs("span",{className:"typewriter-text",children:[p,(w==="subtitle"||w==="done")&&l.jsx("span",{className:`terminal-cursor terminal-cursor-sub${w==="done"?" blink":""}`})]})}),l.jsxs("span",{className:"welcome-version",children:["v","0.17.5"," ",l.jsx("span",{className:"beta-badge",children:"BETA"})]}),l.jsxs("div",{className:"features",children:[l.jsx(Pa,{icon:l.jsx(s1,{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(Pa,{icon:l.jsx(l1,{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(Pa,{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(Pa,{icon:l.jsx(py,{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(lc,{size:14}),l.jsx("span",{children:O.name})]},O.id))}),L&&l.jsxs("div",{className:"welcome-setup-hint",children:[l.jsx(Cu,{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(Cu,{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(_d,{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 Pa({icon:e,title:t,desc:n,expandedDesc:r,codeHint:i}){const[s,a]=_.useState("idle"),[u,o]=_.useState(i),[d,f]=_.useState(""),h=_.useRef(null),p=()=>{a("erasing"),f("");let x=i.length;const w=()=>{if(x--,x>=0)o(i.slice(0,x)),h.current=setTimeout(w,15+Math.random()*20);else{a("typing"),o("");let g=0;const T=()=>{if(g++,g<=r.length){f(r.slice(0,g));const k=r[g-1],L=g>1?r[g-2]:"";h.current=setTimeout(T,mE(k,L))}else a("done")};T()}};w()},m=()=>{h.current&&clearTimeout(h.current),a("idle"),o(i),f("")};_.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const E=s!=="idle";return l.jsxs("div",{className:`feature-card ${E?"feature-hovered":""}`,onMouseEnter:p,onMouseLeave:m,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:d}),l.jsx("span",{className:`terminal-cursor terminal-cursor-sm${s==="done"?" blink":""}`})]})]})]})}function S6(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 C6(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 N6(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 A6(){const{documents:e,setDocuments:t,setShowDocLibrary:n,setShowFileBrowser:r,currentSessionId:i,sessions:s,updateSessionInList:a}=_e(),u=s.find(I=>I.id===i)??null,[o,d]=_.useState(!1),[f,h]=_.useState(!1),[p,m]=_.useState(""),[E,x]=_.useState(""),[w,g]=_.useState(null),T=_.useRef(new Map),[,k]=_.useState(0);_.useEffect(()=>{P.doc.info("Loading document library...");const I=P.doc.time();ti().then(B=>{const y=B.documents||[];t(y),P.doc.timed(`Loaded ${y.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");_.useEffect(()=>{if(!L)return;const I=_e.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 y=setInterval(async()=>{if(k(ee=>ee+1),!B){B=!0;try{const ce=_e.getState().documents.filter(N=>N.indexing_status==="indexing"||N.indexing_status==="pending");for(const N of ce)try{const fe=await vx(N.id);if(fe.indexing_status!=="indexing"&&fe.indexing_status!=="pending"){T.current.delete(N.id);const ye=await ti();t(ye.documents||[]);break}}catch{}}finally{B=!1}}},2e3);return()=>clearInterval(y)},[L,t]),_.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]),_.useEffect(()=>{const I=setInterval(async()=>{try{const y=(await ti()).documents||[],ee=_e.getState().documents;(y.length!==ee.length||y.some((N,fe)=>{const ye=ee.find(ge=>ge.id===N.id);return!ye||ye.indexing_status!==N.indexing_status||ye.indexed_at!==N.indexed_at||ye.chunk_count!==N.chunk_count}))&&(t(y),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,y=["B","KB","MB","GB"],ee=Math.min(Math.floor(Math.log(I)/Math.log(B)),y.length-1);return parseFloat((I/Math.pow(B,ee)).toFixed(1))+" "+y[ee]},R=_.useCallback(async(I,B)=>{var ce;const y=I.includes(".")?"."+((ce=I.split(".").pop())==null?void 0:ce.toLowerCase()):"";if(y&&!Mu(y)){const N=Ns(y),fe=N?N.message:`The file type "${y}" is not supported for indexing.`;P.doc.warn(`Unsupported file type: ${I} (${y})`),g({filename:I,error:fe});return}P.doc.info(`Indexing document: ${I}`);const ee=P.doc.time();h(!0),m(`Indexing ${I}...`),g(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 ye=_e.getState().sessions.find(Oe=>Oe.id===i),ge=(ye==null?void 0:ye.document_ids)??[];ge.includes(N.id)||a(i,{document_ids:[...ge,N.id]}),P.doc.info(`Auto-attached "${I}" to session ${i}`)}catch(ye){P.doc.warn(`Could not attach document to session: ${ye}`)}const fe=await ti();t(fe.documents||[]),m("")}catch(N){P.doc.error(`Failed to index "${I}"`,N);const fe=N instanceof Error?N.message:"Upload failed";g({filename:I,error:fe}),m("")}finally{h(!1)}},[i,a,t]),Y=_.useCallback(async(I,B)=>{await R(B,()=>y1(I))},[R]),v=_.useCallback(async I=>{await R(I.name,()=>x1(I))},[R]),z=_.useCallback(async I=>{I.preventDefault(),d(!1);const B=Array.from(I.dataTransfer.files);P.doc.info(`Dropped ${B.length} file(s) into Document Library`);for(const y of B)await v(y)},[v]),K=_.useCallback(async I=>{const B=e.find(y=>y.id===I);P.doc.info(`Deleting document: ${(B==null?void 0:B.filename)||I}`);try{await Ax(I),T.current.delete(I),t(e.filter(y=>y.id!==I)),P.doc.info(`Deleted document: ${(B==null?void 0:B.filename)||I}`)}catch(y){P.doc.error(`Failed to delete document: ${(B==null?void 0:B.filename)||I}`,y)}},[e,t]),de=_.useCallback(async(I,B)=>{P.doc.info(`Opening folder for: ${I}`);try{await Cd(I,!0)}catch(y){P.doc.error(`Failed to open folder for: ${B}`,y)}},[]),ue=_.useCallback(async I=>{const B=e.find(y=>y.id===I);P.doc.info(`Cancelling indexing for: ${(B==null?void 0:B.filename)||I}`);try{await wx(I),T.current.delete(I);const y=await ti();t(y.documents||[]),P.doc.info(`Cancelled indexing for: ${(B==null?void 0:B.filename)||I}`)}catch(y){P.doc.error(`Failed to cancel indexing: ${(B==null?void 0:B.filename)||I}`,y)}},[e,t]),oe=_.useCallback(async I=>{if(!i)return;const B=e.find(y=>y.id===I);P.doc.info(`Attaching document to session: ${(B==null?void 0:B.filename)||I}`);try{await Au(i,I);const y=_e.getState().sessions.find(ce=>ce.id===i),ee=(y==null?void 0:y.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(y){P.doc.error(`Failed to attach document to session: ${(B==null?void 0:B.filename)||I}`,y)}},[i,e,a]),Ne=_.useCallback(async I=>{I.preventDefault(),E.trim()&&(P.doc.info(`Indexing from path input: ${E.trim()}`),await Y(E.trim(),E.trim().split(/[\\/]/).pop()||"file"),x(""))},[E,Y]),ne=I=>{const B=I.indexing_status||"complete",y=T.current.get(I.id),ee=I.indexed_at?C6(I.indexed_at):"",ce=I.indexed_at?N6(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(_y,{size:12,className:"doc-spin"}),"Indexing",y?` (${S6(y)})`:"..."]})]}),l.jsxs("button",{className:"btn-cancel",onClick:N=>{N.stopPropagation(),ue(I.id)},title:"Cancel indexing","aria-label":`Cancel indexing ${I.filename}`,children:[l.jsx(mh,{size:14}),"Cancel"]})]});case"failed":return l.jsxs("span",{className:"doc-status-badge doc-status-failed",children:[l.jsx(Tn,{size:12})," Failed"]});case"cancelled":return l.jsxs("span",{className:"doc-status-badge doc-status-cancelled",children:[l.jsx(mh,{size:12})," Cancelled"]});case"missing":return l.jsxs("span",{className:"doc-status-badge doc-status-missing",children:[l.jsx(Tn,{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(t1,{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(ht,{size:18})})]}),l.jsxs("div",{className:"modal-body",children:[l.jsx("div",{className:`drop-zone ${o?"drag-over":""} ${f?"uploading":""}`,onDragOver:I=>{I.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:z,children:f?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"upload-spinner"}),l.jsx("p",{children:p})]}):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:Ne,children:[l.jsx(Hn,{size:16,className:"path-icon"}),l.jsx("input",{type:"text",className:"path-input",value:E,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:!E.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(Rr,{size:14}),"Browse Files"]})]}),w&&l.jsx(hE,{filename:w.filename,error:w.error,onDismiss:()=>g(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(xy,{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(Nu,{size:14})})]})]},I.id)})]})]})]})})}function v6(e){if(e.type==="folder")return l.jsx(r1,{size:16});const t=(e.extension||"").toLowerCase();return[".csv",".xlsx",".xls",".tsv"].includes(t)?l.jsx(My,{size:16}):[".py",".js",".ts",".java",".c",".cpp",".go",".rs"].includes(t)?l.jsx(hy,{size:16}):[".pdf",".doc",".docx",".txt",".md"].includes(t)?l.jsx(In,{size:16}):l.jsx(n1,{size:16})}function w6(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 I6(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 L6(e){switch(e){case"home":return l.jsx(Ty,{size:14});case"desktop":return l.jsx(Cy,{size:14});case"documents":return l.jsx(In,{size:14});case"download":return l.jsx($r,{size:14});default:return l.jsx(r1,{size:14})}}const D6=[{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 Um(e,t,n,r){var h;const i=[],s=[];for(const p of e){const m=p.includes(".")?"."+((h=p.split(".").pop())==null?void 0:h.toLowerCase()):"";m&&!Mu(m)?s.push(p):i.push(p)}const a=[],u=[];let o=0,d="";const f=new Set(t.filter(p=>p.type==="folder").map(p=>p.path));for(const p of i)try{if(f.has(p)){const m=await Dx(p),E=[];m.documents.forEach(x=>{x.id&&E.push(x.id)}),E.length>0&&(E.forEach(x=>a.push(x)),u.push(p))}else{const m=await y1(p);m!=null&&m.id&&(a.push(m.id),u.push(p))}}catch(m){o++,d=m instanceof Error?m.message:"Unknown error"}if(n&&a.length>0){for(const x of a)try{await Au(n,x)}catch(w){P.doc.warn(`Could not attach document to session: ${w}`)}const p=_e.getState().sessions.find(x=>x.id===n),m=(p==null?void 0:p.document_ids)??[],E=a.filter(x=>!m.includes(x));E.length>0&&r(n,{document_ids:[...m,...E]})}return{docIds:a,supported:i,succeededFiles:u,unsupported:s,failed:o,lastError:d}}function R6(){const{setShowFileBrowser:e,currentSessionId:t,updateSessionInList:n,setPendingPrompt:r}=_e(),[i,s]=_.useState(""),[a,u]=_.useState(null),[o,d]=_.useState([]),[f,h]=_.useState([]),[p,m]=_.useState(!1),[E,x]=_.useState(null),[w,g]=_.useState(""),[T,k]=_.useState(null),[L,M]=_.useState(!1),[S,O]=_.useState(""),[R,Y]=_.useState(new Set),[v,z]=_.useState(null),[K,de]=_.useState(!1),[ue,oe]=_.useState(new Set),[Ne,ne]=_.useState(null),I=_.useRef(null),[B,y]=_.useState(null),ee=_.useCallback(async D=>{m(!0),x(null),k(null),g("");try{const W=await Lx(D);s(W.current_path),u(W.parent_path),d(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{m(!1)}},[]);_.useEffect(()=>{ee()},[ee]),_.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]);const ce=_.useCallback(async()=>{if(!w.trim()){k(null);return}M(!0),x(null);try{const D=await Rx(w.trim(),S||void 0,30);k(D.results),P.ui.info(`Search "${w}": ${D.total} results`)}catch(D){const W=D instanceof Error?D.message:"Search failed";x(W),P.ui.error("Search failed",D)}finally{M(!1)}},[w,S]),N=D=>{D.key==="Enter"&&ce()},fe=_.useCallback(D=>{D.type==="folder"&&(ee(D.path),Y(new Set),z(null))},[ee]),ye=_.useCallback(async D=>{de(!0);try{const W=await Ox(D);z(W)}catch(W){P.ui.error("Preview failed",W)}finally{de(!1)}},[]),ge=_.useCallback(async()=>{if(R.size===0)return;const D=Array.from(R);if(y(null),!D.some(U=>{var he;const te=U.includes(".")?"."+((he=U.split(".").pop())==null?void 0:he.toLowerCase()):"";return!te||Mu(te)})){const U=D[0],te=U.lastIndexOf("."),he=te>0?U.slice(te).toLowerCase():"",Te=Ns(he);y({filename:D.length===1?U.split(/[\\/]/).pop()||U:`${D.length} files`,error:Te?Te.message:`File type "${he}" is not supported for indexing.`});return}oe(new Set(D)),ne(`Indexing ${D.length} file(s)...`);try{const U=await Um(D,o,t,n);if(U.failed>0)ne(`Done: ${U.docIds.length} indexed, ${U.failed} failed`),y({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),y({filename:D.length===1?D[0].split(/[\\/]/).pop()||D[0]:`${D.length} files`,error:U instanceof Error?U.message:"An unexpected error occurred."})}finally{oe(new Set)}},[R,t,n,o]),Oe=_.useCallback(async()=>{if(R.size===0)return;const D=Array.from(R);y(null),oe(new Set(D)),ne(`Indexing ${D.length} file(s) for analysis...`);try{const W=await Um(D,o,t,n);if(W.supported.length===0){const he=D[0].lastIndexOf("."),Te=he>0?D[0].slice(he).toLowerCase():"",$e=Ns(Te);y({filename:D.length===1?D[0].split(/[\\/]/).pop()||D[0]:`${D.length} files`,error:($e==null?void 0:$e.message)??`File type "${Te}" is not supported for indexing.`});return}if(W.docIds.length===0){y({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:
|
|
429
|
-
${U.map(he=>`- ${he}`).join(`
|
|
430
|
-
`)}`;r(te),e(!1),Y(new Set)}catch(W){P.doc.error("Ask Agent failed",W),y({filename:D.length===1?D[0].split(/[\\/]/).pop()||D[0]:`${D.length} files`,error:W instanceof Error?W.message:"An unexpected error occurred."})}finally{oe(new Set),ne(null)}},[R,t,n,o,r,e]),rt=i?i.replace(/\\/g,"/").split("/").filter(Boolean):[],gt=rt.map((D,W)=>({label:D,path:rt.slice(0,W+1).join("/")+(W===0&&D.includes(":")?"/":"")})),se=T?T.map(D=>({name:D.name,path:D.path,type:"file",size:D.size,extension:D.extension||"",modified:D.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 ${v?"has-preview":""}`,onClick:D=>D.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(ht,{size:18})})]}),l.jsxs("div",{className:"file-browser-body",children:[l.jsx("div",{className:"fb-quick-links",children:f.map(D=>l.jsxs("button",{className:"fb-quick-link",onClick:()=>ee(D.path),title:D.path,children:[L6(D.icon),l.jsx("span",{children:D.name})]},D.path))}),l.jsxs("div",{className:"fb-search-bar",children:[l.jsxs("div",{className:"fb-search-input-wrap",children:[l.jsx(Rr,{size:14,className:"fb-search-icon"}),l.jsx("input",{type:"text",className:"fb-search-input",placeholder:"Search files on your PC...",value:w,onChange:D=>g(D.target.value),onKeyDown:N,"aria-label":"Search files"}),w&&l.jsx("button",{className:"fb-search-clear",onClick:()=>{g(""),k(null)},"aria-label":"Clear search",children:l.jsx(ht,{size:12})})]}),l.jsx("select",{className:"fb-type-filter",value:S,onChange:D=>O(D.target.value),"aria-label":"File type filter",children:D6.map(D=>l.jsx("option",{value:D.value,children:D.label},D.value))}),l.jsx("button",{className:"fb-search-btn",onClick:ce,disabled:!w.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(Ey,{size:12})}),gt.map((D,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(D.path),children:D.label})]},W)),a&&l.jsx("button",{className:"fb-up-btn",onClick:()=>ee(a),title:"Go up",children:l.jsx(oy,{size:14})})]}),T&&l.jsxs("div",{className:"fb-search-header",children:[l.jsxs("span",{children:["Found ",T.length,' result(s) for "',w,'"']}),l.jsx("button",{className:"fb-back-btn",onClick:()=>{k(null),g("")},children:"Back to browsing"})]}),E&&l.jsx("div",{className:"fb-error",children:E}),l.jsxs("div",{className:"fb-content",children:[l.jsxs("div",{className:"fb-file-list",children:[p&&l.jsx("div",{className:"fb-loading",children:"Loading..."}),!p&&se.length===0&&l.jsx("div",{className:"fb-empty",children:T?"No files found":"This folder is empty"}),!p&&se.map(D=>{var he;const W=D.extension||(D.name.includes(".")?"."+((he=D.name.split(".").pop())==null?void 0:he.toLowerCase()):""),U=D.type==="file"&&W&&!Mu(W),te=U?Ns(W):null;return l.jsxs("div",{className:`fb-entry ${D.type} ${R.has(D.path)?"selected":""} ${U?"unsupported":""}`,onClick:()=>D.type==="folder"?fe(D):ye(D.path),onDoubleClick:()=>D.type==="folder"?fe(D):void 0,title:U?`${(te==null?void 0:te.label)||"This"} file type cannot be indexed`:D.path,children:[l.jsx("input",{type:"checkbox",className:"fb-entry-checkbox",checked:R.has(D.path),onChange:()=>{Y(Te=>{const $e=new Set(Te);return $e.has(D.path)?$e.delete(D.path):$e.add(D.path),$e})},onClick:Te=>Te.stopPropagation(),"aria-label":`Select ${D.name}`}),l.jsx("span",{className:"fb-entry-icon",children:v6(D)}),l.jsx("span",{className:"fb-entry-name",title:D.path,children:D.name}),U&&l.jsx("span",{className:"fb-unsupported-badge",children:"Not indexable"}),l.jsx("span",{className:"fb-entry-size",children:D.type==="file"?w6(D.size):""}),l.jsx("span",{className:"fb-entry-date",children:I6(D.modified)})]},D.path)})]}),v&&l.jsxs("div",{className:"fb-preview",children:[l.jsxs("div",{className:"fb-preview-header",children:[l.jsx("span",{className:"fb-preview-name",children:v.name}),l.jsx("button",{className:"btn-icon-sm",onClick:()=>z(null),"aria-label":"Close preview",children:l.jsx(ht,{size:14})})]}),l.jsxs("div",{className:"fb-preview-meta",children:[l.jsx("span",{children:v.size_display}),v.total_lines&&l.jsxs("span",{children:[v.total_lines," lines"]}),v.columns&&l.jsxs("span",{children:[v.columns.length," columns"]}),v.row_count!==null&&l.jsxs("span",{children:[v.row_count," rows"]})]}),v.columns&&l.jsxs("div",{className:"fb-preview-columns",children:[l.jsx("strong",{children:"Columns:"})," ",v.columns.join(", ")]}),K?l.jsx("div",{className:"fb-preview-loading",children:"Loading preview..."}):v.is_text&&v.preview_lines.length>0?l.jsx("pre",{className:"fb-preview-content",children:v.preview_lines.slice(0,30).join(`
|
|
431
|
-
`)}):l.jsx("div",{className:"fb-preview-binary",children:"Binary file - no preview available"})]})]}),B&&l.jsx(hE,{filename:B.filename,error:B.error,onDismiss:()=>y(null)}),l.jsxs("div",{className:"fb-actions",children:[l.jsx("div",{className:"fb-selection-info",children:R.size>0?`${R.size} item(s) selected`:"Select files to index or analyze"}),Ne&&l.jsx("span",{className:"fb-index-status",children:Ne}),l.jsxs("div",{className:"fb-action-btns",children:[l.jsxs("button",{className:"fb-action-btn secondary",onClick:ge,disabled:R.size===0||ue.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:R.size===0||ue.size>0,title:"Index and send selected files to the chat agent for analysis",children:[l.jsx(cy,{size:14}),"Ask Agent"]})]})]})]})]})})}const As=32768,Qd="Qwen3.5-35B-A3B-GGUF",O6=3e5,P6=18e5,M6=1e4;function pE(e){const[t,n]=_.useState(!1),[r,i]=_.useState(!1),s=_.useRef(null),a=_.useRef(null),u=_.useRef(null),o=_.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)},[]);_.useEffect(()=>o,[o]);const d=_.useCallback((m,E)=>{u.current&&clearInterval(u.current),u.current=setInterval(async()=>{var x,w;try{const g=await kd();E==="load"?((x=g.model_loaded)==null?void 0:x.toLowerCase())===m.toLowerCase()&&(n(!1),s.current&&(clearTimeout(s.current),s.current=null),u.current&&(clearInterval(u.current),u.current=null)):(g.model_downloaded===!0||((w=g.model_loaded)==null?void 0:w.toLowerCase())===m.toLowerCase())&&(i(!1),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null))}catch{}},M6)},[]),f=e??Qd,h=_.useCallback(async(m,E)=>{const x=m??f,w=E??As;n(!0);try{await Tx(x,w),P.system.info(`Load model triggered: ${x} (ctx=${w})`),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),O6),d(x,"load")}catch(g){P.system.error("Failed to trigger model load",g),n(!1)}},[f,d]),p=_.useCallback(async(m=!1,E)=>{const x=E??f;i(!0);try{await yx(x,m),P.system.info(`Download model triggered: ${x} (force=${m})`),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),P6),d(x,"download")}catch(w){P.system.error("Failed to trigger model download",w),i(!1)}},[f,d]);return{isLoadingModel:t,isDownloadingModel:r,loadModel:h,downloadModel:p}}const Hm=p1();function F6(){const{agents:e,setAgents:t}=_e(),[n,r]=_.useState({kind:"idle"}),i=_.useRef(null),s=_.useRef(null),a=_.useRef(null);_.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),_.useEffect(()=>{var E;n.kind==="error"&&((E=a.current)==null||E.scrollIntoView({behavior:"smooth",block:"nearest"}))},[n]);const u=_.useCallback((E,x=5e3)=>{r(E),s.current&&clearTimeout(s.current),(E.kind==="success"||E.kind==="error")&&(s.current=setTimeout(()=>r({kind:"idle"}),x))},[]),o=_.useCallback(async()=>{try{const E=await Sd();t(E.agents||[])}catch(E){P.api.warn("Failed to refresh agents after import",E)}},[t]),d=e.filter(E=>E.source!=="builtin"),f=_.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.
|
|
432
|
-
|
|
433
|
-
Continue?`)){u({kind:"working",message:"Exporting…"});try{const x=await fetch(`${Hm}/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 w=await x.blob(),g=URL.createObjectURL(w),T=document.createElement("a");T.href=g,T.download="gaia-agents-export.zip",document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(g),u({kind:"success",message:"Export downloaded."})}catch(x){console.error("Agent export failed:",x);const w=x instanceof Error?x.message:String(x);P.api.error("Agent export failed",x),u({kind:"error",message:`Export failed: ${w}`})}}},[u]),h=_.useCallback(()=>{var E;(E=i.current)==null||E.click()},[]),p=_.useCallback(async E=>{var k;const x=(k=E.target.files)==null?void 0:k[0];if(E.target.value="",!x)return;let w=null;if(x.size<=100*1024*1024)try{w=await j6(x)}catch(L){P.api.warn("Could not pre-read bundle.json from zip",L)}const g=w&&w.length>0?`Agents to install: ${w.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.
|
|
434
|
-
|
|
435
|
-
`+g+`
|
|
436
|
-
|
|
437
|
-
Import?`)){u({kind:"working",message:"Uploading…"});try{const L=new FormData;L.append("bundle",x,x.name);const M=await fetch(`${Hm}/agents/import`,{method:"POST",headers:{"X-Gaia-UI":"1"},body:L});if(!M.ok){const v=await M.text().catch(()=>"");let z=v;try{z=JSON.parse(v).detail||v}catch{}throw new Error(z||`Import failed (HTTP ${M.status})`)}const S=await M.json(),O=S.imported||[],R=S.overwritten||[];await o();let Y;if(O.length===0?Y="No agents imported":(Y=`Installed ${O.length} agent(s): ${O.join(", ")}`,R.length>0&&(Y+=` (replaced: ${R.join(", ")})`)),S.requires_restart&&(Y+=" — restart required for replaced agents to take full effect"),S.errors&&S.errors.length>0){const v=S.errors.map(z=>`${z.id}: ${z.error}`).join("; ");u({kind:"error",message:`${Y}. Errors: ${v}`})}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]),m=n.kind==="working";return l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"Custom Agents"}),d.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:d.map(E=>l.jsxs("div",{className:"status-row",children:[l.jsx("span",{className:"status-label",children:E.name}),l.jsxs("div",{className:"status-value-wrap",children:[l.jsx("span",{className:"status-value ok",children:E.id}),E.source&&E.source!=="builtin"&&l.jsx("span",{className:"status-hint",children:l.jsx("code",{children:E.source})})]})]},E.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:m||d.length===0,title:d.length===0?"No custom agents to export":void 0,children:m&&n.message.startsWith("Export")?l.jsxs(l.Fragment,{children:[l.jsx(sn,{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:m,children:m&&n.message.startsWith("Upload")?l.jsxs(l.Fragment,{children:[l.jsx(sn,{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:p})]}),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(sn,{size:14,className:"btn-spinner"}),n.kind==="success"&&l.jsx(Ws,{size:14}),n.kind==="error"&&l.jsx(Tn,{size:14}),l.jsx("span",{children:n.message})]})]})}async function j6(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 d=n.getUint32(a+16,!0);for(let f=0;f<u;f++){if(d+46>t.byteLength||n.getUint32(d,!0)!==33639248)return null;const h=n.getUint16(d+10,!0),p=n.getUint32(d+20,!0),m=n.getUint16(d+28,!0),E=n.getUint16(d+30,!0),x=n.getUint16(d+32,!0),w=n.getUint32(d+42,!0);if(new TextDecoder("utf-8").decode(r.subarray(d+46,d+46+m))==="bundle.json"){if(w+30>t.byteLength||n.getUint32(w,!0)!==67324752)return null;const T=n.getUint16(w+26,!0),k=n.getUint16(w+28,!0),L=w+30+T+k,M=L+p;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 v=new DecompressionStream("deflate-raw"),z=new Blob([S]).stream().pipeThrough(v),K=await new Response(z).arrayBuffer();O=new TextDecoder("utf-8").decode(K)}else return null;const R=JSON.parse(O),Y=R==null?void 0:R.agent_ids;return Array.isArray(Y)&&Y.every(v=>typeof v=="string")?Y:null}d+=46+m+E+x}return null}function B6(){const{setShowSettings:e,sessions:t,removeSession:n,agents:r}=_e(),[i,s]=_.useState(null),[a,u]=_.useState(!0),[o,d]=_.useState([]),[f,h]=_.useState(""),[p,m]=_.useState(""),[E,x]=_.useState(!1),[w,g]=_.useState(!1),[T,k]=_.useState(null),[L,M]=_.useState(!1),S=_.useRef(null);_.useEffect(()=>{P.system.info("Checking system status...");const D=P.system.time();kd().then(W=>{s(W),P.system.timed("System status received",D,{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)),Fx().then(W=>d(W.servers)).catch(()=>{}),gx().then(W=>{const U=W.custom_model??"";h(U),m(U)}).catch(W=>{P.system.error("Failed to load settings",W)}).finally(()=>x(!0))},[]),_.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const O=_.useCallback(async()=>{const D=f.trim(),W=D.length>0?D:"";g(!0),k(null),M(!1);try{P.system.info("Saving custom_model override",{custom_model:W});const te=(await Ex({custom_model:W})).custom_model??"";h(te),m(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{g(!1)}},[f]),R=f.trim()!==p.trim(),Y=(i==null?void 0:i.default_model_name)??Qd,{isLoadingModel:v,isDownloadingModel:z,loadModel:K,downloadModel:de}=pE(Y),ue=[{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,[Ne,ne]=_.useState("");_.useEffect(()=>{oe!=null&&ne(String(oe))},[oe]);const I=(()=>{const D=parseInt(Ne,10);return Number.isFinite(D)&&D>0?D:null})(),B=I!=null&&I!==oe,y=(i==null?void 0:i.model_loaded)??Y,ee=_.useCallback(async()=>{I&&(P.system.info(`Reloading ${y} with ctx_size=${I}`),await K(y,I))},[I,y,K]),[ce,N]=_.useState(!1),fe=_.useRef(null);_.useEffect(()=>()=>{fe.current&&clearTimeout(fe.current)},[]);const ye=_.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 D=P.system.time();let W=0;for(const U of t)try{await E1(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)`,D),e(!1)},[ce,t,n,e]),ge="0.17.5",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.jsx("div",{className:"modal-overlay",onClick:()=>e(!1),role:"dialog","aria-modal":"true","aria-label":"Settings",children:l.jsxs("div",{className:"modal-panel settings-modal",onClick:D=>D.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsx("h3",{children:"Settings"}),l.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close settings",children:l.jsx(ht,{size:18})})]}),l.jsxs("div",{className:"modal-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(fn,{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(fn,{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(fn,{label:"Model Size",value:`${i.model_size_gb} GB`,ok:!0}),i.model_device&&l.jsx(fn,{label:"Device",value:i.model_device.toUpperCase(),ok:i.model_device!=="cpu"}),i.model_context_size!=null&&l.jsx(fn,{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(fn,{label:"Capabilities",value:i.model_labels.join(", "),ok:!0}),l.jsx(fn,{label:"Embedding Model",value:i.embedding_model_loaded?"Available":"Not loaded",ok:i.embedding_model_loaded}),i.gpu_name&&l.jsx(fn,{label:"GPU",value:`${i.gpu_name}${i.gpu_vram_gb?` (${i.gpu_vram_gb} GB)`:""}`,ok:!0}),l.jsx(fn,{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(fn,{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(fn,{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(sn,{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:v,children:v?l.jsxs(l.Fragment,{children:[l.jsx(sn,{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(sn,{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${p?" has-override":""}`,placeholder:"Use agent default",value:f,onChange:D=>{h(D.target.value),k(null),M(!1)},onKeyDown:D=>{D.key==="Enter"&&!w&&R&&E&&(D.preventDefault(),O())},disabled:!E||w,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:!E||w||!R&&!L,"aria-label":"Save custom model",children:w?l.jsxs(l.Fragment,{children:[l.jsx(sn,{size:13,className:"btn-spinner"})," Saving…"]}):L?l.jsxs(l.Fragment,{children:[l.jsx(Ws,{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(Tn,{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:ue.map(D=>{const W=I===D.value;return l.jsx("button",{className:`btn-ctx-preset${W?" active":""}`,onClick:()=>ne(String(D.value)),disabled:v,type:"button",children:D.label},D.value)})}),l.jsxs("div",{className:"model-input-row",children:[l.jsx("input",{type:"number",className:"model-input",placeholder:oe!=null?String(oe):"4096",value:Ne,min:512,step:1024,onChange:D=>ne(D.target.value),disabled:v,"aria-label":"Context size in tokens"}),l.jsx("div",{className:"model-btn-group",children:l.jsx("button",{className:"btn-model-save",onClick:()=>{ee()},disabled:v||!B||!(i!=null&&i.lemonade_running),"aria-label":"Reload model with new context size",children:v?l.jsxs(l.Fragment,{children:[l.jsx(sn,{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 D=i.memory_available_gb,W=r.filter(U=>U.min_memory_gb!=null&&U.min_memory_gb>D);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(Tn,{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(D=>l.jsxs("div",{className:"status-row",children:[l.jsx("span",{className:"status-label",children:D.name}),l.jsx("div",{className:"status-value-wrap",children:D.connected?l.jsxs("span",{className:"status-value ok mcp-status-connected",children:[l.jsx(Ws,{size:12}),D.tool_count," tool",D.tool_count!==1?"s":""]}):l.jsxs("span",{className:"status-value warn mcp-status-failed",title:D.error??void 0,children:[l.jsx(Tn,{size:12}),"Failed"]})})]},D.name))})]}),l.jsx(F6,{}),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 danger-zone",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:ye,children:ce?"Click again to confirm":"Clear All Data"})]})]})]})]})})}function fn({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 U6="modulepreload",H6=function(e,t){return new URL(e,t).href},zm={},z6=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(d=>{if(d=H6(d,r),d in zm)return;zm[d]=!0;const f=d.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(!!r)for(let E=a.length-1;E>=0;E--){const x=a[E];if(x.href===d&&(!f||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${h}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":U6,f||(m.as="script"),m.crossOrigin="",m.href=d,o&&m.setAttribute("nonce",o),document.head.appendChild(m),f)return new Promise((E,x)=>{m.addEventListener("load",E),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}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 mo=null;function $6({isOpen:e,onClose:t,onStop:n,error:r}){const[i,s]=_.useState(null),[a,u]=_.useState(!1),o=_.useRef(null),d=_.useCallback(async()=>{try{const m=await b1();return s(m),m}catch(m){return P.system.error("Failed to fetch tunnel status",m),null}},[]);_.useEffect(()=>{if(!e||r)return;d();const m=setInterval(async()=>{const E=await d();E!=null&&E.active&&(E!=null&&E.url)&&clearInterval(m)},2e3);return()=>clearInterval(m)},[e,r,d]),_.useEffect(()=>{if(!(i!=null&&i.active)||!i.url||!i.token||!o.current)return;const m=`${i.url}/?token=${i.token}`;P.system.info(`Generating QR code for: ${m}`),(async()=>{if(!mo)try{const w=await z6(()=>import("./browser-CTB2jwNe.js").then(g=>g.b),[],import.meta.url);mo=w.default||w}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 mo.toCanvas(o.current,m,{width:200,margin:2,color:{dark:x?"#e6edf3":"#111827",light:x?"#0d0d0d":"#ffffff"}})}catch(w){P.system.error("QR code generation failed",w)}})()},[i==null?void 0:i.active,i==null?void 0:i.url,i==null?void 0:i.token]);const f=_.useRef(null),h=_.useCallback(()=>{if(!(i!=null&&i.url)||!(i!=null&&i.token))return;const m=`${i.url}/?token=${i.token}`;navigator.clipboard.writeText(m).then(()=>{u(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u(!1),2e3)})},[i]);if(_.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),!e)return null;const p=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:m=>m.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(u1,{size:18}),"Mobile Access"]}),l.jsx("button",{className:"btn-icon",onClick:t,"aria-label":"Close",children:l.jsx(ht,{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)&&p&&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:p}),l.jsxs("button",{className:`copy-url-btn ${a?"copied":""}`,onClick:h,title:"Copy URL",children:[a?l.jsx(ra,{size:13}):l.jsx(el,{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 Y6({onRetry:e}){var k;const{backendConnected:t,systemStatus:n,currentSessionId:r,messages:i}=_e(),[s,a]=_.useState(!1),u=!!r&&i.length>0,o=(n==null?void 0:n.default_model_name)??Qd,{isLoadingModel:d,isDownloadingModel:f,loadModel:h,downloadModel:p}=pE(o),m=_.useRef(n==null?void 0:n.lemonade_running),E=_.useRef(n==null?void 0:n.model_downloaded),x=_.useRef(n==null?void 0:n.context_size_sufficient),w=_.useRef(n==null?void 0:n.expected_model_loaded);_.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 R=!1;m.current!==L&&(m.current=L,L===!1&&(R=!0)),E.current!==M&&(E.current=M,M===!1&&(R=!0)),x.current!==S&&(x.current=S,S===!1&&(R=!0)),w.current!==O&&(w.current=O,O===!1&&(R=!0)),R&&a(!1)},[n,u]);const g=(n==null?void 0:n.download_progress)??null;if(f||(g==null?void 0:g.state)==="downloading"||(g==null?void 0:g.state)==="starting"||(g==null?void 0:g.state)==="error"){const L=n!=null&&n.default_model_size_gb?`~${n.default_model_size_gb.toFixed(1)} GB`:"large download",M=(g==null?void 0:g.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."," ",(g==null?void 0:g.message)&&l.jsx("span",{className:"connection-banner__hint",children:g.message})]}):l.jsxs(l.Fragment,{children:["Downloading ",l.jsx("strong",{children:o})," (",L,").",(g==null?void 0:g.state)==="downloading"&&g.file&&l.jsxs(l.Fragment,{children:[" ",l.jsxs("span",{className:"connection-banner__hint",children:["File ",g.file_index," / ",g.total_files,": ",l.jsx("code",{children:g.file})]})]})]})}),M?l.jsx("button",{className:"connection-banner__retry",onClick:()=>p(!1),children:"Retry"}):l.jsx("span",{className:"connection-banner__loading connection-banner__progress",children:g&&g.state==="downloading"&&g.total_bytes>0?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"connection-banner__progress-bar",role:"progressbar","aria-valuenow":g.percent,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Download progress",children:l.jsx("span",{className:"connection-banner__progress-fill",style:{width:`${g.percent}%`}})}),l.jsxs("span",{className:"connection-banner__progress-label",children:[g.percent,"% ·"," ",(g.downloaded_bytes/1e9).toFixed(2)," /"," ",(g.total_bytes/1e9).toFixed(2)," GB"]})]}):l.jsxs(l.Fragment,{children:[l.jsx(sn,{size:13,className:"connection-banner__spinner"}),(g==null?void 0:g.state)==="starting"?"Starting download…":"Downloading…"]})}),M&&l.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:l.jsx(ht,{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(sn,{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(Fy,{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(ht,{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:()=>p(!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(ht,{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(my,{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."]})]}),d?l.jsxs("span",{className:"connection-banner__loading",children:[l.jsx(sn,{size:13,className:"connection-banner__spinner"}),"Loading…"]}):l.jsx("button",{className:"connection-banner__retry",onClick:()=>h(),children:"Load Now"}),e&&!d&&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(ht,{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(yy,{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(ht,{size:14})})]})}return null}const V6={status:"idle",version:null,progress:0,releaseNotes:null,error:null};function W6(){const[e,t]=_.useState(V6);return _.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 q6(){const e=W6(),[t,n]=_.useState(!1),r=_.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(ht,{size:11})})]}):e.status==="downloaded"?l.jsxs("div",{className:"update-chip update-chip--ready",role:"status","aria-live":"polite",children:[l.jsx(a1,{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(ht,{size:11})})]}):null}function Q6(){const e=Pu(h6),t=Pu(n=>n.respondToPermission);return e?l.jsx("div",{className:"permission-overlay",role:"dialog","aria-modal":"true","aria-label":"Permission Request",children:l.jsx(G6,{notification:e,onRespond:t},e.id)}):null}function G6({notification:e,onRespond:t}){const n=e.timeoutSeconds!=null&&e.timeoutSeconds>0,[r,i]=_.useState(n?e.timeoutSeconds:null),s=_.useRef(null),[a,u]=_.useState(!1),[o,d]=_.useState(!1),f=_.useRef(!1),h=_.useRef(t);h.current=t,_.useEffect(()=>{if(n)return s.current=setInterval(()=>{i(w=>w===null||w<=1?(s.current&&clearInterval(s.current),0):w-1)},1e3),()=>{s.current&&clearInterval(s.current)}},[n]),_.useEffect(()=>{if(r===0){if(f.current)return;f.current=!0,u(!0),h.current(e.id,"deny",!1)}},[r,e.id]);const p=_.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]),m=_.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]);_.useEffect(()=>{const w=g=>{g.key==="Enter"&&!g.shiftKey?(g.preventDefault(),p()):g.key==="Escape"&&(g.preventDefault(),m())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[p,m]);const E=e.toolArgs,x=E&&Object.keys(E).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(Ry,{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(t1,{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(E,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:w=>d(w.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:m,disabled:a,title:"Deny (Esc)",children:[l.jsx(ht,{size:16}),"Deny"]}),l.jsxs("button",{className:"permission-btn permission-btn-allow",onClick:p,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 K6(e){return e.replace(/-/g,"").slice(0,7)}function X6(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 Ma({show:e,children:t,duration:n=250}){const[r,i]=_.useState(!1),[s,a]=_.useState("idle");return _.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 J6(){const{currentSessionId:e,setSessions:t,setCurrentSession:n,addSession:r,removeSession:i,updateSessionInList:s,setMessages:a,showDocLibrary:u,showFileBrowser:o,showSettings:d,sidebarOpen:f,toggleSidebar:h,setSidebarOpen:p,systemStatus:m,setSystemStatus:E,setBackendConnected:x,setAgents:w}=_e(),g=_.useRef(""),T=_.useCallback(async()=>{try{const te=(await Sd()).agents||[],he=te.map(Te=>Te.id).sort().join(",");he!==g.current&&(g.current=he,w(te))}catch{}},[w]);_.useEffect(()=>{T();const U=setInterval(T,3e4);return()=>clearInterval(U)},[T]);const[k,L]=_.useState(!1),[M,S]=_.useState(!1),[O,R]=_.useState(!1),[Y,v]=_.useState(null),z=_.useRef(null),K=_.useRef(0),de=3,ue=_.useCallback(async()=>{try{const U=await kd();if(x(!0),U.lemonade_running)K.current=0,E(U);else if(K.current+=1,P.system.warn(`Lemonade health check failed (${K.current}/${de})`),K.current>=de)E(U);else{const te=_e.getState().systemStatus;te&&te.lemonade_running?E({...te,disk_space_gb:U.disk_space_gb,memory_available_gb:U.memory_available_gb}):E(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),E(null)}},[E,x]),oe=_.useRef(3e3);_.useEffect(()=>(ue(),oe.current=3e3,z.current=setInterval(ue,3e3),()=>{z.current&&clearInterval(z.current)}),[ue]),_.useEffect(()=>{const U=m==null?void 0:m.init_state;if(!U||U==="initializing")return;const te=15e3;te!==oe.current&&(oe.current=te,z.current&&clearInterval(z.current),z.current=setInterval(ue,te))},[m==null?void 0:m.init_state,ue]);const Ne=_.useRef(null),ne=_.useRef("");_.useEffect(()=>{px("0.17.5"),P.system.info("App mounting, loading sessions...");const U=P.system.time(),te=Te=>Te.map($e=>`${$e.id}|${$e.updated_at}|${$e.title}`).join(`
|
|
438
|
-
`),he=(Te=!1)=>{xx().then($e=>{const Et=$e.sessions||[];if(Te){t(Et),x(!0),ne.current=te(Et),P.system.timed(`Loaded ${Et.length} session(s)`,U);return}const zt=_e.getState().sessions;if(Et.length===0&&zt.length>0){P.system.warn(`Session poll returned 0 sessions but sidebar has ${zt.length} — skipping update to prevent data loss`);return}const cn=te(Et);cn!==ne.current&&(P.system.info(`Session list changed (${zt.length} → ${Et.length} sessions)`),t(Et),ne.current=cn)}).catch($e=>{Te&&(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),Ne.current=setInterval(()=>he(!1),5e3),()=>{Ne.current&&clearInterval(Ne.current)}},[t,r,i,s,x]),_.useEffect(()=>{if(e)return;const te=new URLSearchParams(window.location.search).get("session"),he=window.location.hash.replace(/^#/,""),Te=te||he;if(!Te)return;P.nav.info(`URL session parameter: ${Te}`);const $e=setTimeout(()=>{const{sessions:Et}=_e.getState();let zt=Et.some(cn=>cn.id===Te)?Te:X6(Et,Te);zt?(n(zt),a([])):P.nav.warn(`Session ${Te} not found in loaded sessions`)},500);return()=>clearTimeout($e)},[e,n,a]),_.useEffect(()=>{if(e){const U=K6(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]),_.useEffect(()=>{b1().then(U=>{S(U.active===!0)}).catch(()=>{})},[]),_.useEffect(()=>{const U=()=>{window.innerWidth>768&&p(!0)};return window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)},[p]);const[I,B]=_.useState(null),y=_.useCallback(async()=>{P.chat.info("Creating new task session..."),B(null);try{const{activeAgentId:U}=_e.getState(),te=await oc({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&&p(!1)}catch(U){P.chat.error("Failed to create session",U),ue(),B("Failed to create task. Is the server running?"),setTimeout(()=>B(null),6e3)}},[r,n,a,p,ue]),ee=_.useCallback(async U=>{_e.getState().setActiveAgentId(U),await y()},[y]),{setPendingPrompt:ce}=_e(),N=_.useCallback(async U=>{P.chat.info(`New task with prompt: "${U.slice(0,60)}..."`),ce(U),await y()},[y,ce]),fe=_.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 oc({title:"New Agent",agent_type:"builder"});P.chat.info(`Builder session created: id=${U.id}`),r(U),n(U.id),a([]),window.innerWidth<=768&&p(!1)}catch(U){ce(null),P.chat.error("Failed to create builder session",U),ue(),B("Failed to create task. Is the server running?"),setTimeout(()=>B(null),6e3)}},[r,n,a,p,ue,ce]),ye=_.useCallback(async()=>{if(M){P.system.info("Reopening mobile access modal (tunnel already running)"),v(null),L(!0);return}P.system.info("Starting mobile access tunnel..."),L(!0),R(!0),v(null);try{const U=await Px();U.error?(P.system.error("Tunnel failed to start:",U.error),S(!1),v(U.error)):(S(!0),P.system.info("Tunnel started successfully"))}catch(U){P.system.error("Tunnel start error:",U),S(!1),v(U instanceof Error?U.message:"Failed to connect")}finally{R(!1)}},[M]),ge=_.useCallback(async()=>{P.system.info("Stopping mobile access tunnel...");try{await Mx()}catch(U){P.system.warn("stopTunnel call failed (continuing)",U)}S(!1),v(null),L(!1)},[]);_.useEffect(()=>{const{sessions:U,setActiveAgentId:te}=_e.getState(),he=U.find(Te=>Te.id===e);he!=null&&he.agent_type&&te(he.agent_type)},[e]),_.useEffect(()=>{e?P.nav.info(`Viewing session: ${e}`):P.nav.info("Viewing welcome screen (no session selected)")},[e]),_.useEffect(()=>{u&&P.ui.info("Document Library opened")},[u]),_.useEffect(()=>{d&&P.ui.info("Settings modal opened")},[d]);const[Oe,rt]=_.useState(typeof window<"u"&&window.innerWidth<=768);_.useEffect(()=>{const U=()=>rt(window.innerWidth<=768);return window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)},[]);const[gt,se]=_.useState(!1),[D,W]=_.useState(null);return _.useEffect(()=>{if(e!==D){se(!0);const U=setTimeout(()=>{W(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!1)})})},220);return()=>clearTimeout(U)}},[e,D]),l.jsxs("div",{className:"app",children:[l.jsx("button",{className:"sidebar-toggle",onClick:h,"aria-label":f?"Close sidebar":"Open sidebar",children:l.jsx(ky,{size:18})}),l.jsx("div",{className:`sidebar-overlay ${f?"visible":""}`,onClick:()=>p(!1),"aria-hidden":"true"}),l.jsx(jx,{onNewTask:y,tunnelActive:M,tunnelLoading:O,onMobileToggle:ye}),l.jsxs("div",{className:"main-content",children:[l.jsx(Y6,{onRetry:ue}),l.jsx("div",{className:`view-container ${gt?"view-transitioning":""}`,children:D?l.jsx(y6,{sessionId:D,onCreateAgent:fe,onAgentChange:ee},D):l.jsx(k6,{onNewTask:y,onSendPrompt:N,onCreateAgent:fe})})]}),l.jsx(Ma,{show:u,children:l.jsx(A6,{})}),l.jsx(Ma,{show:o,children:l.jsx(R6,{})}),l.jsx(Ma,{show:d,children:l.jsx(B6,{})}),!Oe&&l.jsx(Ma,{show:k,children:l.jsx($6,{isOpen:k,onClose:()=>L(!1),onStop:ge,error:Y})}),l.jsx(Q6,{}),l.jsx(q6,{}),I&&l.jsx("div",{className:"toast",role:"alert",children:I})]})}const Z6=localStorage.getItem("gaia-chat-theme");Z6!=="light"&&document.documentElement.setAttribute("data-theme","dark");po.createRoot(document.getElementById("root")).render(l.jsx(vs.StrictMode,{children:l.jsx(J6,{})}));
|