@amodalai/runtime-app 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
var iE=Object.defineProperty;var Mv=n=>{throw TypeError(n)};var sE=(n,e,t)=>e in n?iE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Yc=(n,e,t)=>sE(n,typeof e!="symbol"?e+"":e,t),Fg=(n,e,t)=>e.has(n)||Mv("Cannot "+t);var L=(n,e,t)=>(Fg(n,e,"read from private field"),t?t.call(n):e.get(n)),Ie=(n,e,t)=>e.has(n)?Mv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),ge=(n,e,t,r)=>(Fg(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ee=(n,e,t)=>(Fg(n,e,"access private method"),t);var $d=(n,e,t,r)=>({set _(i){ge(n,e,i,t)},get _(){return L(n,e,r)}});function Kb(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(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=t(i);fetch(i.href,s)}})();function af(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function oE(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var Bg={exports:{}},Uc={},Yg={exports:{}},kt={};/**
|
|
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 jv;function aE(){if(jv)return kt;jv=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function m(Y){return Y===null||typeof Y!="object"?null:(Y=p&&Y[p]||Y["@@iterator"],typeof Y=="function"?Y:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function C(Y,ue,z){this.props=Y,this.context=ue,this.refs=k,this.updater=z||g}C.prototype.isReactComponent={},C.prototype.setState=function(Y,ue){if(typeof Y!="object"&&typeof Y!="function"&&Y!=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,Y,ue,"setState")},C.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function Q(){}Q.prototype=C.prototype;function M(Y,ue,z){this.props=Y,this.context=ue,this.refs=k,this.updater=z||g}var E=M.prototype=new Q;E.constructor=M,w(E,C.prototype),E.isPureReactComponent=!0;var I=Array.isArray,U=Object.prototype.hasOwnProperty,_={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function q(Y,ue,z){var Re,_e={},$e=null,rt=null;if(ue!=null)for(Re in ue.ref!==void 0&&(rt=ue.ref),ue.key!==void 0&&($e=""+ue.key),ue)U.call(ue,Re)&&!R.hasOwnProperty(Re)&&(_e[Re]=ue[Re]);var st=arguments.length-2;if(st===1)_e.children=z;else if(1<st){for(var mt=Array(st),Xt=0;Xt<st;Xt++)mt[Xt]=arguments[Xt+2];_e.children=mt}if(Y&&Y.defaultProps)for(Re in st=Y.defaultProps,st)_e[Re]===void 0&&(_e[Re]=st[Re]);return{$$typeof:n,type:Y,key:$e,ref:rt,props:_e,_owner:_.current}}function G(Y,ue){return{$$typeof:n,type:Y.type,key:ue,ref:Y.ref,props:Y.props,_owner:Y._owner}}function V(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===n}function D(Y){var ue={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(z){return ue[z]})}var Z=/\/+/g;function ae(Y,ue){return typeof Y=="object"&&Y!==null&&Y.key!=null?D(""+Y.key):ue.toString(36)}function se(Y,ue,z,Re,_e){var $e=typeof Y;($e==="undefined"||$e==="boolean")&&(Y=null);var rt=!1;if(Y===null)rt=!0;else switch($e){case"string":case"number":rt=!0;break;case"object":switch(Y.$$typeof){case n:case e:rt=!0}}if(rt)return rt=Y,_e=_e(rt),Y=Re===""?"."+ae(rt,0):Re,I(_e)?(z="",Y!=null&&(z=Y.replace(Z,"$&/")+"/"),se(_e,ue,z,"",function(Xt){return Xt})):_e!=null&&(V(_e)&&(_e=G(_e,z+(!_e.key||rt&&rt.key===_e.key?"":(""+_e.key).replace(Z,"$&/")+"/")+Y)),ue.push(_e)),1;if(rt=0,Re=Re===""?".":Re+":",I(Y))for(var st=0;st<Y.length;st++){$e=Y[st];var mt=Re+ae($e,st);rt+=se($e,ue,z,mt,_e)}else if(mt=m(Y),typeof mt=="function")for(Y=mt.call(Y),st=0;!($e=Y.next()).done;)$e=$e.value,mt=Re+ae($e,st++),rt+=se($e,ue,z,mt,_e);else if($e==="object")throw ue=String(Y),Error("Objects are not valid as a React child (found: "+(ue==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":ue)+"). If you meant to render a collection of children, use an array instead.");return rt}function re(Y,ue,z){if(Y==null)return Y;var Re=[],_e=0;return se(Y,Re,"","",function($e){return ue.call(z,$e,_e++)}),Re}function Oe(Y){if(Y._status===-1){var ue=Y._result;ue=ue(),ue.then(function(z){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=z)},function(z){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=z)}),Y._status===-1&&(Y._status=0,Y._result=ue)}if(Y._status===1)return Y._result.default;throw Y._result}var be={current:null},he={transition:null},ye={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:he,ReactCurrentOwner:_};function A(){throw Error("act(...) is not supported in production builds of React.")}return kt.Children={map:re,forEach:function(Y,ue,z){re(Y,function(){ue.apply(this,arguments)},z)},count:function(Y){var ue=0;return re(Y,function(){ue++}),ue},toArray:function(Y){return re(Y,function(ue){return ue})||[]},only:function(Y){if(!V(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}},kt.Component=C,kt.Fragment=t,kt.Profiler=i,kt.PureComponent=M,kt.StrictMode=r,kt.Suspense=c,kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ye,kt.act=A,kt.cloneElement=function(Y,ue,z){if(Y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+Y+".");var Re=w({},Y.props),_e=Y.key,$e=Y.ref,rt=Y._owner;if(ue!=null){if(ue.ref!==void 0&&($e=ue.ref,rt=_.current),ue.key!==void 0&&(_e=""+ue.key),Y.type&&Y.type.defaultProps)var st=Y.type.defaultProps;for(mt in ue)U.call(ue,mt)&&!R.hasOwnProperty(mt)&&(Re[mt]=ue[mt]===void 0&&st!==void 0?st[mt]:ue[mt])}var mt=arguments.length-2;if(mt===1)Re.children=z;else if(1<mt){st=Array(mt);for(var Xt=0;Xt<mt;Xt++)st[Xt]=arguments[Xt+2];Re.children=st}return{$$typeof:n,type:Y.type,key:_e,ref:$e,props:Re,_owner:rt}},kt.createContext=function(Y){return Y={$$typeof:o,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},Y.Provider={$$typeof:s,_context:Y},Y.Consumer=Y},kt.createElement=q,kt.createFactory=function(Y){var ue=q.bind(null,Y);return ue.type=Y,ue},kt.createRef=function(){return{current:null}},kt.forwardRef=function(Y){return{$$typeof:l,render:Y}},kt.isValidElement=V,kt.lazy=function(Y){return{$$typeof:f,_payload:{_status:-1,_result:Y},_init:Oe}},kt.memo=function(Y,ue){return{$$typeof:h,type:Y,compare:ue===void 0?null:ue}},kt.startTransition=function(Y){var ue=he.transition;he.transition={};try{Y()}finally{he.transition=ue}},kt.unstable_act=A,kt.useCallback=function(Y,ue){return be.current.useCallback(Y,ue)},kt.useContext=function(Y){return be.current.useContext(Y)},kt.useDebugValue=function(){},kt.useDeferredValue=function(Y){return be.current.useDeferredValue(Y)},kt.useEffect=function(Y,ue){return be.current.useEffect(Y,ue)},kt.useId=function(){return be.current.useId()},kt.useImperativeHandle=function(Y,ue,z){return be.current.useImperativeHandle(Y,ue,z)},kt.useInsertionEffect=function(Y,ue){return be.current.useInsertionEffect(Y,ue)},kt.useLayoutEffect=function(Y,ue){return be.current.useLayoutEffect(Y,ue)},kt.useMemo=function(Y,ue){return be.current.useMemo(Y,ue)},kt.useReducer=function(Y,ue,z){return be.current.useReducer(Y,ue,z)},kt.useRef=function(Y){return be.current.useRef(Y)},kt.useState=function(Y){return be.current.useState(Y)},kt.useSyncExternalStore=function(Y,ue,z){return be.current.useSyncExternalStore(Y,ue,z)},kt.useTransition=function(){return be.current.useTransition()},kt.version="18.3.1",kt}var Rv;function $y(){return Rv||(Rv=1,Yg.exports=aE()),Yg.exports}/**
|
|
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 Av;function lE(){if(Av)return Uc;Av=1;var n=$y(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,h){var f,p={},m=null,g=null;h!==void 0&&(m=""+h),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(p[f]=c[f]);if(l&&l.defaultProps)for(f in c=l.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:e,type:l,key:m,ref:g,props:p,_owner:i.current}}return Uc.Fragment=t,Uc.jsx=o,Uc.jsxs=o,Uc}var Nv;function uE(){return Nv||(Nv=1,Bg.exports=lE()),Bg.exports}var v=uE(),F=$y();const Jb=af(F),cE=Kb({__proto__:null,default:Jb},[F]);var Ug={exports:{}},Or={},qg={exports:{}},Hg={};/**
|
|
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
|
+
*/var _v;function hE(){return _v||(_v=1,function(n){function e(he,ye){var A=he.length;he.push(ye);e:for(;0<A;){var Y=A-1>>>1,ue=he[Y];if(0<i(ue,ye))he[Y]=ye,he[A]=ue,A=Y;else break e}}function t(he){return he.length===0?null:he[0]}function r(he){if(he.length===0)return null;var ye=he[0],A=he.pop();if(A!==ye){he[0]=A;e:for(var Y=0,ue=he.length,z=ue>>>1;Y<z;){var Re=2*(Y+1)-1,_e=he[Re],$e=Re+1,rt=he[$e];if(0>i(_e,A))$e<ue&&0>i(rt,_e)?(he[Y]=rt,he[$e]=A,Y=$e):(he[Y]=_e,he[Re]=A,Y=Re);else if($e<ue&&0>i(rt,A))he[Y]=rt,he[$e]=A,Y=$e;else break e}}return ye}function i(he,ye){var A=he.sortIndex-ye.sortIndex;return A!==0?A:he.id-ye.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();n.unstable_now=function(){return o.now()-l}}var c=[],h=[],f=1,p=null,m=3,g=!1,w=!1,k=!1,C=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(he){for(var ye=t(h);ye!==null;){if(ye.callback===null)r(h);else if(ye.startTime<=he)r(h),ye.sortIndex=ye.expirationTime,e(c,ye);else break;ye=t(h)}}function I(he){if(k=!1,E(he),!w)if(t(c)!==null)w=!0,Oe(U);else{var ye=t(h);ye!==null&&be(I,ye.startTime-he)}}function U(he,ye){w=!1,k&&(k=!1,Q(q),q=-1),g=!0;var A=m;try{for(E(ye),p=t(c);p!==null&&(!(p.expirationTime>ye)||he&&!D());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,m=p.priorityLevel;var ue=Y(p.expirationTime<=ye);ye=n.unstable_now(),typeof ue=="function"?p.callback=ue:p===t(c)&&r(c),E(ye)}else r(c);p=t(c)}if(p!==null)var z=!0;else{var Re=t(h);Re!==null&&be(I,Re.startTime-ye),z=!1}return z}finally{p=null,m=A,g=!1}}var _=!1,R=null,q=-1,G=5,V=-1;function D(){return!(n.unstable_now()-V<G)}function Z(){if(R!==null){var he=n.unstable_now();V=he;var ye=!0;try{ye=R(!0,he)}finally{ye?ae():(_=!1,R=null)}}else _=!1}var ae;if(typeof M=="function")ae=function(){M(Z)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,re=se.port2;se.port1.onmessage=Z,ae=function(){re.postMessage(null)}}else ae=function(){C(Z,0)};function Oe(he){R=he,_||(_=!0,ae())}function be(he,ye){q=C(function(){he(n.unstable_now())},ye)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(he){he.callback=null},n.unstable_continueExecution=function(){w||g||(w=!0,Oe(U))},n.unstable_forceFrameRate=function(he){0>he||125<he?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<he?Math.floor(1e3/he):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return t(c)},n.unstable_next=function(he){switch(m){case 1:case 2:case 3:var ye=3;break;default:ye=m}var A=m;m=ye;try{return he()}finally{m=A}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(he,ye){switch(he){case 1:case 2:case 3:case 4:case 5:break;default:he=3}var A=m;m=he;try{return ye()}finally{m=A}},n.unstable_scheduleCallback=function(he,ye,A){var Y=n.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?Y+A:Y):A=Y,he){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=A+ue,he={id:f++,callback:ye,priorityLevel:he,startTime:A,expirationTime:ue,sortIndex:-1},A>Y?(he.sortIndex=A,e(h,he),t(c)===null&&he===t(h)&&(k?(Q(q),q=-1):k=!0,be(I,A-Y))):(he.sortIndex=ue,e(c,he),w||g||(w=!0,Oe(U))),he},n.unstable_shouldYield=D,n.unstable_wrapCallback=function(he){var ye=m;return function(){var A=m;m=ye;try{return he.apply(this,arguments)}finally{m=A}}}}(Hg)),Hg}var zv;function fE(){return zv||(zv=1,qg.exports=hE()),qg.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 Lv;function dE(){if(Lv)return Or;Lv=1;var n=$y(),e=fE();function t(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(a,u){o(a,u),o(a+"Capture",u)}function o(a,u){for(i[a]=u,a=0;a<u.length;a++)r.add(u[a])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(a){return c.call(p,a)?!0:c.call(f,a)?!1:h.test(a)?p[a]=!0:(f[a]=!0,!1)}function g(a,u,d,y){if(d!==null&&d.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return y?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function w(a,u,d,y){if(u===null||typeof u>"u"||g(a,u,d,y))return!0;if(y)return!1;if(d!==null)switch(d.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function k(a,u,d,y,x,b,$){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=y,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=a,this.type=u,this.sanitizeURL=b,this.removeEmptyString=$}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new k(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var u=a[0];C[u]=new k(u,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new k(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new k(a,2,!1,a,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(a){C[a]=new k(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){C[a]=new k(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){C[a]=new k(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){C[a]=new k(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){C[a]=new k(a,5,!1,a.toLowerCase(),null,!1,!1)});var Q=/[\-:]([a-z])/g;function M(a){return a[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(a){var u=a.replace(Q,M);C[u]=new k(u,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var u=a.replace(Q,M);C[u]=new k(u,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var u=a.replace(Q,M);C[u]=new k(u,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){C[a]=new k(a,1,!1,a.toLowerCase(),null,!1,!1)}),C.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){C[a]=new k(a,1,!1,a.toLowerCase(),null,!0,!0)});function E(a,u,d,y){var x=C.hasOwnProperty(u)?C[u]:null;(x!==null?x.type!==0:y||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(w(u,d,x,y)&&(d=null),y||x===null?m(u)&&(d===null?a.removeAttribute(u):a.setAttribute(u,""+d)):x.mustUseProperty?a[x.propertyName]=d===null?x.type===3?!1:"":d:(u=x.attributeName,y=x.attributeNamespace,d===null?a.removeAttribute(u):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,y?a.setAttributeNS(y,u,d):a.setAttribute(u,d))))}var I=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),D=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),he=Symbol.iterator;function ye(a){return a===null||typeof a!="object"?null:(a=he&&a[he]||a["@@iterator"],typeof a=="function"?a:null)}var A=Object.assign,Y;function ue(a){if(Y===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);Y=u&&u[1]||""}return`
|
|
34
|
+
`+Y+a}var z=!1;function Re(a,u){if(!a||z)return"";z=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(le){var y=le}Reflect.construct(a,[],u)}else{try{u.call()}catch(le){y=le}a.call(u.prototype)}else{try{throw Error()}catch(le){y=le}a()}}catch(le){if(le&&y&&typeof le.stack=="string"){for(var x=le.stack.split(`
|
|
35
|
+
`),b=y.stack.split(`
|
|
36
|
+
`),$=x.length-1,X=b.length-1;1<=$&&0<=X&&x[$]!==b[X];)X--;for(;1<=$&&0<=X;$--,X--)if(x[$]!==b[X]){if($!==1||X!==1)do if($--,X--,0>X||x[$]!==b[X]){var H=`
|
|
37
|
+
`+x[$].replace(" at new "," at ");return a.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",a.displayName)),H}while(1<=$&&0<=X);break}}}finally{z=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?ue(a):""}function _e(a){switch(a.tag){case 5:return ue(a.type);case 16:return ue("Lazy");case 13:return ue("Suspense");case 19:return ue("SuspenseList");case 0:case 2:case 15:return a=Re(a.type,!1),a;case 11:return a=Re(a.type.render,!1),a;case 1:return a=Re(a.type,!0),a;default:return""}}function $e(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case R:return"Fragment";case _:return"Portal";case G:return"Profiler";case q:return"StrictMode";case ae:return"Suspense";case se:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case D:return(a.displayName||"Context")+".Consumer";case V:return(a._context.displayName||"Context")+".Provider";case Z:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case re:return u=a.displayName||null,u!==null?u:$e(a.type)||"Memo";case Oe:u=a._payload,a=a._init;try{return $e(a(u))}catch{}}return null}function rt(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=u.render,a=a.displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(u);case 8:return u===q?"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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function st(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function mt(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Xt(a){var u=mt(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,u),y=""+a[u];if(!a.hasOwnProperty(u)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,b=d.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return x.call(this)},set:function($){y=""+$,b.call(this,$)}}),Object.defineProperty(a,u,{enumerable:d.enumerable}),{getValue:function(){return y},setValue:function($){y=""+$},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function Gn(a){a._valueTracker||(a._valueTracker=Xt(a))}function cn(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var d=u.getValue(),y="";return a&&(y=mt(a)?a.checked?"true":"false":a.value),a=y,a!==d?(u.setValue(a),!0):!1}function An(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Zi(a,u){var d=u.checked;return A({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function Tr(a,u){var d=u.defaultValue==null?"":u.defaultValue,y=u.checked!=null?u.checked:u.defaultChecked;d=st(u.value!=null?u.value:d),a._wrapperState={initialChecked:y,initialValue:d,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Kn(a,u){u=u.checked,u!=null&&E(a,"checked",u,!1)}function Yr(a,u){Kn(a,u);var d=st(u.value),y=u.type;if(d!=null)y==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(y==="submit"||y==="reset"){a.removeAttribute("value");return}u.hasOwnProperty("value")?$r(a,u.type,d):u.hasOwnProperty("defaultValue")&&$r(a,u.type,st(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(a.defaultChecked=!!u.defaultChecked)}function ks(a,u,d){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var y=u.type;if(!(y!=="submit"&&y!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+a._wrapperState.initialValue,d||u===a.value||(a.value=u),a.defaultValue=u}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function $r(a,u,d){(u!=="number"||An(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Ur=Array.isArray;function qr(a,u,d,y){if(a=a.options,u){u={};for(var x=0;x<d.length;x++)u["$"+d[x]]=!0;for(d=0;d<a.length;d++)x=u.hasOwnProperty("$"+a[d].value),a[d].selected!==x&&(a[d].selected=x),x&&y&&(a[d].defaultSelected=!0)}else{for(d=""+st(d),u=null,x=0;x<a.length;x++){if(a[x].value===d){a[x].selected=!0,y&&(a[x].defaultSelected=!0);return}u!==null||a[x].disabled||(u=a[x])}u!==null&&(u.selected=!0)}}function Ss(a,u){if(u.dangerouslySetInnerHTML!=null)throw Error(t(91));return A({},u,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function io(a,u){var d=u.value;if(d==null){if(d=u.children,u=u.defaultValue,d!=null){if(u!=null)throw Error(t(92));if(Ur(d)){if(1<d.length)throw Error(t(93));d=d[0]}u=d}u==null&&(u=""),d=u}a._wrapperState={initialValue:st(d)}}function cr(a,u){var d=st(u.value),y=st(u.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),u.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),y!=null&&(a.defaultValue=""+y)}function Jn(a){var u=a.textContent;u===a._wrapperState.initialValue&&u!==""&&u!==null&&(a.value=u)}function fe(a){switch(a){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 Pe(a,u){return a==null||a==="http://www.w3.org/1999/xhtml"?fe(u):a==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Fe,nt=function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,d,y,x){MSApp.execUnsafeLocalFunction(function(){return a(u,d,y,x)})}:a}(function(a,u){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=u;else{for(Fe=Fe||document.createElement("div"),Fe.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=Fe.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}});function yt(a,u){if(u){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=u;return}}a.textContent=u}var Ke={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},er=["Webkit","ms","Moz","O"];Object.keys(Ke).forEach(function(a){er.forEach(function(u){u=u+a.charAt(0).toUpperCase()+a.substring(1),Ke[u]=Ke[a]})});function xt(a,u,d){return u==null||typeof u=="boolean"||u===""?"":d||typeof u!="number"||u===0||Ke.hasOwnProperty(a)&&Ke[a]?(""+u).trim():u+"px"}function hr(a,u){a=a.style;for(var d in u)if(u.hasOwnProperty(d)){var y=d.indexOf("--")===0,x=xt(d,u[d],y);d==="float"&&(d="cssFloat"),y?a.setProperty(d,x):a[d]=x}}var bn=A({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 nn(a,u){if(u){if(bn[a]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(t(137,a));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(t(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(t(61))}if(u.style!=null&&typeof u.style!="object")throw Error(t(62))}}function tr(a,u){if(a.indexOf("-")===-1)return typeof u.is=="string";switch(a){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 Tn=null;function Xi(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Vi=null,Hr=null,hn=null;function xa(a){if(a=Eo(a)){if(typeof Vi!="function")throw Error(t(280));var u=a.stateNode;u&&(u=Ia(u),Vi(a.stateNode,a.type,u))}}function so(a){Hr?hn?hn.push(a):hn=[a]:Hr=a}function va(){if(Hr){var a=Hr,u=hn;if(hn=Hr=null,xa(a),u)for(a=0;a<u.length;a++)xa(u[a])}}function oo(a,u){return a(u)}function Wi(){}var yi=!1;function wa(a,u,d){if(yi)return a(u,d);yi=!0;try{return oo(a,u,d)}finally{yi=!1,(Hr!==null||hn!==null)&&(Wi(),va())}}function Fi(a,u){var d=a.stateNode;if(d===null)return null;var y=Ia(d);if(y===null)return null;d=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(t(231,u,typeof d));return d}var B=!1;if(l)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){B=!0}}),window.addEventListener("test",ee,ee),window.removeEventListener("test",ee,ee)}catch{B=!1}function ce(a,u,d,y,x,b,$,X,H){var le=Array.prototype.slice.call(arguments,3);try{u.apply(d,le)}catch(ve){this.onError(ve)}}var de=!1,ke=null,Xe=!1,Je=null,Ne={onError:function(a){de=!0,ke=a}};function ze(a,u,d,y,x,b,$,X,H){de=!1,ke=null,ce.apply(Ne,arguments)}function Me(a,u,d,y,x,b,$,X,H){if(ze.apply(this,arguments),de){if(de){var le=ke;de=!1,ke=null}else throw Error(t(198));Xe||(Xe=!0,Je=le)}}function Ae(a){var u=a,d=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do u=a,(u.flags&4098)!==0&&(d=u.return),a=u.return;while(a)}return u.tag===3?d:null}function ot(a){if(a.tag===13){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function gt(a){if(Ae(a)!==a)throw Error(t(188))}function fn(a){var u=a.alternate;if(!u){if(u=Ae(a),u===null)throw Error(t(188));return u!==a?null:a}for(var d=a,y=u;;){var x=d.return;if(x===null)break;var b=x.alternate;if(b===null){if(y=x.return,y!==null){d=y;continue}break}if(x.child===b.child){for(b=x.child;b;){if(b===d)return gt(x),a;if(b===y)return gt(x),u;b=b.sibling}throw Error(t(188))}if(d.return!==y.return)d=x,y=b;else{for(var $=!1,X=x.child;X;){if(X===d){$=!0,d=x,y=b;break}if(X===y){$=!0,y=x,d=b;break}X=X.sibling}if(!$){for(X=b.child;X;){if(X===d){$=!0,d=b,y=x;break}if(X===y){$=!0,y=b,d=x;break}X=X.sibling}if(!$)throw Error(t(189))}}if(d.alternate!==y)throw Error(t(190))}if(d.tag!==3)throw Error(t(188));return d.stateNode.current===d?a:u}function _t(a){return a=fn(a),a!==null?Qt(a):null}function Qt(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var u=Qt(a);if(u!==null)return u;a=a.sibling}return null}var Ft=e.unstable_scheduleCallback,Gr=e.unstable_cancelCallback,qe=e.unstable_shouldYield,vn=e.unstable_requestPaint,bt=e.unstable_now,ka=e.unstable_getCurrentPriorityLevel,xi=e.unstable_ImmediatePriority,Er=e.unstable_UserBlockingPriority,Kr=e.unstable_NormalPriority,ao=e.unstable_LowPriority,vt=e.unstable_IdlePriority,Vt=null,rn=null;function vi(a){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Vt,a,void 0,(a.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:Jr,Bi=Math.log,Kt=Math.LN2;function Jr(a){return a>>>=0,a===0?32:31-(Bi(a)/Kt|0)|0}var ei=64,lo=4194304;function bs(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Yi(a,u){var d=a.pendingLanes;if(d===0)return 0;var y=0,x=a.suspendedLanes,b=a.pingedLanes,$=d&268435455;if($!==0){var X=$&~x;X!==0?y=bs(X):(b&=$,b!==0&&(y=bs(b)))}else $=d&~x,$!==0?y=bs($):b!==0&&(y=bs(b));if(y===0)return 0;if(u!==0&&u!==y&&(u&x)===0&&(x=y&-y,b=u&-u,x>=b||x===16&&(b&4194240)!==0))return u;if((y&4)!==0&&(y|=d&16),u=a.entangledLanes,u!==0)for(a=a.entanglements,u&=y;0<u;)d=31-ht(u),x=1<<d,y|=a[d],u&=~x;return y}function uo(a,u){switch(a){case 1:case 2:case 4:return u+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 u+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 Al(a,u){for(var d=a.suspendedLanes,y=a.pingedLanes,x=a.expirationTimes,b=a.pendingLanes;0<b;){var $=31-ht(b),X=1<<$,H=x[$];H===-1?((X&d)===0||(X&y)!==0)&&(x[$]=uo(X,u)):H<=u&&(a.expiredLanes|=X),b&=~X}}function co(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function ac(){var a=ei;return ei<<=1,(ei&4194240)===0&&(ei=64),a}function Ps(a){for(var u=[],d=0;31>d;d++)u.push(a);return u}function Qs(a,u,d){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,u=31-ht(u),a[u]=d}function Sf(a,u){var d=a.pendingLanes&~u;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=u,a.mutableReadLanes&=u,a.entangledLanes&=u,u=a.entanglements;var y=a.eventTimes;for(a=a.expirationTimes;0<d;){var x=31-ht(d),b=1<<x;u[x]=0,y[x]=-1,a[x]=-1,d&=~b}}function ho(a,u){var d=a.entangledLanes|=u;for(a=a.entanglements;d;){var y=31-ht(d),x=1<<y;x&u|a[y]&u&&(a[y]|=u),d&=~x}}var jt=0;function Sa(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var fo,po,bf,lc,Pf,Nl=!1,ba=[],wi=null,Ui=null,ki=null,mo=new Map,Pa=new Map,qi=[],mm="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 uc(a,u){switch(a){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":Ui=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":mo.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pa.delete(u.pointerId)}}function Qa(a,u,d,y,x,b){return a===null||a.nativeEvent!==b?(a={blockedOn:u,domEventName:d,eventSystemFlags:y,nativeEvent:b,targetContainers:[x]},u!==null&&(u=Eo(u),u!==null&&po(u)),a):(a.eventSystemFlags|=y,u=a.targetContainers,x!==null&&u.indexOf(x)===-1&&u.push(x),a)}function gm(a,u,d,y,x){switch(u){case"focusin":return wi=Qa(wi,a,u,d,y,x),!0;case"dragenter":return Ui=Qa(Ui,a,u,d,y,x),!0;case"mouseover":return ki=Qa(ki,a,u,d,y,x),!0;case"pointerover":var b=x.pointerId;return mo.set(b,Qa(mo.get(b)||null,a,u,d,y,x)),!0;case"gotpointercapture":return b=x.pointerId,Pa.set(b,Qa(Pa.get(b)||null,a,u,d,y,x)),!0}return!1}function Qf(a){var u=jr(a.target);if(u!==null){var d=Ae(u);if(d!==null){if(u=d.tag,u===13){if(u=ot(d),u!==null){a.blockedOn=u,Pf(a.priority,function(){bf(d)});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function _l(a){if(a.blockedOn!==null)return!1;for(var u=a.targetContainers;0<u.length;){var d=cc(a.domEventName,a.eventSystemFlags,u[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var y=new d.constructor(d.type,d);Tn=y,d.target.dispatchEvent(y),Tn=null}else return u=Eo(d),u!==null&&po(u),a.blockedOn=d,!1;u.shift()}return!0}function Cf(a,u,d){_l(a)&&d.delete(u)}function Tf(){Nl=!1,wi!==null&&_l(wi)&&(wi=null),Ui!==null&&_l(Ui)&&(Ui=null),ki!==null&&_l(ki)&&(ki=null),mo.forEach(Cf),Pa.forEach(Cf)}function Ca(a,u){a.blockedOn===u&&(a.blockedOn=null,Nl||(Nl=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Tf)))}function dn(a){function u(x){return Ca(x,a)}if(0<ba.length){Ca(ba[0],a);for(var d=1;d<ba.length;d++){var y=ba[d];y.blockedOn===a&&(y.blockedOn=null)}}for(wi!==null&&Ca(wi,a),Ui!==null&&Ca(Ui,a),ki!==null&&Ca(ki,a),mo.forEach(u),Pa.forEach(u),d=0;d<qi.length;d++)y=qi[d],y.blockedOn===a&&(y.blockedOn=null);for(;0<qi.length&&(d=qi[0],d.blockedOn===null);)Qf(d),d.blockedOn===null&&qi.shift()}var Cs=I.ReactCurrentBatchConfig,Si=!0;function go(a,u,d,y){var x=jt,b=Cs.transition;Cs.transition=null;try{jt=1,zl(a,u,d,y)}finally{jt=x,Cs.transition=b}}function Oo(a,u,d,y){var x=jt,b=Cs.transition;Cs.transition=null;try{jt=4,zl(a,u,d,y)}finally{jt=x,Cs.transition=b}}function zl(a,u,d,y){if(Si){var x=cc(a,u,d,y);if(x===null)Hl(a,u,y,Ta,d),uc(a,y);else if(gm(x,a,u,d,y))y.stopPropagation();else if(uc(a,y),u&4&&-1<mm.indexOf(a)){for(;x!==null;){var b=Eo(x);if(b!==null&&fo(b),b=cc(a,u,d,y),b===null&&Hl(a,u,y,Ta,d),b===x)break;x=b}x!==null&&y.stopPropagation()}else Hl(a,u,y,null,d)}}var Ta=null;function cc(a,u,d,y){if(Ta=null,a=Xi(y),a=jr(a),a!==null)if(u=Ae(a),u===null)a=null;else if(d=u.tag,d===13){if(a=ot(u),a!==null)return a;a=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;a=null}else u!==a&&(a=null);return Ta=a,null}function Ll(a){switch(a){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(ka()){case xi:return 1;case Er:return 4;case Kr:case ao:return 16;case vt:return 536870912;default:return 16}default:return 16}}var bi=null,$a=null,Dl=null;function $f(){if(Dl)return Dl;var a,u=$a,d=u.length,y,x="value"in bi?bi.value:bi.textContent,b=x.length;for(a=0;a<d&&u[a]===x[a];a++);var $=d-a;for(y=1;y<=$&&u[d-y]===x[b-y];y++);return Dl=x.slice(a,1<y?1-y:void 0)}function Il(a){var u=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&u===13&&(a=13)):a=u,a===10&&(a=13),32<=a||a===13?a:0}function Zl(){return!0}function Ef(){return!1}function nr(a){function u(d,y,x,b,$){this._reactName=d,this._targetInst=x,this.type=y,this.nativeEvent=b,this.target=$,this.currentTarget=null;for(var X in a)a.hasOwnProperty(X)&&(d=a[X],this[X]=d?d(b):b[X]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Zl:Ef,this.isPropagationStopped=Ef,this}return A(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Zl)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),u}var Ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hc=nr(Ts),ti=A({},Ts,{view:0,detail:0}),Om=nr(ti),Hi,$s,Pi,Xl=A({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mc,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Pi&&(Pi&&a.type==="mousemove"?(Hi=a.screenX-Pi.screenX,$s=a.screenY-Pi.screenY):$s=Hi=0,Pi=a),Hi)},movementY:function(a){return"movementY"in a?a.movementY:$s}}),Mf=nr(Xl),ym=A({},Xl,{dataTransfer:0}),xm=nr(ym),fc=A({},ti,{relatedTarget:0}),dc=nr(fc),vm=A({},Ts,{animationName:0,elapsedTime:0,pseudoElement:0}),wm=nr(vm),km=A({},Ts,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Sm=nr(km),bm=A({},Ts,{data:0}),pc=nr(bm),Pm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qm={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"},Cm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tm(a){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(a):(a=Cm[a])?!!u[a]:!1}function mc(){return Tm}var jf=A({},ti,{key:function(a){if(a.key){var u=Pm[a.key]||a.key;if(u!=="Unidentified")return u}return a.type==="keypress"?(a=Il(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Qm[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mc,charCode:function(a){return a.type==="keypress"?Il(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Il(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),$m=nr(jf),Em=A({},Xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rf=nr(Em),Mm=A({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),jm=nr(Mm),Rm=A({},Ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),Am=nr(Rm),Nm=A({},Xl,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),_m=nr(Nm),zm=[9,13,27,32],gc=l&&"CompositionEvent"in window,Ea=null;l&&"documentMode"in document&&(Ea=document.documentMode);var Lm=l&&"TextEvent"in window&&!Ea,Oc=l&&(!gc||Ea&&8<Ea&&11>=Ea),yc=" ",Af=!1;function rr(a,u){switch(a){case"keyup":return zm.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Es(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var yo=!1;function Ms(a,u){switch(a){case"compositionend":return Es(u);case"keypress":return u.which!==32?null:(Af=!0,yc);case"textInput":return a=u.data,a===yc&&Af?null:a;default:return null}}function Dm(a,u){if(yo)return a==="compositionend"||!gc&&rr(a,u)?(a=$f(),Dl=$a=bi=null,yo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Oc&&u.locale!=="ko"?null:u.data;default:return null}}var Qi={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 xc(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u==="input"?!!Qi[a.type]:u==="textarea"}function vc(a,u,d,y){so(y),u=La(u,"onChange"),0<u.length&&(d=new hc("onChange","change",null,d,y),a.push({event:d,listeners:u}))}var xo=null,Ot=null;function vo(a){Wf(a,0)}function Vl(a){var u=Mo(a);if(cn(u))return a}function Jt(a,u){if(a==="change")return u}var wo=!1;if(l){var Wl;if(l){var wc="oninput"in document;if(!wc){var Nf=document.createElement("div");Nf.setAttribute("oninput","return;"),wc=typeof Nf.oninput=="function"}Wl=wc}else Wl=!1;wo=Wl&&(!document.documentMode||9<document.documentMode)}function _f(){xo&&(xo.detachEvent("onpropertychange",Tt),Ot=xo=null)}function Tt(a){if(a.propertyName==="value"&&Vl(Ot)){var u=[];vc(u,Ot,a,Xi(a)),wa(vo,u)}}function Kx(a,u,d){a==="focusin"?(_f(),xo=u,Ot=d,xo.attachEvent("onpropertychange",Tt)):a==="focusout"&&_f()}function zf(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Vl(Ot)}function Lf(a,u){if(a==="click")return Vl(u)}function Im(a,u){if(a==="input"||a==="change")return Vl(u)}function Df(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var an=typeof Object.is=="function"?Object.is:Df;function ko(a,u){if(an(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var d=Object.keys(a),y=Object.keys(u);if(d.length!==y.length)return!1;for(y=0;y<d.length;y++){var x=d[y];if(!c.call(u,x)||!an(a[x],u[x]))return!1}return!0}function Ma(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function If(a,u){var d=Ma(a);a=0;for(var y;d;){if(d.nodeType===3){if(y=a+d.textContent.length,a<=u&&y>=u)return{node:d,offset:u-a};a=y}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Ma(d)}}function Zf(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?Zf(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function Xf(){for(var a=window,u=An();u instanceof a.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)a=u.contentWindow;else break;u=An(a.document)}return u}function kc(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}function Zm(a){var u=Xf(),d=a.focusedElem,y=a.selectionRange;if(u!==d&&d&&d.ownerDocument&&Zf(d.ownerDocument.documentElement,d)){if(y!==null&&kc(d)){if(u=y.start,a=y.end,a===void 0&&(a=u),"selectionStart"in d)d.selectionStart=u,d.selectionEnd=Math.min(a,d.value.length);else if(a=(u=d.ownerDocument||document)&&u.defaultView||window,a.getSelection){a=a.getSelection();var x=d.textContent.length,b=Math.min(y.start,x);y=y.end===void 0?b:Math.min(y.end,x),!a.extend&&b>y&&(x=y,y=b,b=x),x=If(d,b);var $=If(d,y);x&&$&&(a.rangeCount!==1||a.anchorNode!==x.node||a.anchorOffset!==x.offset||a.focusNode!==$.node||a.focusOffset!==$.offset)&&(u=u.createRange(),u.setStart(x.node,x.offset),a.removeAllRanges(),b>y?(a.addRange(u),a.extend($.node,$.offset)):(u.setEnd($.node,$.offset),a.addRange(u)))}}for(u=[],a=d;a=a.parentNode;)a.nodeType===1&&u.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<u.length;d++)a=u[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var Xm=l&&"documentMode"in document&&11>=document.documentMode,So=null,ja=null,Ra=null,Sc=!1;function bc(a,u,d){var y=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Sc||So==null||So!==An(y)||(y=So,"selectionStart"in y&&kc(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Ra&&ko(Ra,y)||(Ra=y,y=La(ja,"onSelect"),0<y.length&&(u=new hc("onSelect","select",null,u,d),a.push({event:u,listeners:y}),u.target=So)))}function Aa(a,u){var d={};return d[a.toLowerCase()]=u.toLowerCase(),d["Webkit"+a]="webkit"+u,d["Moz"+a]="moz"+u,d}var js={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionend:Aa("Transition","TransitionEnd")},Pc={},Qc={};l&&(Qc=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function bo(a){if(Pc[a])return Pc[a];if(!js[a])return a;var u=js[a],d;for(d in u)if(u.hasOwnProperty(d)&&d in Qc)return Pc[a]=u[d];return a}var Cc=bo("animationend"),Po=bo("animationiteration"),Fl=bo("animationstart"),Bl=bo("transitionend"),Gi=new Map,Tc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mr(a,u){Gi.set(a,u),s(u,[a])}for(var Qo=0;Qo<Tc.length;Qo++){var Yl=Tc[Qo],Co=Yl.toLowerCase(),Ul=Yl[0].toUpperCase()+Yl.slice(1);Mr(Co,"on"+Ul)}Mr(Cc,"onAnimationEnd"),Mr(Po,"onAnimationIteration"),Mr(Fl,"onAnimationStart"),Mr("dblclick","onDoubleClick"),Mr("focusin","onFocus"),Mr("focusout","onBlur"),Mr(Bl,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rs="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(" "),Vf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rs));function $c(a,u,d){var y=a.type||"unknown-event";a.currentTarget=d,Me(y,u,void 0,a),a.currentTarget=null}function Wf(a,u){u=(u&4)!==0;for(var d=0;d<a.length;d++){var y=a[d],x=y.event;y=y.listeners;e:{var b=void 0;if(u)for(var $=y.length-1;0<=$;$--){var X=y[$],H=X.instance,le=X.currentTarget;if(X=X.listener,H!==b&&x.isPropagationStopped())break e;$c(x,X,le),b=H}else for($=0;$<y.length;$++){if(X=y[$],H=X.instance,le=X.currentTarget,X=X.listener,H!==b&&x.isPropagationStopped())break e;$c(x,X,le),b=H}}}if(Xe)throw a=Je,Xe=!1,Je=null,a}function Bt(a,u){var d=u[ir];d===void 0&&(d=u[ir]=new Set);var y=a+"__bubble";d.has(y)||(_a(u,a,2,!1),d.add(y))}function To(a,u,d){var y=0;u&&(y|=4),_a(d,a,y,u)}var ql="_reactListening"+Math.random().toString(36).slice(2);function Na(a){if(!a[ql]){a[ql]=!0,r.forEach(function(d){d!=="selectionchange"&&(Vf.has(d)||To(d,!1,a),To(d,!0,a))});var u=a.nodeType===9?a:a.ownerDocument;u===null||u[ql]||(u[ql]=!0,To("selectionchange",!1,u))}}function _a(a,u,d,y){switch(Ll(u)){case 1:var x=go;break;case 4:x=Oo;break;default:x=zl}d=x.bind(null,u,d,a),x=void 0,!B||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(x=!0),y?x!==void 0?a.addEventListener(u,d,{capture:!0,passive:x}):a.addEventListener(u,d,!0):x!==void 0?a.addEventListener(u,d,{passive:x}):a.addEventListener(u,d,!1)}function Hl(a,u,d,y,x){var b=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var $=y.tag;if($===3||$===4){var X=y.stateNode.containerInfo;if(X===x||X.nodeType===8&&X.parentNode===x)break;if($===4)for($=y.return;$!==null;){var H=$.tag;if((H===3||H===4)&&(H=$.stateNode.containerInfo,H===x||H.nodeType===8&&H.parentNode===x))return;$=$.return}for(;X!==null;){if($=jr(X),$===null)return;if(H=$.tag,H===5||H===6){y=b=$;continue e}X=X.parentNode}}y=y.return}wa(function(){var le=b,ve=Xi(d),we=[];e:{var me=Gi.get(a);if(me!==void 0){var je=hc,Ze=a;switch(a){case"keypress":if(Il(d)===0)break e;case"keydown":case"keyup":je=$m;break;case"focusin":Ze="focus",je=dc;break;case"focusout":Ze="blur",je=dc;break;case"beforeblur":case"afterblur":je=dc;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=Mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=xm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=jm;break;case Cc:case Po:case Fl:je=wm;break;case Bl:je=Am;break;case"scroll":je=Om;break;case"wheel":je=_m;break;case"copy":case"cut":case"paste":je=Sm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Rf}var Ve=(u&4)!==0,On=!Ve&&a==="scroll",ie=Ve?me!==null?me+"Capture":null:me;Ve=[];for(var J=le,oe;J!==null;){oe=J;var Qe=oe.stateNode;if(oe.tag===5&&Qe!==null&&(oe=Qe,ie!==null&&(Qe=Fi(J,ie),Qe!=null&&Ve.push(za(J,Qe,oe)))),On)break;J=J.return}0<Ve.length&&(me=new je(me,Ze,null,d,ve),we.push({event:me,listeners:Ve}))}}if((u&7)===0){e:{if(me=a==="mouseover"||a==="pointerover",je=a==="mouseout"||a==="pointerout",me&&d!==Tn&&(Ze=d.relatedTarget||d.fromElement)&&(jr(Ze)||Ze[It]))break e;if((je||me)&&(me=ve.window===ve?ve:(me=ve.ownerDocument)?me.defaultView||me.parentWindow:window,je?(Ze=d.relatedTarget||d.toElement,je=le,Ze=Ze?jr(Ze):null,Ze!==null&&(On=Ae(Ze),Ze!==On||Ze.tag!==5&&Ze.tag!==6)&&(Ze=null)):(je=null,Ze=le),je!==Ze)){if(Ve=Mf,Qe="onMouseLeave",ie="onMouseEnter",J="mouse",(a==="pointerout"||a==="pointerover")&&(Ve=Rf,Qe="onPointerLeave",ie="onPointerEnter",J="pointer"),On=je==null?me:Mo(je),oe=Ze==null?me:Mo(Ze),me=new Ve(Qe,J+"leave",je,d,ve),me.target=On,me.relatedTarget=oe,Qe=null,jr(ve)===le&&(Ve=new Ve(ie,J+"enter",Ze,d,ve),Ve.target=oe,Ve.relatedTarget=On,Qe=Ve),On=Qe,je&&Ze)t:{for(Ve=je,ie=Ze,J=0,oe=Ve;oe;oe=As(oe))J++;for(oe=0,Qe=ie;Qe;Qe=As(Qe))oe++;for(;0<J-oe;)Ve=As(Ve),J--;for(;0<oe-J;)ie=As(ie),oe--;for(;J--;){if(Ve===ie||ie!==null&&Ve===ie.alternate)break t;Ve=As(Ve),ie=As(ie)}Ve=null}else Ve=null;je!==null&&Ec(we,me,je,Ve,!1),Ze!==null&&On!==null&&Ec(we,On,Ze,Ve,!0)}}e:{if(me=le?Mo(le):window,je=me.nodeName&&me.nodeName.toLowerCase(),je==="select"||je==="input"&&me.type==="file")var We=Jt;else if(xc(me))if(wo)We=Im;else{We=zf;var et=Kx}else(je=me.nodeName)&&je.toLowerCase()==="input"&&(me.type==="checkbox"||me.type==="radio")&&(We=Lf);if(We&&(We=We(a,le))){vc(we,We,d,ve);break e}et&&et(a,me,le),a==="focusout"&&(et=me._wrapperState)&&et.controlled&&me.type==="number"&&$r(me,"number",me.value)}switch(et=le?Mo(le):window,a){case"focusin":(xc(et)||et.contentEditable==="true")&&(So=et,ja=le,Ra=null);break;case"focusout":Ra=ja=So=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,bc(we,d,ve);break;case"selectionchange":if(Xm)break;case"keydown":case"keyup":bc(we,d,ve)}var tt;if(gc)e:{switch(a){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else yo?rr(a,d)&&(lt="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(lt="onCompositionStart");lt&&(Oc&&d.locale!=="ko"&&(yo||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&yo&&(tt=$f()):(bi=ve,$a="value"in bi?bi.value:bi.textContent,yo=!0)),et=La(le,lt),0<et.length&&(lt=new pc(lt,a,null,d,ve),we.push({event:lt,listeners:et}),tt?lt.data=tt:(tt=Es(d),tt!==null&&(lt.data=tt)))),(tt=Lm?Ms(a,d):Dm(a,d))&&(le=La(le,"onBeforeInput"),0<le.length&&(ve=new pc("onBeforeInput","beforeinput",null,d,ve),we.push({event:ve,listeners:le}),ve.data=tt))}Wf(we,u)})}function za(a,u,d){return{instance:a,listener:u,currentTarget:d}}function La(a,u){for(var d=u+"Capture",y=[];a!==null;){var x=a,b=x.stateNode;x.tag===5&&b!==null&&(x=b,b=Fi(a,d),b!=null&&y.unshift(za(a,b,x)),b=Fi(a,u),b!=null&&y.push(za(a,b,x))),a=a.return}return y}function As(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function Ec(a,u,d,y,x){for(var b=u._reactName,$=[];d!==null&&d!==y;){var X=d,H=X.alternate,le=X.stateNode;if(H!==null&&H===y)break;X.tag===5&&le!==null&&(X=le,x?(H=Fi(d,b),H!=null&&$.unshift(za(d,H,X))):x||(H=Fi(d,b),H!=null&&$.push(za(d,H,X)))),d=d.return}$.length!==0&&a.push({event:u,listeners:$})}var Da=/\r\n?/g,Mc=/\u0000|\uFFFD/g;function it(a){return(typeof a=="string"?a:""+a).replace(Da,`
|
|
38
|
+
`).replace(Mc,"")}function Ki(a,u,d){if(u=it(u),it(a)!==u&&d)throw Error(t(425))}function Gl(){}var P=null,O=null;function S(a,u){return a==="textarea"||a==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var T=typeof setTimeout=="function"?setTimeout:void 0,j=typeof clearTimeout=="function"?clearTimeout:void 0,W=typeof Promise=="function"?Promise:void 0,K=typeof queueMicrotask=="function"?queueMicrotask:typeof W<"u"?function(a){return W.resolve(null).then(a).catch(te)}:T;function te(a){setTimeout(function(){throw a})}function ne(a,u){var d=u,y=0;do{var x=d.nextSibling;if(a.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(y===0){a.removeChild(x),dn(u);return}y--}else d!=="$"&&d!=="$?"&&d!=="$!"||y++;d=x}while(d);dn(u)}function xe(a){for(;a!=null;a=a.nextSibling){var u=a.nodeType;if(u===1||u===3)break;if(u===8){if(u=a.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return a}function He(a){a=a.previousSibling;for(var u=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(u===0)return a;u--}else d==="/$"&&u++}a=a.previousSibling}return null}var at=Math.random().toString(36).slice(2),wt="__reactFiber$"+at,Ge="__reactProps$"+at,It="__reactContainer$"+at,ir="__reactEvents$"+at,ni="__reactListeners$"+at,$o="__reactHandles$"+at;function jr(a){var u=a[wt];if(u)return u;for(var d=a.parentNode;d;){if(u=d[It]||d[wt]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(a=He(a);a!==null;){if(d=a[wt])return d;a=He(a)}return u}a=d,d=a.parentNode}return null}function Eo(a){return a=a[wt]||a[It],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Mo(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(t(33))}function Ia(a){return a[Ge]||null}var jc=[],jo=-1;function Ji(a){return{current:a}}function zt(a){0>jo||(a.current=jc[jo],jc[jo]=null,jo--)}function Rt(a,u){jo++,jc[jo]=a.current,a.current=u}var es={},In=Ji(es),fr=Ji(!1),Za=es;function Kl(a,u){var d=a.type.contextTypes;if(!d)return es;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===u)return y.__reactInternalMemoizedMaskedChildContext;var x={},b;for(b in d)x[b]=u[b];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=x),x}function dr(a){return a=a.childContextTypes,a!=null}function Ff(){zt(fr),zt(In)}function Jx(a,u,d){if(In.current!==es)throw Error(t(168));Rt(In,u),Rt(fr,d)}function e1(a,u,d){var y=a.stateNode;if(u=u.childContextTypes,typeof y.getChildContext!="function")return d;y=y.getChildContext();for(var x in y)if(!(x in u))throw Error(t(108,rt(a)||"Unknown",x));return A({},d,y)}function Bf(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||es,Za=In.current,Rt(In,a),Rt(fr,fr.current),!0}function t1(a,u,d){var y=a.stateNode;if(!y)throw Error(t(169));d?(a=e1(a,u,Za),y.__reactInternalMemoizedMergedChildContext=a,zt(fr),zt(In),Rt(In,a)):zt(fr),Rt(fr,d)}var Ns=null,Yf=!1,Vm=!1;function n1(a){Ns===null?Ns=[a]:Ns.push(a)}function S$(a){Yf=!0,n1(a)}function Ro(){if(!Vm&&Ns!==null){Vm=!0;var a=0,u=jt;try{var d=Ns;for(jt=1;a<d.length;a++){var y=d[a];do y=y(!0);while(y!==null)}Ns=null,Yf=!1}catch(x){throw Ns!==null&&(Ns=Ns.slice(a+1)),Ft(xi,Ro),x}finally{jt=u,Vm=!1}}return null}var Jl=[],eu=0,Uf=null,qf=0,ri=[],ii=0,Xa=null,_s=1,zs="";function Va(a,u){Jl[eu++]=qf,Jl[eu++]=Uf,Uf=a,qf=u}function r1(a,u,d){ri[ii++]=_s,ri[ii++]=zs,ri[ii++]=Xa,Xa=a;var y=_s;a=zs;var x=32-ht(y)-1;y&=~(1<<x),d+=1;var b=32-ht(u)+x;if(30<b){var $=x-x%5;b=(y&(1<<$)-1).toString(32),y>>=$,x-=$,_s=1<<32-ht(u)+x|d<<x|y,zs=b+a}else _s=1<<b|d<<x|y,zs=a}function Wm(a){a.return!==null&&(Va(a,1),r1(a,1,0))}function Fm(a){for(;a===Uf;)Uf=Jl[--eu],Jl[eu]=null,qf=Jl[--eu],Jl[eu]=null;for(;a===Xa;)Xa=ri[--ii],ri[ii]=null,zs=ri[--ii],ri[ii]=null,_s=ri[--ii],ri[ii]=null}var Rr=null,Ar=null,sn=!1,Ci=null;function i1(a,u){var d=li(5,null,null,0);d.elementType="DELETED",d.stateNode=u,d.return=a,u=a.deletions,u===null?(a.deletions=[d],a.flags|=16):u.push(d)}function s1(a,u){switch(a.tag){case 5:var d=a.type;return u=u.nodeType!==1||d.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(a.stateNode=u,Rr=a,Ar=xe(u.firstChild),!0):!1;case 6:return u=a.pendingProps===""||u.nodeType!==3?null:u,u!==null?(a.stateNode=u,Rr=a,Ar=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(d=Xa!==null?{id:_s,overflow:zs}:null,a.memoizedState={dehydrated:u,treeContext:d,retryLane:1073741824},d=li(18,null,null,0),d.stateNode=u,d.return=a,a.child=d,Rr=a,Ar=null,!0):!1;default:return!1}}function Bm(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Ym(a){if(sn){var u=Ar;if(u){var d=u;if(!s1(a,u)){if(Bm(a))throw Error(t(418));u=xe(d.nextSibling);var y=Rr;u&&s1(a,u)?i1(y,d):(a.flags=a.flags&-4097|2,sn=!1,Rr=a)}}else{if(Bm(a))throw Error(t(418));a.flags=a.flags&-4097|2,sn=!1,Rr=a}}}function o1(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Rr=a}function Hf(a){if(a!==Rr)return!1;if(!sn)return o1(a),sn=!0,!1;var u;if((u=a.tag!==3)&&!(u=a.tag!==5)&&(u=a.type,u=u!=="head"&&u!=="body"&&!S(a.type,a.memoizedProps)),u&&(u=Ar)){if(Bm(a))throw a1(),Error(t(418));for(;u;)i1(a,u),u=xe(u.nextSibling)}if(o1(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(t(317));e:{for(a=a.nextSibling,u=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(u===0){Ar=xe(a.nextSibling);break e}u--}else d!=="$"&&d!=="$!"&&d!=="$?"||u++}a=a.nextSibling}Ar=null}}else Ar=Rr?xe(a.stateNode.nextSibling):null;return!0}function a1(){for(var a=Ar;a;)a=xe(a.nextSibling)}function tu(){Ar=Rr=null,sn=!1}function Um(a){Ci===null?Ci=[a]:Ci.push(a)}var b$=I.ReactCurrentBatchConfig;function Rc(a,u,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(t(309));var y=d.stateNode}if(!y)throw Error(t(147,a));var x=y,b=""+a;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===b?u.ref:(u=function($){var X=x.refs;$===null?delete X[b]:X[b]=$},u._stringRef=b,u)}if(typeof a!="string")throw Error(t(284));if(!d._owner)throw Error(t(290,a))}return a}function Gf(a,u){throw a=Object.prototype.toString.call(u),Error(t(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a))}function l1(a){var u=a._init;return u(a._payload)}function u1(a){function u(ie,J){if(a){var oe=ie.deletions;oe===null?(ie.deletions=[J],ie.flags|=16):oe.push(J)}}function d(ie,J){if(!a)return null;for(;J!==null;)u(ie,J),J=J.sibling;return null}function y(ie,J){for(ie=new Map;J!==null;)J.key!==null?ie.set(J.key,J):ie.set(J.index,J),J=J.sibling;return ie}function x(ie,J){return ie=Zo(ie,J),ie.index=0,ie.sibling=null,ie}function b(ie,J,oe){return ie.index=oe,a?(oe=ie.alternate,oe!==null?(oe=oe.index,oe<J?(ie.flags|=2,J):oe):(ie.flags|=2,J)):(ie.flags|=1048576,J)}function $(ie){return a&&ie.alternate===null&&(ie.flags|=2),ie}function X(ie,J,oe,Qe){return J===null||J.tag!==6?(J=Dg(oe,ie.mode,Qe),J.return=ie,J):(J=x(J,oe),J.return=ie,J)}function H(ie,J,oe,Qe){var We=oe.type;return We===R?ve(ie,J,oe.props.children,Qe,oe.key):J!==null&&(J.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Oe&&l1(We)===J.type)?(Qe=x(J,oe.props),Qe.ref=Rc(ie,J,oe),Qe.return=ie,Qe):(Qe=wd(oe.type,oe.key,oe.props,null,ie.mode,Qe),Qe.ref=Rc(ie,J,oe),Qe.return=ie,Qe)}function le(ie,J,oe,Qe){return J===null||J.tag!==4||J.stateNode.containerInfo!==oe.containerInfo||J.stateNode.implementation!==oe.implementation?(J=Ig(oe,ie.mode,Qe),J.return=ie,J):(J=x(J,oe.children||[]),J.return=ie,J)}function ve(ie,J,oe,Qe,We){return J===null||J.tag!==7?(J=Ga(oe,ie.mode,Qe,We),J.return=ie,J):(J=x(J,oe),J.return=ie,J)}function we(ie,J,oe){if(typeof J=="string"&&J!==""||typeof J=="number")return J=Dg(""+J,ie.mode,oe),J.return=ie,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case U:return oe=wd(J.type,J.key,J.props,null,ie.mode,oe),oe.ref=Rc(ie,null,J),oe.return=ie,oe;case _:return J=Ig(J,ie.mode,oe),J.return=ie,J;case Oe:var Qe=J._init;return we(ie,Qe(J._payload),oe)}if(Ur(J)||ye(J))return J=Ga(J,ie.mode,oe,null),J.return=ie,J;Gf(ie,J)}return null}function me(ie,J,oe,Qe){var We=J!==null?J.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number")return We!==null?null:X(ie,J,""+oe,Qe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case U:return oe.key===We?H(ie,J,oe,Qe):null;case _:return oe.key===We?le(ie,J,oe,Qe):null;case Oe:return We=oe._init,me(ie,J,We(oe._payload),Qe)}if(Ur(oe)||ye(oe))return We!==null?null:ve(ie,J,oe,Qe,null);Gf(ie,oe)}return null}function je(ie,J,oe,Qe,We){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number")return ie=ie.get(oe)||null,X(J,ie,""+Qe,We);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case U:return ie=ie.get(Qe.key===null?oe:Qe.key)||null,H(J,ie,Qe,We);case _:return ie=ie.get(Qe.key===null?oe:Qe.key)||null,le(J,ie,Qe,We);case Oe:var et=Qe._init;return je(ie,J,oe,et(Qe._payload),We)}if(Ur(Qe)||ye(Qe))return ie=ie.get(oe)||null,ve(J,ie,Qe,We,null);Gf(J,Qe)}return null}function Ze(ie,J,oe,Qe){for(var We=null,et=null,tt=J,lt=J=0,Mn=null;tt!==null&<<oe.length;lt++){tt.index>lt?(Mn=tt,tt=null):Mn=tt.sibling;var At=me(ie,tt,oe[lt],Qe);if(At===null){tt===null&&(tt=Mn);break}a&&tt&&At.alternate===null&&u(ie,tt),J=b(At,J,lt),et===null?We=At:et.sibling=At,et=At,tt=Mn}if(lt===oe.length)return d(ie,tt),sn&&Va(ie,lt),We;if(tt===null){for(;lt<oe.length;lt++)tt=we(ie,oe[lt],Qe),tt!==null&&(J=b(tt,J,lt),et===null?We=tt:et.sibling=tt,et=tt);return sn&&Va(ie,lt),We}for(tt=y(ie,tt);lt<oe.length;lt++)Mn=je(tt,ie,lt,oe[lt],Qe),Mn!==null&&(a&&Mn.alternate!==null&&tt.delete(Mn.key===null?lt:Mn.key),J=b(Mn,J,lt),et===null?We=Mn:et.sibling=Mn,et=Mn);return a&&tt.forEach(function(Xo){return u(ie,Xo)}),sn&&Va(ie,lt),We}function Ve(ie,J,oe,Qe){var We=ye(oe);if(typeof We!="function")throw Error(t(150));if(oe=We.call(oe),oe==null)throw Error(t(151));for(var et=We=null,tt=J,lt=J=0,Mn=null,At=oe.next();tt!==null&&!At.done;lt++,At=oe.next()){tt.index>lt?(Mn=tt,tt=null):Mn=tt.sibling;var Xo=me(ie,tt,At.value,Qe);if(Xo===null){tt===null&&(tt=Mn);break}a&&tt&&Xo.alternate===null&&u(ie,tt),J=b(Xo,J,lt),et===null?We=Xo:et.sibling=Xo,et=Xo,tt=Mn}if(At.done)return d(ie,tt),sn&&Va(ie,lt),We;if(tt===null){for(;!At.done;lt++,At=oe.next())At=we(ie,At.value,Qe),At!==null&&(J=b(At,J,lt),et===null?We=At:et.sibling=At,et=At);return sn&&Va(ie,lt),We}for(tt=y(ie,tt);!At.done;lt++,At=oe.next())At=je(tt,ie,lt,At.value,Qe),At!==null&&(a&&At.alternate!==null&&tt.delete(At.key===null?lt:At.key),J=b(At,J,lt),et===null?We=At:et.sibling=At,et=At);return a&&tt.forEach(function(rE){return u(ie,rE)}),sn&&Va(ie,lt),We}function On(ie,J,oe,Qe){if(typeof oe=="object"&&oe!==null&&oe.type===R&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case U:e:{for(var We=oe.key,et=J;et!==null;){if(et.key===We){if(We=oe.type,We===R){if(et.tag===7){d(ie,et.sibling),J=x(et,oe.props.children),J.return=ie,ie=J;break e}}else if(et.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Oe&&l1(We)===et.type){d(ie,et.sibling),J=x(et,oe.props),J.ref=Rc(ie,et,oe),J.return=ie,ie=J;break e}d(ie,et);break}else u(ie,et);et=et.sibling}oe.type===R?(J=Ga(oe.props.children,ie.mode,Qe,oe.key),J.return=ie,ie=J):(Qe=wd(oe.type,oe.key,oe.props,null,ie.mode,Qe),Qe.ref=Rc(ie,J,oe),Qe.return=ie,ie=Qe)}return $(ie);case _:e:{for(et=oe.key;J!==null;){if(J.key===et)if(J.tag===4&&J.stateNode.containerInfo===oe.containerInfo&&J.stateNode.implementation===oe.implementation){d(ie,J.sibling),J=x(J,oe.children||[]),J.return=ie,ie=J;break e}else{d(ie,J);break}else u(ie,J);J=J.sibling}J=Ig(oe,ie.mode,Qe),J.return=ie,ie=J}return $(ie);case Oe:return et=oe._init,On(ie,J,et(oe._payload),Qe)}if(Ur(oe))return Ze(ie,J,oe,Qe);if(ye(oe))return Ve(ie,J,oe,Qe);Gf(ie,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"?(oe=""+oe,J!==null&&J.tag===6?(d(ie,J.sibling),J=x(J,oe),J.return=ie,ie=J):(d(ie,J),J=Dg(oe,ie.mode,Qe),J.return=ie,ie=J),$(ie)):d(ie,J)}return On}var nu=u1(!0),c1=u1(!1),Kf=Ji(null),Jf=null,ru=null,qm=null;function Hm(){qm=ru=Jf=null}function Gm(a){var u=Kf.current;zt(Kf),a._currentValue=u}function Km(a,u,d){for(;a!==null;){var y=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),a===d)break;a=a.return}}function iu(a,u){Jf=a,qm=ru=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&u)!==0&&(pr=!0),a.firstContext=null)}function si(a){var u=a._currentValue;if(qm!==a)if(a={context:a,memoizedValue:u,next:null},ru===null){if(Jf===null)throw Error(t(308));ru=a,Jf.dependencies={lanes:0,firstContext:a}}else ru=ru.next=a;return u}var Wa=null;function Jm(a){Wa===null?Wa=[a]:Wa.push(a)}function h1(a,u,d,y){var x=u.interleaved;return x===null?(d.next=d,Jm(u)):(d.next=x.next,x.next=d),u.interleaved=d,Ls(a,y)}function Ls(a,u){a.lanes|=u;var d=a.alternate;for(d!==null&&(d.lanes|=u),d=a,a=a.return;a!==null;)a.childLanes|=u,d=a.alternate,d!==null&&(d.childLanes|=u),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Ao=!1;function eg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function f1(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ds(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function No(a,u,d){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Mt&2)!==0){var x=y.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),y.pending=u,Ls(a,d)}return x=y.interleaved,x===null?(u.next=u,Jm(y)):(u.next=x.next,x.next=u),y.interleaved=u,Ls(a,d)}function ed(a,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194240)!==0)){var y=u.lanes;y&=a.pendingLanes,d|=y,u.lanes=d,ho(a,d)}}function d1(a,u){var d=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,d===y)){var x=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var $={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};b===null?x=b=$:b=b.next=$,d=d.next}while(d!==null);b===null?x=b=u:b=b.next=u}else x=b=u;d={baseState:y.baseState,firstBaseUpdate:x,lastBaseUpdate:b,shared:y.shared,effects:y.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=u}function td(a,u,d,y){var x=a.updateQueue;Ao=!1;var b=x.firstBaseUpdate,$=x.lastBaseUpdate,X=x.shared.pending;if(X!==null){x.shared.pending=null;var H=X,le=H.next;H.next=null,$===null?b=le:$.next=le,$=H;var ve=a.alternate;ve!==null&&(ve=ve.updateQueue,X=ve.lastBaseUpdate,X!==$&&(X===null?ve.firstBaseUpdate=le:X.next=le,ve.lastBaseUpdate=H))}if(b!==null){var we=x.baseState;$=0,ve=le=H=null,X=b;do{var me=X.lane,je=X.eventTime;if((y&me)===me){ve!==null&&(ve=ve.next={eventTime:je,lane:0,tag:X.tag,payload:X.payload,callback:X.callback,next:null});e:{var Ze=a,Ve=X;switch(me=u,je=d,Ve.tag){case 1:if(Ze=Ve.payload,typeof Ze=="function"){we=Ze.call(je,we,me);break e}we=Ze;break e;case 3:Ze.flags=Ze.flags&-65537|128;case 0:if(Ze=Ve.payload,me=typeof Ze=="function"?Ze.call(je,we,me):Ze,me==null)break e;we=A({},we,me);break e;case 2:Ao=!0}}X.callback!==null&&X.lane!==0&&(a.flags|=64,me=x.effects,me===null?x.effects=[X]:me.push(X))}else je={eventTime:je,lane:me,tag:X.tag,payload:X.payload,callback:X.callback,next:null},ve===null?(le=ve=je,H=we):ve=ve.next=je,$|=me;if(X=X.next,X===null){if(X=x.shared.pending,X===null)break;me=X,X=me.next,me.next=null,x.lastBaseUpdate=me,x.shared.pending=null}}while(!0);if(ve===null&&(H=we),x.baseState=H,x.firstBaseUpdate=le,x.lastBaseUpdate=ve,u=x.shared.interleaved,u!==null){x=u;do $|=x.lane,x=x.next;while(x!==u)}else b===null&&(x.shared.lanes=0);Ya|=$,a.lanes=$,a.memoizedState=we}}function p1(a,u,d){if(a=u.effects,u.effects=null,a!==null)for(u=0;u<a.length;u++){var y=a[u],x=y.callback;if(x!==null){if(y.callback=null,y=d,typeof x!="function")throw Error(t(191,x));x.call(y)}}}var Ac={},ts=Ji(Ac),Nc=Ji(Ac),_c=Ji(Ac);function Fa(a){if(a===Ac)throw Error(t(174));return a}function tg(a,u){switch(Rt(_c,u),Rt(Nc,a),Rt(ts,Ac),a=u.nodeType,a){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:Pe(null,"");break;default:a=a===8?u.parentNode:u,u=a.namespaceURI||null,a=a.tagName,u=Pe(u,a)}zt(ts),Rt(ts,u)}function su(){zt(ts),zt(Nc),zt(_c)}function m1(a){Fa(_c.current);var u=Fa(ts.current),d=Pe(u,a.type);u!==d&&(Rt(Nc,a),Rt(ts,d))}function ng(a){Nc.current===a&&(zt(ts),zt(Nc))}var ln=Ji(0);function nd(a){for(var u=a;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var rg=[];function ig(){for(var a=0;a<rg.length;a++)rg[a]._workInProgressVersionPrimary=null;rg.length=0}var rd=I.ReactCurrentDispatcher,sg=I.ReactCurrentBatchConfig,Ba=0,un=null,Pn=null,$n=null,id=!1,zc=!1,Lc=0,P$=0;function Zn(){throw Error(t(321))}function og(a,u){if(u===null)return!1;for(var d=0;d<u.length&&d<a.length;d++)if(!an(a[d],u[d]))return!1;return!0}function ag(a,u,d,y,x,b){if(Ba=b,un=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,rd.current=a===null||a.memoizedState===null?$$:E$,a=d(y,x),zc){b=0;do{if(zc=!1,Lc=0,25<=b)throw Error(t(301));b+=1,$n=Pn=null,u.updateQueue=null,rd.current=M$,a=d(y,x)}while(zc)}if(rd.current=ad,u=Pn!==null&&Pn.next!==null,Ba=0,$n=Pn=un=null,id=!1,u)throw Error(t(300));return a}function lg(){var a=Lc!==0;return Lc=0,a}function ns(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $n===null?un.memoizedState=$n=a:$n=$n.next=a,$n}function oi(){if(Pn===null){var a=un.alternate;a=a!==null?a.memoizedState:null}else a=Pn.next;var u=$n===null?un.memoizedState:$n.next;if(u!==null)$n=u,Pn=a;else{if(a===null)throw Error(t(310));Pn=a,a={memoizedState:Pn.memoizedState,baseState:Pn.baseState,baseQueue:Pn.baseQueue,queue:Pn.queue,next:null},$n===null?un.memoizedState=$n=a:$n=$n.next=a}return $n}function Dc(a,u){return typeof u=="function"?u(a):u}function ug(a){var u=oi(),d=u.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=a;var y=Pn,x=y.baseQueue,b=d.pending;if(b!==null){if(x!==null){var $=x.next;x.next=b.next,b.next=$}y.baseQueue=x=b,d.pending=null}if(x!==null){b=x.next,y=y.baseState;var X=$=null,H=null,le=b;do{var ve=le.lane;if((Ba&ve)===ve)H!==null&&(H=H.next={lane:0,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),y=le.hasEagerState?le.eagerState:a(y,le.action);else{var we={lane:ve,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null};H===null?(X=H=we,$=y):H=H.next=we,un.lanes|=ve,Ya|=ve}le=le.next}while(le!==null&&le!==b);H===null?$=y:H.next=X,an(y,u.memoizedState)||(pr=!0),u.memoizedState=y,u.baseState=$,u.baseQueue=H,d.lastRenderedState=y}if(a=d.interleaved,a!==null){x=a;do b=x.lane,un.lanes|=b,Ya|=b,x=x.next;while(x!==a)}else x===null&&(d.lanes=0);return[u.memoizedState,d.dispatch]}function cg(a){var u=oi(),d=u.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=a;var y=d.dispatch,x=d.pending,b=u.memoizedState;if(x!==null){d.pending=null;var $=x=x.next;do b=a(b,$.action),$=$.next;while($!==x);an(b,u.memoizedState)||(pr=!0),u.memoizedState=b,u.baseQueue===null&&(u.baseState=b),d.lastRenderedState=b}return[b,y]}function g1(){}function O1(a,u){var d=un,y=oi(),x=u(),b=!an(y.memoizedState,x);if(b&&(y.memoizedState=x,pr=!0),y=y.queue,hg(v1.bind(null,d,y,a),[a]),y.getSnapshot!==u||b||$n!==null&&$n.memoizedState.tag&1){if(d.flags|=2048,Ic(9,x1.bind(null,d,y,x,u),void 0,null),En===null)throw Error(t(349));(Ba&30)!==0||y1(d,u,x)}return x}function y1(a,u,d){a.flags|=16384,a={getSnapshot:u,value:d},u=un.updateQueue,u===null?(u={lastEffect:null,stores:null},un.updateQueue=u,u.stores=[a]):(d=u.stores,d===null?u.stores=[a]:d.push(a))}function x1(a,u,d,y){u.value=d,u.getSnapshot=y,w1(u)&&k1(a)}function v1(a,u,d){return d(function(){w1(u)&&k1(a)})}function w1(a){var u=a.getSnapshot;a=a.value;try{var d=u();return!an(a,d)}catch{return!0}}function k1(a){var u=Ls(a,1);u!==null&&Mi(u,a,1,-1)}function S1(a){var u=ns();return typeof a=="function"&&(a=a()),u.memoizedState=u.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dc,lastRenderedState:a},u.queue=a,a=a.dispatch=T$.bind(null,un,a),[u.memoizedState,a]}function Ic(a,u,d,y){return a={tag:a,create:u,destroy:d,deps:y,next:null},u=un.updateQueue,u===null?(u={lastEffect:null,stores:null},un.updateQueue=u,u.lastEffect=a.next=a):(d=u.lastEffect,d===null?u.lastEffect=a.next=a:(y=d.next,d.next=a,a.next=y,u.lastEffect=a)),a}function b1(){return oi().memoizedState}function sd(a,u,d,y){var x=ns();un.flags|=a,x.memoizedState=Ic(1|u,d,void 0,y===void 0?null:y)}function od(a,u,d,y){var x=oi();y=y===void 0?null:y;var b=void 0;if(Pn!==null){var $=Pn.memoizedState;if(b=$.destroy,y!==null&&og(y,$.deps)){x.memoizedState=Ic(u,d,b,y);return}}un.flags|=a,x.memoizedState=Ic(1|u,d,b,y)}function P1(a,u){return sd(8390656,8,a,u)}function hg(a,u){return od(2048,8,a,u)}function Q1(a,u){return od(4,2,a,u)}function C1(a,u){return od(4,4,a,u)}function T1(a,u){if(typeof u=="function")return a=a(),u(a),function(){u(null)};if(u!=null)return a=a(),u.current=a,function(){u.current=null}}function $1(a,u,d){return d=d!=null?d.concat([a]):null,od(4,4,T1.bind(null,u,a),d)}function fg(){}function E1(a,u){var d=oi();u=u===void 0?null:u;var y=d.memoizedState;return y!==null&&u!==null&&og(u,y[1])?y[0]:(d.memoizedState=[a,u],a)}function M1(a,u){var d=oi();u=u===void 0?null:u;var y=d.memoizedState;return y!==null&&u!==null&&og(u,y[1])?y[0]:(a=a(),d.memoizedState=[a,u],a)}function j1(a,u,d){return(Ba&21)===0?(a.baseState&&(a.baseState=!1,pr=!0),a.memoizedState=d):(an(d,u)||(d=ac(),un.lanes|=d,Ya|=d,a.baseState=!0),u)}function Q$(a,u){var d=jt;jt=d!==0&&4>d?d:4,a(!0);var y=sg.transition;sg.transition={};try{a(!1),u()}finally{jt=d,sg.transition=y}}function R1(){return oi().memoizedState}function C$(a,u,d){var y=Do(a);if(d={lane:y,action:d,hasEagerState:!1,eagerState:null,next:null},A1(a))N1(u,d);else if(d=h1(a,u,d,y),d!==null){var x=or();Mi(d,a,y,x),_1(d,u,y)}}function T$(a,u,d){var y=Do(a),x={lane:y,action:d,hasEagerState:!1,eagerState:null,next:null};if(A1(a))N1(u,x);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=u.lastRenderedReducer,b!==null))try{var $=u.lastRenderedState,X=b($,d);if(x.hasEagerState=!0,x.eagerState=X,an(X,$)){var H=u.interleaved;H===null?(x.next=x,Jm(u)):(x.next=H.next,H.next=x),u.interleaved=x;return}}catch{}finally{}d=h1(a,u,x,y),d!==null&&(x=or(),Mi(d,a,y,x),_1(d,u,y))}}function A1(a){var u=a.alternate;return a===un||u!==null&&u===un}function N1(a,u){zc=id=!0;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}function _1(a,u,d){if((d&4194240)!==0){var y=u.lanes;y&=a.pendingLanes,d|=y,u.lanes=d,ho(a,d)}}var ad={readContext:si,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},$$={readContext:si,useCallback:function(a,u){return ns().memoizedState=[a,u===void 0?null:u],a},useContext:si,useEffect:P1,useImperativeHandle:function(a,u,d){return d=d!=null?d.concat([a]):null,sd(4194308,4,T1.bind(null,u,a),d)},useLayoutEffect:function(a,u){return sd(4194308,4,a,u)},useInsertionEffect:function(a,u){return sd(4,2,a,u)},useMemo:function(a,u){var d=ns();return u=u===void 0?null:u,a=a(),d.memoizedState=[a,u],a},useReducer:function(a,u,d){var y=ns();return u=d!==void 0?d(u):u,y.memoizedState=y.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},y.queue=a,a=a.dispatch=C$.bind(null,un,a),[y.memoizedState,a]},useRef:function(a){var u=ns();return a={current:a},u.memoizedState=a},useState:S1,useDebugValue:fg,useDeferredValue:function(a){return ns().memoizedState=a},useTransition:function(){var a=S1(!1),u=a[0];return a=Q$.bind(null,a[1]),ns().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,d){var y=un,x=ns();if(sn){if(d===void 0)throw Error(t(407));d=d()}else{if(d=u(),En===null)throw Error(t(349));(Ba&30)!==0||y1(y,u,d)}x.memoizedState=d;var b={value:d,getSnapshot:u};return x.queue=b,P1(v1.bind(null,y,b,a),[a]),y.flags|=2048,Ic(9,x1.bind(null,y,b,d,u),void 0,null),d},useId:function(){var a=ns(),u=En.identifierPrefix;if(sn){var d=zs,y=_s;d=(y&~(1<<32-ht(y)-1)).toString(32)+d,u=":"+u+"R"+d,d=Lc++,0<d&&(u+="H"+d.toString(32)),u+=":"}else d=P$++,u=":"+u+"r"+d.toString(32)+":";return a.memoizedState=u},unstable_isNewReconciler:!1},E$={readContext:si,useCallback:E1,useContext:si,useEffect:hg,useImperativeHandle:$1,useInsertionEffect:Q1,useLayoutEffect:C1,useMemo:M1,useReducer:ug,useRef:b1,useState:function(){return ug(Dc)},useDebugValue:fg,useDeferredValue:function(a){var u=oi();return j1(u,Pn.memoizedState,a)},useTransition:function(){var a=ug(Dc)[0],u=oi().memoizedState;return[a,u]},useMutableSource:g1,useSyncExternalStore:O1,useId:R1,unstable_isNewReconciler:!1},M$={readContext:si,useCallback:E1,useContext:si,useEffect:hg,useImperativeHandle:$1,useInsertionEffect:Q1,useLayoutEffect:C1,useMemo:M1,useReducer:cg,useRef:b1,useState:function(){return cg(Dc)},useDebugValue:fg,useDeferredValue:function(a){var u=oi();return Pn===null?u.memoizedState=a:j1(u,Pn.memoizedState,a)},useTransition:function(){var a=cg(Dc)[0],u=oi().memoizedState;return[a,u]},useMutableSource:g1,useSyncExternalStore:O1,useId:R1,unstable_isNewReconciler:!1};function Ti(a,u){if(a&&a.defaultProps){u=A({},u),a=a.defaultProps;for(var d in a)u[d]===void 0&&(u[d]=a[d]);return u}return u}function dg(a,u,d,y){u=a.memoizedState,d=d(y,u),d=d==null?u:A({},u,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var ld={isMounted:function(a){return(a=a._reactInternals)?Ae(a)===a:!1},enqueueSetState:function(a,u,d){a=a._reactInternals;var y=or(),x=Do(a),b=Ds(y,x);b.payload=u,d!=null&&(b.callback=d),u=No(a,b,x),u!==null&&(Mi(u,a,x,y),ed(u,a,x))},enqueueReplaceState:function(a,u,d){a=a._reactInternals;var y=or(),x=Do(a),b=Ds(y,x);b.tag=1,b.payload=u,d!=null&&(b.callback=d),u=No(a,b,x),u!==null&&(Mi(u,a,x,y),ed(u,a,x))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var d=or(),y=Do(a),x=Ds(d,y);x.tag=2,u!=null&&(x.callback=u),u=No(a,x,y),u!==null&&(Mi(u,a,y,d),ed(u,a,y))}};function z1(a,u,d,y,x,b,$){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,b,$):u.prototype&&u.prototype.isPureReactComponent?!ko(d,y)||!ko(x,b):!0}function L1(a,u,d){var y=!1,x=es,b=u.contextType;return typeof b=="object"&&b!==null?b=si(b):(x=dr(u)?Za:In.current,y=u.contextTypes,b=(y=y!=null)?Kl(a,x):es),u=new u(d,b),a.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=ld,a.stateNode=u,u._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=x,a.__reactInternalMemoizedMaskedChildContext=b),u}function D1(a,u,d,y){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,y),u.state!==a&&ld.enqueueReplaceState(u,u.state,null)}function pg(a,u,d,y){var x=a.stateNode;x.props=d,x.state=a.memoizedState,x.refs={},eg(a);var b=u.contextType;typeof b=="object"&&b!==null?x.context=si(b):(b=dr(u)?Za:In.current,x.context=Kl(a,b)),x.state=a.memoizedState,b=u.getDerivedStateFromProps,typeof b=="function"&&(dg(a,u,b,d),x.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(u=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),u!==x.state&&ld.enqueueReplaceState(x,x.state,null),td(a,d,x,y),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308)}function ou(a,u){try{var d="",y=u;do d+=_e(y),y=y.return;while(y);var x=d}catch(b){x=`
|
|
39
|
+
Error generating stack: `+b.message+`
|
|
40
|
+
`+b.stack}return{value:a,source:u,stack:x,digest:null}}function mg(a,u,d){return{value:a,source:null,stack:d??null,digest:u??null}}function gg(a,u){try{console.error(u.value)}catch(d){setTimeout(function(){throw d})}}var j$=typeof WeakMap=="function"?WeakMap:Map;function I1(a,u,d){d=Ds(-1,d),d.tag=3,d.payload={element:null};var y=u.value;return d.callback=function(){md||(md=!0,Mg=y),gg(a,u)},d}function Z1(a,u,d){d=Ds(-1,d),d.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var x=u.value;d.payload=function(){return y(x)},d.callback=function(){gg(a,u)}}var b=a.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(d.callback=function(){gg(a,u),typeof y!="function"&&(zo===null?zo=new Set([this]):zo.add(this));var $=u.stack;this.componentDidCatch(u.value,{componentStack:$!==null?$:""})}),d}function X1(a,u,d){var y=a.pingCache;if(y===null){y=a.pingCache=new j$;var x=new Set;y.set(u,x)}else x=y.get(u),x===void 0&&(x=new Set,y.set(u,x));x.has(d)||(x.add(d),a=B$.bind(null,a,u,d),u.then(a,a))}function V1(a){do{var u;if((u=a.tag===13)&&(u=a.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return a;a=a.return}while(a!==null);return null}function W1(a,u,d,y,x){return(a.mode&1)===0?(a===u?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(u=Ds(-1,1),u.tag=2,No(d,u,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=x,a)}var R$=I.ReactCurrentOwner,pr=!1;function sr(a,u,d,y){u.child=a===null?c1(u,null,d,y):nu(u,a.child,d,y)}function F1(a,u,d,y,x){d=d.render;var b=u.ref;return iu(u,x),y=ag(a,u,d,y,b,x),d=lg(),a!==null&&!pr?(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~x,Is(a,u,x)):(sn&&d&&Wm(u),u.flags|=1,sr(a,u,y,x),u.child)}function B1(a,u,d,y,x){if(a===null){var b=d.type;return typeof b=="function"&&!Lg(b)&&b.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(u.tag=15,u.type=b,Y1(a,u,b,y,x)):(a=wd(d.type,null,y,u,u.mode,x),a.ref=u.ref,a.return=u,u.child=a)}if(b=a.child,(a.lanes&x)===0){var $=b.memoizedProps;if(d=d.compare,d=d!==null?d:ko,d($,y)&&a.ref===u.ref)return Is(a,u,x)}return u.flags|=1,a=Zo(b,y),a.ref=u.ref,a.return=u,u.child=a}function Y1(a,u,d,y,x){if(a!==null){var b=a.memoizedProps;if(ko(b,y)&&a.ref===u.ref)if(pr=!1,u.pendingProps=y=b,(a.lanes&x)!==0)(a.flags&131072)!==0&&(pr=!0);else return u.lanes=a.lanes,Is(a,u,x)}return Og(a,u,d,y,x)}function U1(a,u,d){var y=u.pendingProps,x=y.children,b=a!==null?a.memoizedState:null;if(y.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(lu,Nr),Nr|=d;else{if((d&1073741824)===0)return a=b!==null?b.baseLanes|d:d,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:a,cachePool:null,transitions:null},u.updateQueue=null,Rt(lu,Nr),Nr|=a,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=b!==null?b.baseLanes:d,Rt(lu,Nr),Nr|=y}else b!==null?(y=b.baseLanes|d,u.memoizedState=null):y=d,Rt(lu,Nr),Nr|=y;return sr(a,u,x,d),u.child}function q1(a,u){var d=u.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(u.flags|=512,u.flags|=2097152)}function Og(a,u,d,y,x){var b=dr(d)?Za:In.current;return b=Kl(u,b),iu(u,x),d=ag(a,u,d,y,b,x),y=lg(),a!==null&&!pr?(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~x,Is(a,u,x)):(sn&&y&&Wm(u),u.flags|=1,sr(a,u,d,x),u.child)}function H1(a,u,d,y,x){if(dr(d)){var b=!0;Bf(u)}else b=!1;if(iu(u,x),u.stateNode===null)cd(a,u),L1(u,d,y),pg(u,d,y,x),y=!0;else if(a===null){var $=u.stateNode,X=u.memoizedProps;$.props=X;var H=$.context,le=d.contextType;typeof le=="object"&&le!==null?le=si(le):(le=dr(d)?Za:In.current,le=Kl(u,le));var ve=d.getDerivedStateFromProps,we=typeof ve=="function"||typeof $.getSnapshotBeforeUpdate=="function";we||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(X!==y||H!==le)&&D1(u,$,y,le),Ao=!1;var me=u.memoizedState;$.state=me,td(u,y,$,x),H=u.memoizedState,X!==y||me!==H||fr.current||Ao?(typeof ve=="function"&&(dg(u,d,ve,y),H=u.memoizedState),(X=Ao||z1(u,d,X,y,me,H,le))?(we||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount()),typeof $.componentDidMount=="function"&&(u.flags|=4194308)):(typeof $.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=H),$.props=y,$.state=H,$.context=le,y=X):(typeof $.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{$=u.stateNode,f1(a,u),X=u.memoizedProps,le=u.type===u.elementType?X:Ti(u.type,X),$.props=le,we=u.pendingProps,me=$.context,H=d.contextType,typeof H=="object"&&H!==null?H=si(H):(H=dr(d)?Za:In.current,H=Kl(u,H));var je=d.getDerivedStateFromProps;(ve=typeof je=="function"||typeof $.getSnapshotBeforeUpdate=="function")||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(X!==we||me!==H)&&D1(u,$,y,H),Ao=!1,me=u.memoizedState,$.state=me,td(u,y,$,x);var Ze=u.memoizedState;X!==we||me!==Ze||fr.current||Ao?(typeof je=="function"&&(dg(u,d,je,y),Ze=u.memoizedState),(le=Ao||z1(u,d,le,y,me,Ze,H)||!1)?(ve||typeof $.UNSAFE_componentWillUpdate!="function"&&typeof $.componentWillUpdate!="function"||(typeof $.componentWillUpdate=="function"&&$.componentWillUpdate(y,Ze,H),typeof $.UNSAFE_componentWillUpdate=="function"&&$.UNSAFE_componentWillUpdate(y,Ze,H)),typeof $.componentDidUpdate=="function"&&(u.flags|=4),typeof $.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof $.componentDidUpdate!="function"||X===a.memoizedProps&&me===a.memoizedState||(u.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||X===a.memoizedProps&&me===a.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Ze),$.props=y,$.state=Ze,$.context=H,y=le):(typeof $.componentDidUpdate!="function"||X===a.memoizedProps&&me===a.memoizedState||(u.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||X===a.memoizedProps&&me===a.memoizedState||(u.flags|=1024),y=!1)}return yg(a,u,d,y,b,x)}function yg(a,u,d,y,x,b){q1(a,u);var $=(u.flags&128)!==0;if(!y&&!$)return x&&t1(u,d,!1),Is(a,u,b);y=u.stateNode,R$.current=u;var X=$&&typeof d.getDerivedStateFromError!="function"?null:y.render();return u.flags|=1,a!==null&&$?(u.child=nu(u,a.child,null,b),u.child=nu(u,null,X,b)):sr(a,u,X,b),u.memoizedState=y.state,x&&t1(u,d,!0),u.child}function G1(a){var u=a.stateNode;u.pendingContext?Jx(a,u.pendingContext,u.pendingContext!==u.context):u.context&&Jx(a,u.context,!1),tg(a,u.containerInfo)}function K1(a,u,d,y,x){return tu(),Um(x),u.flags|=256,sr(a,u,d,y),u.child}var xg={dehydrated:null,treeContext:null,retryLane:0};function vg(a){return{baseLanes:a,cachePool:null,transitions:null}}function J1(a,u,d){var y=u.pendingProps,x=ln.current,b=!1,$=(u.flags&128)!==0,X;if((X=$)||(X=a!==null&&a.memoizedState===null?!1:(x&2)!==0),X?(b=!0,u.flags&=-129):(a===null||a.memoizedState!==null)&&(x|=1),Rt(ln,x&1),a===null)return Ym(u),a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((u.mode&1)===0?u.lanes=1:a.data==="$!"?u.lanes=8:u.lanes=1073741824,null):($=y.children,a=y.fallback,b?(y=u.mode,b=u.child,$={mode:"hidden",children:$},(y&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=$):b=kd($,y,0,null),a=Ga(a,y,d,null),b.return=u,a.return=u,b.sibling=a,u.child=b,u.child.memoizedState=vg(d),u.memoizedState=xg,a):wg(u,$));if(x=a.memoizedState,x!==null&&(X=x.dehydrated,X!==null))return A$(a,u,$,y,X,x,d);if(b){b=y.fallback,$=u.mode,x=a.child,X=x.sibling;var H={mode:"hidden",children:y.children};return($&1)===0&&u.child!==x?(y=u.child,y.childLanes=0,y.pendingProps=H,u.deletions=null):(y=Zo(x,H),y.subtreeFlags=x.subtreeFlags&14680064),X!==null?b=Zo(X,b):(b=Ga(b,$,d,null),b.flags|=2),b.return=u,y.return=u,y.sibling=b,u.child=y,y=b,b=u.child,$=a.child.memoizedState,$=$===null?vg(d):{baseLanes:$.baseLanes|d,cachePool:null,transitions:$.transitions},b.memoizedState=$,b.childLanes=a.childLanes&~d,u.memoizedState=xg,y}return b=a.child,a=b.sibling,y=Zo(b,{mode:"visible",children:y.children}),(u.mode&1)===0&&(y.lanes=d),y.return=u,y.sibling=null,a!==null&&(d=u.deletions,d===null?(u.deletions=[a],u.flags|=16):d.push(a)),u.child=y,u.memoizedState=null,y}function wg(a,u){return u=kd({mode:"visible",children:u},a.mode,0,null),u.return=a,a.child=u}function ud(a,u,d,y){return y!==null&&Um(y),nu(u,a.child,null,d),a=wg(u,u.pendingProps.children),a.flags|=2,u.memoizedState=null,a}function A$(a,u,d,y,x,b,$){if(d)return u.flags&256?(u.flags&=-257,y=mg(Error(t(422))),ud(a,u,$,y)):u.memoizedState!==null?(u.child=a.child,u.flags|=128,null):(b=y.fallback,x=u.mode,y=kd({mode:"visible",children:y.children},x,0,null),b=Ga(b,x,$,null),b.flags|=2,y.return=u,b.return=u,y.sibling=b,u.child=y,(u.mode&1)!==0&&nu(u,a.child,null,$),u.child.memoizedState=vg($),u.memoizedState=xg,b);if((u.mode&1)===0)return ud(a,u,$,null);if(x.data==="$!"){if(y=x.nextSibling&&x.nextSibling.dataset,y)var X=y.dgst;return y=X,b=Error(t(419)),y=mg(b,y,void 0),ud(a,u,$,y)}if(X=($&a.childLanes)!==0,pr||X){if(y=En,y!==null){switch($&-$){case 4:x=2;break;case 16:x=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:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(y.suspendedLanes|$))!==0?0:x,x!==0&&x!==b.retryLane&&(b.retryLane=x,Ls(a,x),Mi(y,a,x,-1))}return zg(),y=mg(Error(t(421))),ud(a,u,$,y)}return x.data==="$?"?(u.flags|=128,u.child=a.child,u=Y$.bind(null,a),x._reactRetry=u,null):(a=b.treeContext,Ar=xe(x.nextSibling),Rr=u,sn=!0,Ci=null,a!==null&&(ri[ii++]=_s,ri[ii++]=zs,ri[ii++]=Xa,_s=a.id,zs=a.overflow,Xa=u),u=wg(u,y.children),u.flags|=4096,u)}function ev(a,u,d){a.lanes|=u;var y=a.alternate;y!==null&&(y.lanes|=u),Km(a.return,u,d)}function kg(a,u,d,y,x){var b=a.memoizedState;b===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:d,tailMode:x}:(b.isBackwards=u,b.rendering=null,b.renderingStartTime=0,b.last=y,b.tail=d,b.tailMode=x)}function tv(a,u,d){var y=u.pendingProps,x=y.revealOrder,b=y.tail;if(sr(a,u,y.children,d),y=ln.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&ev(a,d,u);else if(a.tag===19)ev(a,d,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}y&=1}if(Rt(ln,y),(u.mode&1)===0)u.memoizedState=null;else switch(x){case"forwards":for(d=u.child,x=null;d!==null;)a=d.alternate,a!==null&&nd(a)===null&&(x=d),d=d.sibling;d=x,d===null?(x=u.child,u.child=null):(x=d.sibling,d.sibling=null),kg(u,!1,x,d,b);break;case"backwards":for(d=null,x=u.child,u.child=null;x!==null;){if(a=x.alternate,a!==null&&nd(a)===null){u.child=x;break}a=x.sibling,x.sibling=d,d=x,x=a}kg(u,!0,d,null,b);break;case"together":kg(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function cd(a,u){(u.mode&1)===0&&a!==null&&(a.alternate=null,u.alternate=null,u.flags|=2)}function Is(a,u,d){if(a!==null&&(u.dependencies=a.dependencies),Ya|=u.lanes,(d&u.childLanes)===0)return null;if(a!==null&&u.child!==a.child)throw Error(t(153));if(u.child!==null){for(a=u.child,d=Zo(a,a.pendingProps),u.child=d,d.return=u;a.sibling!==null;)a=a.sibling,d=d.sibling=Zo(a,a.pendingProps),d.return=u;d.sibling=null}return u.child}function N$(a,u,d){switch(u.tag){case 3:G1(u),tu();break;case 5:m1(u);break;case 1:dr(u.type)&&Bf(u);break;case 4:tg(u,u.stateNode.containerInfo);break;case 10:var y=u.type._context,x=u.memoizedProps.value;Rt(Kf,y._currentValue),y._currentValue=x;break;case 13:if(y=u.memoizedState,y!==null)return y.dehydrated!==null?(Rt(ln,ln.current&1),u.flags|=128,null):(d&u.child.childLanes)!==0?J1(a,u,d):(Rt(ln,ln.current&1),a=Is(a,u,d),a!==null?a.sibling:null);Rt(ln,ln.current&1);break;case 19:if(y=(d&u.childLanes)!==0,(a.flags&128)!==0){if(y)return tv(a,u,d);u.flags|=128}if(x=u.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),Rt(ln,ln.current),y)break;return null;case 22:case 23:return u.lanes=0,U1(a,u,d)}return Is(a,u,d)}var nv,Sg,rv,iv;nv=function(a,u){for(var d=u.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Sg=function(){},rv=function(a,u,d,y){var x=a.memoizedProps;if(x!==y){a=u.stateNode,Fa(ts.current);var b=null;switch(d){case"input":x=Zi(a,x),y=Zi(a,y),b=[];break;case"select":x=A({},x,{value:void 0}),y=A({},y,{value:void 0}),b=[];break;case"textarea":x=Ss(a,x),y=Ss(a,y),b=[];break;default:typeof x.onClick!="function"&&typeof y.onClick=="function"&&(a.onclick=Gl)}nn(d,y);var $;d=null;for(le in x)if(!y.hasOwnProperty(le)&&x.hasOwnProperty(le)&&x[le]!=null)if(le==="style"){var X=x[le];for($ in X)X.hasOwnProperty($)&&(d||(d={}),d[$]="")}else le!=="dangerouslySetInnerHTML"&&le!=="children"&&le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&le!=="autoFocus"&&(i.hasOwnProperty(le)?b||(b=[]):(b=b||[]).push(le,null));for(le in y){var H=y[le];if(X=x!=null?x[le]:void 0,y.hasOwnProperty(le)&&H!==X&&(H!=null||X!=null))if(le==="style")if(X){for($ in X)!X.hasOwnProperty($)||H&&H.hasOwnProperty($)||(d||(d={}),d[$]="");for($ in H)H.hasOwnProperty($)&&X[$]!==H[$]&&(d||(d={}),d[$]=H[$])}else d||(b||(b=[]),b.push(le,d)),d=H;else le==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,X=X?X.__html:void 0,H!=null&&X!==H&&(b=b||[]).push(le,H)):le==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(le,""+H):le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&(i.hasOwnProperty(le)?(H!=null&&le==="onScroll"&&Bt("scroll",a),b||X===H||(b=[])):(b=b||[]).push(le,H))}d&&(b=b||[]).push("style",d);var le=b;(u.updateQueue=le)&&(u.flags|=4)}},iv=function(a,u,d,y){d!==y&&(u.flags|=4)};function Zc(a,u){if(!sn)switch(a.tailMode){case"hidden":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var y=null;d!==null;)d.alternate!==null&&(y=d),d=d.sibling;y===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function Xn(a){var u=a.alternate!==null&&a.alternate.child===a.child,d=0,y=0;if(u)for(var x=a.child;x!==null;)d|=x.lanes|x.childLanes,y|=x.subtreeFlags&14680064,y|=x.flags&14680064,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)d|=x.lanes|x.childLanes,y|=x.subtreeFlags,y|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=y,a.childLanes=d,u}function _$(a,u,d){var y=u.pendingProps;switch(Fm(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xn(u),null;case 1:return dr(u.type)&&Ff(),Xn(u),null;case 3:return y=u.stateNode,su(),zt(fr),zt(In),ig(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(Hf(u)?u.flags|=4:a===null||a.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Ci!==null&&(Ag(Ci),Ci=null))),Sg(a,u),Xn(u),null;case 5:ng(u);var x=Fa(_c.current);if(d=u.type,a!==null&&u.stateNode!=null)rv(a,u,d,y,x),a.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!y){if(u.stateNode===null)throw Error(t(166));return Xn(u),null}if(a=Fa(ts.current),Hf(u)){y=u.stateNode,d=u.type;var b=u.memoizedProps;switch(y[wt]=u,y[Ge]=b,a=(u.mode&1)!==0,d){case"dialog":Bt("cancel",y),Bt("close",y);break;case"iframe":case"object":case"embed":Bt("load",y);break;case"video":case"audio":for(x=0;x<Rs.length;x++)Bt(Rs[x],y);break;case"source":Bt("error",y);break;case"img":case"image":case"link":Bt("error",y),Bt("load",y);break;case"details":Bt("toggle",y);break;case"input":Tr(y,b),Bt("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!b.multiple},Bt("invalid",y);break;case"textarea":io(y,b),Bt("invalid",y)}nn(d,b),x=null;for(var $ in b)if(b.hasOwnProperty($)){var X=b[$];$==="children"?typeof X=="string"?y.textContent!==X&&(b.suppressHydrationWarning!==!0&&Ki(y.textContent,X,a),x=["children",X]):typeof X=="number"&&y.textContent!==""+X&&(b.suppressHydrationWarning!==!0&&Ki(y.textContent,X,a),x=["children",""+X]):i.hasOwnProperty($)&&X!=null&&$==="onScroll"&&Bt("scroll",y)}switch(d){case"input":Gn(y),ks(y,b,!0);break;case"textarea":Gn(y),Jn(y);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(y.onclick=Gl)}y=x,u.updateQueue=y,y!==null&&(u.flags|=4)}else{$=x.nodeType===9?x:x.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=fe(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=$.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof y.is=="string"?a=$.createElement(d,{is:y.is}):(a=$.createElement(d),d==="select"&&($=a,y.multiple?$.multiple=!0:y.size&&($.size=y.size))):a=$.createElementNS(a,d),a[wt]=u,a[Ge]=y,nv(a,u,!1,!1),u.stateNode=a;e:{switch($=tr(d,y),d){case"dialog":Bt("cancel",a),Bt("close",a),x=y;break;case"iframe":case"object":case"embed":Bt("load",a),x=y;break;case"video":case"audio":for(x=0;x<Rs.length;x++)Bt(Rs[x],a);x=y;break;case"source":Bt("error",a),x=y;break;case"img":case"image":case"link":Bt("error",a),Bt("load",a),x=y;break;case"details":Bt("toggle",a),x=y;break;case"input":Tr(a,y),x=Zi(a,y),Bt("invalid",a);break;case"option":x=y;break;case"select":a._wrapperState={wasMultiple:!!y.multiple},x=A({},y,{value:void 0}),Bt("invalid",a);break;case"textarea":io(a,y),x=Ss(a,y),Bt("invalid",a);break;default:x=y}nn(d,x),X=x;for(b in X)if(X.hasOwnProperty(b)){var H=X[b];b==="style"?hr(a,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&nt(a,H)):b==="children"?typeof H=="string"?(d!=="textarea"||H!=="")&&yt(a,H):typeof H=="number"&&yt(a,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(i.hasOwnProperty(b)?H!=null&&b==="onScroll"&&Bt("scroll",a):H!=null&&E(a,b,H,$))}switch(d){case"input":Gn(a),ks(a,y,!1);break;case"textarea":Gn(a),Jn(a);break;case"option":y.value!=null&&a.setAttribute("value",""+st(y.value));break;case"select":a.multiple=!!y.multiple,b=y.value,b!=null?qr(a,!!y.multiple,b,!1):y.defaultValue!=null&&qr(a,!!y.multiple,y.defaultValue,!0);break;default:typeof x.onClick=="function"&&(a.onclick=Gl)}switch(d){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Xn(u),null;case 6:if(a&&u.stateNode!=null)iv(a,u,a.memoizedProps,y);else{if(typeof y!="string"&&u.stateNode===null)throw Error(t(166));if(d=Fa(_c.current),Fa(ts.current),Hf(u)){if(y=u.stateNode,d=u.memoizedProps,y[wt]=u,(b=y.nodeValue!==d)&&(a=Rr,a!==null))switch(a.tag){case 3:Ki(y.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Ki(y.nodeValue,d,(a.mode&1)!==0)}b&&(u.flags|=4)}else y=(d.nodeType===9?d:d.ownerDocument).createTextNode(y),y[wt]=u,u.stateNode=y}return Xn(u),null;case 13:if(zt(ln),y=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(sn&&Ar!==null&&(u.mode&1)!==0&&(u.flags&128)===0)a1(),tu(),u.flags|=98560,b=!1;else if(b=Hf(u),y!==null&&y.dehydrated!==null){if(a===null){if(!b)throw Error(t(318));if(b=u.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(t(317));b[wt]=u}else tu(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Xn(u),b=!1}else Ci!==null&&(Ag(Ci),Ci=null),b=!0;if(!b)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=d,u):(y=y!==null,y!==(a!==null&&a.memoizedState!==null)&&y&&(u.child.flags|=8192,(u.mode&1)!==0&&(a===null||(ln.current&1)!==0?Qn===0&&(Qn=3):zg())),u.updateQueue!==null&&(u.flags|=4),Xn(u),null);case 4:return su(),Sg(a,u),a===null&&Na(u.stateNode.containerInfo),Xn(u),null;case 10:return Gm(u.type._context),Xn(u),null;case 17:return dr(u.type)&&Ff(),Xn(u),null;case 19:if(zt(ln),b=u.memoizedState,b===null)return Xn(u),null;if(y=(u.flags&128)!==0,$=b.rendering,$===null)if(y)Zc(b,!1);else{if(Qn!==0||a!==null&&(a.flags&128)!==0)for(a=u.child;a!==null;){if($=nd(a),$!==null){for(u.flags|=128,Zc(b,!1),y=$.updateQueue,y!==null&&(u.updateQueue=y,u.flags|=4),u.subtreeFlags=0,y=d,d=u.child;d!==null;)b=d,a=y,b.flags&=14680066,$=b.alternate,$===null?(b.childLanes=0,b.lanes=a,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=$.childLanes,b.lanes=$.lanes,b.child=$.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=$.memoizedProps,b.memoizedState=$.memoizedState,b.updateQueue=$.updateQueue,b.type=$.type,a=$.dependencies,b.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return Rt(ln,ln.current&1|2),u.child}a=a.sibling}b.tail!==null&&bt()>uu&&(u.flags|=128,y=!0,Zc(b,!1),u.lanes=4194304)}else{if(!y)if(a=nd($),a!==null){if(u.flags|=128,y=!0,d=a.updateQueue,d!==null&&(u.updateQueue=d,u.flags|=4),Zc(b,!0),b.tail===null&&b.tailMode==="hidden"&&!$.alternate&&!sn)return Xn(u),null}else 2*bt()-b.renderingStartTime>uu&&d!==1073741824&&(u.flags|=128,y=!0,Zc(b,!1),u.lanes=4194304);b.isBackwards?($.sibling=u.child,u.child=$):(d=b.last,d!==null?d.sibling=$:u.child=$,b.last=$)}return b.tail!==null?(u=b.tail,b.rendering=u,b.tail=u.sibling,b.renderingStartTime=bt(),u.sibling=null,d=ln.current,Rt(ln,y?d&1|2:d&1),u):(Xn(u),null);case 22:case 23:return _g(),y=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==y&&(u.flags|=8192),y&&(u.mode&1)!==0?(Nr&1073741824)!==0&&(Xn(u),u.subtreeFlags&6&&(u.flags|=8192)):Xn(u),null;case 24:return null;case 25:return null}throw Error(t(156,u.tag))}function z$(a,u){switch(Fm(u),u.tag){case 1:return dr(u.type)&&Ff(),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return su(),zt(fr),zt(In),ig(),a=u.flags,(a&65536)!==0&&(a&128)===0?(u.flags=a&-65537|128,u):null;case 5:return ng(u),null;case 13:if(zt(ln),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(t(340));tu()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return zt(ln),null;case 4:return su(),null;case 10:return Gm(u.type._context),null;case 22:case 23:return _g(),null;case 24:return null;default:return null}}var hd=!1,Vn=!1,L$=typeof WeakSet=="function"?WeakSet:Set,Le=null;function au(a,u){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(y){pn(a,u,y)}else d.current=null}function bg(a,u,d){try{d()}catch(y){pn(a,u,y)}}var sv=!1;function D$(a,u){if(P=Si,a=Xf(),kc(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var y=d.getSelection&&d.getSelection();if(y&&y.rangeCount!==0){d=y.anchorNode;var x=y.anchorOffset,b=y.focusNode;y=y.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var $=0,X=-1,H=-1,le=0,ve=0,we=a,me=null;t:for(;;){for(var je;we!==d||x!==0&&we.nodeType!==3||(X=$+x),we!==b||y!==0&&we.nodeType!==3||(H=$+y),we.nodeType===3&&($+=we.nodeValue.length),(je=we.firstChild)!==null;)me=we,we=je;for(;;){if(we===a)break t;if(me===d&&++le===x&&(X=$),me===b&&++ve===y&&(H=$),(je=we.nextSibling)!==null)break;we=me,me=we.parentNode}we=je}d=X===-1||H===-1?null:{start:X,end:H}}else d=null}d=d||{start:0,end:0}}else d=null;for(O={focusedElem:a,selectionRange:d},Si=!1,Le=u;Le!==null;)if(u=Le,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,Le=a;else for(;Le!==null;){u=Le;try{var Ze=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Ze!==null){var Ve=Ze.memoizedProps,On=Ze.memoizedState,ie=u.stateNode,J=ie.getSnapshotBeforeUpdate(u.elementType===u.type?Ve:Ti(u.type,Ve),On);ie.__reactInternalSnapshotBeforeUpdate=J}break;case 3:var oe=u.stateNode.containerInfo;oe.nodeType===1?oe.textContent="":oe.nodeType===9&&oe.documentElement&&oe.removeChild(oe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Qe){pn(u,u.return,Qe)}if(a=u.sibling,a!==null){a.return=u.return,Le=a;break}Le=u.return}return Ze=sv,sv=!1,Ze}function Xc(a,u,d){var y=u.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var x=y=y.next;do{if((x.tag&a)===a){var b=x.destroy;x.destroy=void 0,b!==void 0&&bg(u,d,b)}x=x.next}while(x!==y)}}function fd(a,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var d=u=u.next;do{if((d.tag&a)===a){var y=d.create;d.destroy=y()}d=d.next}while(d!==u)}}function Pg(a){var u=a.ref;if(u!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof u=="function"?u(a):u.current=a}}function ov(a){var u=a.alternate;u!==null&&(a.alternate=null,ov(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&(delete u[wt],delete u[Ge],delete u[ir],delete u[ni],delete u[$o])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function av(a){return a.tag===5||a.tag===3||a.tag===4}function lv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||av(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Qg(a,u,d){var y=a.tag;if(y===5||y===6)a=a.stateNode,u?d.nodeType===8?d.parentNode.insertBefore(a,u):d.insertBefore(a,u):(d.nodeType===8?(u=d.parentNode,u.insertBefore(a,d)):(u=d,u.appendChild(a)),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=Gl));else if(y!==4&&(a=a.child,a!==null))for(Qg(a,u,d),a=a.sibling;a!==null;)Qg(a,u,d),a=a.sibling}function Cg(a,u,d){var y=a.tag;if(y===5||y===6)a=a.stateNode,u?d.insertBefore(a,u):d.appendChild(a);else if(y!==4&&(a=a.child,a!==null))for(Cg(a,u,d),a=a.sibling;a!==null;)Cg(a,u,d),a=a.sibling}var Nn=null,$i=!1;function _o(a,u,d){for(d=d.child;d!==null;)uv(a,u,d),d=d.sibling}function uv(a,u,d){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Vt,d)}catch{}switch(d.tag){case 5:Vn||au(d,u);case 6:var y=Nn,x=$i;Nn=null,_o(a,u,d),Nn=y,$i=x,Nn!==null&&($i?(a=Nn,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Nn.removeChild(d.stateNode));break;case 18:Nn!==null&&($i?(a=Nn,d=d.stateNode,a.nodeType===8?ne(a.parentNode,d):a.nodeType===1&&ne(a,d),dn(a)):ne(Nn,d.stateNode));break;case 4:y=Nn,x=$i,Nn=d.stateNode.containerInfo,$i=!0,_o(a,u,d),Nn=y,$i=x;break;case 0:case 11:case 14:case 15:if(!Vn&&(y=d.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){x=y=y.next;do{var b=x,$=b.destroy;b=b.tag,$!==void 0&&((b&2)!==0||(b&4)!==0)&&bg(d,u,$),x=x.next}while(x!==y)}_o(a,u,d);break;case 1:if(!Vn&&(au(d,u),y=d.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=d.memoizedProps,y.state=d.memoizedState,y.componentWillUnmount()}catch(X){pn(d,u,X)}_o(a,u,d);break;case 21:_o(a,u,d);break;case 22:d.mode&1?(Vn=(y=Vn)||d.memoizedState!==null,_o(a,u,d),Vn=y):_o(a,u,d);break;default:_o(a,u,d)}}function cv(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new L$),u.forEach(function(y){var x=U$.bind(null,a,y);d.has(y)||(d.add(y),y.then(x,x))})}}function Ei(a,u){var d=u.deletions;if(d!==null)for(var y=0;y<d.length;y++){var x=d[y];try{var b=a,$=u,X=$;e:for(;X!==null;){switch(X.tag){case 5:Nn=X.stateNode,$i=!1;break e;case 3:Nn=X.stateNode.containerInfo,$i=!0;break e;case 4:Nn=X.stateNode.containerInfo,$i=!0;break e}X=X.return}if(Nn===null)throw Error(t(160));uv(b,$,x),Nn=null,$i=!1;var H=x.alternate;H!==null&&(H.return=null),x.return=null}catch(le){pn(x,u,le)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)hv(u,a),u=u.sibling}function hv(a,u){var d=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Ei(u,a),rs(a),y&4){try{Xc(3,a,a.return),fd(3,a)}catch(Ve){pn(a,a.return,Ve)}try{Xc(5,a,a.return)}catch(Ve){pn(a,a.return,Ve)}}break;case 1:Ei(u,a),rs(a),y&512&&d!==null&&au(d,d.return);break;case 5:if(Ei(u,a),rs(a),y&512&&d!==null&&au(d,d.return),a.flags&32){var x=a.stateNode;try{yt(x,"")}catch(Ve){pn(a,a.return,Ve)}}if(y&4&&(x=a.stateNode,x!=null)){var b=a.memoizedProps,$=d!==null?d.memoizedProps:b,X=a.type,H=a.updateQueue;if(a.updateQueue=null,H!==null)try{X==="input"&&b.type==="radio"&&b.name!=null&&Kn(x,b),tr(X,$);var le=tr(X,b);for($=0;$<H.length;$+=2){var ve=H[$],we=H[$+1];ve==="style"?hr(x,we):ve==="dangerouslySetInnerHTML"?nt(x,we):ve==="children"?yt(x,we):E(x,ve,we,le)}switch(X){case"input":Yr(x,b);break;case"textarea":cr(x,b);break;case"select":var me=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!b.multiple;var je=b.value;je!=null?qr(x,!!b.multiple,je,!1):me!==!!b.multiple&&(b.defaultValue!=null?qr(x,!!b.multiple,b.defaultValue,!0):qr(x,!!b.multiple,b.multiple?[]:"",!1))}x[Ge]=b}catch(Ve){pn(a,a.return,Ve)}}break;case 6:if(Ei(u,a),rs(a),y&4){if(a.stateNode===null)throw Error(t(162));x=a.stateNode,b=a.memoizedProps;try{x.nodeValue=b}catch(Ve){pn(a,a.return,Ve)}}break;case 3:if(Ei(u,a),rs(a),y&4&&d!==null&&d.memoizedState.isDehydrated)try{dn(u.containerInfo)}catch(Ve){pn(a,a.return,Ve)}break;case 4:Ei(u,a),rs(a);break;case 13:Ei(u,a),rs(a),x=a.child,x.flags&8192&&(b=x.memoizedState!==null,x.stateNode.isHidden=b,!b||x.alternate!==null&&x.alternate.memoizedState!==null||(Eg=bt())),y&4&&cv(a);break;case 22:if(ve=d!==null&&d.memoizedState!==null,a.mode&1?(Vn=(le=Vn)||ve,Ei(u,a),Vn=le):Ei(u,a),rs(a),y&8192){if(le=a.memoizedState!==null,(a.stateNode.isHidden=le)&&!ve&&(a.mode&1)!==0)for(Le=a,ve=a.child;ve!==null;){for(we=Le=ve;Le!==null;){switch(me=Le,je=me.child,me.tag){case 0:case 11:case 14:case 15:Xc(4,me,me.return);break;case 1:au(me,me.return);var Ze=me.stateNode;if(typeof Ze.componentWillUnmount=="function"){y=me,d=me.return;try{u=y,Ze.props=u.memoizedProps,Ze.state=u.memoizedState,Ze.componentWillUnmount()}catch(Ve){pn(y,d,Ve)}}break;case 5:au(me,me.return);break;case 22:if(me.memoizedState!==null){pv(we);continue}}je!==null?(je.return=me,Le=je):pv(we)}ve=ve.sibling}e:for(ve=null,we=a;;){if(we.tag===5){if(ve===null){ve=we;try{x=we.stateNode,le?(b=x.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(X=we.stateNode,H=we.memoizedProps.style,$=H!=null&&H.hasOwnProperty("display")?H.display:null,X.style.display=xt("display",$))}catch(Ve){pn(a,a.return,Ve)}}}else if(we.tag===6){if(ve===null)try{we.stateNode.nodeValue=le?"":we.memoizedProps}catch(Ve){pn(a,a.return,Ve)}}else if((we.tag!==22&&we.tag!==23||we.memoizedState===null||we===a)&&we.child!==null){we.child.return=we,we=we.child;continue}if(we===a)break e;for(;we.sibling===null;){if(we.return===null||we.return===a)break e;ve===we&&(ve=null),we=we.return}ve===we&&(ve=null),we.sibling.return=we.return,we=we.sibling}}break;case 19:Ei(u,a),rs(a),y&4&&cv(a);break;case 21:break;default:Ei(u,a),rs(a)}}function rs(a){var u=a.flags;if(u&2){try{e:{for(var d=a.return;d!==null;){if(av(d)){var y=d;break e}d=d.return}throw Error(t(160))}switch(y.tag){case 5:var x=y.stateNode;y.flags&32&&(yt(x,""),y.flags&=-33);var b=lv(a);Cg(a,b,x);break;case 3:case 4:var $=y.stateNode.containerInfo,X=lv(a);Qg(a,X,$);break;default:throw Error(t(161))}}catch(H){pn(a,a.return,H)}a.flags&=-3}u&4096&&(a.flags&=-4097)}function I$(a,u,d){Le=a,fv(a)}function fv(a,u,d){for(var y=(a.mode&1)!==0;Le!==null;){var x=Le,b=x.child;if(x.tag===22&&y){var $=x.memoizedState!==null||hd;if(!$){var X=x.alternate,H=X!==null&&X.memoizedState!==null||Vn;X=hd;var le=Vn;if(hd=$,(Vn=H)&&!le)for(Le=x;Le!==null;)$=Le,H=$.child,$.tag===22&&$.memoizedState!==null?mv(x):H!==null?(H.return=$,Le=H):mv(x);for(;b!==null;)Le=b,fv(b),b=b.sibling;Le=x,hd=X,Vn=le}dv(a)}else(x.subtreeFlags&8772)!==0&&b!==null?(b.return=x,Le=b):dv(a)}}function dv(a){for(;Le!==null;){var u=Le;if((u.flags&8772)!==0){var d=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:Vn||fd(5,u);break;case 1:var y=u.stateNode;if(u.flags&4&&!Vn)if(d===null)y.componentDidMount();else{var x=u.elementType===u.type?d.memoizedProps:Ti(u.type,d.memoizedProps);y.componentDidUpdate(x,d.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var b=u.updateQueue;b!==null&&p1(u,b,y);break;case 3:var $=u.updateQueue;if($!==null){if(d=null,u.child!==null)switch(u.child.tag){case 5:d=u.child.stateNode;break;case 1:d=u.child.stateNode}p1(u,$,d)}break;case 5:var X=u.stateNode;if(d===null&&u.flags&4){d=X;var H=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&d.focus();break;case"img":H.src&&(d.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var le=u.alternate;if(le!==null){var ve=le.memoizedState;if(ve!==null){var we=ve.dehydrated;we!==null&&dn(we)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Vn||u.flags&512&&Pg(u)}catch(me){pn(u,u.return,me)}}if(u===a){Le=null;break}if(d=u.sibling,d!==null){d.return=u.return,Le=d;break}Le=u.return}}function pv(a){for(;Le!==null;){var u=Le;if(u===a){Le=null;break}var d=u.sibling;if(d!==null){d.return=u.return,Le=d;break}Le=u.return}}function mv(a){for(;Le!==null;){var u=Le;try{switch(u.tag){case 0:case 11:case 15:var d=u.return;try{fd(4,u)}catch(H){pn(u,d,H)}break;case 1:var y=u.stateNode;if(typeof y.componentDidMount=="function"){var x=u.return;try{y.componentDidMount()}catch(H){pn(u,x,H)}}var b=u.return;try{Pg(u)}catch(H){pn(u,b,H)}break;case 5:var $=u.return;try{Pg(u)}catch(H){pn(u,$,H)}}}catch(H){pn(u,u.return,H)}if(u===a){Le=null;break}var X=u.sibling;if(X!==null){X.return=u.return,Le=X;break}Le=u.return}}var Z$=Math.ceil,dd=I.ReactCurrentDispatcher,Tg=I.ReactCurrentOwner,ai=I.ReactCurrentBatchConfig,Mt=0,En=null,wn=null,_n=0,Nr=0,lu=Ji(0),Qn=0,Vc=null,Ya=0,pd=0,$g=0,Wc=null,mr=null,Eg=0,uu=1/0,Zs=null,md=!1,Mg=null,zo=null,gd=!1,Lo=null,Od=0,Fc=0,jg=null,yd=-1,xd=0;function or(){return(Mt&6)!==0?bt():yd!==-1?yd:yd=bt()}function Do(a){return(a.mode&1)===0?1:(Mt&2)!==0&&_n!==0?_n&-_n:b$.transition!==null?(xd===0&&(xd=ac()),xd):(a=jt,a!==0||(a=window.event,a=a===void 0?16:Ll(a.type)),a)}function Mi(a,u,d,y){if(50<Fc)throw Fc=0,jg=null,Error(t(185));Qs(a,d,y),((Mt&2)===0||a!==En)&&(a===En&&((Mt&2)===0&&(pd|=d),Qn===4&&Io(a,_n)),gr(a,y),d===1&&Mt===0&&(u.mode&1)===0&&(uu=bt()+500,Yf&&Ro()))}function gr(a,u){var d=a.callbackNode;Al(a,u);var y=Yi(a,a===En?_n:0);if(y===0)d!==null&&Gr(d),a.callbackNode=null,a.callbackPriority=0;else if(u=y&-y,a.callbackPriority!==u){if(d!=null&&Gr(d),u===1)a.tag===0?S$(Ov.bind(null,a)):n1(Ov.bind(null,a)),K(function(){(Mt&6)===0&&Ro()}),d=null;else{switch(Sa(y)){case 1:d=xi;break;case 4:d=Er;break;case 16:d=Kr;break;case 536870912:d=vt;break;default:d=Kr}d=Pv(d,gv.bind(null,a))}a.callbackPriority=u,a.callbackNode=d}}function gv(a,u){if(yd=-1,xd=0,(Mt&6)!==0)throw Error(t(327));var d=a.callbackNode;if(cu()&&a.callbackNode!==d)return null;var y=Yi(a,a===En?_n:0);if(y===0)return null;if((y&30)!==0||(y&a.expiredLanes)!==0||u)u=vd(a,y);else{u=y;var x=Mt;Mt|=2;var b=xv();(En!==a||_n!==u)&&(Zs=null,uu=bt()+500,qa(a,u));do try{W$();break}catch(X){yv(a,X)}while(!0);Hm(),dd.current=b,Mt=x,wn!==null?u=0:(En=null,_n=0,u=Qn)}if(u!==0){if(u===2&&(x=co(a),x!==0&&(y=x,u=Rg(a,x))),u===1)throw d=Vc,qa(a,0),Io(a,y),gr(a,bt()),d;if(u===6)Io(a,y);else{if(x=a.current.alternate,(y&30)===0&&!X$(x)&&(u=vd(a,y),u===2&&(b=co(a),b!==0&&(y=b,u=Rg(a,b))),u===1))throw d=Vc,qa(a,0),Io(a,y),gr(a,bt()),d;switch(a.finishedWork=x,a.finishedLanes=y,u){case 0:case 1:throw Error(t(345));case 2:Ha(a,mr,Zs);break;case 3:if(Io(a,y),(y&130023424)===y&&(u=Eg+500-bt(),10<u)){if(Yi(a,0)!==0)break;if(x=a.suspendedLanes,(x&y)!==y){or(),a.pingedLanes|=a.suspendedLanes&x;break}a.timeoutHandle=T(Ha.bind(null,a,mr,Zs),u);break}Ha(a,mr,Zs);break;case 4:if(Io(a,y),(y&4194240)===y)break;for(u=a.eventTimes,x=-1;0<y;){var $=31-ht(y);b=1<<$,$=u[$],$>x&&(x=$),y&=~b}if(y=x,y=bt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*Z$(y/1960))-y,10<y){a.timeoutHandle=T(Ha.bind(null,a,mr,Zs),y);break}Ha(a,mr,Zs);break;case 5:Ha(a,mr,Zs);break;default:throw Error(t(329))}}}return gr(a,bt()),a.callbackNode===d?gv.bind(null,a):null}function Rg(a,u){var d=Wc;return a.current.memoizedState.isDehydrated&&(qa(a,u).flags|=256),a=vd(a,u),a!==2&&(u=mr,mr=d,u!==null&&Ag(u)),a}function Ag(a){mr===null?mr=a:mr.push.apply(mr,a)}function X$(a){for(var u=a;;){if(u.flags&16384){var d=u.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var y=0;y<d.length;y++){var x=d[y],b=x.getSnapshot;x=x.value;try{if(!an(b(),x))return!1}catch{return!1}}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Io(a,u){for(u&=~$g,u&=~pd,a.suspendedLanes|=u,a.pingedLanes&=~u,a=a.expirationTimes;0<u;){var d=31-ht(u),y=1<<d;a[d]=-1,u&=~y}}function Ov(a){if((Mt&6)!==0)throw Error(t(327));cu();var u=Yi(a,0);if((u&1)===0)return gr(a,bt()),null;var d=vd(a,u);if(a.tag!==0&&d===2){var y=co(a);y!==0&&(u=y,d=Rg(a,y))}if(d===1)throw d=Vc,qa(a,0),Io(a,u),gr(a,bt()),d;if(d===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=u,Ha(a,mr,Zs),gr(a,bt()),null}function Ng(a,u){var d=Mt;Mt|=1;try{return a(u)}finally{Mt=d,Mt===0&&(uu=bt()+500,Yf&&Ro())}}function Ua(a){Lo!==null&&Lo.tag===0&&(Mt&6)===0&&cu();var u=Mt;Mt|=1;var d=ai.transition,y=jt;try{if(ai.transition=null,jt=1,a)return a()}finally{jt=y,ai.transition=d,Mt=u,(Mt&6)===0&&Ro()}}function _g(){Nr=lu.current,zt(lu)}function qa(a,u){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,j(d)),wn!==null)for(d=wn.return;d!==null;){var y=d;switch(Fm(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Ff();break;case 3:su(),zt(fr),zt(In),ig();break;case 5:ng(y);break;case 4:su();break;case 13:zt(ln);break;case 19:zt(ln);break;case 10:Gm(y.type._context);break;case 22:case 23:_g()}d=d.return}if(En=a,wn=a=Zo(a.current,null),_n=Nr=u,Qn=0,Vc=null,$g=pd=Ya=0,mr=Wc=null,Wa!==null){for(u=0;u<Wa.length;u++)if(d=Wa[u],y=d.interleaved,y!==null){d.interleaved=null;var x=y.next,b=d.pending;if(b!==null){var $=b.next;b.next=x,y.next=$}d.pending=y}Wa=null}return a}function yv(a,u){do{var d=wn;try{if(Hm(),rd.current=ad,id){for(var y=un.memoizedState;y!==null;){var x=y.queue;x!==null&&(x.pending=null),y=y.next}id=!1}if(Ba=0,$n=Pn=un=null,zc=!1,Lc=0,Tg.current=null,d===null||d.return===null){Qn=1,Vc=u,wn=null;break}e:{var b=a,$=d.return,X=d,H=u;if(u=_n,X.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var le=H,ve=X,we=ve.tag;if((ve.mode&1)===0&&(we===0||we===11||we===15)){var me=ve.alternate;me?(ve.updateQueue=me.updateQueue,ve.memoizedState=me.memoizedState,ve.lanes=me.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var je=V1($);if(je!==null){je.flags&=-257,W1(je,$,X,b,u),je.mode&1&&X1(b,le,u),u=je,H=le;var Ze=u.updateQueue;if(Ze===null){var Ve=new Set;Ve.add(H),u.updateQueue=Ve}else Ze.add(H);break e}else{if((u&1)===0){X1(b,le,u),zg();break e}H=Error(t(426))}}else if(sn&&X.mode&1){var On=V1($);if(On!==null){(On.flags&65536)===0&&(On.flags|=256),W1(On,$,X,b,u),Um(ou(H,X));break e}}b=H=ou(H,X),Qn!==4&&(Qn=2),Wc===null?Wc=[b]:Wc.push(b),b=$;do{switch(b.tag){case 3:b.flags|=65536,u&=-u,b.lanes|=u;var ie=I1(b,H,u);d1(b,ie);break e;case 1:X=H;var J=b.type,oe=b.stateNode;if((b.flags&128)===0&&(typeof J.getDerivedStateFromError=="function"||oe!==null&&typeof oe.componentDidCatch=="function"&&(zo===null||!zo.has(oe)))){b.flags|=65536,u&=-u,b.lanes|=u;var Qe=Z1(b,X,u);d1(b,Qe);break e}}b=b.return}while(b!==null)}wv(d)}catch(We){u=We,wn===d&&d!==null&&(wn=d=d.return);continue}break}while(!0)}function xv(){var a=dd.current;return dd.current=ad,a===null?ad:a}function zg(){(Qn===0||Qn===3||Qn===2)&&(Qn=4),En===null||(Ya&268435455)===0&&(pd&268435455)===0||Io(En,_n)}function vd(a,u){var d=Mt;Mt|=2;var y=xv();(En!==a||_n!==u)&&(Zs=null,qa(a,u));do try{V$();break}catch(x){yv(a,x)}while(!0);if(Hm(),Mt=d,dd.current=y,wn!==null)throw Error(t(261));return En=null,_n=0,Qn}function V$(){for(;wn!==null;)vv(wn)}function W$(){for(;wn!==null&&!qe();)vv(wn)}function vv(a){var u=bv(a.alternate,a,Nr);a.memoizedProps=a.pendingProps,u===null?wv(a):wn=u,Tg.current=null}function wv(a){var u=a;do{var d=u.alternate;if(a=u.return,(u.flags&32768)===0){if(d=_$(d,u,Nr),d!==null){wn=d;return}}else{if(d=z$(d,u),d!==null){d.flags&=32767,wn=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Qn=6,wn=null;return}}if(u=u.sibling,u!==null){wn=u;return}wn=u=a}while(u!==null);Qn===0&&(Qn=5)}function Ha(a,u,d){var y=jt,x=ai.transition;try{ai.transition=null,jt=1,F$(a,u,d,y)}finally{ai.transition=x,jt=y}return null}function F$(a,u,d,y){do cu();while(Lo!==null);if((Mt&6)!==0)throw Error(t(327));d=a.finishedWork;var x=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(t(177));a.callbackNode=null,a.callbackPriority=0;var b=d.lanes|d.childLanes;if(Sf(a,b),a===En&&(wn=En=null,_n=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||gd||(gd=!0,Pv(Kr,function(){return cu(),null})),b=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||b){b=ai.transition,ai.transition=null;var $=jt;jt=1;var X=Mt;Mt|=4,Tg.current=null,D$(a,d),hv(d,a),Zm(O),Si=!!P,O=P=null,a.current=d,I$(d),vn(),Mt=X,jt=$,ai.transition=b}else a.current=d;if(gd&&(gd=!1,Lo=a,Od=x),b=a.pendingLanes,b===0&&(zo=null),vi(d.stateNode),gr(a,bt()),u!==null)for(y=a.onRecoverableError,d=0;d<u.length;d++)x=u[d],y(x.value,{componentStack:x.stack,digest:x.digest});if(md)throw md=!1,a=Mg,Mg=null,a;return(Od&1)!==0&&a.tag!==0&&cu(),b=a.pendingLanes,(b&1)!==0?a===jg?Fc++:(Fc=0,jg=a):Fc=0,Ro(),null}function cu(){if(Lo!==null){var a=Sa(Od),u=ai.transition,d=jt;try{if(ai.transition=null,jt=16>a?16:a,Lo===null)var y=!1;else{if(a=Lo,Lo=null,Od=0,(Mt&6)!==0)throw Error(t(331));var x=Mt;for(Mt|=4,Le=a.current;Le!==null;){var b=Le,$=b.child;if((Le.flags&16)!==0){var X=b.deletions;if(X!==null){for(var H=0;H<X.length;H++){var le=X[H];for(Le=le;Le!==null;){var ve=Le;switch(ve.tag){case 0:case 11:case 15:Xc(8,ve,b)}var we=ve.child;if(we!==null)we.return=ve,Le=we;else for(;Le!==null;){ve=Le;var me=ve.sibling,je=ve.return;if(ov(ve),ve===le){Le=null;break}if(me!==null){me.return=je,Le=me;break}Le=je}}}var Ze=b.alternate;if(Ze!==null){var Ve=Ze.child;if(Ve!==null){Ze.child=null;do{var On=Ve.sibling;Ve.sibling=null,Ve=On}while(Ve!==null)}}Le=b}}if((b.subtreeFlags&2064)!==0&&$!==null)$.return=b,Le=$;else e:for(;Le!==null;){if(b=Le,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Xc(9,b,b.return)}var ie=b.sibling;if(ie!==null){ie.return=b.return,Le=ie;break e}Le=b.return}}var J=a.current;for(Le=J;Le!==null;){$=Le;var oe=$.child;if(($.subtreeFlags&2064)!==0&&oe!==null)oe.return=$,Le=oe;else e:for($=J;Le!==null;){if(X=Le,(X.flags&2048)!==0)try{switch(X.tag){case 0:case 11:case 15:fd(9,X)}}catch(We){pn(X,X.return,We)}if(X===$){Le=null;break e}var Qe=X.sibling;if(Qe!==null){Qe.return=X.return,Le=Qe;break e}Le=X.return}}if(Mt=x,Ro(),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Vt,a)}catch{}y=!0}return y}finally{jt=d,ai.transition=u}}return!1}function kv(a,u,d){u=ou(d,u),u=I1(a,u,1),a=No(a,u,1),u=or(),a!==null&&(Qs(a,1,u),gr(a,u))}function pn(a,u,d){if(a.tag===3)kv(a,a,d);else for(;u!==null;){if(u.tag===3){kv(u,a,d);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(zo===null||!zo.has(y))){a=ou(d,a),a=Z1(u,a,1),u=No(u,a,1),a=or(),u!==null&&(Qs(u,1,a),gr(u,a));break}}u=u.return}}function B$(a,u,d){var y=a.pingCache;y!==null&&y.delete(u),u=or(),a.pingedLanes|=a.suspendedLanes&d,En===a&&(_n&d)===d&&(Qn===4||Qn===3&&(_n&130023424)===_n&&500>bt()-Eg?qa(a,0):$g|=d),gr(a,u)}function Sv(a,u){u===0&&((a.mode&1)===0?u=1:(u=lo,lo<<=1,(lo&130023424)===0&&(lo=4194304)));var d=or();a=Ls(a,u),a!==null&&(Qs(a,u,d),gr(a,d))}function Y$(a){var u=a.memoizedState,d=0;u!==null&&(d=u.retryLane),Sv(a,d)}function U$(a,u){var d=0;switch(a.tag){case 13:var y=a.stateNode,x=a.memoizedState;x!==null&&(d=x.retryLane);break;case 19:y=a.stateNode;break;default:throw Error(t(314))}y!==null&&y.delete(u),Sv(a,d)}var bv;bv=function(a,u,d){if(a!==null)if(a.memoizedProps!==u.pendingProps||fr.current)pr=!0;else{if((a.lanes&d)===0&&(u.flags&128)===0)return pr=!1,N$(a,u,d);pr=(a.flags&131072)!==0}else pr=!1,sn&&(u.flags&1048576)!==0&&r1(u,qf,u.index);switch(u.lanes=0,u.tag){case 2:var y=u.type;cd(a,u),a=u.pendingProps;var x=Kl(u,In.current);iu(u,d),x=ag(null,u,y,a,x,d);var b=lg();return u.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,dr(y)?(b=!0,Bf(u)):b=!1,u.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,eg(u),x.updater=ld,u.stateNode=x,x._reactInternals=u,pg(u,y,a,d),u=yg(null,u,y,!0,b,d)):(u.tag=0,sn&&b&&Wm(u),sr(null,u,x,d),u=u.child),u;case 16:y=u.elementType;e:{switch(cd(a,u),a=u.pendingProps,x=y._init,y=x(y._payload),u.type=y,x=u.tag=H$(y),a=Ti(y,a),x){case 0:u=Og(null,u,y,a,d);break e;case 1:u=H1(null,u,y,a,d);break e;case 11:u=F1(null,u,y,a,d);break e;case 14:u=B1(null,u,y,Ti(y.type,a),d);break e}throw Error(t(306,y,""))}return u;case 0:return y=u.type,x=u.pendingProps,x=u.elementType===y?x:Ti(y,x),Og(a,u,y,x,d);case 1:return y=u.type,x=u.pendingProps,x=u.elementType===y?x:Ti(y,x),H1(a,u,y,x,d);case 3:e:{if(G1(u),a===null)throw Error(t(387));y=u.pendingProps,b=u.memoizedState,x=b.element,f1(a,u),td(u,y,null,d);var $=u.memoizedState;if(y=$.element,b.isDehydrated)if(b={element:y,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},u.updateQueue.baseState=b,u.memoizedState=b,u.flags&256){x=ou(Error(t(423)),u),u=K1(a,u,y,d,x);break e}else if(y!==x){x=ou(Error(t(424)),u),u=K1(a,u,y,d,x);break e}else for(Ar=xe(u.stateNode.containerInfo.firstChild),Rr=u,sn=!0,Ci=null,d=c1(u,null,y,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(tu(),y===x){u=Is(a,u,d);break e}sr(a,u,y,d)}u=u.child}return u;case 5:return m1(u),a===null&&Ym(u),y=u.type,x=u.pendingProps,b=a!==null?a.memoizedProps:null,$=x.children,S(y,x)?$=null:b!==null&&S(y,b)&&(u.flags|=32),q1(a,u),sr(a,u,$,d),u.child;case 6:return a===null&&Ym(u),null;case 13:return J1(a,u,d);case 4:return tg(u,u.stateNode.containerInfo),y=u.pendingProps,a===null?u.child=nu(u,null,y,d):sr(a,u,y,d),u.child;case 11:return y=u.type,x=u.pendingProps,x=u.elementType===y?x:Ti(y,x),F1(a,u,y,x,d);case 7:return sr(a,u,u.pendingProps,d),u.child;case 8:return sr(a,u,u.pendingProps.children,d),u.child;case 12:return sr(a,u,u.pendingProps.children,d),u.child;case 10:e:{if(y=u.type._context,x=u.pendingProps,b=u.memoizedProps,$=x.value,Rt(Kf,y._currentValue),y._currentValue=$,b!==null)if(an(b.value,$)){if(b.children===x.children&&!fr.current){u=Is(a,u,d);break e}}else for(b=u.child,b!==null&&(b.return=u);b!==null;){var X=b.dependencies;if(X!==null){$=b.child;for(var H=X.firstContext;H!==null;){if(H.context===y){if(b.tag===1){H=Ds(-1,d&-d),H.tag=2;var le=b.updateQueue;if(le!==null){le=le.shared;var ve=le.pending;ve===null?H.next=H:(H.next=ve.next,ve.next=H),le.pending=H}}b.lanes|=d,H=b.alternate,H!==null&&(H.lanes|=d),Km(b.return,d,u),X.lanes|=d;break}H=H.next}}else if(b.tag===10)$=b.type===u.type?null:b.child;else if(b.tag===18){if($=b.return,$===null)throw Error(t(341));$.lanes|=d,X=$.alternate,X!==null&&(X.lanes|=d),Km($,d,u),$=b.sibling}else $=b.child;if($!==null)$.return=b;else for($=b;$!==null;){if($===u){$=null;break}if(b=$.sibling,b!==null){b.return=$.return,$=b;break}$=$.return}b=$}sr(a,u,x.children,d),u=u.child}return u;case 9:return x=u.type,y=u.pendingProps.children,iu(u,d),x=si(x),y=y(x),u.flags|=1,sr(a,u,y,d),u.child;case 14:return y=u.type,x=Ti(y,u.pendingProps),x=Ti(y.type,x),B1(a,u,y,x,d);case 15:return Y1(a,u,u.type,u.pendingProps,d);case 17:return y=u.type,x=u.pendingProps,x=u.elementType===y?x:Ti(y,x),cd(a,u),u.tag=1,dr(y)?(a=!0,Bf(u)):a=!1,iu(u,d),L1(u,y,x),pg(u,y,x,d),yg(null,u,y,!0,a,d);case 19:return tv(a,u,d);case 22:return U1(a,u,d)}throw Error(t(156,u.tag))};function Pv(a,u){return Ft(a,u)}function q$(a,u,d,y){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(a,u,d,y){return new q$(a,u,d,y)}function Lg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function H$(a){if(typeof a=="function")return Lg(a)?1:0;if(a!=null){if(a=a.$$typeof,a===Z)return 11;if(a===re)return 14}return 2}function Zo(a,u){var d=a.alternate;return d===null?(d=li(a.tag,u,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=u,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,u=a.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function wd(a,u,d,y,x,b){var $=2;if(y=a,typeof a=="function")Lg(a)&&($=1);else if(typeof a=="string")$=5;else e:switch(a){case R:return Ga(d.children,x,b,u);case q:$=8,x|=8;break;case G:return a=li(12,d,u,x|2),a.elementType=G,a.lanes=b,a;case ae:return a=li(13,d,u,x),a.elementType=ae,a.lanes=b,a;case se:return a=li(19,d,u,x),a.elementType=se,a.lanes=b,a;case be:return kd(d,x,b,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case V:$=10;break e;case D:$=9;break e;case Z:$=11;break e;case re:$=14;break e;case Oe:$=16,y=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return u=li($,d,u,x),u.elementType=a,u.type=y,u.lanes=b,u}function Ga(a,u,d,y){return a=li(7,a,y,u),a.lanes=d,a}function kd(a,u,d,y){return a=li(22,a,y,u),a.elementType=be,a.lanes=d,a.stateNode={isHidden:!1},a}function Dg(a,u,d){return a=li(6,a,null,u),a.lanes=d,a}function Ig(a,u,d){return u=li(4,a.children!==null?a.children:[],a.key,u),u.lanes=d,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function G$(a,u,d,y,x){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ps(0),this.expirationTimes=Ps(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ps(0),this.identifierPrefix=y,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Zg(a,u,d,y,x,b,$,X,H){return a=new G$(a,u,d,X,H),u===1?(u=1,b===!0&&(u|=8)):u=0,b=li(3,null,null,u),a.current=b,b.stateNode=a,b.memoizedState={element:y,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},eg(b),a}function K$(a,u,d){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_,key:y==null?null:""+y,children:a,containerInfo:u,implementation:d}}function Qv(a){if(!a)return es;a=a._reactInternals;e:{if(Ae(a)!==a||a.tag!==1)throw Error(t(170));var u=a;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(dr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(t(171))}if(a.tag===1){var d=a.type;if(dr(d))return e1(a,d,u)}return u}function Cv(a,u,d,y,x,b,$,X,H){return a=Zg(d,y,!0,a,x,b,$,X,H),a.context=Qv(null),d=a.current,y=or(),x=Do(d),b=Ds(y,x),b.callback=u??null,No(d,b,x),a.current.lanes=x,Qs(a,x,y),gr(a,y),a}function Sd(a,u,d,y){var x=u.current,b=or(),$=Do(x);return d=Qv(d),u.context===null?u.context=d:u.pendingContext=d,u=Ds(b,$),u.payload={element:a},y=y===void 0?null:y,y!==null&&(u.callback=y),a=No(x,u,$),a!==null&&(Mi(a,x,$,b),ed(a,x,$)),$}function bd(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Tv(a,u){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<u?d:u}}function Xg(a,u){Tv(a,u),(a=a.alternate)&&Tv(a,u)}function J$(){return null}var $v=typeof reportError=="function"?reportError:function(a){console.error(a)};function Vg(a){this._internalRoot=a}Pd.prototype.render=Vg.prototype.render=function(a){var u=this._internalRoot;if(u===null)throw Error(t(409));Sd(a,u,null,null)},Pd.prototype.unmount=Vg.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var u=a.containerInfo;Ua(function(){Sd(null,a,null,null)}),u[It]=null}};function Pd(a){this._internalRoot=a}Pd.prototype.unstable_scheduleHydration=function(a){if(a){var u=lc();a={blockedOn:null,target:a,priority:u};for(var d=0;d<qi.length&&u!==0&&u<qi[d].priority;d++);qi.splice(d,0,a),d===0&&Qf(a)}};function Wg(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Qd(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Ev(){}function eE(a,u,d,y,x){if(x){if(typeof y=="function"){var b=y;y=function(){var le=bd($);b.call(le)}}var $=Cv(u,y,a,0,null,!1,!1,"",Ev);return a._reactRootContainer=$,a[It]=$.current,Na(a.nodeType===8?a.parentNode:a),Ua(),$}for(;x=a.lastChild;)a.removeChild(x);if(typeof y=="function"){var X=y;y=function(){var le=bd(H);X.call(le)}}var H=Zg(a,0,!1,null,null,!1,!1,"",Ev);return a._reactRootContainer=H,a[It]=H.current,Na(a.nodeType===8?a.parentNode:a),Ua(function(){Sd(u,H,d,y)}),H}function Cd(a,u,d,y,x){var b=d._reactRootContainer;if(b){var $=b;if(typeof x=="function"){var X=x;x=function(){var H=bd($);X.call(H)}}Sd(u,$,a,x)}else $=eE(d,u,a,x,y);return bd($)}fo=function(a){switch(a.tag){case 3:var u=a.stateNode;if(u.current.memoizedState.isDehydrated){var d=bs(u.pendingLanes);d!==0&&(ho(u,d|1),gr(u,bt()),(Mt&6)===0&&(uu=bt()+500,Ro()))}break;case 13:Ua(function(){var y=Ls(a,1);if(y!==null){var x=or();Mi(y,a,1,x)}}),Xg(a,1)}},po=function(a){if(a.tag===13){var u=Ls(a,134217728);if(u!==null){var d=or();Mi(u,a,134217728,d)}Xg(a,134217728)}},bf=function(a){if(a.tag===13){var u=Do(a),d=Ls(a,u);if(d!==null){var y=or();Mi(d,a,u,y)}Xg(a,u)}},lc=function(){return jt},Pf=function(a,u){var d=jt;try{return jt=a,u()}finally{jt=d}},Vi=function(a,u,d){switch(u){case"input":if(Yr(a,d),u=d.name,d.type==="radio"&&u!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<d.length;u++){var y=d[u];if(y!==a&&y.form===a.form){var x=Ia(y);if(!x)throw Error(t(90));cn(y),Yr(y,x)}}}break;case"textarea":cr(a,d);break;case"select":u=d.value,u!=null&&qr(a,!!d.multiple,u,!1)}},oo=Ng,Wi=Ua;var tE={usingClientEntryPoint:!1,Events:[Eo,Mo,Ia,so,va,Ng]},Bc={findFiberByHostInstance:jr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nE={bundleType:Bc.bundleType,version:Bc.version,rendererPackageName:Bc.rendererPackageName,rendererConfig:Bc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=_t(a),a===null?null:a.stateNode},findFiberByHostInstance:Bc.findFiberByHostInstance||J$,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 Td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Td.isDisabled&&Td.supportsFiber)try{Vt=Td.inject(nE),rn=Td}catch{}}return Or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tE,Or.createPortal=function(a,u){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wg(u))throw Error(t(200));return K$(a,u,null,d)},Or.createRoot=function(a,u){if(!Wg(a))throw Error(t(299));var d=!1,y="",x=$v;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onRecoverableError!==void 0&&(x=u.onRecoverableError)),u=Zg(a,1,!1,null,null,d,!1,y,x),a[It]=u.current,Na(a.nodeType===8?a.parentNode:a),new Vg(u)},Or.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(t(188)):(a=Object.keys(a).join(","),Error(t(268,a)));return a=_t(u),a=a===null?null:a.stateNode,a},Or.flushSync=function(a){return Ua(a)},Or.hydrate=function(a,u,d){if(!Qd(u))throw Error(t(200));return Cd(null,a,u,!0,d)},Or.hydrateRoot=function(a,u,d){if(!Wg(a))throw Error(t(405));var y=d!=null&&d.hydratedSources||null,x=!1,b="",$=$v;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onRecoverableError!==void 0&&($=d.onRecoverableError)),u=Cv(u,null,a,1,d??null,x,!1,b,$),a[It]=u.current,Na(a),y)for(a=0;a<y.length;a++)d=y[a],x=d._getVersion,x=x(d._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[d,x]:u.mutableSourceEagerHydrationData.push(d,x);return new Pd(u)},Or.render=function(a,u,d){if(!Qd(u))throw Error(t(200));return Cd(null,a,u,!1,d)},Or.unmountComponentAtNode=function(a){if(!Qd(a))throw Error(t(40));return a._reactRootContainer?(Ua(function(){Cd(null,null,a,!1,function(){a._reactRootContainer=null,a[It]=null})}),!0):!1},Or.unstable_batchedUpdates=Ng,Or.unstable_renderSubtreeIntoContainer=function(a,u,d,y){if(!Qd(d))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Cd(a,u,d,!1,y)},Or.version="18.3.1-next-f1338f8080-20240426",Or}var Dv;function eP(){if(Dv)return Ug.exports;Dv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Ug.exports=dE(),Ug.exports}var tP=eP();const nP=af(tP),pE=Kb({__proto__:null,default:nP},[tP]);var Ed={},Iv;function mE(){if(Iv)return Ed;Iv=1;var n=eP();return Ed.createRoot=n.createRoot,Ed.hydrateRoot=n.hydrateRoot,Ed}var gE=mE();/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function on(){return on=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},on.apply(this,arguments)}var Sn;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Sn||(Sn={}));const Zv="popstate";function OE(n){n===void 0&&(n={});function e(r,i){let{pathname:s,search:o,hash:l}=r.location;return zh("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function t(r,i){return typeof i=="string"?i:vl(i)}return xE(e,t,null,n)}function St(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function xl(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function yE(){return Math.random().toString(36).substr(2,8)}function Xv(n,e){return{usr:n.state,key:n.key,idx:e}}function zh(n,e,t,r){return t===void 0&&(t=null),on({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?ma(e):e,{state:t,key:e&&e.key||r||yE()})}function vl(n){let{pathname:e="/",search:t="",hash:r=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ma(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let r=n.indexOf("?");r>=0&&(e.search=n.substr(r),n=n.substr(0,r)),n&&(e.pathname=n)}return e}function xE(n,e,t,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Sn.Pop,c=null,h=f();h==null&&(h=0,o.replaceState(on({},o.state,{idx:h}),""));function f(){return(o.state||{idx:null}).idx}function p(){l=Sn.Pop;let C=f(),Q=C==null?null:C-h;h=C,c&&c({action:l,location:k.location,delta:Q})}function m(C,Q){l=Sn.Push;let M=zh(k.location,C,Q);h=f()+1;let E=Xv(M,h),I=k.createHref(M);try{o.pushState(E,"",I)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;i.location.assign(I)}s&&c&&c({action:l,location:k.location,delta:1})}function g(C,Q){l=Sn.Replace;let M=zh(k.location,C,Q);h=f();let E=Xv(M,h),I=k.createHref(M);o.replaceState(E,"",I),s&&c&&c({action:l,location:k.location,delta:0})}function w(C){let Q=i.location.origin!=="null"?i.location.origin:i.location.href,M=typeof C=="string"?C:vl(C);return M=M.replace(/ $/,"%20"),St(Q,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,Q)}let k={get action(){return l},get location(){return n(i,o)},listen(C){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Zv,p),c=C,()=>{i.removeEventListener(Zv,p),c=null}},createHref(C){return e(i,C)},createURL:w,encodeLocation(C){let Q=w(C);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:m,replace:g,go(C){return o.go(C)}};return k}var Wt;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Wt||(Wt={}));const vE=new Set(["lazy","caseSensitive","path","id","index","children"]);function wE(n){return n.index===!0}function gp(n,e,t,r){return t===void 0&&(t=[]),r===void 0&&(r={}),n.map((i,s)=>{let o=[...t,String(s)],l=typeof i.id=="string"?i.id:o.join("-");if(St(i.index!==!0||!i.children,"Cannot specify children on an index route"),St(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),wE(i)){let c=on({},i,e(i),{id:l});return r[l]=c,c}else{let c=on({},i,e(i),{id:l,children:void 0});return r[l]=c,i.children&&(c.children=gp(i.children,e,o,r)),c}})}function il(n,e,t){return t===void 0&&(t="/"),rp(n,e,t,!1)}function rp(n,e,t,r){let i=typeof e=="string"?ma(e):e,s=Ks(i.pathname||"/",t);if(s==null)return null;let o=rP(n);SE(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let h=AE(s);l=jE(o[c],h,r)}return l}function kE(n,e){let{route:t,pathname:r,params:i}=n;return{id:t.id,pathname:r,params:i,data:e[t.id],handle:t.handle}}function rP(n,e,t,r){e===void 0&&(e=[]),t===void 0&&(t=[]),r===void 0&&(r="");let i=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(St(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let h=Us([r,c.relativePath]),f=t.concat(c);s.children&&s.children.length>0&&(St(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),rP(s.children,e,f,h)),!(s.path==null&&!s.index)&&e.push({path:h,score:EE(h,s.index),routesMeta:f})};return n.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of iP(s.path))i(s,o,c)}),e}function iP(n){let e=n.split("/");if(e.length===0)return[];let[t,...r]=e,i=t.endsWith("?"),s=t.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=iP(r.join("/")),l=[];return l.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...o),l.map(c=>n.startsWith("/")&&c===""?"/":c)}function SE(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:ME(e.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}const bE=/^:[\w-]+$/,PE=3,QE=2,CE=1,TE=10,$E=-2,Vv=n=>n==="*";function EE(n,e){let t=n.split("/"),r=t.length;return t.some(Vv)&&(r+=$E),e&&(r+=QE),t.filter(i=>!Vv(i)).reduce((i,s)=>i+(bE.test(s)?PE:s===""?CE:TE),r)}function ME(n,e){return n.length===e.length&&n.slice(0,-1).every((r,i)=>r===e[i])?n[n.length-1]-e[e.length-1]:0}function jE(n,e,t){t===void 0&&(t=!1);let{routesMeta:r}=n,i={},s="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],h=l===r.length-1,f=s==="/"?e:e.slice(s.length)||"/",p=Op({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},f),m=c.route;if(!p&&h&&t&&!r[r.length-1].route.index&&(p=Op({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:Us([s,p.pathname]),pathnameBase:LE(Us([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=Us([s,p.pathnameBase]))}return o}function Op(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[t,r]=RE(n.path,n.caseSensitive,n.end),i=e.match(t);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((h,f,p)=>{let{paramName:m,isOptional:g}=f;if(m==="*"){let k=l[p]||"";o=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const w=l[p];return g&&!w?h[m]=void 0:h[m]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:o,pattern:n}}function RE(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),xl(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],i="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),i+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":n!==""&&n!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function AE(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return xl(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function Ks(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,r=n.charAt(t);return r&&r!=="/"?null:n.slice(t)||"/"}const NE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_E=n=>NE.test(n);function zE(n,e){e===void 0&&(e="/");let{pathname:t,search:r="",hash:i=""}=typeof n=="string"?ma(n):n,s;if(t)if(_E(t))s=t;else{if(t.includes("//")){let o=t;t=t.replace(/\/\/+/g,"/"),xl(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+t))}t.startsWith("/")?s=Wv(t.substring(1),"/"):s=Wv(t,e)}else s=e;return{pathname:s,search:DE(r),hash:IE(i)}}function Wv(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function Gg(n,e,t,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function sP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ey(n,e){let t=sP(n);return e?t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):t.map(r=>r.pathnameBase)}function My(n,e,t,r){r===void 0&&(r=!1);let i;typeof n=="string"?i=ma(n):(i=on({},n),St(!i.pathname||!i.pathname.includes("?"),Gg("?","pathname","search",i)),St(!i.pathname||!i.pathname.includes("#"),Gg("#","pathname","hash",i)),St(!i.search||!i.search.includes("#"),Gg("#","search","hash",i)));let s=n===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=t;else{let p=e.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?e[p]:"/"}let c=zE(i,l),h=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(h||f)&&(c.pathname+="/"),c}const Us=n=>n.join("/").replace(/\/\/+/g,"/"),LE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),DE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,IE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;class yp{constructor(e,t,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Lh(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const oP=["post","put","patch","delete"],ZE=new Set(oP),XE=["get",...oP],VE=new Set(XE),WE=new Set([301,302,303,307,308]),FE=new Set([307,308]),Kg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},BE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,YE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),aP="remix-router-transitions";function UE(n){const e=n.window?n.window:typeof window<"u"?window:void 0,t=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!t;St(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(n.mapRouteProperties)i=n.mapRouteProperties;else if(n.detectErrorBoundary){let B=n.detectErrorBoundary;i=ee=>({hasErrorBoundary:B(ee)})}else i=YE;let s={},o=gp(n.routes,i,void 0,s),l,c=n.basename||"/",h=n.dataStrategy||KE,f=n.patchRoutesOnNavigation,p=on({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},n.future),m=null,g=new Set,w=null,k=null,C=null,Q=n.hydrationData!=null,M=il(o,n.history.location,c),E=!1,I=null;if(M==null&&!f){let B=wr(404,{pathname:n.history.location.pathname}),{matches:ee,route:ce}=tw(o);M=ee,I={[ce.id]:B}}M&&!n.hydrationData&&Wi(M,o,n.history.location.pathname).active&&(M=null);let U;if(M)if(M.some(B=>B.route.lazy))U=!1;else if(!M.some(B=>B.route.loader))U=!0;else if(p.v7_partialHydration){let B=n.hydrationData?n.hydrationData.loaderData:null,ee=n.hydrationData?n.hydrationData.errors:null;if(ee){let ce=M.findIndex(de=>ee[de.route.id]!==void 0);U=M.slice(0,ce+1).every(de=>!i0(de.route,B,ee))}else U=M.every(ce=>!i0(ce.route,B,ee))}else U=n.hydrationData!=null;else if(U=!1,M=[],p.v7_partialHydration){let B=Wi(null,o,n.history.location.pathname);B.active&&B.matches&&(E=!0,M=B.matches)}let _,R={historyAction:n.history.action,location:n.history.location,matches:M,initialized:U,navigation:Kg,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||I,fetchers:new Map,blockers:new Map},q=Sn.Pop,G=!1,V,D=!1,Z=new Map,ae=null,se=!1,re=!1,Oe=[],be=new Set,he=new Map,ye=0,A=-1,Y=new Map,ue=new Set,z=new Map,Re=new Map,_e=new Set,$e=new Map,rt=new Map,st;function mt(){if(m=n.history.listen(B=>{let{action:ee,location:ce,delta:de}=B;if(st){st(),st=void 0;return}xl(rt.size===0||de!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ke=Vi({currentLocation:R.location,nextLocation:ce,historyAction:ee});if(ke&&de!=null){let Xe=new Promise(Je=>{st=Je});n.history.go(de*-1),Xi(ke,{state:"blocked",location:ce,proceed(){Xi(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),Xe.then(()=>n.history.go(de))},reset(){let Je=new Map(R.blockers);Je.set(ke,qc),cn({blockers:Je})}});return}return Kn(ee,ce)}),t){fM(e,Z);let B=()=>dM(e,Z);e.addEventListener("pagehide",B),ae=()=>e.removeEventListener("pagehide",B)}return R.initialized||Kn(Sn.Pop,R.location,{initialHydration:!0}),_}function Xt(){m&&m(),ae&&ae(),g.clear(),V&&V.abort(),R.fetchers.forEach((B,ee)=>Ke(ee)),R.blockers.forEach((B,ee)=>Tn(ee))}function Gn(B){return g.add(B),()=>g.delete(B)}function cn(B,ee){ee===void 0&&(ee={}),R=on({},R,B);let ce=[],de=[];p.v7_fetcherPersist&&R.fetchers.forEach((ke,Xe)=>{ke.state==="idle"&&(_e.has(Xe)?de.push(Xe):ce.push(Xe))}),_e.forEach(ke=>{!R.fetchers.has(ke)&&!he.has(ke)&&de.push(ke)}),[...g].forEach(ke=>ke(R,{deletedFetchers:de,viewTransitionOpts:ee.viewTransitionOpts,flushSync:ee.flushSync===!0})),p.v7_fetcherPersist?(ce.forEach(ke=>R.fetchers.delete(ke)),de.forEach(ke=>Ke(ke))):de.forEach(ke=>_e.delete(ke))}function An(B,ee,ce){var de,ke;let{flushSync:Xe}=ce===void 0?{}:ce,Je=R.actionData!=null&&R.navigation.formMethod!=null&&Ni(R.navigation.formMethod)&&R.navigation.state==="loading"&&((de=B.state)==null?void 0:de._isRedirect)!==!0,Ne;ee.actionData?Object.keys(ee.actionData).length>0?Ne=ee.actionData:Ne=null:Je?Ne=R.actionData:Ne=null;let ze=ee.loaderData?Jv(R.loaderData,ee.loaderData,ee.matches||[],ee.errors):R.loaderData,Me=R.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((gt,fn)=>Me.set(fn,qc)));let Ae=G===!0||R.navigation.formMethod!=null&&Ni(R.navigation.formMethod)&&((ke=B.state)==null?void 0:ke._isRedirect)!==!0;l&&(o=l,l=void 0),se||q===Sn.Pop||(q===Sn.Push?n.history.push(B,B.state):q===Sn.Replace&&n.history.replace(B,B.state));let ot;if(q===Sn.Pop){let gt=Z.get(R.location.pathname);gt&>.has(B.pathname)?ot={currentLocation:R.location,nextLocation:B}:Z.has(B.pathname)&&(ot={currentLocation:B,nextLocation:R.location})}else if(D){let gt=Z.get(R.location.pathname);gt?gt.add(B.pathname):(gt=new Set([B.pathname]),Z.set(R.location.pathname,gt)),ot={currentLocation:R.location,nextLocation:B}}cn(on({},ee,{actionData:Ne,loaderData:ze,historyAction:q,location:B,initialized:!0,navigation:Kg,revalidation:"idle",restoreScrollPosition:oo(B,ee.matches||R.matches),preventScrollReset:Ae,blockers:Me}),{viewTransitionOpts:ot,flushSync:Xe===!0}),q=Sn.Pop,G=!1,D=!1,se=!1,re=!1,Oe=[]}async function Zi(B,ee){if(typeof B=="number"){n.history.go(B);return}let ce=r0(R.location,R.matches,c,p.v7_prependBasename,B,p.v7_relativeSplatPath,ee==null?void 0:ee.fromRouteId,ee==null?void 0:ee.relative),{path:de,submission:ke,error:Xe}=Fv(p.v7_normalizeFormMethod,!1,ce,ee),Je=R.location,Ne=zh(R.location,de,ee&&ee.state);Ne=on({},Ne,n.history.encodeLocation(Ne));let ze=ee&&ee.replace!=null?ee.replace:void 0,Me=Sn.Push;ze===!0?Me=Sn.Replace:ze===!1||ke!=null&&Ni(ke.formMethod)&&ke.formAction===R.location.pathname+R.location.search&&(Me=Sn.Replace);let Ae=ee&&"preventScrollReset"in ee?ee.preventScrollReset===!0:void 0,ot=(ee&&ee.flushSync)===!0,gt=Vi({currentLocation:Je,nextLocation:Ne,historyAction:Me});if(gt){Xi(gt,{state:"blocked",location:Ne,proceed(){Xi(gt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ne}),Zi(B,ee)},reset(){let fn=new Map(R.blockers);fn.set(gt,qc),cn({blockers:fn})}});return}return await Kn(Me,Ne,{submission:ke,pendingError:Xe,preventScrollReset:Ae,replace:ee&&ee.replace,enableViewTransition:ee&&ee.viewTransition,flushSync:ot})}function Tr(){if(Pe(),cn({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){Kn(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}Kn(q||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:D===!0})}}async function Kn(B,ee,ce){V&&V.abort(),V=null,q=B,se=(ce&&ce.startUninterruptedRevalidation)===!0,va(R.location,R.matches),G=(ce&&ce.preventScrollReset)===!0,D=(ce&&ce.enableViewTransition)===!0;let de=l||o,ke=ce&&ce.overrideNavigation,Xe=ce!=null&&ce.initialHydration&&R.matches&&R.matches.length>0&&!E?R.matches:il(de,ee,c),Je=(ce&&ce.flushSync)===!0;if(Xe&&R.initialized&&!re&&iM(R.location,ee)&&!(ce&&ce.submission&&Ni(ce.submission.formMethod))){An(ee,{matches:Xe},{flushSync:Je});return}let Ne=Wi(Xe,de,ee.pathname);if(Ne.active&&Ne.matches&&(Xe=Ne.matches),!Xe){let{error:_t,notFoundMatches:Qt,route:Ft}=Hr(ee.pathname);An(ee,{matches:Qt,loaderData:{},errors:{[Ft.id]:_t}},{flushSync:Je});return}V=new AbortController;let ze=hu(n.history,ee,V.signal,ce&&ce.submission),Me;if(ce&&ce.pendingError)Me=[sl(Xe).route.id,{type:Wt.error,error:ce.pendingError}];else if(ce&&ce.submission&&Ni(ce.submission.formMethod)){let _t=await Yr(ze,ee,ce.submission,Xe,Ne.active,{replace:ce.replace,flushSync:Je});if(_t.shortCircuited)return;if(_t.pendingActionResult){let[Qt,Ft]=_t.pendingActionResult;if(Vr(Ft)&&Lh(Ft.error)&&Ft.error.status===404){V=null,An(ee,{matches:_t.matches,loaderData:{},errors:{[Qt]:Ft.error}});return}}Xe=_t.matches||Xe,Me=_t.pendingActionResult,ke=Jg(ee,ce.submission),Je=!1,Ne.active=!1,ze=hu(n.history,ze.url,ze.signal)}let{shortCircuited:Ae,matches:ot,loaderData:gt,errors:fn}=await ks(ze,ee,Xe,Ne.active,ke,ce&&ce.submission,ce&&ce.fetcherSubmission,ce&&ce.replace,ce&&ce.initialHydration===!0,Je,Me);Ae||(V=null,An(ee,on({matches:ot||Xe},ew(Me),{loaderData:gt,errors:fn})))}async function Yr(B,ee,ce,de,ke,Xe){Xe===void 0&&(Xe={}),Pe();let Je=cM(ee,ce);if(cn({navigation:Je},{flushSync:Xe.flushSync===!0}),ke){let Me=await yi(de,ee.pathname,B.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){let Ae=sl(Me.partialMatches).route.id;return{matches:Me.partialMatches,pendingActionResult:[Ae,{type:Wt.error,error:Me.error}]}}else if(Me.matches)de=Me.matches;else{let{notFoundMatches:Ae,error:ot,route:gt}=Hr(ee.pathname);return{matches:Ae,pendingActionResult:[gt.id,{type:Wt.error,error:ot}]}}}let Ne,ze=kh(de,ee);if(!ze.route.action&&!ze.route.lazy)Ne={type:Wt.error,error:wr(405,{method:B.method,pathname:ee.pathname,routeId:ze.route.id})};else if(Ne=(await Jn("action",R,B,[ze],de,null))[ze.route.id],B.signal.aborted)return{shortCircuited:!0};if(ll(Ne)){let Me;return Xe&&Xe.replace!=null?Me=Xe.replace:Me=Hv(Ne.response.headers.get("Location"),new URL(B.url),c,n.history)===R.location.pathname+R.location.search,await cr(B,Ne,!0,{submission:ce,replace:Me}),{shortCircuited:!0}}if(aa(Ne))throw wr(400,{type:"defer-action"});if(Vr(Ne)){let Me=sl(de,ze.route.id);return(Xe&&Xe.replace)!==!0&&(q=Sn.Push),{matches:de,pendingActionResult:[Me.route.id,Ne]}}return{matches:de,pendingActionResult:[ze.route.id,Ne]}}async function ks(B,ee,ce,de,ke,Xe,Je,Ne,ze,Me,Ae){let ot=ke||Jg(ee,Xe),gt=Xe||Je||rw(ot),fn=!se&&(!p.v7_partialHydration||!ze);if(de){if(fn){let Vt=$r(Ae);cn(on({navigation:ot},Vt!==void 0?{actionData:Vt}:{}),{flushSync:Me})}let vt=await yi(ce,ee.pathname,B.signal);if(vt.type==="aborted")return{shortCircuited:!0};if(vt.type==="error"){let Vt=sl(vt.partialMatches).route.id;return{matches:vt.partialMatches,loaderData:{},errors:{[Vt]:vt.error}}}else if(vt.matches)ce=vt.matches;else{let{error:Vt,notFoundMatches:rn,route:vi}=Hr(ee.pathname);return{matches:rn,loaderData:{},errors:{[vi.id]:Vt}}}}let _t=l||o,[Qt,Ft]=Yv(n.history,R,ce,gt,ee,p.v7_partialHydration&&ze===!0,p.v7_skipActionErrorRevalidation,re,Oe,be,_e,z,ue,_t,c,Ae);if(hn(vt=>!(ce&&ce.some(Vt=>Vt.route.id===vt))||Qt&&Qt.some(Vt=>Vt.route.id===vt)),A=++ye,Qt.length===0&&Ft.length===0){let vt=bn();return An(ee,on({matches:ce,loaderData:{},errors:Ae&&Vr(Ae[1])?{[Ae[0]]:Ae[1].error}:null},ew(Ae),vt?{fetchers:new Map(R.fetchers)}:{}),{flushSync:Me}),{shortCircuited:!0}}if(fn){let vt={};if(!de){vt.navigation=ot;let Vt=$r(Ae);Vt!==void 0&&(vt.actionData=Vt)}Ft.length>0&&(vt.fetchers=Ur(Ft)),cn(vt,{flushSync:Me})}Ft.forEach(vt=>{xt(vt.key),vt.controller&&he.set(vt.key,vt.controller)});let Gr=()=>Ft.forEach(vt=>xt(vt.key));V&&V.signal.addEventListener("abort",Gr);let{loaderResults:qe,fetcherResults:vn}=await fe(R,ce,Qt,Ft,B);if(B.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",Gr),Ft.forEach(vt=>he.delete(vt.key));let bt=Md(qe);if(bt)return await cr(B,bt.result,!0,{replace:Ne}),{shortCircuited:!0};if(bt=Md(vn),bt)return ue.add(bt.key),await cr(B,bt.result,!0,{replace:Ne}),{shortCircuited:!0};let{loaderData:ka,errors:xi}=Kv(R,ce,qe,Ae,Ft,vn,$e);$e.forEach((vt,Vt)=>{vt.subscribe(rn=>{(rn||vt.done)&&$e.delete(Vt)})}),p.v7_partialHydration&&ze&&R.errors&&(xi=on({},R.errors,xi));let Er=bn(),Kr=nn(A),ao=Er||Kr||Ft.length>0;return on({matches:ce,loaderData:ka,errors:xi},ao?{fetchers:new Map(R.fetchers)}:{})}function $r(B){if(B&&!Vr(B[1]))return{[B[0]]:B[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Ur(B){return B.forEach(ee=>{let ce=R.fetchers.get(ee.key),de=Hc(void 0,ce?ce.data:void 0);R.fetchers.set(ee.key,de)}),new Map(R.fetchers)}function qr(B,ee,ce,de){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");xt(B);let ke=(de&&de.flushSync)===!0,Xe=l||o,Je=r0(R.location,R.matches,c,p.v7_prependBasename,ce,p.v7_relativeSplatPath,ee,de==null?void 0:de.relative),Ne=il(Xe,Je,c),ze=Wi(Ne,Xe,Je);if(ze.active&&ze.matches&&(Ne=ze.matches),!Ne){nt(B,ee,wr(404,{pathname:Je}),{flushSync:ke});return}let{path:Me,submission:Ae,error:ot}=Fv(p.v7_normalizeFormMethod,!0,Je,de);if(ot){nt(B,ee,ot,{flushSync:ke});return}let gt=kh(Ne,Me),fn=(de&&de.preventScrollReset)===!0;if(Ae&&Ni(Ae.formMethod)){Ss(B,ee,Me,gt,Ne,ze.active,ke,fn,Ae);return}z.set(B,{routeId:ee,path:Me}),io(B,ee,Me,gt,Ne,ze.active,ke,fn,Ae)}async function Ss(B,ee,ce,de,ke,Xe,Je,Ne,ze){Pe(),z.delete(B);function Me(ht){if(!ht.route.action&&!ht.route.lazy){let Bi=wr(405,{method:ze.formMethod,pathname:ce,routeId:ee});return nt(B,ee,Bi,{flushSync:Je}),!0}return!1}if(!Xe&&Me(de))return;let Ae=R.fetchers.get(B);Fe(B,hM(ze,Ae),{flushSync:Je});let ot=new AbortController,gt=hu(n.history,ce,ot.signal,ze);if(Xe){let ht=await yi(ke,new URL(gt.url).pathname,gt.signal,B);if(ht.type==="aborted")return;if(ht.type==="error"){nt(B,ee,ht.error,{flushSync:Je});return}else if(ht.matches){if(ke=ht.matches,de=kh(ke,ce),Me(de))return}else{nt(B,ee,wr(404,{pathname:ce}),{flushSync:Je});return}}he.set(B,ot);let fn=ye,Qt=(await Jn("action",R,gt,[de],ke,B))[de.route.id];if(gt.signal.aborted){he.get(B)===ot&&he.delete(B);return}if(p.v7_fetcherPersist&&_e.has(B)){if(ll(Qt)||Vr(Qt)){Fe(B,Uo(void 0));return}}else{if(ll(Qt))if(he.delete(B),A>fn){Fe(B,Uo(void 0));return}else return ue.add(B),Fe(B,Hc(ze)),cr(gt,Qt,!1,{fetcherSubmission:ze,preventScrollReset:Ne});if(Vr(Qt)){nt(B,ee,Qt.error);return}}if(aa(Qt))throw wr(400,{type:"defer-action"});let Ft=R.navigation.location||R.location,Gr=hu(n.history,Ft,ot.signal),qe=l||o,vn=R.navigation.state!=="idle"?il(qe,R.navigation.location,c):R.matches;St(vn,"Didn't find any matches after fetcher action");let bt=++ye;Y.set(B,bt);let ka=Hc(ze,Qt.data);R.fetchers.set(B,ka);let[xi,Er]=Yv(n.history,R,vn,ze,Ft,!1,p.v7_skipActionErrorRevalidation,re,Oe,be,_e,z,ue,qe,c,[de.route.id,Qt]);Er.filter(ht=>ht.key!==B).forEach(ht=>{let Bi=ht.key,Kt=R.fetchers.get(Bi),Jr=Hc(void 0,Kt?Kt.data:void 0);R.fetchers.set(Bi,Jr),xt(Bi),ht.controller&&he.set(Bi,ht.controller)}),cn({fetchers:new Map(R.fetchers)});let Kr=()=>Er.forEach(ht=>xt(ht.key));ot.signal.addEventListener("abort",Kr);let{loaderResults:ao,fetcherResults:vt}=await fe(R,vn,xi,Er,Gr);if(ot.signal.aborted)return;ot.signal.removeEventListener("abort",Kr),Y.delete(B),he.delete(B),Er.forEach(ht=>he.delete(ht.key));let Vt=Md(ao);if(Vt)return cr(Gr,Vt.result,!1,{preventScrollReset:Ne});if(Vt=Md(vt),Vt)return ue.add(Vt.key),cr(Gr,Vt.result,!1,{preventScrollReset:Ne});let{loaderData:rn,errors:vi}=Kv(R,vn,ao,void 0,Er,vt,$e);if(R.fetchers.has(B)){let ht=Uo(Qt.data);R.fetchers.set(B,ht)}nn(bt),R.navigation.state==="loading"&&bt>A?(St(q,"Expected pending action"),V&&V.abort(),An(R.navigation.location,{matches:vn,loaderData:rn,errors:vi,fetchers:new Map(R.fetchers)})):(cn({errors:vi,loaderData:Jv(R.loaderData,rn,vn,vi),fetchers:new Map(R.fetchers)}),re=!1)}async function io(B,ee,ce,de,ke,Xe,Je,Ne,ze){let Me=R.fetchers.get(B);Fe(B,Hc(ze,Me?Me.data:void 0),{flushSync:Je});let Ae=new AbortController,ot=hu(n.history,ce,Ae.signal);if(Xe){let Qt=await yi(ke,new URL(ot.url).pathname,ot.signal,B);if(Qt.type==="aborted")return;if(Qt.type==="error"){nt(B,ee,Qt.error,{flushSync:Je});return}else if(Qt.matches)ke=Qt.matches,de=kh(ke,ce);else{nt(B,ee,wr(404,{pathname:ce}),{flushSync:Je});return}}he.set(B,Ae);let gt=ye,_t=(await Jn("loader",R,ot,[de],ke,B))[de.route.id];if(aa(_t)&&(_t=await Ry(_t,ot.signal,!0)||_t),he.get(B)===Ae&&he.delete(B),!ot.signal.aborted){if(_e.has(B)){Fe(B,Uo(void 0));return}if(ll(_t))if(A>gt){Fe(B,Uo(void 0));return}else{ue.add(B),await cr(ot,_t,!1,{preventScrollReset:Ne});return}if(Vr(_t)){nt(B,ee,_t.error);return}St(!aa(_t),"Unhandled fetcher deferred data"),Fe(B,Uo(_t.data))}}async function cr(B,ee,ce,de){let{submission:ke,fetcherSubmission:Xe,preventScrollReset:Je,replace:Ne}=de===void 0?{}:de;ee.response.headers.has("X-Remix-Revalidate")&&(re=!0);let ze=ee.response.headers.get("Location");St(ze,"Expected a Location header on the redirect Response"),ze=Hv(ze,new URL(B.url),c,n.history);let Me=zh(R.location,ze,{_isRedirect:!0});if(t){let Qt=!1;if(ee.response.headers.has("X-Remix-Reload-Document"))Qt=!0;else if(jy.test(ze)){const Ft=n.history.createURL(ze);Qt=Ft.origin!==e.location.origin||Ks(Ft.pathname,c)==null}if(Qt){Ne?e.location.replace(ze):e.location.assign(ze);return}}V=null;let Ae=Ne===!0||ee.response.headers.has("X-Remix-Replace")?Sn.Replace:Sn.Push,{formMethod:ot,formAction:gt,formEncType:fn}=R.navigation;!ke&&!Xe&&ot&>&&fn&&(ke=rw(R.navigation));let _t=ke||Xe;if(FE.has(ee.response.status)&&_t&&Ni(_t.formMethod))await Kn(Ae,Me,{submission:on({},_t,{formAction:ze}),preventScrollReset:Je||G,enableViewTransition:ce?D:void 0});else{let Qt=Jg(Me,ke);await Kn(Ae,Me,{overrideNavigation:Qt,fetcherSubmission:Xe,preventScrollReset:Je||G,enableViewTransition:ce?D:void 0})}}async function Jn(B,ee,ce,de,ke,Xe){let Je,Ne={};try{Je=await JE(h,B,ee,ce,de,ke,Xe,s,i)}catch(ze){return de.forEach(Me=>{Ne[Me.route.id]={type:Wt.error,error:ze}}),Ne}for(let[ze,Me]of Object.entries(Je))if(sM(Me)){let Ae=Me.result;Ne[ze]={type:Wt.redirect,response:nM(Ae,ce,ze,ke,c,p.v7_relativeSplatPath)}}else Ne[ze]=await tM(Me);return Ne}async function fe(B,ee,ce,de,ke){let Xe=B.matches,Je=Jn("loader",B,ke,ce,ee,null),Ne=Promise.all(de.map(async Ae=>{if(Ae.matches&&Ae.match&&Ae.controller){let gt=(await Jn("loader",B,hu(n.history,Ae.path,Ae.controller.signal),[Ae.match],Ae.matches,Ae.key))[Ae.match.route.id];return{[Ae.key]:gt}}else return Promise.resolve({[Ae.key]:{type:Wt.error,error:wr(404,{pathname:Ae.path})}})})),ze=await Je,Me=(await Ne).reduce((Ae,ot)=>Object.assign(Ae,ot),{});return await Promise.all([lM(ee,ze,ke.signal,Xe,B.loaderData),uM(ee,Me,de)]),{loaderResults:ze,fetcherResults:Me}}function Pe(){re=!0,Oe.push(...hn()),z.forEach((B,ee)=>{he.has(ee)&&be.add(ee),xt(ee)})}function Fe(B,ee,ce){ce===void 0&&(ce={}),R.fetchers.set(B,ee),cn({fetchers:new Map(R.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function nt(B,ee,ce,de){de===void 0&&(de={});let ke=sl(R.matches,ee);Ke(B),cn({errors:{[ke.route.id]:ce},fetchers:new Map(R.fetchers)},{flushSync:(de&&de.flushSync)===!0})}function yt(B){return Re.set(B,(Re.get(B)||0)+1),_e.has(B)&&_e.delete(B),R.fetchers.get(B)||BE}function Ke(B){let ee=R.fetchers.get(B);he.has(B)&&!(ee&&ee.state==="loading"&&Y.has(B))&&xt(B),z.delete(B),Y.delete(B),ue.delete(B),p.v7_fetcherPersist&&_e.delete(B),be.delete(B),R.fetchers.delete(B)}function er(B){let ee=(Re.get(B)||0)-1;ee<=0?(Re.delete(B),_e.add(B),p.v7_fetcherPersist||Ke(B)):Re.set(B,ee),cn({fetchers:new Map(R.fetchers)})}function xt(B){let ee=he.get(B);ee&&(ee.abort(),he.delete(B))}function hr(B){for(let ee of B){let ce=yt(ee),de=Uo(ce.data);R.fetchers.set(ee,de)}}function bn(){let B=[],ee=!1;for(let ce of ue){let de=R.fetchers.get(ce);St(de,"Expected fetcher: "+ce),de.state==="loading"&&(ue.delete(ce),B.push(ce),ee=!0)}return hr(B),ee}function nn(B){let ee=[];for(let[ce,de]of Y)if(de<B){let ke=R.fetchers.get(ce);St(ke,"Expected fetcher: "+ce),ke.state==="loading"&&(xt(ce),Y.delete(ce),ee.push(ce))}return hr(ee),ee.length>0}function tr(B,ee){let ce=R.blockers.get(B)||qc;return rt.get(B)!==ee&&rt.set(B,ee),ce}function Tn(B){R.blockers.delete(B),rt.delete(B)}function Xi(B,ee){let ce=R.blockers.get(B)||qc;St(ce.state==="unblocked"&&ee.state==="blocked"||ce.state==="blocked"&&ee.state==="blocked"||ce.state==="blocked"&&ee.state==="proceeding"||ce.state==="blocked"&&ee.state==="unblocked"||ce.state==="proceeding"&&ee.state==="unblocked","Invalid blocker state transition: "+ce.state+" -> "+ee.state);let de=new Map(R.blockers);de.set(B,ee),cn({blockers:de})}function Vi(B){let{currentLocation:ee,nextLocation:ce,historyAction:de}=B;if(rt.size===0)return;rt.size>1&&xl(!1,"A router only supports one blocker at a time");let ke=Array.from(rt.entries()),[Xe,Je]=ke[ke.length-1],Ne=R.blockers.get(Xe);if(!(Ne&&Ne.state==="proceeding")&&Je({currentLocation:ee,nextLocation:ce,historyAction:de}))return Xe}function Hr(B){let ee=wr(404,{pathname:B}),ce=l||o,{matches:de,route:ke}=tw(ce);return hn(),{notFoundMatches:de,route:ke,error:ee}}function hn(B){let ee=[];return $e.forEach((ce,de)=>{(!B||B(de))&&(ce.cancel(),ee.push(de),$e.delete(de))}),ee}function xa(B,ee,ce){if(w=B,C=ee,k=ce||null,!Q&&R.navigation===Kg){Q=!0;let de=oo(R.location,R.matches);de!=null&&cn({restoreScrollPosition:de})}return()=>{w=null,C=null,k=null}}function so(B,ee){return k&&k(B,ee.map(de=>kE(de,R.loaderData)))||B.key}function va(B,ee){if(w&&C){let ce=so(B,ee);w[ce]=C()}}function oo(B,ee){if(w){let ce=so(B,ee),de=w[ce];if(typeof de=="number")return de}return null}function Wi(B,ee,ce){if(f)if(B){if(Object.keys(B[0].params).length>0)return{active:!0,matches:rp(ee,ce,c,!0)}}else return{active:!0,matches:rp(ee,ce,c,!0)||[]};return{active:!1,matches:null}}async function yi(B,ee,ce,de){if(!f)return{type:"success",matches:B};let ke=B;for(;;){let Xe=l==null,Je=l||o,Ne=s;try{await f({signal:ce,path:ee,matches:ke,fetcherKey:de,patch:(Ae,ot)=>{ce.aborted||qv(Ae,ot,Je,Ne,i)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:ke}}finally{Xe&&!ce.aborted&&(o=[...o])}if(ce.aborted)return{type:"aborted"};let ze=il(Je,ee,c);if(ze)return{type:"success",matches:ze};let Me=rp(Je,ee,c,!0);if(!Me||ke.length===Me.length&&ke.every((Ae,ot)=>Ae.route.id===Me[ot].route.id))return{type:"success",matches:null};ke=Me}}function wa(B){s={},l=gp(B,i,void 0,s)}function Fi(B,ee){let ce=l==null;qv(B,ee,l||o,s,i),ce&&(o=[...o],cn({}))}return _={get basename(){return c},get future(){return p},get state(){return R},get routes(){return o},get window(){return e},initialize:mt,subscribe:Gn,enableScrollRestoration:xa,navigate:Zi,fetch:qr,revalidate:Tr,createHref:B=>n.history.createHref(B),encodeLocation:B=>n.history.encodeLocation(B),getFetcher:yt,deleteFetcher:er,dispose:Xt,getBlocker:tr,deleteBlocker:Tn,patchRoutes:Fi,_internalFetchControllers:he,_internalActiveDeferreds:$e,_internalSetRoutes:wa},_}function qE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function r0(n,e,t,r,i,s,o,l){let c,h;if(o){c=[];for(let p of e)if(c.push(p),p.route.id===o){h=p;break}}else c=e,h=e[e.length-1];let f=My(i||".",Ey(c,s),Ks(n.pathname,t)||n.pathname,l==="path");if(i==null&&(f.search=n.search,f.hash=n.hash),(i==null||i===""||i===".")&&h){let p=Ay(f.search);if(h.route.index&&!p)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&p){let m=new URLSearchParams(f.search),g=m.getAll("index");m.delete("index"),g.filter(k=>k).forEach(k=>m.append("index",k));let w=m.toString();f.search=w?"?"+w:""}}return r&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Us([t,f.pathname])),vl(f)}function Fv(n,e,t,r){if(!r||!qE(r))return{path:t};if(r.formMethod&&!aM(r.formMethod))return{path:t,error:wr(405,{method:r.formMethod})};let i=()=>({path:t,error:wr(400,{type:"invalid-body"})}),s=r.formMethod||"get",o=n?s.toUpperCase():s.toLowerCase(),l=cP(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ni(o))return i();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,w)=>{let[k,C]=w;return""+g+k+"="+C+`
|
|
50
|
+
`},""):String(r.body);return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!Ni(o))return i();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}St(typeof FormData=="function","FormData is not available in this environment");let c,h;if(r.formData)c=s0(r.formData),h=r.formData;else if(r.body instanceof FormData)c=s0(r.body),h=r.body;else if(r.body instanceof URLSearchParams)c=r.body,h=Gv(c);else if(r.body==null)c=new URLSearchParams,h=new FormData;else try{c=new URLSearchParams(r.body),h=Gv(c)}catch{return i()}let f={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Ni(f.formMethod))return{path:t,submission:f};let p=ma(t);return e&&p.search&&Ay(p.search)&&c.append("index",""),p.search="?"+c,{path:vl(p),submission:f}}function Bv(n,e,t){t===void 0&&(t=!1);let r=n.findIndex(i=>i.route.id===e);return r>=0?n.slice(0,t?r+1:r):n}function Yv(n,e,t,r,i,s,o,l,c,h,f,p,m,g,w,k){let C=k?Vr(k[1])?k[1].error:k[1].data:void 0,Q=n.createURL(e.location),M=n.createURL(i),E=t;s&&e.errors?E=Bv(t,Object.keys(e.errors)[0],!0):k&&Vr(k[1])&&(E=Bv(t,k[0]));let I=k?k[1].statusCode:void 0,U=o&&I&&I>=400,_=E.filter((q,G)=>{let{route:V}=q;if(V.lazy)return!0;if(V.loader==null)return!1;if(s)return i0(V,e.loaderData,e.errors);if(HE(e.loaderData,e.matches[G],q)||c.some(ae=>ae===q.route.id))return!0;let D=e.matches[G],Z=q;return Uv(q,on({currentUrl:Q,currentParams:D.params,nextUrl:M,nextParams:Z.params},r,{actionResult:C,actionStatus:I,defaultShouldRevalidate:U?!1:l||Q.pathname+Q.search===M.pathname+M.search||Q.search!==M.search||lP(D,Z)}))}),R=[];return p.forEach((q,G)=>{if(s||!t.some(se=>se.route.id===q.routeId)||f.has(G))return;let V=il(g,q.path,w);if(!V){R.push({key:G,routeId:q.routeId,path:q.path,matches:null,match:null,controller:null});return}let D=e.fetchers.get(G),Z=kh(V,q.path),ae=!1;m.has(G)?ae=!1:h.has(G)?(h.delete(G),ae=!0):D&&D.state!=="idle"&&D.data===void 0?ae=l:ae=Uv(Z,on({currentUrl:Q,currentParams:e.matches[e.matches.length-1].params,nextUrl:M,nextParams:t[t.length-1].params},r,{actionResult:C,actionStatus:I,defaultShouldRevalidate:U?!1:l})),ae&&R.push({key:G,routeId:q.routeId,path:q.path,matches:V,match:Z,controller:new AbortController})}),[_,R]}function i0(n,e,t){if(n.lazy)return!0;if(!n.loader)return!1;let r=e!=null&&e[n.id]!==void 0,i=t!=null&&t[n.id]!==void 0;return!r&&i?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!r&&!i}function HE(n,e,t){let r=!e||t.route.id!==e.route.id,i=n[t.route.id]===void 0;return r||i}function lP(n,e){let t=n.route.path;return n.pathname!==e.pathname||t!=null&&t.endsWith("*")&&n.params["*"]!==e.params["*"]}function Uv(n,e){if(n.route.shouldRevalidate){let t=n.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}function qv(n,e,t,r,i){var s;let o;if(n){let h=r[n];St(h,"No route found to patch children into: routeId = "+n),h.children||(h.children=[]),o=h.children}else o=t;let l=e.filter(h=>!o.some(f=>uP(h,f))),c=gp(l,i,[n||"_","patch",String(((s=o)==null?void 0:s.length)||"0")],r);o.push(...c)}function uP(n,e){return"id"in n&&"id"in e&&n.id===e.id?!0:n.index===e.index&&n.path===e.path&&n.caseSensitive===e.caseSensitive?(!n.children||n.children.length===0)&&(!e.children||e.children.length===0)?!0:n.children.every((t,r)=>{var i;return(i=e.children)==null?void 0:i.some(s=>uP(t,s))}):!1}async function GE(n,e,t){if(!n.lazy)return;let r=await n.lazy();if(!n.lazy)return;let i=t[n.id];St(i,"No route found in manifest");let s={};for(let o in r){let c=i[o]!==void 0&&o!=="hasErrorBoundary";xl(!c,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!c&&!vE.has(o)&&(s[o]=r[o])}Object.assign(i,s),Object.assign(i,on({},e(i),{lazy:void 0}))}async function KE(n){let{matches:e}=n,t=e.filter(i=>i.shouldLoad);return(await Promise.all(t.map(i=>i.resolve()))).reduce((i,s,o)=>Object.assign(i,{[t[o].route.id]:s}),{})}async function JE(n,e,t,r,i,s,o,l,c,h){let f=s.map(g=>g.route.lazy?GE(g.route,c,l):void 0),p=s.map((g,w)=>{let k=f[w],C=i.some(M=>M.route.id===g.route.id);return on({},g,{shouldLoad:C,resolve:async M=>(M&&r.method==="GET"&&(g.route.lazy||g.route.loader)&&(C=!0),C?eM(e,r,g,k,M,h):Promise.resolve({type:Wt.data,result:void 0}))})}),m=await n({matches:p,request:r,params:s[0].params,fetcherKey:o,context:h});try{await Promise.all(f)}catch{}return m}async function eM(n,e,t,r,i,s){let o,l,c=h=>{let f,p=new Promise((w,k)=>f=k);l=()=>f(),e.signal.addEventListener("abort",l);let m=w=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+n+'" [routeId: '+t.route.id+"]"))):h({request:e,params:t.params,context:s},...w!==void 0?[w]:[]),g=(async()=>{try{return{type:"data",result:await(i?i(k=>m(k)):m())}}catch(w){return{type:"error",result:w}}})();return Promise.race([g,p])};try{let h=t.route[n];if(r)if(h){let f,[p]=await Promise.all([c(h).catch(m=>{f=m}),r]);if(f!==void 0)throw f;o=p}else if(await r,h=t.route[n],h)o=await c(h);else if(n==="action"){let f=new URL(e.url),p=f.pathname+f.search;throw wr(405,{method:e.method,pathname:p,routeId:t.route.id})}else return{type:Wt.data,result:void 0};else if(h)o=await c(h);else{let f=new URL(e.url),p=f.pathname+f.search;throw wr(404,{pathname:p})}St(o.result!==void 0,"You defined "+(n==="action"?"an action":"a loader")+" for route "+('"'+t.route.id+"\" but didn't return anything from your `"+n+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:Wt.error,result:h}}finally{l&&e.signal.removeEventListener("abort",l)}return o}async function tM(n){let{result:e,type:t}=n;if(hP(e)){let p;try{let m=e.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?e.body==null?p=null:p=await e.json():p=await e.text()}catch(m){return{type:Wt.error,error:m}}return t===Wt.error?{type:Wt.error,error:new yp(e.status,e.statusText,p),statusCode:e.status,headers:e.headers}:{type:Wt.data,data:p,statusCode:e.status,headers:e.headers}}if(t===Wt.error){if(nw(e)){var r,i;if(e.data instanceof Error){var s,o;return{type:Wt.error,error:e.data,statusCode:(s=e.init)==null?void 0:s.status,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}}return{type:Wt.error,error:new yp(((r=e.init)==null?void 0:r.status)||500,void 0,e.data),statusCode:Lh(e)?e.status:void 0,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}}return{type:Wt.error,error:e,statusCode:Lh(e)?e.status:void 0}}if(oM(e)){var l,c;return{type:Wt.deferred,deferredData:e,statusCode:(l=e.init)==null?void 0:l.status,headers:((c=e.init)==null?void 0:c.headers)&&new Headers(e.init.headers)}}if(nw(e)){var h,f;return{type:Wt.data,data:e.data,statusCode:(h=e.init)==null?void 0:h.status,headers:(f=e.init)!=null&&f.headers?new Headers(e.init.headers):void 0}}return{type:Wt.data,data:e}}function nM(n,e,t,r,i,s){let o=n.headers.get("Location");if(St(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!jy.test(o)){let l=r.slice(0,r.findIndex(c=>c.route.id===t)+1);o=r0(new URL(e.url),l,i,!0,o,s),n.headers.set("Location",o)}return n}function Hv(n,e,t,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(jy.test(n)){let s=n,o=s.startsWith("//")?new URL(e.protocol+s):new URL(s);if(i.includes(o.protocol))throw new Error("Invalid redirect location");let l=Ks(o.pathname,t)!=null;if(o.origin===e.origin&&l)return o.pathname+o.search+o.hash}try{let s=r.createURL(n);if(i.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return n}function hu(n,e,t,r){let i=n.createURL(cP(e)).toString(),s={signal:t};if(r&&Ni(r.formMethod)){let{formMethod:o,formEncType:l}=r;s.method=o.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(r.json)):l==="text/plain"?s.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?s.body=s0(r.formData):s.body=r.formData}return new Request(i,s)}function s0(n){let e=new URLSearchParams;for(let[t,r]of n.entries())e.append(t,typeof r=="string"?r:r.name);return e}function Gv(n){let e=new FormData;for(let[t,r]of n.entries())e.append(t,r);return e}function rM(n,e,t,r,i){let s={},o=null,l,c=!1,h={},f=t&&Vr(t[1])?t[1].error:void 0;return n.forEach(p=>{if(!(p.route.id in e))return;let m=p.route.id,g=e[m];if(St(!ll(g),"Cannot handle redirect results in processLoaderData"),Vr(g)){let w=g.error;f!==void 0&&(w=f,f=void 0),o=o||{};{let k=sl(n,m);o[k.route.id]==null&&(o[k.route.id]=w)}s[m]=void 0,c||(c=!0,l=Lh(g.error)?g.error.status:500),g.headers&&(h[m]=g.headers)}else aa(g)?(r.set(m,g.deferredData),s[m]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(h[m]=g.headers)):(s[m]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(h[m]=g.headers))}),f!==void 0&&t&&(o={[t[0]]:f},s[t[0]]=void 0),{loaderData:s,errors:o,statusCode:l||200,loaderHeaders:h}}function Kv(n,e,t,r,i,s,o){let{loaderData:l,errors:c}=rM(e,t,r,o);return i.forEach(h=>{let{key:f,match:p,controller:m}=h,g=s[f];if(St(g,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(Vr(g)){let w=sl(n.matches,p==null?void 0:p.route.id);c&&c[w.route.id]||(c=on({},c,{[w.route.id]:g.error})),n.fetchers.delete(f)}else if(ll(g))St(!1,"Unhandled fetcher revalidation redirect");else if(aa(g))St(!1,"Unhandled fetcher deferred data");else{let w=Uo(g.data);n.fetchers.set(f,w)}}),{loaderData:l,errors:c}}function Jv(n,e,t,r){let i=on({},e);for(let s of t){let o=s.route.id;if(e.hasOwnProperty(o)?e[o]!==void 0&&(i[o]=e[o]):n[o]!==void 0&&s.route.loader&&(i[o]=n[o]),r&&r.hasOwnProperty(o))break}return i}function ew(n){return n?Vr(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function sl(n,e){return(e?n.slice(0,n.findIndex(r=>r.route.id===e)+1):[...n]).reverse().find(r=>r.route.hasErrorBoundary===!0)||n[0]}function tw(n){let e=n.length===1?n[0]:n.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function wr(n,e){let{pathname:t,routeId:r,method:i,type:s,message:o}=e===void 0?{}:e,l="Unknown Server Error",c="Unknown @remix-run/router error";return n===400?(l="Bad Request",i&&t&&r?c="You made a "+i+' request to "'+t+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?c="defer() is not supported in actions":s==="invalid-body"&&(c="Unable to encode submission body")):n===403?(l="Forbidden",c='Route "'+r+'" does not match URL "'+t+'"'):n===404?(l="Not Found",c='No route matches URL "'+t+'"'):n===405&&(l="Method Not Allowed",i&&t&&r?c="You made a "+i.toUpperCase()+' request to "'+t+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new yp(n||500,l,new Error(c),!0)}function Md(n){let e=Object.entries(n);for(let t=e.length-1;t>=0;t--){let[r,i]=e[t];if(ll(i))return{key:r,result:i}}}function cP(n){let e=typeof n=="string"?ma(n):n;return vl(on({},e,{hash:""}))}function iM(n,e){return n.pathname!==e.pathname||n.search!==e.search?!1:n.hash===""?e.hash!=="":n.hash===e.hash?!0:e.hash!==""}function sM(n){return hP(n.result)&&WE.has(n.result.status)}function aa(n){return n.type===Wt.deferred}function Vr(n){return n.type===Wt.error}function ll(n){return(n&&n.type)===Wt.redirect}function nw(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function oM(n){let e=n;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function hP(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function aM(n){return VE.has(n.toLowerCase())}function Ni(n){return ZE.has(n.toLowerCase())}async function lM(n,e,t,r,i){let s=Object.entries(e);for(let o=0;o<s.length;o++){let[l,c]=s[o],h=n.find(m=>(m==null?void 0:m.route.id)===l);if(!h)continue;let f=r.find(m=>m.route.id===h.route.id),p=f!=null&&!lP(f,h)&&(i&&i[h.route.id])!==void 0;aa(c)&&p&&await Ry(c,t,!1).then(m=>{m&&(e[l]=m)})}}async function uM(n,e,t){for(let r=0;r<t.length;r++){let{key:i,routeId:s,controller:o}=t[r],l=e[i];n.find(h=>(h==null?void 0:h.route.id)===s)&&aa(l)&&(St(o,"Expected an AbortController for revalidating fetcher deferred result"),await Ry(l,o.signal,!0).then(h=>{h&&(e[i]=h)}))}}async function Ry(n,e,t){if(t===void 0&&(t=!1),!await n.deferredData.resolveData(e)){if(t)try{return{type:Wt.data,data:n.deferredData.unwrappedData}}catch(i){return{type:Wt.error,error:i}}return{type:Wt.data,data:n.deferredData.data}}}function Ay(n){return new URLSearchParams(n).getAll("index").some(e=>e==="")}function kh(n,e){let t=typeof e=="string"?ma(e).search:e.search;if(n[n.length-1].route.index&&Ay(t||""))return n[n.length-1];let r=sP(n);return r[r.length-1]}function rw(n){let{formMethod:e,formAction:t,formEncType:r,text:i,formData:s,json:o}=n;if(!(!e||!t||!r)){if(i!=null)return{formMethod:e,formAction:t,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:t,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:t,formEncType:r,formData:void 0,json:o,text:void 0}}}function Jg(n,e){return e?{state:"loading",location:n,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function cM(n,e){return{state:"submitting",location:n,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Hc(n,e){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function hM(n,e){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:e?e.data:void 0}}function Uo(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function fM(n,e){try{let t=n.sessionStorage.getItem(aP);if(t){let r=JSON.parse(t);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function dM(n,e){if(e.size>0){let t={};for(let[r,i]of e)t[r]=[...i];try{n.sessionStorage.setItem(aP,JSON.stringify(t))}catch(r){xl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
51
|
+
* React Router v6.30.3
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/function xp(){return xp=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},xp.apply(this,arguments)}const lf=F.createContext(null),Ny=F.createContext(null),ga=F.createContext(null),_y=F.createContext(null),ro=F.createContext({outlet:null,matches:[],isDataRoute:!1}),fP=F.createContext(null);function pM(n,e){let{relative:t}=e===void 0?{}:e;uf()||St(!1);let{basename:r,navigator:i}=F.useContext(ga),{hash:s,pathname:o,search:l}=qp(n,{relative:t}),c=o;return r!=="/"&&(c=o==="/"?r:Us([r,o])),i.createHref({pathname:c,search:l,hash:s})}function uf(){return F.useContext(_y)!=null}function Cl(){return uf()||St(!1),F.useContext(_y).location}function dP(n){F.useContext(ga).static||F.useLayoutEffect(n)}function Ku(){let{isDataRoute:n}=F.useContext(ro);return n?TM():mM()}function mM(){uf()||St(!1);let n=F.useContext(lf),{basename:e,future:t,navigator:r}=F.useContext(ga),{matches:i}=F.useContext(ro),{pathname:s}=Cl(),o=JSON.stringify(Ey(i,t.v7_relativeSplatPath)),l=F.useRef(!1);return dP(()=>{l.current=!0}),F.useCallback(function(h,f){if(f===void 0&&(f={}),!l.current)return;if(typeof h=="number"){r.go(h);return}let p=My(h,JSON.parse(o),s,f.relative==="path");n==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Us([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,o,s,n])}const gM=F.createContext(null);function OM(n){let e=F.useContext(ro).outlet;return e&&F.createElement(gM.Provider,{value:n},e)}function Ju(){let{matches:n}=F.useContext(ro),e=n[n.length-1];return e?e.params:{}}function qp(n,e){let{relative:t}=e===void 0?{}:e,{future:r}=F.useContext(ga),{matches:i}=F.useContext(ro),{pathname:s}=Cl(),o=JSON.stringify(Ey(i,r.v7_relativeSplatPath));return F.useMemo(()=>My(n,JSON.parse(o),s,t==="path"),[n,o,s,t])}function yM(n,e,t,r){uf()||St(!1);let{navigator:i}=F.useContext(ga),{matches:s}=F.useContext(ro),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let h=Cl(),f;f=h;let p=f.pathname||"/",m=p;if(c!=="/"){let k=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(k.length).join("/")}let g=il(n,{pathname:m});return SM(g&&g.map(k=>Object.assign({},k,{params:Object.assign({},l,k.params),pathname:Us([c,i.encodeLocation?i.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?c:Us([c,i.encodeLocation?i.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),s,t,r)}function xM(){let n=CM(),e=Lh(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},e),t?F.createElement("pre",{style:i},t):null,null)}const vM=F.createElement(xM,null);class wM extends F.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?F.createElement(ro.Provider,{value:this.props.routeContext},F.createElement(fP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function kM(n){let{routeContext:e,match:t,children:r}=n,i=F.useContext(lf);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),F.createElement(ro.Provider,{value:e},r)}function SM(n,e,t,r){var i;if(e===void 0&&(e=[]),t===void 0&&(t=null),r===void 0&&(r=null),n==null){var s;if(!t)return null;if(t.errors)n=t.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!t.initialized&&t.matches.length>0)n=t.matches;else return null}let o=n,l=(i=t)==null?void 0:i.errors;if(l!=null){let f=o.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);f>=0||St(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,h=-1;if(t&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let p=o[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=f),p.route.id){let{loaderData:m,errors:g}=t,w=p.route.loader&&m[p.route.id]===void 0&&(!g||g[p.route.id]===void 0);if(p.route.lazy||w){c=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((f,p,m)=>{let g,w=!1,k=null,C=null;t&&(g=l&&p.route.id?l[p.route.id]:void 0,k=p.route.errorElement||vM,c&&(h<0&&m===0?($M("route-fallback"),w=!0,C=null):h===m&&(w=!0,C=p.route.hydrateFallbackElement||null)));let Q=e.concat(o.slice(0,m+1)),M=()=>{let E;return g?E=k:w?E=C:p.route.Component?E=F.createElement(p.route.Component,null):p.route.element?E=p.route.element:E=f,F.createElement(kM,{match:p,routeContext:{outlet:f,matches:Q,isDataRoute:t!=null},children:E})};return t&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?F.createElement(wM,{location:t.location,revalidation:t.revalidation,component:k,error:g,children:M(),routeContext:{outlet:null,matches:Q,isDataRoute:!0}}):M()},null)}var pP=function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n}(pP||{}),mP=function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n}(mP||{});function bM(n){let e=F.useContext(lf);return e||St(!1),e}function PM(n){let e=F.useContext(Ny);return e||St(!1),e}function QM(n){let e=F.useContext(ro);return e||St(!1),e}function gP(n){let e=QM(),t=e.matches[e.matches.length-1];return t.route.id||St(!1),t.route.id}function CM(){var n;let e=F.useContext(fP),t=PM(mP.UseRouteError),r=gP();return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function TM(){let{router:n}=bM(pP.UseNavigateStable),e=gP(),t=F.useRef(!1);return dP(()=>{t.current=!0}),F.useCallback(function(i,s){s===void 0&&(s={}),t.current&&(typeof i=="number"?n.navigate(i):n.navigate(i,xp({fromRouteId:e},s)))},[n,e])}const iw={};function $M(n,e,t){iw[n]||(iw[n]=!0)}function EM(n,e){n==null||n.v7_startTransition,(n==null?void 0:n.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function OP(n){return OM(n.context)}function MM(n){let{basename:e="/",children:t=null,location:r,navigationType:i=Sn.Pop,navigator:s,static:o=!1,future:l}=n;uf()&&St(!1);let c=e.replace(/^\/*/,"/"),h=F.useMemo(()=>({basename:c,navigator:s,static:o,future:xp({v7_relativeSplatPath:!1},l)}),[c,l,s,o]);typeof r=="string"&&(r=ma(r));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:w="default"}=r,k=F.useMemo(()=>{let C=Ks(f,c);return C==null?null:{location:{pathname:C,search:p,hash:m,state:g,key:w},navigationType:i}},[c,f,p,m,g,w,i]);return k==null?null:F.createElement(ga.Provider,{value:h},F.createElement(_y.Provider,{children:t,value:k}))}new Promise(()=>{});function jM(n){let e={hasErrorBoundary:n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&Object.assign(e,{element:F.createElement(n.Component),Component:void 0}),n.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:F.createElement(n.HydrateFallback),HydrateFallback:void 0}),n.ErrorBoundary&&Object.assign(e,{errorElement:F.createElement(n.ErrorBoundary),ErrorBoundary:void 0}),e}/**
|
|
60
|
+
* React Router DOM v6.30.3
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Remix Software Inc.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
+
*
|
|
67
|
+
* @license MIT
|
|
68
|
+
*/function Du(){return Du=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Du.apply(this,arguments)}function yP(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function RM(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function AM(n,e){return n.button===0&&(!e||e==="_self")&&!RM(n)}function o0(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((e,t)=>{let r=n[t];return e.concat(Array.isArray(r)?r.map(i=>[t,i]):[[t,r]])},[]))}function NM(n,e){let t=o0(n);return e&&e.forEach((r,i)=>{t.has(i)||e.getAll(i).forEach(s=>{t.append(i,s)})}),t}const _M=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],zM=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],LM="6";try{window.__reactRouterVersion=LM}catch{}function DM(n,e){return UE({basename:void 0,future:Du({},void 0,{v7_prependBasename:!0}),history:OE({window:void 0}),hydrationData:IM(),routes:n,mapRouteProperties:jM,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function IM(){var n;let e=(n=window)==null?void 0:n.__staticRouterHydrationData;return e&&e.errors&&(e=Du({},e,{errors:ZM(e.errors)})),e}function ZM(n){if(!n)return null;let e=Object.entries(n),t={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")t[r]=new yp(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",t[r]=o}catch{}}if(t[r]==null){let s=new Error(i.message);s.stack="",t[r]=s}}else t[r]=i;return t}const xP=F.createContext({isTransitioning:!1}),XM=F.createContext(new Map),VM="startTransition",sw=cE[VM],WM="flushSync",ow=pE[WM];function FM(n){sw?sw(n):n()}function Gc(n){ow?ow(n):n()}class BM{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}}function YM(n){let{fallbackElement:e,router:t,future:r}=n,[i,s]=F.useState(t.state),[o,l]=F.useState(),[c,h]=F.useState({isTransitioning:!1}),[f,p]=F.useState(),[m,g]=F.useState(),[w,k]=F.useState(),C=F.useRef(new Map),{v7_startTransition:Q}=r||{},M=F.useCallback(q=>{Q?FM(q):q()},[Q]),E=F.useCallback((q,G)=>{let{deletedFetchers:V,flushSync:D,viewTransitionOpts:Z}=G;q.fetchers.forEach((se,re)=>{se.data!==void 0&&C.current.set(re,se.data)}),V.forEach(se=>C.current.delete(se));let ae=t.window==null||t.window.document==null||typeof t.window.document.startViewTransition!="function";if(!Z||ae){D?Gc(()=>s(q)):M(()=>s(q));return}if(D){Gc(()=>{m&&(f&&f.resolve(),m.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let se=t.window.document.startViewTransition(()=>{Gc(()=>s(q))});se.finished.finally(()=>{Gc(()=>{p(void 0),g(void 0),l(void 0),h({isTransitioning:!1})})}),Gc(()=>g(se));return}m?(f&&f.resolve(),m.skipTransition(),k({state:q,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(l(q),h({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[t.window,m,f,C,M]);F.useLayoutEffect(()=>t.subscribe(E),[t,E]),F.useEffect(()=>{c.isTransitioning&&!c.flushSync&&p(new BM)},[c]),F.useEffect(()=>{if(f&&o&&t.window){let q=o,G=f.promise,V=t.window.document.startViewTransition(async()=>{M(()=>s(q)),await G});V.finished.finally(()=>{p(void 0),g(void 0),l(void 0),h({isTransitioning:!1})}),g(V)}},[M,o,f,t.window]),F.useEffect(()=>{f&&o&&i.location.key===o.location.key&&f.resolve()},[f,m,i.location,o]),F.useEffect(()=>{!c.isTransitioning&&w&&(l(w.state),h({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),k(void 0))},[c.isTransitioning,w]),F.useEffect(()=>{},[]);let I=F.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:q=>t.navigate(q),push:(q,G,V)=>t.navigate(q,{state:G,preventScrollReset:V==null?void 0:V.preventScrollReset}),replace:(q,G,V)=>t.navigate(q,{replace:!0,state:G,preventScrollReset:V==null?void 0:V.preventScrollReset})}),[t]),U=t.basename||"/",_=F.useMemo(()=>({router:t,navigator:I,static:!1,basename:U}),[t,I,U]),R=F.useMemo(()=>({v7_relativeSplatPath:t.future.v7_relativeSplatPath}),[t.future.v7_relativeSplatPath]);return F.useEffect(()=>EM(r,t.future),[r,t.future]),F.createElement(F.Fragment,null,F.createElement(lf.Provider,{value:_},F.createElement(Ny.Provider,{value:i},F.createElement(XM.Provider,{value:C.current},F.createElement(xP.Provider,{value:c},F.createElement(MM,{basename:U,location:i.location,navigationType:i.historyAction,navigator:I,future:R},i.initialized||t.future.v7_partialHydration?F.createElement(UM,{routes:t.routes,future:t.future,state:i}):e))))),null)}const UM=F.memo(qM);function qM(n){let{routes:e,future:t,state:r}=n;return yM(e,void 0,r,t)}const HM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",GM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cf=F.forwardRef(function(e,t){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:c,to:h,preventScrollReset:f,viewTransition:p}=e,m=yP(e,_M),{basename:g}=F.useContext(ga),w,k=!1;if(typeof h=="string"&&GM.test(h)&&(w=h,HM))try{let E=new URL(window.location.href),I=h.startsWith("//")?new URL(E.protocol+h):new URL(h),U=Ks(I.pathname,g);I.origin===E.origin&&U!=null?h=U+I.search+I.hash:k=!0}catch{}let C=pM(h,{relative:i}),Q=JM(h,{replace:o,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:p});function M(E){r&&r(E),E.defaultPrevented||Q(E)}return F.createElement("a",Du({},m,{href:w||C,onClick:k||s?r:M,ref:t,target:c}))}),Iu=F.forwardRef(function(e,t){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:l,to:c,viewTransition:h,children:f}=e,p=yP(e,zM),m=qp(c,{relative:p.relative}),g=Cl(),w=F.useContext(Ny),{navigator:k,basename:C}=F.useContext(ga),Q=w!=null&&tj(m)&&h===!0,M=k.encodeLocation?k.encodeLocation(m).pathname:m.pathname,E=g.pathname,I=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;i||(E=E.toLowerCase(),I=I?I.toLowerCase():null,M=M.toLowerCase()),I&&C&&(I=Ks(I,C)||I);const U=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let _=E===M||!o&&E.startsWith(M)&&E.charAt(U)==="/",R=I!=null&&(I===M||!o&&I.startsWith(M)&&I.charAt(M.length)==="/"),q={isActive:_,isPending:R,isTransitioning:Q},G=_?r:void 0,V;typeof s=="function"?V=s(q):V=[s,_?"active":null,R?"pending":null,Q?"transitioning":null].filter(Boolean).join(" ");let D=typeof l=="function"?l(q):l;return F.createElement(cf,Du({},p,{"aria-current":G,className:V,ref:t,style:D,to:c,viewTransition:h}),typeof f=="function"?f(q):f)});var a0;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(a0||(a0={}));var aw;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(aw||(aw={}));function KM(n){let e=F.useContext(lf);return e||St(!1),e}function JM(n,e){let{target:t,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:l}=e===void 0?{}:e,c=Ku(),h=Cl(),f=qp(n,{relative:o});return F.useCallback(p=>{if(AM(p,t)){p.preventDefault();let m=r!==void 0?r:vl(h)===vl(f);c(n,{replace:m,state:i,preventScrollReset:s,relative:o,viewTransition:l})}},[h,c,f,r,i,t,n,s,o,l])}function ej(n){let e=F.useRef(o0(n)),t=F.useRef(!1),r=Cl(),i=F.useMemo(()=>NM(r.search,t.current?null:e.current),[r.search]),s=Ku(),o=F.useCallback((l,c)=>{const h=o0(typeof l=="function"?l(i):l);t.current=!0,s("?"+h,c)},[s,i]);return[i,o]}function tj(n,e){e===void 0&&(e={});let t=F.useContext(xP);t==null&&St(!1);let{basename:r}=KM(a0.useViewTransitionState),i=qp(n,{relative:e.relative});if(!t.isTransitioning)return!1;let s=Ks(t.currentLocation.pathname,r)||t.currentLocation.pathname,o=Ks(t.nextLocation.pathname,r)||t.nextLocation.pathname;return Op(i.pathname,o)!=null||Op(i.pathname,s)!=null}var Hp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dl,ta,Mu,Vb,nj=(Vb=class extends Hp{constructor(){super();Ie(this,dl);Ie(this,ta);Ie(this,Mu);ge(this,Mu,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){L(this,ta)||this.setEventListener(L(this,Mu))}onUnsubscribe(){var e;this.hasListeners()||((e=L(this,ta))==null||e.call(this),ge(this,ta,void 0))}setEventListener(e){var t;ge(this,Mu,e),(t=L(this,ta))==null||t.call(this),ge(this,ta,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){L(this,dl)!==e&&(ge(this,dl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof L(this,dl)=="boolean"?L(this,dl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},dl=new WeakMap,ta=new WeakMap,Mu=new WeakMap,Vb),vP=new nj,rj={setTimeout:(n,e)=>setTimeout(n,e),clearTimeout:n=>clearTimeout(n),setInterval:(n,e)=>setInterval(n,e),clearInterval:n=>clearInterval(n)},na,Ty,Wb,ij=(Wb=class{constructor(){Ie(this,na,rj);Ie(this,Ty,!1)}setTimeoutProvider(n){ge(this,na,n)}setTimeout(n,e){return L(this,na).setTimeout(n,e)}clearTimeout(n){L(this,na).clearTimeout(n)}setInterval(n,e){return L(this,na).setInterval(n,e)}clearInterval(n){L(this,na).clearInterval(n)}},na=new WeakMap,Ty=new WeakMap,Wb),l0=new ij;function sj(n){setTimeout(n,0)}var oj=typeof window>"u"||"Deno"in globalThis;function Ri(){}function aj(n,e){return typeof n=="function"?n(e):n}function lj(n){return typeof n=="number"&&n>=0&&n!==1/0}function uj(n,e){return Math.max(n+(e||0)-Date.now(),0)}function u0(n,e){return typeof n=="function"?n(e):n}function cj(n,e){return typeof n=="function"?n(e):n}function lw(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=n;if(o){if(r){if(e.queryHash!==zy(o,e.options))return!1}else if(!Ih(e.queryKey,o))return!1}if(t!=="all"){const c=e.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function uw(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(Dh(e.options.mutationKey)!==Dh(s))return!1}else if(!Ih(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function zy(n,e){return((e==null?void 0:e.queryKeyHashFn)||Dh)(n)}function Dh(n){return JSON.stringify(n,(e,t)=>c0(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function Ih(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Ih(n[t],e[t])):!1}var hj=Object.prototype.hasOwnProperty;function wP(n,e,t=0){if(n===e)return n;if(t>500)return e;const r=cw(n)&&cw(e);if(!r&&!(c0(n)&&c0(e)))return e;const s=(r?n:Object.keys(n)).length,o=r?e:Object.keys(e),l=o.length,c=r?new Array(l):{};let h=0;for(let f=0;f<l;f++){const p=r?f:o[f],m=n[p],g=e[p];if(m===g){c[p]=m,(r?f<s:hj.call(n,p))&&h++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[p]=g;continue}const w=wP(m,g,t+1);c[p]=w,w===m&&h++}return s===l&&h===s?n:c}function cw(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function c0(n){if(!hw(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!hw(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function hw(n){return Object.prototype.toString.call(n)==="[object Object]"}function fj(n){return new Promise(e=>{l0.setTimeout(e,n)})}function dj(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?wP(n,e):e}function pj(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function mj(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var Ly=Symbol();function kP(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===Ly?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function gj(n,e,t){let r=!1,i;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?t():i.addEventListener("abort",t,{once:!0})),i)}),n}var SP=(()=>{let n=()=>oj;return{isServer(){return n()},setIsServer(e){n=e}}})();function Oj(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}var yj=sj;function xj(){let n=[],e=0,t=l=>{l()},r=l=>{l()},i=yj;const s=l=>{e?n.push(l):i(()=>{t(l)})},o=()=>{const l=n;n=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{t(c)})})})};return{batch:l=>{let c;e++;try{c=l()}finally{e--,e||o()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{t=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var lr=xj(),ju,ra,Ru,Fb,vj=(Fb=class extends Hp{constructor(){super();Ie(this,ju,!0);Ie(this,ra);Ie(this,Ru);ge(this,Ru,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,ra)||this.setEventListener(L(this,Ru))}onUnsubscribe(){var e;this.hasListeners()||((e=L(this,ra))==null||e.call(this),ge(this,ra,void 0))}setEventListener(e){var t;ge(this,Ru,e),(t=L(this,ra))==null||t.call(this),ge(this,ra,e(this.setOnline.bind(this)))}setOnline(e){L(this,ju)!==e&&(ge(this,ju,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return L(this,ju)}},ju=new WeakMap,ra=new WeakMap,Ru=new WeakMap,Fb),vp=new vj;function wj(n){return Math.min(1e3*2**n,3e4)}function bP(n){return(n??"online")==="online"?vp.isOnline():!0}var h0=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function PP(n){let e=!1,t=0,r;const i=Oj(),s=()=>i.status!=="pending",o=k=>{var C;if(!s()){const Q=new h0(k);m(Q),(C=n.onCancel)==null||C.call(n,Q)}},l=()=>{e=!0},c=()=>{e=!1},h=()=>vP.isFocused()&&(n.networkMode==="always"||vp.isOnline())&&n.canRun(),f=()=>bP(n.networkMode)&&n.canRun(),p=k=>{s()||(r==null||r(),i.resolve(k))},m=k=>{s()||(r==null||r(),i.reject(k))},g=()=>new Promise(k=>{var C;r=Q=>{(s()||h())&&k(Q)},(C=n.onPause)==null||C.call(n)}).then(()=>{var k;r=void 0,s()||(k=n.onContinue)==null||k.call(n)}),w=()=>{if(s())return;let k;const C=t===0?n.initialPromise:void 0;try{k=C??n.fn()}catch(Q){k=Promise.reject(Q)}Promise.resolve(k).then(p).catch(Q=>{var _;if(s())return;const M=n.retry??(SP.isServer()?0:3),E=n.retryDelay??wj,I=typeof E=="function"?E(t,Q):E,U=M===!0||typeof M=="number"&&t<M||typeof M=="function"&&M(t,Q);if(e||!U){m(Q);return}t++,(_=n.onFail)==null||_.call(n,t,Q),fj(I).then(()=>h()?void 0:g()).then(()=>{e?m(Q):w()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?w():g().then(w),i)}}var pl,Bb,QP=(Bb=class{constructor(){Ie(this,pl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lj(this.gcTime)&&ge(this,pl,l0.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(SP.isServer()?1/0:5*60*1e3))}clearGcTimeout(){L(this,pl)&&(l0.clearTimeout(L(this,pl)),ge(this,pl,void 0))}},pl=new WeakMap,Bb),ml,Au,ui,gl,jn,rf,Ol,Xr,CP,Ws,Yb,kj=(Yb=class extends QP{constructor(e){super();Ie(this,Xr);Ie(this,ml);Ie(this,Au);Ie(this,ui);Ie(this,gl);Ie(this,jn);Ie(this,rf);Ie(this,Ol);ge(this,Ol,!1),ge(this,rf,e.defaultOptions),this.setOptions(e.options),this.observers=[],ge(this,gl,e.client),ge(this,ui,L(this,gl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ge(this,ml,dw(this.options)),this.state=e.state??L(this,ml),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=L(this,jn))==null?void 0:e.promise}setOptions(e){if(this.options={...L(this,rf),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=dw(this.options);t.data!==void 0&&(this.setState(fw(t.data,t.dataUpdatedAt)),ge(this,ml,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,ui).remove(this)}setData(e,t){const r=dj(this.state.data,e,this.options);return Ee(this,Xr,Ws).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){Ee(this,Xr,Ws).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=L(this,jn))==null?void 0:r.promise;return(i=L(this,jn))==null||i.cancel(e),t?t.then(Ri).catch(Ri):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,ml)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>cj(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ly||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>u0(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!uj(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=L(this,jn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=L(this,jn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),L(this,ui).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(L(this,jn)&&(L(this,Ol)||Ee(this,Xr,CP).call(this)?L(this,jn).cancel({revert:!0}):L(this,jn).cancelRetry()),this.scheduleGc()),L(this,ui).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,Xr,Ws).call(this,{type:"invalidate"})}async fetch(e,t){var c,h,f,p,m,g,w,k,C,Q,M,E;if(this.state.fetchStatus!=="idle"&&((c=L(this,jn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(L(this,jn))return L(this,jn).continueRetry(),L(this,jn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const I=this.observers.find(U=>U.options.queryFn);I&&this.setOptions(I.options)}const r=new AbortController,i=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(ge(this,Ol,!0),r.signal)})},s=()=>{const I=kP(this.options,t),_=(()=>{const R={client:L(this,gl),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return ge(this,Ol,!1),this.options.persister?this.options.persister(I,_,this):I(_)},l=(()=>{const I={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:L(this,gl),state:this.state,fetchFn:s};return i(I),I})();(h=this.options.behavior)==null||h.onFetch(l,this),ge(this,Au,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Ee(this,Xr,Ws).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),ge(this,jn,PP({initialPromise:t==null?void 0:t.initialPromise,fn:l.fetchFn,onCancel:I=>{I instanceof h0&&I.revert&&this.setState({...L(this,Au),fetchStatus:"idle"}),r.abort()},onFail:(I,U)=>{Ee(this,Xr,Ws).call(this,{type:"failed",failureCount:I,error:U})},onPause:()=>{Ee(this,Xr,Ws).call(this,{type:"pause"})},onContinue:()=>{Ee(this,Xr,Ws).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const I=await L(this,jn).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(g=(m=L(this,ui).config).onSuccess)==null||g.call(m,I,this),(k=(w=L(this,ui).config).onSettled)==null||k.call(w,I,this.state.error,this),I}catch(I){if(I instanceof h0){if(I.silent)return L(this,jn).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw Ee(this,Xr,Ws).call(this,{type:"error",error:I}),(Q=(C=L(this,ui).config).onError)==null||Q.call(C,I,this),(E=(M=L(this,ui).config).onSettled)==null||E.call(M,this.state.data,I,this),I}finally{this.scheduleGc()}}},ml=new WeakMap,Au=new WeakMap,ui=new WeakMap,gl=new WeakMap,jn=new WeakMap,rf=new WeakMap,Ol=new WeakMap,Xr=new WeakSet,CP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ws=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Sj(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...fw(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,Au,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),lr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,ui).notify({query:this,type:"updated",action:e})})},Yb);function Sj(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bP(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function fw(n,e){return{data:n,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dw(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}function pw(n){return{onFetch:(e,t)=>{var f,p,m,g,w;const r=e.options,i=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((g=e.state.data)==null?void 0:g.pages)||[],o=((w=e.state.data)==null?void 0:w.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const h=async()=>{let k=!1;const C=E=>{gj(E,()=>e.signal,()=>k=!0)},Q=kP(e.options,e.fetchOptions),M=async(E,I,U)=>{if(k)return Promise.reject();if(I==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const D={client:e.client,queryKey:e.queryKey,pageParam:I,direction:U?"backward":"forward",meta:e.options.meta};return C(D),D})(),q=await Q(R),{maxPages:G}=e.options,V=U?mj:pj;return{pages:V(E.pages,q,G),pageParams:V(E.pageParams,I,G)}};if(i&&s.length){const E=i==="backward",I=E?bj:mw,U={pages:s,pageParams:o},_=I(r,U);l=await M(U,_,E)}else{const E=n??s.length;do{const I=c===0?o[0]??r.initialPageParam:mw(r,l);if(c>0&&I==null)break;l=await M(l,I),c++}while(c<E)}return l};e.options.persister?e.fetchFn=()=>{var k,C;return(C=(k=e.options).persister)==null?void 0:C.call(k,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=h}}}function mw(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function bj(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var sf,us,Wn,yl,cs,qo,Ub,Pj=(Ub=class extends QP{constructor(e){super();Ie(this,cs);Ie(this,sf);Ie(this,us);Ie(this,Wn);Ie(this,yl);ge(this,sf,e.client),this.mutationId=e.mutationId,ge(this,Wn,e.mutationCache),ge(this,us,[]),this.state=e.state||Qj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){L(this,us).includes(e)||(L(this,us).push(e),this.clearGcTimeout(),L(this,Wn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ge(this,us,L(this,us).filter(t=>t!==e)),this.scheduleGc(),L(this,Wn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){L(this,us).length||(this.state.status==="pending"?this.scheduleGc():L(this,Wn).remove(this))}continue(){var e;return((e=L(this,yl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,c,h,f,p,m,g,w,k,C,Q,M,E,I,U,_,R;const t=()=>{Ee(this,cs,qo).call(this,{type:"continue"})},r={client:L(this,sf),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,yl,PP({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(q,G)=>{Ee(this,cs,qo).call(this,{type:"failed",failureCount:q,error:G})},onPause:()=>{Ee(this,cs,qo).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Wn).canRun(this)}));const i=this.state.status==="pending",s=!L(this,yl).canStart();try{if(i)t();else{Ee(this,cs,qo).call(this,{type:"pending",variables:e,isPaused:s}),L(this,Wn).config.onMutate&&await L(this,Wn).config.onMutate(e,this,r);const G=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e,r));G!==this.state.context&&Ee(this,cs,qo).call(this,{type:"pending",context:G,variables:e,isPaused:s})}const q=await L(this,yl).start();return await((h=(c=L(this,Wn).config).onSuccess)==null?void 0:h.call(c,q,e,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,q,e,this.state.context,r)),await((g=(m=L(this,Wn).config).onSettled)==null?void 0:g.call(m,q,null,this.state.variables,this.state.context,this,r)),await((k=(w=this.options).onSettled)==null?void 0:k.call(w,q,null,e,this.state.context,r)),Ee(this,cs,qo).call(this,{type:"success",data:q}),q}catch(q){try{await((Q=(C=L(this,Wn).config).onError)==null?void 0:Q.call(C,q,e,this.state.context,this,r))}catch(G){Promise.reject(G)}try{await((E=(M=this.options).onError)==null?void 0:E.call(M,q,e,this.state.context,r))}catch(G){Promise.reject(G)}try{await((U=(I=L(this,Wn).config).onSettled)==null?void 0:U.call(I,void 0,q,this.state.variables,this.state.context,this,r))}catch(G){Promise.reject(G)}try{await((R=(_=this.options).onSettled)==null?void 0:R.call(_,void 0,q,e,this.state.context,r))}catch(G){Promise.reject(G)}throw Ee(this,cs,qo).call(this,{type:"error",error:q}),q}finally{L(this,Wn).runNext(this)}}},sf=new WeakMap,us=new WeakMap,Wn=new WeakMap,yl=new WeakMap,cs=new WeakSet,qo=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),lr.batch(()=>{L(this,us).forEach(r=>{r.onMutationUpdate(e)}),L(this,Wn).notify({mutation:this,type:"updated",action:e})})},Ub);function Qj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bs,Ai,of,qb,Cj=(qb=class extends Hp{constructor(e={}){super();Ie(this,Bs);Ie(this,Ai);Ie(this,of);this.config=e,ge(this,Bs,new Set),ge(this,Ai,new Map),ge(this,of,0)}build(e,t,r){const i=new Pj({client:e,mutationCache:this,mutationId:++$d(this,of)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){L(this,Bs).add(e);const t=jd(e);if(typeof t=="string"){const r=L(this,Ai).get(t);r?r.push(e):L(this,Ai).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(L(this,Bs).delete(e)){const t=jd(e);if(typeof t=="string"){const r=L(this,Ai).get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&L(this,Ai).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=jd(e);if(typeof t=="string"){const r=L(this,Ai).get(t),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const t=jd(e);if(typeof t=="string"){const i=(r=L(this,Ai).get(t))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lr.batch(()=>{L(this,Bs).forEach(e=>{this.notify({type:"removed",mutation:e})}),L(this,Bs).clear(),L(this,Ai).clear()})}getAll(){return Array.from(L(this,Bs))}find(e){const t={exact:!0,...e};return this.getAll().find(r=>uw(t,r))}findAll(e={}){return this.getAll().filter(t=>uw(e,t))}notify(e){lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return lr.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ri))))}},Bs=new WeakMap,Ai=new WeakMap,of=new WeakMap,qb);function jd(n){var e;return(e=n.options.scope)==null?void 0:e.id}var hs,Hb,Tj=(Hb=class extends Hp{constructor(e={}){super();Ie(this,hs);this.config=e,ge(this,hs,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??zy(i,t);let o=this.get(s);return o||(o=new kj({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){L(this,hs).has(e.queryHash)||(L(this,hs).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=L(this,hs).get(e.queryHash);t&&(e.destroy(),t===e&&L(this,hs).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){lr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return L(this,hs).get(e)}getAll(){return[...L(this,hs).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>lw(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>lw(e,r)):t}notify(e){lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){lr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){lr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},hs=new WeakMap,Hb),mn,ia,sa,Nu,_u,oa,zu,Lu,Gb,$j=(Gb=class{constructor(n={}){Ie(this,mn);Ie(this,ia);Ie(this,sa);Ie(this,Nu);Ie(this,_u);Ie(this,oa);Ie(this,zu);Ie(this,Lu);ge(this,mn,n.queryCache||new Tj),ge(this,ia,n.mutationCache||new Cj),ge(this,sa,n.defaultOptions||{}),ge(this,Nu,new Map),ge(this,_u,new Map),ge(this,oa,0)}mount(){$d(this,oa)._++,L(this,oa)===1&&(ge(this,zu,vP.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,mn).onFocus())})),ge(this,Lu,vp.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,mn).onOnline())})))}unmount(){var n,e;$d(this,oa)._--,L(this,oa)===0&&((n=L(this,zu))==null||n.call(this),ge(this,zu,void 0),(e=L(this,Lu))==null||e.call(this),ge(this,Lu,void 0))}isFetching(n){return L(this,mn).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return L(this,ia).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=L(this,mn).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=L(this,mn).build(this,e),r=t.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(u0(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(n){return L(this,mn).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=L(this,mn).get(r.queryHash),s=i==null?void 0:i.state.data,o=aj(e,s);if(o!==void 0)return L(this,mn).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return lr.batch(()=>L(this,mn).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=L(this,mn).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=L(this,mn);lr.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=L(this,mn);return lr.batch(()=>(t.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},r=lr.batch(()=>L(this,mn).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Ri).catch(Ri)}invalidateQueries(n,e={}){return lr.batch(()=>(L(this,mn).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},r=lr.batch(()=>L(this,mn).findAll(n).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Ri)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ri)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=L(this,mn).build(this,e);return t.isStaleByTime(u0(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ri).catch(Ri)}fetchInfiniteQuery(n){return n.behavior=pw(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ri).catch(Ri)}ensureInfiniteQueryData(n){return n.behavior=pw(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return vp.isOnline()?L(this,ia).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,mn)}getMutationCache(){return L(this,ia)}getDefaultOptions(){return L(this,sa)}setDefaultOptions(n){ge(this,sa,n)}setQueryDefaults(n,e){L(this,Nu).set(Dh(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...L(this,Nu).values()],t={};return e.forEach(r=>{Ih(n,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(n,e){L(this,_u).set(Dh(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...L(this,_u).values()],t={};return e.forEach(r=>{Ih(n,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...L(this,sa).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=zy(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ly&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...L(this,sa).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){L(this,mn).clear(),L(this,ia).clear()}},mn=new WeakMap,ia=new WeakMap,sa=new WeakMap,Nu=new WeakMap,_u=new WeakMap,oa=new WeakMap,zu=new WeakMap,Lu=new WeakMap,Gb),Ej=F.createContext(void 0),Mj=({client:n,children:e})=>(F.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),v.jsx(Ej.Provider,{value:n,children:e}));/**
|
|
69
|
+
* @license
|
|
70
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
71
|
+
* SPDX-License-Identifier: MIT
|
|
72
|
+
*/function gw(n){if(!n.startsWith("data: "))return null;const e=n.slice(6).trim();return e.length===0?null:JSON.parse(e)}async function*jj(n,e,t){const r={"Content-Type":"application/json",...t==null?void 0:t.headers},i=await fetch(n,{method:"POST",headers:r,body:JSON.stringify(e),signal:t==null?void 0:t.signal});if(!i.ok)throw new Error(`SSE request failed: ${String(i.status)} ${i.statusText}`);yield*TP(i)}async function*Rj(n,e){const t=await fetch(n,{method:"GET",headers:e==null?void 0:e.headers,signal:e==null?void 0:e.signal});if(!t.ok)throw new Error(`SSE request failed: ${String(t.status)} ${t.statusText}`);yield*TP(t)}async function*TP(n){const e=n.body;if(!e)throw new Error("Response body is null");const t=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:s,value:o}=await t.read();if(s)break;i+=r.decode(o,{stream:!0});const l=i.split(`
|
|
73
|
+
`);i=l.pop()??"";for(const c of l){const h=c.trim();if(h.length===0)continue;const f=gw(h);f&&(yield f)}}if(i.trim().length>0){const s=gw(i.trim());s&&(yield s)}}finally{t.releaseLock()}}/**
|
|
74
|
+
* @license
|
|
75
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
76
|
+
* SPDX-License-Identifier: MIT
|
|
77
|
+
*/class Aj{constructor(e){Yc(this,"runtimeUrl");Yc(this,"appId");Yc(this,"getToken");this.runtimeUrl=e.runtimeUrl.replace(/\/$/,""),this.appId=e.appId,this.getToken=e.getToken}async authHeaders(){const e={};if(this.getToken){const t=await this.getToken();t&&(e.Authorization=`Bearer ${t}`)}return e}async*chatStream(e,t){const r=`${this.runtimeUrl}/chat`,i={message:e,app_id:this.appId};t!=null&&t.sessionId&&(i.session_id=t.sessionId),t!=null&&t.context&&(i.context=t.context);const s=await this.authHeaders();yield*jj(r,i,{signal:t==null?void 0:t.signal,headers:s})}async startTask(e,t){const r=`${this.runtimeUrl}/task`,i=await this.authHeaders(),s={prompt:e,app_id:this.appId};t&&(s.app_token=t);const o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...i},body:JSON.stringify(s)});if(!o.ok)throw new Error(`Start task failed: ${String(o.status)} ${o.statusText}`);return await o.json()}async getTaskStatus(e){const t=`${this.runtimeUrl}/task/${e}`,r=await this.authHeaders(),i=await fetch(t,{method:"GET",headers:r});if(!i.ok)throw new Error(`Get task status failed: ${String(i.status)} ${i.statusText}`);return await i.json()}async*streamTask(e,t){const r=`${this.runtimeUrl}/task/${e}/stream`,i=await this.authHeaders();yield*Rj(r,{signal:t,headers:i})}async getStores(e){const t=`${this.runtimeUrl}/api/stores`,r=await this.authHeaders(),i=await fetch(t,{headers:r,signal:e});if(!i.ok)throw new Error(`Failed to fetch stores: ${String(i.status)}`);return(await i.json()).stores}async getStoreDocuments(e,t){const r=new URLSearchParams;t!=null&&t.filter&&r.set("filter",JSON.stringify(t.filter)),t!=null&&t.sort&&r.set("sort",t.sort),(t==null?void 0:t.limit)!==void 0&&r.set("limit",String(t.limit)),(t==null?void 0:t.offset)!==void 0&&r.set("offset",String(t.offset));const i=r.toString(),s=`${this.runtimeUrl}/api/stores/${e}${i?`?${i}`:""}`,o=await this.authHeaders(),l=await fetch(s,{headers:o,signal:t==null?void 0:t.signal});if(!l.ok)throw new Error(`Failed to fetch store documents: ${String(l.status)}`);return await l.json()}async getStoreDocument(e,t,r){const i=`${this.runtimeUrl}/api/stores/${e}/${encodeURIComponent(t)}`,s=await this.authHeaders(),o=await fetch(i,{headers:s,signal:r});if(!o.ok){if(o.status===404)return{document:null,history:[]};throw new Error(`Failed to fetch store document: ${String(o.status)}`)}return await o.json()}}const $P=F.createContext(null);function Nj({runtimeUrl:n,appId:e,getToken:t,children:r}){const i=F.useMemo(()=>new Aj({runtimeUrl:n,appId:e,getToken:t}),[n,e,t]),s=F.useMemo(()=>({client:i,runtimeUrl:n,appId:e}),[i,n,e]);return v.jsx($P.Provider,{value:s,children:r})}function Dy(){const n=F.useContext($P);if(!n)throw new Error("useAmodalContext must be used within an <AmodalProvider>");return n}/**
|
|
78
|
+
* @license
|
|
79
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
80
|
+
* SPDX-License-Identifier: MIT
|
|
81
|
+
*/const EP={messages:[],sessionId:null,isStreaming:!1,error:null,activeToolCalls:[],isHistorical:!1,usage:{inputTokens:0,outputTokens:0}};let Ow=0;function yw(){return Ow++,`msg-${Date.now()}-${String(Ow)}`}function _j(n,e){switch(e.type){case"SEND_MESSAGE":{const t={type:"user",id:yw(),text:e.text,timestamp:new Date().toISOString()},r={type:"assistant_text",id:yw(),text:"",toolCalls:[],confirmations:[],skillActivations:[],kbProposals:[],widgets:[],contentBlocks:[],timestamp:new Date().toISOString()};return{...n,messages:[...n.messages,t,r],isStreaming:!0,error:null,activeToolCalls:[]}}case"STREAM_INIT":return{...n,sessionId:e.sessionId};case"STREAM_TEXT_DELTA":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i=[...r.contentBlocks],s=i[i.length-1];s&&s.type==="text"?i[i.length-1]={type:"text",text:s.text+e.content}:i.push({type:"text",text:e.content}),t[t.length-1]={...r,text:r.text+e.content,contentBlocks:i}}return{...n,messages:t}}case"STREAM_TOOL_CALL_START":{const t=[...n.messages],r=t[t.length-1],i={toolId:e.toolId,toolName:e.toolName,parameters:e.parameters,status:"running"};if(r&&r.type==="assistant_text"){const s=[...r.toolCalls,i],o=[...r.contentBlocks],l=o[o.length-1];l&&l.type==="tool_calls"?o[o.length-1]={type:"tool_calls",calls:[...l.calls,i]}:o.push({type:"tool_calls",calls:[i]}),t[t.length-1]={...r,toolCalls:s,contentBlocks:o}}return{...n,messages:t,activeToolCalls:[...n.activeToolCalls,i]}}case"STREAM_TOOL_CALL_RESULT":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const s=c=>c.toolId===e.toolId?{...c,status:e.status,result:e.result,duration_ms:e.duration_ms,error:e.error}:c,o=r.toolCalls.map(s),l=r.contentBlocks.map(c=>c.type==="tool_calls"?{...c,calls:c.calls.map(s)}:c);t[t.length-1]={...r,toolCalls:o,contentBlocks:l}}const i=n.activeToolCalls.filter(s=>s.toolId!==e.toolId);return{...n,messages:t,activeToolCalls:i}}case"STREAM_SUBAGENT_EVENT":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i=l=>l.toolId===e.parentToolId?{...l,subagentEvents:[...l.subagentEvents??[],e.event]}:l,s=r.toolCalls.map(i),o=r.contentBlocks.map(l=>l.type==="tool_calls"?{...l,calls:l.calls.map(i)}:l);t[t.length-1]={...r,toolCalls:s,contentBlocks:o}}return{...n,messages:t}}case"STREAM_WIDGET":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i={type:"widget",widgetType:e.widgetType,data:e.data};t[t.length-1]={...r,contentBlocks:[...r.contentBlocks,i]}}return{...n,messages:t}}case"STREAM_CONFIRMATION_REQUIRED":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i={type:"confirmation",confirmation:e.confirmation};t[t.length-1]={...r,confirmations:[...r.confirmations,e.confirmation],contentBlocks:[...r.contentBlocks,i]}}return{...n,messages:t}}case"CONFIRMATION_RESPONDED":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i=r.confirmations.map(o=>o.correlationId===e.correlationId?{...o,status:e.approved?"approved":"denied"}:o),s=r.contentBlocks.map(o=>o.type==="confirmation"&&o.confirmation.correlationId===e.correlationId?{...o,confirmation:{...o.confirmation,status:e.approved?"approved":"denied"}}:o);t[t.length-1]={...r,confirmations:i,contentBlocks:s}}return{...n,messages:t}}case"STREAM_ERROR":return{...n,isStreaming:!1,error:e.message,activeToolCalls:[]};case"STREAM_DONE":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const s=c=>c.status==="running"?{...c,status:"error",error:"Stopped"}:c,o=r.toolCalls.map(s),l=r.contentBlocks.map(c=>c.type==="tool_calls"?{...c,calls:c.calls.map(s)}:c);t[t.length-1]={...r,toolCalls:o,contentBlocks:l}}const i=e.usage?{inputTokens:n.usage.inputTokens+e.usage.inputTokens,outputTokens:n.usage.outputTokens+e.usage.outputTokens}:n.usage;return{...n,messages:t,isStreaming:!1,activeToolCalls:[],usage:i}}case"RESET":return{...EP};default:return n}}function zj(n){const{client:e}=Dy(),[t,r]=F.useReducer(_j,EP),i=F.useRef((n==null?void 0:n.initialSessionId)??null),s=F.useRef(null),o=F.useRef(n);o.current=n,i.current=t.sessionId??i.current;const l=F.useCallback(p=>{if(t.isStreaming)return;r({type:"SEND_MESSAGE",text:p});const m=new AbortController;s.current=m,(async()=>{var k,C,Q,M,E,I,U,_,R,q,G;let w=!1;try{const V=e.chatStream(p,{sessionId:i.current??void 0,context:(k=o.current)==null?void 0:k.context,signal:m.signal});for await(const D of V)switch(D.type){case"init":r({type:"STREAM_INIT",sessionId:D.session_id}),(Q=(C=o.current)==null?void 0:C.onSessionCreated)==null||Q.call(C,D.session_id);break;case"text_delta":r({type:"STREAM_TEXT_DELTA",content:D.content});break;case"tool_call_start":r({type:"STREAM_TOOL_CALL_START",toolId:D.tool_id,toolName:D.tool_name,parameters:D.parameters});break;case"tool_call_result":r({type:"STREAM_TOOL_CALL_RESULT",toolId:D.tool_id,status:D.status,result:D.result,duration_ms:D.duration_ms,error:D.error}),(E=(M=o.current)==null?void 0:M.onToolCall)==null||E.call(M,{toolId:D.tool_id,toolName:"",parameters:{},status:D.status,result:D.result,duration_ms:D.duration_ms,error:D.error});break;case"subagent_event":r({type:"STREAM_SUBAGENT_EVENT",parentToolId:D.parent_tool_id,event:{agentName:D.agent_name,eventType:D.event_type,toolName:D.tool_name,toolArgs:D.tool_args,result:D.result,text:D.text,error:D.error,timestamp:D.timestamp}});break;case"widget":r({type:"STREAM_WIDGET",widgetType:D.widget_type,data:D.data});break;case"confirmation_required":{const Z={endpoint:D.endpoint,method:D.method,reason:D.reason,escalated:D.escalated,params:D.params,connectionName:D.connection_name,correlationId:D.correlation_id,status:"pending"};r({type:"STREAM_CONFIRMATION_REQUIRED",confirmation:Z}),(U=(I=o.current)==null?void 0:I.onConfirmation)==null||U.call(I,Z);break}case"error":r({type:"STREAM_ERROR",message:D.message});break;case"done":w=!0,r({type:"STREAM_DONE",usage:D.usage?{inputTokens:D.usage.input_tokens,outputTokens:D.usage.output_tokens}:void 0}),(R=(_=o.current)==null?void 0:_.onStreamEnd)==null||R.call(_);break;default:break}}catch(V){V instanceof DOMException&&V.name==="AbortError"||r({type:"STREAM_ERROR",message:V instanceof Error?V.message:"Unknown error"})}finally{s.current=null,!w&&!m.signal.aborted&&(r({type:"STREAM_DONE"}),(G=(q=o.current)==null?void 0:q.onStreamEnd)==null||G.call(q))}})()},[e,t.isStreaming]),c=F.useCallback(()=>{s.current&&(s.current.abort(),s.current=null),r({type:"STREAM_DONE"})},[]),h=F.useCallback(()=>{s.current&&(s.current.abort(),s.current=null),r({type:"RESET"})},[]),f=F.useCallback((p,m)=>{r({type:"CONFIRMATION_RESPONDED",correlationId:p,approved:m});const g=m?`I approve the action (correlation: ${p})`:`I deny the action (correlation: ${p})`;t.isStreaming||l(g)},[l,t.isStreaming]);return F.useEffect(()=>()=>{s.current&&s.current.abort()},[]),{messages:t.messages,send:l,stop:c,isStreaming:t.isStreaming,activeToolCalls:t.activeToolCalls,sessionId:t.sessionId,error:t.error,usage:t.usage,reset:h,respondToConfirmation:f}}/**
|
|
82
|
+
* @license
|
|
83
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
84
|
+
* SPDX-License-Identifier: MIT
|
|
85
|
+
*/function Lj(n,e){const{key:t,refreshInterval:r=3e4}=e,{client:i}=Dy(),[s,o]=F.useState(null),[l,c]=F.useState([]),[h,f]=F.useState(!0),[p,m]=F.useState(null),g=F.useRef(null),w=F.useCallback(async()=>{g.current&&g.current.abort();const C=new AbortController;g.current=C;try{const Q=await i.getStoreDocument(n,t,C.signal);o(Q.document),c(Q.history),m(null)}catch(Q){Q instanceof DOMException&&Q.name==="AbortError"||m(Q instanceof Error?Q.message:"Failed to fetch document")}finally{f(!1),g.current=null}},[i,n,t]),k=F.useCallback(()=>{w()},[w]);return F.useEffect(()=>(f(!0),w(),()=>{g.current&&g.current.abort()}),[w]),F.useEffect(()=>{if(r<=0)return;const C=setInterval(()=>{w()},r);return()=>clearInterval(C)},[w,r]),{data:(s==null?void 0:s.payload)??null,meta:(s==null?void 0:s.meta)??null,document:s,history:l,isLoading:h,error:p,refetch:k}}/**
|
|
86
|
+
* @license
|
|
87
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
88
|
+
* SPDX-License-Identifier: MIT
|
|
89
|
+
*/function Dj(n,e={}){const{filter:t,sort:r,limit:i=20,refreshInterval:s=3e4}=e,{client:o}=Dy(),[l,c]=F.useState([]),[h,f]=F.useState(0),[p,m]=F.useState(!1),[g,w]=F.useState(!0),[k,C]=F.useState(null),Q=F.useRef(null),M=t?JSON.stringify(t):"",E=F.useCallback(async()=>{Q.current&&Q.current.abort();const U=new AbortController;Q.current=U;try{const _=await o.getStoreDocuments(n,{filter:M?JSON.parse(M):void 0,sort:r,limit:i,signal:U.signal});c(_.documents),f(_.total),m(_.hasMore),C(null)}catch(_){_ instanceof DOMException&&_.name==="AbortError"||C(_ instanceof Error?_.message:"Failed to fetch store list")}finally{w(!1),Q.current=null}},[o,n,M,r,i]),I=F.useCallback(()=>{E()},[E]);return F.useEffect(()=>(w(!0),E(),()=>{Q.current&&Q.current.abort()}),[E]),F.useEffect(()=>{if(s<=0)return;const U=setInterval(()=>{E()},s);return()=>clearInterval(U)},[E,s]),{data:l.map(U=>U.payload),documents:l,total:h,hasMore:p,isLoading:g,error:k,refetch:I}}/**
|
|
90
|
+
* @license
|
|
91
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
92
|
+
* SPDX-License-Identifier: MIT
|
|
93
|
+
*/F.createContext(null);const MP=F.createContext({name:"",model:"",provider:"",stores:[],connections:[],mcpServers:[],skills:[],automations:[],knowledge:[],resumeSessionId:null,isLoading:!0,error:null});function Ij({runtimeUrl:n,children:e}){const[t,r]=F.useState({name:"",model:"",provider:"",stores:[],connections:[],mcpServers:[],skills:[],automations:[],knowledge:[],resumeSessionId:null,isLoading:!0,error:null});return F.useEffect(()=>{let i=!1;async function s(){try{const o=await fetch(`${n}/inspect/context`);let l="",c="",h="",f=[],p=[],m=[],g=[],w=[];if(o.ok){const Q=await o.json();l=Q.name??"",c=Q.model??"",h=Q.provider??"",f=Q.connections??[],p=Q.mcpServers??[],m=Q.skills??[],g=Q.automations??[],w=Q.knowledge??[]}let k=[];try{const Q=await fetch(`${n}/api/stores`);Q.ok&&(k=(await Q.json()).stores)}catch{}let C=null;try{const Q=await fetch(`${n}/config`);Q.ok&&(C=(await Q.json()).resumeSessionId??null)}catch{}i||r({name:l,model:c,provider:h,stores:k,connections:f,mcpServers:p,skills:m,automations:g,knowledge:w,resumeSessionId:C,isLoading:!1,error:null})}catch(o){i||r(l=>({...l,isLoading:!1,error:o instanceof Error?o.message:"Failed to load manifest"}))}}return s(),()=>{i=!0}},[n]),v.jsx(MP.Provider,{value:t,children:e})}function ec(){return F.useContext(MP)}/**
|
|
94
|
+
* @license lucide-react v0.469.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const Zj=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jP=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim();/**
|
|
99
|
+
* @license lucide-react v0.469.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/var Xj={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"};/**
|
|
104
|
+
* @license lucide-react v0.469.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const Vj=F.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...l},c)=>F.createElement("svg",{ref:c,...Xj,width:e,height:e,stroke:n,strokeWidth:r?Number(t)*24/Number(e):t,className:jP("lucide",i),...l},[...o.map(([h,f])=>F.createElement(h,f)),...Array.isArray(s)?s:[s]]));/**
|
|
109
|
+
* @license lucide-react v0.469.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const Ct=(n,e)=>{const t=F.forwardRef(({className:r,...i},s)=>F.createElement(Vj,{ref:s,iconNode:e,className:jP(`lucide-${Zj(n)}`,r),...i}));return t.displayName=`${n}`,t};/**
|
|
114
|
+
* @license lucide-react v0.469.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const eO=Ct("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
119
|
+
* @license lucide-react v0.469.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const Iy=Ct("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
124
|
+
* @license lucide-react v0.469.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const f0=Ct("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
129
|
+
* @license lucide-react v0.469.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const Wj=Ct("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"}]]);/**
|
|
134
|
+
* @license lucide-react v0.469.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const RP=Ct("Cable",[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]]);/**
|
|
139
|
+
* @license lucide-react v0.469.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const Fj=Ct("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
144
|
+
* @license lucide-react v0.469.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const Zy=Ct("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
149
|
+
* @license lucide-react v0.469.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const Zh=Ct("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
154
|
+
* @license lucide-react v0.469.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const Xy=Ct("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
159
|
+
* @license lucide-react v0.469.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const Gp=Ct("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
164
|
+
* @license lucide-react v0.469.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const Vy=Ct("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["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"}]]);/**
|
|
169
|
+
* @license lucide-react v0.469.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const AP=Ct("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"}]]);/**
|
|
174
|
+
* @license lucide-react v0.469.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const Bj=Ct("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"}]]);/**
|
|
179
|
+
* @license lucide-react v0.469.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const Wy=Ct("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"}]]);/**
|
|
184
|
+
* @license lucide-react v0.469.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const fu=Ct("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"}]]);/**
|
|
189
|
+
* @license lucide-react v0.469.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const Yj=Ct("FolderCode",[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["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:"1u1bxd"}]]);/**
|
|
194
|
+
* @license lucide-react v0.469.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const Uj=Ct("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"}]]);/**
|
|
199
|
+
* @license lucide-react v0.469.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const qj=Ct("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"}]]);/**
|
|
204
|
+
* @license lucide-react v0.469.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const NP=Ct("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
209
|
+
* @license lucide-react v0.469.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const wl=Ct("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
214
|
+
* @license lucide-react v0.469.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const d0=Ct("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"}]]);/**
|
|
219
|
+
* @license lucide-react v0.469.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const _P=Ct("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
224
|
+
* @license lucide-react v0.469.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const Hj=Ct("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
229
|
+
* @license lucide-react v0.469.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const Fy=Ct("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
234
|
+
* @license lucide-react v0.469.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const p0=Ct("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
239
|
+
* @license lucide-react v0.469.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const Gj=Ct("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
244
|
+
* @license lucide-react v0.469.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const Kj=Ct("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
249
|
+
* @license lucide-react v0.469.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/const gu=Ct("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
254
|
+
* @license lucide-react v0.469.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const zP=Ct("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"}]]);/**
|
|
259
|
+
* @license lucide-react v0.469.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const m0=Ct("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
264
|
+
* @license lucide-react v0.469.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const Jj=Ct("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
269
|
+
* @license lucide-react v0.469.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const LP=Ct("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"}]]);/**
|
|
274
|
+
* @license lucide-react v0.469.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const eR=Ct("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"}]]);/**
|
|
279
|
+
* @license lucide-react v0.469.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const tR=Ct("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
284
|
+
* @license lucide-react v0.469.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const Zu=Ct("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),nR="modulepreload",rR=function(n){return"/"+n},xw={},iR=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let o=function(h){return Promise.all(h.map(f=>Promise.resolve(f).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(t.map(h=>{if(h=rR(h),h in xw)return;xw[h]=!0;const f=h.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":nR,f||(m.as="script"),m.crossOrigin="",m.href=h,c&&m.setAttribute("nonce",c),document.head.appendChild(m),f)return new Promise((g,w)=>{m.addEventListener("load",g),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};function DP(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=DP(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function sR(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=DP(n))&&(r&&(r+=" "),r+=e);return r}const By="-",oR=n=>{const e=lR(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const l=o.split(By);return l[0]===""&&l.length!==1&&l.shift(),IP(l,e)||aR(o)},getConflictingClassGroupIds:(o,l)=>{const c=t[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},IP=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?IP(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(By);return(o=e.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},vw=/^\[(.+)\]$/,aR=n=>{if(vw.test(n)){const e=vw.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},lR=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return cR(Object.entries(n.classGroups),t).forEach(([s,o])=>{g0(o,r,s,e)}),r},g0=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:ww(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(uR(i)){g0(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{g0(o,ww(e,s),t,r)})})},ww=(n,e)=>{let t=n;return e.split(By).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},uR=n=>n.isThemeGetter,cR=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,l])=>[e+o,l])):s);return[t,i]}):n,hR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},ZP="!",fR=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=l=>{const c=[];let h=0,f=0,p;for(let C=0;C<l.length;C++){let Q=l[C];if(h===0){if(Q===i&&(r||l.slice(C,C+s)===e)){c.push(l.slice(f,C)),f=C+s;continue}if(Q==="/"){p=C;continue}}Q==="["?h++:Q==="]"&&h--}const m=c.length===0?l:l.substring(f),g=m.startsWith(ZP),w=g?m.substring(1):m,k=p&&p>f?p-f:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:k}};return t?l=>t({className:l,parseClassName:o}):o},dR=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},pR=n=>({cache:hR(n.cacheSize),parseClassName:fR(n),...oR(n)}),mR=/\s+/,gR=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(mR);let l="";for(let c=o.length-1;c>=0;c-=1){const h=o[c],{modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=t(h);let w=!!g,k=r(w?m.substring(0,g):m);if(!k){if(!w){l=h+(l.length>0?" "+l:l);continue}if(k=r(m),!k){l=h+(l.length>0?" "+l:l);continue}w=!1}const C=dR(f).join(":"),Q=p?C+ZP:C,M=Q+k;if(s.includes(M))continue;s.push(M);const E=i(k,w);for(let I=0;I<E.length;++I){const U=E[I];s.push(Q+U)}l=h+(l.length>0?" "+l:l)}return l};function OR(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=XP(e))&&(r&&(r+=" "),r+=t);return r}const XP=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=XP(n[r]))&&(t&&(t+=" "),t+=e);return t};function yR(n,...e){let t,r,i,s=o;function o(c){const h=e.reduce((f,p)=>p(f),n());return t=pR(h),r=t.cache.get,i=t.cache.set,s=l,l(c)}function l(c){const h=r(c);if(h)return h;const f=gR(c,t);return i(c,f),f}return function(){return s(OR.apply(null,arguments))}}const en=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},VP=/^\[(?:([a-z-]+):)?(.+)\]$/i,xR=/^\d+\/\d+$/,vR=new Set(["px","full","screen"]),wR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xs=n=>wu(n)||vR.has(n)||xR.test(n),Vo=n=>tc(n,"length",RR),wu=n=>!!n&&!Number.isNaN(Number(n)),tO=n=>tc(n,"number",wu),Kc=n=>!!n&&Number.isInteger(Number(n)),QR=n=>n.endsWith("%")&&wu(n.slice(0,-1)),ft=n=>VP.test(n),Wo=n=>wR.test(n),CR=new Set(["length","size","percentage"]),TR=n=>tc(n,CR,WP),$R=n=>tc(n,"position",WP),ER=new Set(["image","url"]),MR=n=>tc(n,ER,NR),jR=n=>tc(n,"",AR),Jc=()=>!0,tc=(n,e,t)=>{const r=VP.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},RR=n=>kR.test(n)&&!SR.test(n),WP=()=>!1,AR=n=>bR.test(n),NR=n=>PR.test(n),_R=()=>{const n=en("colors"),e=en("spacing"),t=en("blur"),r=en("brightness"),i=en("borderColor"),s=en("borderRadius"),o=en("borderSpacing"),l=en("borderWidth"),c=en("contrast"),h=en("grayscale"),f=en("hueRotate"),p=en("invert"),m=en("gap"),g=en("gradientColorStops"),w=en("gradientColorStopPositions"),k=en("inset"),C=en("margin"),Q=en("opacity"),M=en("padding"),E=en("saturate"),I=en("scale"),U=en("sepia"),_=en("skew"),R=en("space"),q=en("translate"),G=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",ft,e],Z=()=>[ft,e],ae=()=>["",Xs,Vo],se=()=>["auto",wu,ft],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Oe=()=>["solid","dashed","dotted","double","none"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>["start","end","center","between","around","evenly","stretch"],ye=()=>["","0",ft],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[wu,ft];return{cacheSize:500,separator:":",theme:{colors:[Jc],spacing:[Xs,Vo],blur:["none","",Wo,ft],brightness:Y(),borderColor:[n],borderRadius:["none","","full",Wo,ft],borderSpacing:Z(),borderWidth:ae(),contrast:Y(),grayscale:ye(),hueRotate:Y(),invert:ye(),gap:Z(),gradientColorStops:[n],gradientColorStopPositions:[QR,Vo],inset:D(),margin:D(),opacity:Y(),padding:Z(),saturate:Y(),scale:Y(),sepia:ye(),skew:Y(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",ft]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),ft]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kc,ft]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ft]}],grow:[{grow:ye()}],shrink:[{shrink:ye()}],order:[{order:["first","last","none",Kc,ft]}],"grid-cols":[{"grid-cols":[Jc]}],"col-start-end":[{col:["auto",{span:["full",Kc,ft]},ft]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Jc]}],"row-start-end":[{row:["auto",{span:[Kc,ft]},ft]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ft]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ft]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...he()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...he(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...he(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ft,e]}],"min-w":[{"min-w":[ft,e,"min","max","fit"]}],"max-w":[{"max-w":[ft,e,"none","full","min","max","fit","prose",{screen:[Wo]},Wo]}],h:[{h:[ft,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ft,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ft,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ft,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Wo,Vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tO]}],"font-family":[{font:[Jc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ft]}],"line-clamp":[{"line-clamp":["none",wu,tO]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xs,ft]}],"list-image":[{"list-image":["none",ft]}],"list-style-type":[{list:["none","disc","decimal",ft]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[Q]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xs,Vo]}],"underline-offset":[{"underline-offset":["auto",Xs,ft]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ft]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Q]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),$R]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",TR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MR]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[Q]}],"border-style":[{border:[...Oe(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Q]}],"divide-style":[{divide:Oe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Oe()]}],"outline-offset":[{"outline-offset":[Xs,ft]}],"outline-w":[{outline:[Xs,Vo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[Q]}],"ring-offset-w":[{"ring-offset":[Xs,Vo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Wo,jR]}],"shadow-color":[{shadow:[Jc]}],opacity:[{opacity:[Q]}],"mix-blend":[{"mix-blend":[...be(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":be()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,ft]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[E]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[Q]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ft]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",ft]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",ft]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Kc,ft]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ft]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ft]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ft]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Xs,Vo,tO]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zR=yR(_R);/**
|
|
289
|
+
* @license
|
|
290
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
291
|
+
* SPDX-License-Identifier: MIT
|
|
292
|
+
*/function Sr(...n){return zR(sR(n))}function nO({to:n,children:e,end:t}){return v.jsx(Iu,{to:n,end:t,className:({isActive:r})=>Sr("flex items-center gap-2.5 px-3 py-[7px] rounded-md text-[13px] transition-colors duration-150",r?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 font-medium":"text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04]"),children:e})}function eh({children:n,action:e}){return v.jsxs("div",{className:"px-3 pt-5 pb-1.5 flex items-center justify-between",children:[v.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:n}),e]})}function rO({label:n,icon:e,children:t,count:r}){const[i,s]=F.useState(!1);return v.jsxs("div",{children:[v.jsxs("button",{onClick:()=>s(!i),className:"flex items-center gap-2 w-full px-3 py-[7px] rounded-md text-[13px] text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[v.jsx(Zy,{className:Sr("h-3 w-3 shrink-0 transition-transform",i&&"rotate-90")}),e,v.jsx("span",{className:"flex-1 text-left",children:n}),v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25",children:String(r)})]}),i&&v.jsx("div",{className:"ml-3 space-y-0.5",children:t})]})}function Rd({icon:n,label:e,to:t,status:r}){return v.jsxs(Iu,{to:t,className:({isActive:i})=>Sr("flex items-center gap-2.5 px-3 py-[6px] text-[13px] rounded-md transition-colors duration-150",i?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[n,v.jsx("span",{className:"flex-1 truncate",children:e}),r&&v.jsx("div",{className:Sr("h-1.5 w-1.5 rounded-full shrink-0",r==="connected"?"bg-emerald-400":r==="connecting"?"bg-amber-400 animate-pulse":r==="error"||r==="disconnected"?"bg-red-400":"bg-gray-400"),title:r})]})}function LR(){const{stores:n,connections:e,mcpServers:t,skills:r,automations:i,knowledge:s}=ec(),o=e.length+t.length,[l,c]=F.useState([]),[h,f]=F.useState([]),[p,m]=F.useState(new Set),[g,w]=F.useState(new Set),k=Ku(),C=Cl();return F.useEffect(()=>{fetch("/api/pages").then(Q=>Q.ok?Q.json():null).then(Q=>{if(Q&&typeof Q=="object"&&"pages"in Q&&Array.isArray(Q.pages)){const M=Q.pages;c(M.map(E=>({name:E.name,filePath:""})))}}).catch(()=>{iR(()=>import("./_virtual_amodal-manifest-DIezHQq3.js"),[]).then(Q=>{c(Q.pages.filter(M=>!M.hidden))}).catch(()=>{})})},[]),F.useEffect(()=>{const Q=()=>{fetch("/automations").then(E=>E.ok?E.json():{automations:[]}).then(E=>{if(E&&typeof E=="object"&&"automations"in E){const I=E.automations,U=new Set(I.filter(_=>_.lastRun&&Date.now()-new Date(_.lastRun).getTime()<5e3).map(_=>_.name));m(U),w(new Set(I.filter(_=>_.running).map(_=>_.name)))}}).catch(()=>{})};Q();const M=setInterval(Q,3e3);return()=>clearInterval(M)},[]),F.useEffect(()=>{fetch("/sessions").then(Q=>Q.ok?Q.json():{sessions:[]}).then(Q=>{if(Q&&typeof Q=="object"&&"sessions"in Q&&Array.isArray(Q.sessions)){const M=Q.sessions;f(M.filter(E=>!E.automationName).slice(0,10))}}).catch(()=>{})},[C.pathname]),v.jsx("aside",{className:"w-[260px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex flex-col shrink-0 overflow-hidden",children:v.jsxs("nav",{className:"flex-1 overflow-y-auto scrollbar-thin px-2 py-2",children:[v.jsxs("button",{onClick:()=>{k("/")},className:"flex items-center gap-2.5 w-full px-3 py-2 mb-1 rounded-md text-[13px] text-gray-500 dark:text-white/60 hover:text-gray-800 dark:hover:text-white/90 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[v.jsx(Jj,{className:"h-4 w-4 shrink-0"}),"New chat"]}),h.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(eh,{action:v.jsx(Iu,{to:"/sessions",className:"text-[10px] text-gray-400 dark:text-white/20 hover:text-gray-600 dark:hover:text-white/40 transition-colors",children:"View all"}),children:"Recent"}),v.jsx("div",{className:"space-y-0.5",children:h.map(Q=>{const M=C.search.includes(Q.id);return v.jsxs("button",{onClick:()=>{k(`/?resume=${Q.id}`)},className:Sr("flex items-center gap-2 w-full px-3 py-[6px] rounded-md text-[12px] text-left transition-colors duration-150 truncate",M?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[v.jsx(d0,{className:"h-3 w-3 shrink-0 opacity-40"}),v.jsx("span",{className:"truncate",children:Q.summary})]},Q.id)})})]}),l.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(eh,{children:"Pages"}),v.jsx("div",{className:"space-y-0.5",children:l.map(Q=>v.jsxs(nO,{to:`/pages/${Q.name}`,children:[v.jsx(Wy,{className:"h-4 w-4 shrink-0"}),v.jsx("span",{className:"truncate",children:DR(Q.name)})]},Q.name))})]}),i.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(eh,{children:"Automations"}),[...i].sort().map(Q=>{const M=g.has(Q),E=p.has(Q);return v.jsxs(nO,{to:`/automations/${encodeURIComponent(Q)}`,children:[E?v.jsx(wl,{className:"h-3.5 w-3.5 shrink-0 text-purple-400 animate-spin"}):v.jsx(Zu,{className:Sr("h-3.5 w-3.5 shrink-0",M?"text-purple-500":"text-purple-500/30")}),v.jsx("span",{className:Sr("truncate",!M&&!E&&"opacity-40"),children:Q.replace(/[-_]/g," ").replace(/\b\w/g,I=>I.toUpperCase())}),M&&v.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 shrink-0 ml-auto"})]},Q)})]}),(o>0||r.length>0||s.length>0)&&v.jsx(eh,{children:"Agent"}),o>0&&v.jsxs(rO,{label:"Connections",icon:v.jsx(p0,{className:"h-3.5 w-3.5 shrink-0 text-emerald-500/60"}),count:o,children:[e.map(Q=>v.jsx(Rd,{icon:v.jsx(p0,{className:"h-3 w-3 shrink-0 text-emerald-500/40"}),label:Q.name,to:`/inspect/connections/${encodeURIComponent(Q.name)}`,status:Q.status},Q.name)),t.map(Q=>v.jsx(Rd,{icon:v.jsx(RP,{className:"h-3 w-3 shrink-0 text-violet-500/40"}),label:Q.name,to:`/inspect/mcp/${encodeURIComponent(Q.name)}`,status:Q.status},`mcp-${Q.name}`))]}),r.length>0&&v.jsx(rO,{label:"Skills",icon:v.jsx(m0,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/60"}),count:r.length,children:r.map(Q=>v.jsx(Rd,{icon:v.jsx(m0,{className:"h-3 w-3 shrink-0 text-amber-500/40"}),label:Q,to:`/inspect/skills/${encodeURIComponent(Q)}`},Q))}),s.length>0&&v.jsx(rO,{label:"Knowledge",icon:v.jsx(f0,{className:"h-3.5 w-3.5 shrink-0 text-blue-500/60"}),count:s.length,children:s.map(Q=>v.jsx(Rd,{icon:v.jsx(f0,{className:"h-3 w-3 shrink-0 text-blue-500/40"}),label:Q,to:`/inspect/knowledge/${encodeURIComponent(Q)}`},Q))}),n.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(eh,{children:"Entities"}),v.jsx("div",{className:"space-y-0.5",children:n.map(Q=>v.jsxs(nO,{to:`/entities/${Q.name}`,children:[v.jsx(AP,{className:"h-4 w-4 shrink-0"}),v.jsx("span",{className:"flex-1 truncate",children:Q.entity.name}),Q.documentCount>0&&v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/30 tabular-nums bg-gray-200 dark:bg-white/[0.06] px-1.5 py-0.5 rounded-full",children:Q.documentCount.toLocaleString()})]},Q.name))})]})]})})}function DR(n){return n.replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function IR(){const[n,e]=F.useState("checking"),t=F.useRef();return F.useEffect(()=>{const r=()=>{fetch("/inspect/health",{signal:AbortSignal.timeout(3e3)}).then(i=>{e(i.ok?"connected":"disconnected")}).catch(()=>{e("disconnected")})};return r(),t.current=setInterval(r,1e4),()=>clearInterval(t.current)},[]),n}function ZR(){const[n,e]=F.useState(()=>document.documentElement.classList.contains("dark")),t=F.useCallback(()=>{const r=!n;e(r),document.documentElement.classList.toggle("dark",r);try{localStorage.setItem("amodal-theme",r?"dark":"light")}catch{}},[n]);return F.useEffect(()=>{try{localStorage.getItem("amodal-theme")==="light"&&(e(!1),document.documentElement.classList.remove("dark"))}catch{}},[]),{dark:n,toggle:t}}function XR(){const{name:n,model:e}=ec(),{dark:t,toggle:r}=ZR(),i=IR();return v.jsxs("div",{className:"flex flex-col h-screen overflow-hidden bg-white dark:bg-[#0a0a0f]",children:[v.jsxs("header",{className:"h-14 bg-gray-50 dark:bg-[#0f0f17] border-b border-gray-200 dark:border-white/[0.06] text-gray-900 dark:text-white flex items-center justify-between px-5 shrink-0 z-20",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:[v.jsx("defs",{children:v.jsx("clipPath",{id:"logo-sq",children:v.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),v.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),v.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),v.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#logo-sq)"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"font-semibold tracking-tight text-[15px] text-gray-900 dark:text-white/90",children:"amodal"}),n&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-gray-300 dark:text-white/20",children:"/"}),v.jsx("span",{className:"text-[13px] text-gray-500 dark:text-white/50 font-medium",children:n})]})]})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(cf,{to:"/config",className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:"Configuration",children:v.jsx(zP,{className:"h-4 w-4"})}),v.jsx("button",{onClick:r,className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:t?"Switch to light mode":"Switch to dark mode",children:t?v.jsx(LP,{className:"h-4 w-4"}):v.jsx(_P,{className:"h-4 w-4"})}),e&&v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25 font-mono",children:e.replace(/-\d{8}$/,"")}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:`h-2 w-2 rounded-full ${i==="connected"?"bg-emerald-400 animate-pulse":i==="checking"?"bg-amber-400 animate-pulse":"bg-red-400"}`}),v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/40 font-medium tracking-wide uppercase",children:i==="connected"?"Connected":i==="checking"?"Connecting":"Disconnected"})]})]})]}),v.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[v.jsx(LR,{}),v.jsx("main",{className:"flex-1 overflow-auto bg-white dark:bg-[#0a0a0f] scrollbar-thin",children:v.jsx(OP,{})})]})]})}function VR(n,e){const t={};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const WR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BR={};function kw(n,e){return(BR.jsx?FR:WR).test(n)}const YR=/[ \t\n\f\r]/g;function UR(n){return typeof n=="object"?n.type==="text"?Sw(n.value):!1:Sw(n)}function Sw(n){return n.replace(YR,"")===""}let hf=class{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}};hf.prototype.normal={};hf.prototype.property={};hf.prototype.space=void 0;function FP(n,e){const t={},r={};for(const i of n)Object.assign(t,i.property),Object.assign(r,i.normal);return new hf(t,r,e)}function O0(n){return n.toLowerCase()}class Cr{constructor(e,t){this.attribute=t,this.property=e}}Cr.prototype.attribute="";Cr.prototype.booleanish=!1;Cr.prototype.boolean=!1;Cr.prototype.commaOrSpaceSeparated=!1;Cr.prototype.commaSeparated=!1;Cr.prototype.defined=!1;Cr.prototype.mustUseProperty=!1;Cr.prototype.number=!1;Cr.prototype.overloadedBoolean=!1;Cr.prototype.property="";Cr.prototype.spaceSeparated=!1;Cr.prototype.space=void 0;let qR=0;const dt=Tl(),kn=Tl(),y0=Tl(),Se=Tl(),qt=Tl(),ku=Tl(),Dr=Tl();function Tl(){return 2**++qR}const x0=Object.freeze(Object.defineProperty({__proto__:null,boolean:dt,booleanish:kn,commaOrSpaceSeparated:Dr,commaSeparated:ku,number:Se,overloadedBoolean:y0,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),iO=Object.keys(x0);class Yy extends Cr{constructor(e,t,r,i){let s=-1;if(super(e,t),bw(this,"space",i),typeof r=="number")for(;++s<iO.length;){const o=iO[s];bw(this,iO[s],(r&x0[o])===x0[o])}}}Yy.prototype.defined=!0;function bw(n,e,t){t&&(n[e]=t)}function nc(n){const e={},t={};for(const[r,i]of Object.entries(n.properties)){const s=new Yy(r,n.transform(n.attributes||{},r),i,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,t[O0(r)]=r,t[O0(s.attribute)]=r}return new hf(e,t,n.space)}const BP=nc({properties:{ariaActiveDescendant:null,ariaAtomic:kn,ariaAutoComplete:null,ariaBusy:kn,ariaChecked:kn,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:kn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:kn,ariaFlowTo:qt,ariaGrabbed:kn,ariaHasPopup:null,ariaHidden:kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:Se,ariaLive:null,ariaModal:kn,ariaMultiLine:kn,ariaMultiSelectable:kn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:kn,ariaReadOnly:kn,ariaRelevant:null,ariaRequired:kn,ariaRoleDescription:qt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:kn,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function YP(n,e){return e in n?n[e]:e}function UP(n,e){return YP(n,e.toLowerCase())}const HR=nc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ku,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:dt,allowPaymentRequest:dt,allowUserMedia:dt,alt:null,as:null,async:dt,autoCapitalize:null,autoComplete:qt,autoFocus:dt,autoPlay:dt,blocking:qt,capture:null,charSet:null,checked:dt,cite:null,className:qt,cols:Se,colSpan:null,content:null,contentEditable:kn,controls:dt,controlsList:qt,coords:Se|ku,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dt,defer:dt,dir:null,dirName:null,disabled:dt,download:y0,draggable:kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dt,formTarget:null,headers:qt,height:Se,hidden:y0,high:Se,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:dt,inputMode:null,integrity:null,is:null,isMap:dt,itemId:null,itemProp:qt,itemRef:qt,itemScope:dt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dt,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:dt,muted:dt,name:null,nonce:null,noModule:dt,noValidate:dt,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:dt,optimum:Se,pattern:null,ping:qt,placeholder:null,playsInline:dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dt,referrerPolicy:null,rel:qt,required:dt,reversed:dt,rows:Se,rowSpan:Se,sandbox:qt,scope:null,scoped:dt,seamless:dt,selected:dt,shadowRootClonable:dt,shadowRootDelegatesFocus:dt,shadowRootMode:null,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:dt,useMap:null,value:kn,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:dt,declare:dt,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:dt,noHref:dt,noShade:dt,noWrap:dt,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:kn,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:dt,disableRemotePlayback:dt,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:UP}),GR=nc({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:Dr,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:qt,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,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:ku,g2:ku,glyphName:ku,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:Dr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dr,rev:Dr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dr,requiredFeatures:Dr,requiredFonts:Dr,requiredFormats:Dr,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:Dr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dr,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:YP}),qP=nc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),HP=nc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:UP}),GP=nc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),KR={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"},JR=/[A-Z]/g,Pw=/-[a-z]/g,e5=/^data[-\w.:]+$/i;function t5(n,e){const t=O0(e);let r=e,i=Cr;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&e5.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Pw,r5);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Pw.test(s)){let o=s.replace(JR,n5);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Yy}return new i(r,e)}function n5(n){return"-"+n.toLowerCase()}function r5(n){return n.charAt(1).toUpperCase()}const i5=FP([BP,HR,qP,HP,GP],"html"),Uy=FP([BP,GR,qP,HP,GP],"svg");function s5(n){return n.join(" ").trim()}var du={},sO,Qw;function o5(){if(Qw)return sO;Qw=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
|
|
293
|
+
`,h="/",f="*",p="",m="comment",g="declaration";function w(C,Q){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];Q=Q||{};var M=1,E=1;function I(se){var re=se.match(e);re&&(M+=re.length);var Oe=se.lastIndexOf(c);E=~Oe?se.length-Oe:E+se.length}function U(){var se={line:M,column:E};return function(re){return re.position=new _(se),G(),re}}function _(se){this.start=se,this.end={line:M,column:E},this.source=Q.source}_.prototype.content=C;function R(se){var re=new Error(Q.source+":"+M+":"+E+": "+se);if(re.reason=se,re.filename=Q.source,re.line=M,re.column=E,re.source=C,!Q.silent)throw re}function q(se){var re=se.exec(C);if(re){var Oe=re[0];return I(Oe),C=C.slice(Oe.length),re}}function G(){q(t)}function V(se){var re;for(se=se||[];re=D();)re!==!1&&se.push(re);return se}function D(){var se=U();if(!(h!=C.charAt(0)||f!=C.charAt(1))){for(var re=2;p!=C.charAt(re)&&(f!=C.charAt(re)||h!=C.charAt(re+1));)++re;if(re+=2,p===C.charAt(re-1))return R("End of comment missing");var Oe=C.slice(2,re-2);return E+=2,I(Oe),C=C.slice(re),E+=2,se({type:m,comment:Oe})}}function Z(){var se=U(),re=q(r);if(re){if(D(),!q(i))return R("property missing ':'");var Oe=q(s),be=se({type:g,property:k(re[0].replace(n,p)),value:Oe?k(Oe[0].replace(n,p)):p});return q(o),be}}function ae(){var se=[];V(se);for(var re;re=Z();)re!==!1&&(se.push(re),V(se));return se}return G(),ae()}function k(C){return C?C.replace(l,p):p}return sO=w,sO}var Cw;function a5(){if(Cw)return du;Cw=1;var n=du&&du.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(du,"__esModule",{value:!0}),du.default=t;const e=n(o5());function t(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,e.default)(r),l=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:f}=c;l?i(h,f,c):f&&(s=s||{},s[h]=f)}),s}return du}var th={},Tw;function l5(){if(Tw)return th;Tw=1,Object.defineProperty(th,"__esModule",{value:!0}),th.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(h){return!h||t.test(h)||n.test(h)},o=function(h,f){return f.toUpperCase()},l=function(h,f){return"".concat(f,"-")},c=function(h,f){return f===void 0&&(f={}),s(h)?h:(h=h.toLowerCase(),f.reactCompat?h=h.replace(i,l):h=h.replace(r,l),h.replace(e,o))};return th.camelCase=c,th}var nh,$w;function u5(){if($w)return nh;$w=1;var n=nh&&nh.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=n(a5()),t=l5();function r(i,s){var o={};return!i||typeof i!="string"||(0,e.default)(i,function(l,c){l&&c&&(o[(0,t.camelCase)(l,s)]=c)}),o}return r.default=r,nh=r,nh}var c5=u5();const h5=af(c5),KP=JP("end"),qy=JP("start");function JP(n){return e;function e(t){const r=t&&t.position&&t.position[n]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function f5(n){const e=qy(n),t=KP(n);if(e&&t)return{start:e,end:t}}function Qh(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Ew(n.position):"start"in n||"end"in n?Ew(n):"line"in n||"column"in n?v0(n):""}function v0(n){return Mw(n&&n.line)+":"+Mw(n&&n.column)}function Ew(n){return v0(n&&n.start)+"-"+v0(n&&n.end)}function Mw(n){return n&&typeof n=="number"?n:1}class qn extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",s={},o=!1;if(t&&("line"in t&&"column"in t?s={place:t}:"start"in t&&"end"in t?s={place:t}:"type"in t?s={ancestors:[t],place:t.position}:s={...t}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Qh(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=o&&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}}qn.prototype.file="";qn.prototype.name="";qn.prototype.reason="";qn.prototype.message="";qn.prototype.stack="";qn.prototype.column=void 0;qn.prototype.line=void 0;qn.prototype.ancestors=void 0;qn.prototype.cause=void 0;qn.prototype.fatal=void 0;qn.prototype.place=void 0;qn.prototype.ruleId=void 0;qn.prototype.source=void 0;const Hy={}.hasOwnProperty,d5=new Map,p5=/[A-Z]/g,m5=new Set(["table","tbody","thead","tfoot","tr"]),g5=new Set(["td","th"]),e2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function O5(n,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=P5(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=b5(t,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Uy:i5,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=t2(i,n,void 0);return s&&typeof s!="string"?s:i.create(n,i.Fragment,{children:s||void 0},void 0)}function t2(n,e,t){if(e.type==="element")return y5(n,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return x5(n,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return w5(n,e,t);if(e.type==="mdxjsEsm")return v5(n,e);if(e.type==="root")return k5(n,e,t);if(e.type==="text")return S5(n,e)}function y5(n,e,t){const r=n.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Uy,n.schema=i),n.ancestors.push(e);const s=r2(n,e.tagName,!1),o=Q5(n,e);let l=Ky(n,e);return m5.has(e.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!UR(c):!0})),n2(n,o,s,e),Gy(o,l),n.ancestors.pop(),n.schema=r,n.create(e,s,o,t)}function x5(n,e){if(e.data&&e.data.estree&&n.evaluater){const r=e.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}Xh(n,e.position)}function v5(n,e){if(e.data&&e.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(e.data.estree);Xh(n,e.position)}function w5(n,e,t){const r=n.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=Uy,n.schema=i),n.ancestors.push(e);const s=e.name===null?n.Fragment:r2(n,e.name,!0),o=C5(n,e),l=Ky(n,e);return n2(n,o,s,e),Gy(o,l),n.ancestors.pop(),n.schema=r,n.create(e,s,o,t)}function k5(n,e,t){const r={};return Gy(r,Ky(n,e)),n.create(e,n.Fragment,r,t)}function S5(n,e){return e.value}function n2(n,e,t,r){typeof t!="string"&&t!==n.Fragment&&n.passNode&&(e.node=r)}function Gy(n,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(n.children=t)}}function b5(n,e,t){return r;function r(i,s,o,l){const h=Array.isArray(o.children)?t:e;return l?h(s,o,l):h(s,o)}}function P5(n,e){return t;function t(r,i,s,o){const l=Array.isArray(s.children),c=qy(r);return e(i,s,o,l,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function Q5(n,e){const t={};let r,i;for(i in e.properties)if(i!=="children"&&Hy.call(e.properties,i)){const s=T5(n,i,e.properties[i]);if(s){const[o,l]=s;n.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&g5.has(e.tagName)?r=l:t[o]=l}}if(r){const s=t.style||(t.style={});s[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function C5(n,e){const t={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,n.evaluater.evaluateExpression(l.argument))}else Xh(n,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const l=r.value.data.estree.body[0];l.type,s=n.evaluater.evaluateExpression(l.expression)}else Xh(n,e.position);else s=r.value===null?!0:r.value;t[i]=s}return t}function Ky(n,e){const t=[];let r=-1;const i=n.passKeys?new Map:d5;for(;++r<e.children.length;){const s=e.children[r];let o;if(n.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const h=i.get(c)||0;o=c+"-"+h,i.set(c,h+1)}}const l=t2(n,s,o);l!==void 0&&t.push(l)}return t}function T5(n,e,t){const r=t5(n.schema,e);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?VR(t):s5(t)),r.property==="style"){let i=typeof t=="object"?t:$5(n,String(t));return n.stylePropertyNameCase==="css"&&(i=E5(i)),["style",i]}return[n.elementAttributeNameCase==="react"&&r.space?KR[r.property]||r.property:r.attribute,t]}}function $5(n,e){try{return h5(e,{reactCompat:!0})}catch(t){if(n.ignoreInvalidStyle)return{};const r=t,i=new qn("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=e2+"#cannot-parse-style-attribute",i}}function r2(n,e,t){let r;if(!t)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const l=kw(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=o}else r=kw(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return Hy.call(n.components,i)?n.components[i]:i}if(n.evaluater)return n.evaluater.evaluateExpression(r);Xh(n)}function Xh(n,e){const t=new qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=n.filePath||void 0,t.url=e2+"#cannot-handle-mdx-estrees-without-createevaluater",t}function E5(n){const e={};let t;for(t in n)Hy.call(n,t)&&(e[M5(t)]=n[t]);return e}function M5(n){let e=n.replace(p5,j5);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function j5(n){return"-"+n.toLowerCase()}const oO={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"]},R5={};function A5(n,e){const t=R5,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return i2(n,r,i)}function i2(n,e,t){if(N5(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return jw(n.children,e,t)}return Array.isArray(n)?jw(n,e,t):""}function jw(n,e,t){const r=[];let i=-1;for(;++i<n.length;)r[i]=i2(n[i],e,t);return r.join("")}function N5(n){return!!(n&&typeof n=="object")}const Rw=document.createElement("i");function Jy(n){const e="&"+n+";";Rw.innerHTML=e;const t=Rw.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}function vs(n,e,t,r){const i=n.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(e,t),n.splice(...o);else for(t&&n.splice(e,t);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),n.splice(...o),s+=1e4,e+=1e4}function ci(n,e){return n.length>0?(vs(n,n.length,0,e),n):e}const Aw={}.hasOwnProperty;function _5(n){const e={};let t=-1;for(;++t<n.length;)z5(e,n[t]);return e}function z5(n,e){let t;for(t in e){const i=(Aw.call(n,t)?n[t]:void 0)||(n[t]={}),s=e[t];let o;if(s)for(o in s){Aw.call(i,o)||(i[o]=[]);const l=s[o];L5(i[o],Array.isArray(l)?l:l?[l]:[])}}}function L5(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);vs(n,0,0,r)}function s2(n,e){const t=Number.parseInt(n,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Su(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fs=Oa(/[A-Za-z]/),Fr=Oa(/[\dA-Za-z]/),D5=Oa(/[#-'*+\--9=?A-Z^-~]/);function w0(n){return n!==null&&(n<32||n===127)}const k0=Oa(/\d/),I5=Oa(/[\dA-Fa-f]/),Z5=Oa(/[!-/:-@[-`{-~]/);function ut(n){return n!==null&&n<-2}function br(n){return n!==null&&(n<0||n===32)}function Lt(n){return n===-2||n===-1||n===32}const X5=Oa(new RegExp("\\p{P}|\\p{S}","u")),V5=Oa(/\s/);function Oa(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function rc(n){const e=[];let t=-1,r=0,i=0;for(;++t<n.length;){const s=n.charCodeAt(t);let o="";if(s===37&&Fr(n.charCodeAt(t+1))&&Fr(n.charCodeAt(t+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const l=n.charCodeAt(t+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),i=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(n.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return e.join("")+n.slice(r)}function Gt(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(c){return Lt(c)?(n.enter(t),l(c)):e(c)}function l(c){return Lt(c)&&s++<i?(n.consume(c),l):(n.exit(t),e(c))}}const W5={tokenize:F5};function F5(n){const e=n.attempt(this.parser.constructs.contentInitial,r,i);let t;return e;function r(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),Gt(n,e,"linePrefix")}function i(l){return n.enter("paragraph"),s(l)}function s(l){const c=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(l)}function o(l){if(l===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(l);return}return ut(l)?(n.consume(l),n.exit("chunkText"),s):(n.consume(l),o)}}const B5={tokenize:Y5},Nw={tokenize:U5};function Y5(n){const e=this,t=[];let r=0,i,s,o;return l;function l(E){if(r<t.length){const I=t[r];return e.containerState=I[1],n.attempt(I[0].continuation,c,h)(E)}return h(E)}function c(E){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&M();const I=e.events.length;let U=I,_;for(;U--;)if(e.events[U][0]==="exit"&&e.events[U][1].type==="chunkFlow"){_=e.events[U][1].end;break}Q(r);let R=I;for(;R<e.events.length;)e.events[R][1].end={..._},R++;return vs(e.events,U+1,0,e.events.slice(I)),e.events.length=R,h(E)}return l(E)}function h(E){if(r===t.length){if(!i)return m(E);if(i.currentConstruct&&i.currentConstruct.concrete)return w(E);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(Nw,f,p)(E)}function f(E){return i&&M(),Q(r),m(E)}function p(E){return e.parser.lazy[e.now().line]=r!==t.length,o=e.now().offset,w(E)}function m(E){return e.containerState={},n.attempt(Nw,g,w)(E)}function g(E){return r++,t.push([e.currentConstruct,e.containerState]),m(E)}function w(E){if(E===null){i&&M(),Q(0),n.consume(E);return}return i=i||e.parser.flow(e.now()),n.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),k(E)}function k(E){if(E===null){C(n.exit("chunkFlow"),!0),Q(0),n.consume(E);return}return ut(E)?(n.consume(E),C(n.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(n.consume(E),k)}function C(E,I){const U=e.sliceStream(E);if(I&&U.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(U),e.parser.lazy[E.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const R=e.events.length;let q=R,G,V;for(;q--;)if(e.events[q][0]==="exit"&&e.events[q][1].type==="chunkFlow"){if(G){V=e.events[q][1].end;break}G=!0}for(Q(r),_=R;_<e.events.length;)e.events[_][1].end={...V},_++;vs(e.events,q+1,0,e.events.slice(R)),e.events.length=_}}function Q(E){let I=t.length;for(;I-- >E;){const U=t[I];e.containerState=U[1],U[0].exit.call(e,n)}t.length=E}function M(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function U5(n,e,t){return Gt(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _w(n){if(n===null||br(n)||V5(n))return 1;if(X5(n))return 2}function ex(n,e,t){const r=[];let i=-1;for(;++i<n.length;){const s=n[i].resolveAll;s&&!r.includes(s)&&(e=s(e,t),r.push(s))}return e}const S0={name:"attention",resolveAll:q5,tokenize:H5};function q5(n,e){let t=-1,r,i,s,o,l,c,h,f;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(r=t;r--;)if(n[r][0]==="exit"&&n[r][1].type==="attentionSequence"&&n[r][1]._open&&e.sliceSerialize(n[r][1]).charCodeAt(0)===e.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[r][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[r][1].end.offset-n[r][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;c=n[r][1].end.offset-n[r][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const p={...n[r][1].end},m={...n[t][1].start};zw(p,-c),zw(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...n[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:m},s={type:c>1?"strongText":"emphasisText",start:{...n[r][1].end},end:{...n[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},n[r][1].end={...o.start},n[t][1].start={...l.end},h=[],n[r][1].end.offset-n[r][1].start.offset&&(h=ci(h,[["enter",n[r][1],e],["exit",n[r][1],e]])),h=ci(h,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",s,e]]),h=ci(h,ex(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),h=ci(h,[["exit",s,e],["enter",l,e],["exit",l,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(f=2,h=ci(h,[["enter",n[t][1],e],["exit",n[t][1],e]])):f=0,vs(n,r-1,t-r+3,h),t=r+h.length-f-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function H5(n,e){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_w(r);let s;return o;function o(c){return s=c,n.enter("attentionSequence"),l(c)}function l(c){if(c===s)return n.consume(c),l;const h=n.exit("attentionSequence"),f=_w(c),p=!f||f===2&&i||t.includes(c),m=!i||i===2&&f||t.includes(r);return h._open=!!(s===42?p:p&&(i||!m)),h._close=!!(s===42?m:m&&(f||!p)),e(c)}}function zw(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}const G5={name:"autolink",tokenize:K5};function K5(n,e,t){let r=0;return i;function i(g){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(g){return fs(g)?(n.consume(g),o):g===64?t(g):h(g)}function o(g){return g===43||g===45||g===46||Fr(g)?(r=1,l(g)):h(g)}function l(g){return g===58?(n.consume(g),r=0,c):(g===43||g===45||g===46||Fr(g))&&r++<32?(n.consume(g),l):(r=0,h(g))}function c(g){return g===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.exit("autolink"),e):g===null||g===32||g===60||w0(g)?t(g):(n.consume(g),c)}function h(g){return g===64?(n.consume(g),f):D5(g)?(n.consume(g),h):t(g)}function f(g){return Fr(g)?p(g):t(g)}function p(g){return g===46?(n.consume(g),r=0,f):g===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.exit("autolink"),e):m(g)}function m(g){if((g===45||Fr(g))&&r++<63){const w=g===45?m:p;return n.consume(g),w}return t(g)}}const Kp={partial:!0,tokenize:J5};function J5(n,e,t){return r;function r(s){return Lt(s)?Gt(n,i,"linePrefix")(s):i(s)}function i(s){return s===null||ut(s)?e(s):t(s)}}const o2={continuation:{tokenize:tA},exit:nA,name:"blockQuote",tokenize:eA};function eA(n,e,t){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(n.enter("blockQuote",{_container:!0}),l.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(o),n.exit("blockQuoteMarker"),s}return t(o)}function s(o){return Lt(o)?(n.enter("blockQuotePrefixWhitespace"),n.consume(o),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),e):(n.exit("blockQuotePrefix"),e(o))}}function tA(n,e,t){const r=this;return i;function i(o){return Lt(o)?Gt(n,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return n.attempt(o2,e,t)(o)}}function nA(n){n.exit("blockQuote")}const a2={name:"characterEscape",tokenize:rA};function rA(n,e,t){return r;function r(s){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(s),n.exit("escapeMarker"),i}function i(s){return Z5(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),e):t(s)}}const l2={name:"characterReference",tokenize:iA};function iA(n,e,t){const r=this;let i=0,s,o;return l;function l(p){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),c}function c(p){return p===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(p),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),s=31,o=Fr,f(p))}function h(p){return p===88||p===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(p),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,o=I5,f):(n.enter("characterReferenceValue"),s=7,o=k0,f(p))}function f(p){if(p===59&&i){const m=n.exit("characterReferenceValue");return o===Fr&&!Jy(r.sliceSerialize(m))?t(p):(n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),n.exit("characterReference"),e)}return o(p)&&i++<s?(n.consume(p),f):t(p)}}const Lw={partial:!0,tokenize:oA},Dw={concrete:!0,name:"codeFenced",tokenize:sA};function sA(n,e,t){const r=this,i={partial:!0,tokenize:U};let s=0,o=0,l;return c;function c(_){return h(_)}function h(_){const R=r.events[r.events.length-1];return s=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,l=_,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),f(_)}function f(_){return _===l?(o++,n.consume(_),f):o<3?t(_):(n.exit("codeFencedFenceSequence"),Lt(_)?Gt(n,p,"whitespace")(_):p(_))}function p(_){return _===null||ut(_)?(n.exit("codeFencedFence"),r.interrupt?e(_):n.check(Lw,k,I)(_)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===null||ut(_)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),p(_)):Lt(_)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Gt(n,g,"whitespace")(_)):_===96&&_===l?t(_):(n.consume(_),m)}function g(_){return _===null||ut(_)?p(_):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===null||ut(_)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),p(_)):_===96&&_===l?t(_):(n.consume(_),w)}function k(_){return n.attempt(i,I,C)(_)}function C(_){return n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),Q}function Q(_){return s>0&&Lt(_)?Gt(n,M,"linePrefix",s+1)(_):M(_)}function M(_){return _===null||ut(_)?n.check(Lw,k,I)(_):(n.enter("codeFlowValue"),E(_))}function E(_){return _===null||ut(_)?(n.exit("codeFlowValue"),M(_)):(n.consume(_),E)}function I(_){return n.exit("codeFenced"),e(_)}function U(_,R,q){let G=0;return V;function V(re){return _.enter("lineEnding"),_.consume(re),_.exit("lineEnding"),D}function D(re){return _.enter("codeFencedFence"),Lt(re)?Gt(_,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):Z(re)}function Z(re){return re===l?(_.enter("codeFencedFenceSequence"),ae(re)):q(re)}function ae(re){return re===l?(G++,_.consume(re),ae):G>=o?(_.exit("codeFencedFenceSequence"),Lt(re)?Gt(_,se,"whitespace")(re):se(re)):q(re)}function se(re){return re===null||ut(re)?(_.exit("codeFencedFence"),R(re)):q(re)}}}function oA(n,e,t){const r=this;return i;function i(o){return o===null?t(o):(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}const aO={name:"codeIndented",tokenize:lA},aA={partial:!0,tokenize:uA};function lA(n,e,t){const r=this;return i;function i(h){return n.enter("codeIndented"),Gt(n,s,"linePrefix",5)(h)}function s(h){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(h):t(h)}function o(h){return h===null?c(h):ut(h)?n.attempt(aA,o,c)(h):(n.enter("codeFlowValue"),l(h))}function l(h){return h===null||ut(h)?(n.exit("codeFlowValue"),o(h)):(n.consume(h),l)}function c(h){return n.exit("codeIndented"),e(h)}}function uA(n,e,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):ut(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),i):Gt(n,s,"linePrefix",5)(o)}function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):ut(o)?i(o):t(o)}}const cA={name:"codeText",previous:fA,resolve:hA,tokenize:dA};function hA(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r<e;)if(n[r][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)i===void 0?r!==e&&n[r][1].type!=="lineEnding"&&(i=r):(r===e||n[r][1].type==="lineEnding")&&(n[i][1].type="codeTextData",r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return n}function fA(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function dA(n,e,t){let r=0,i,s;return o;function o(p){return n.enter("codeText"),n.enter("codeTextSequence"),l(p)}function l(p){return p===96?(n.consume(p),r++,l):(n.exit("codeTextSequence"),c(p))}function c(p){return p===null?t(p):p===32?(n.enter("space"),n.consume(p),n.exit("space"),c):p===96?(s=n.enter("codeTextSequence"),i=0,f(p)):ut(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||ut(p)?(n.exit("codeTextData"),c(p)):(n.consume(p),h)}function f(p){return p===96?(n.consume(p),i++,f):i===r?(n.exit("codeTextSequence"),n.exit("codeText"),e(p)):(s.type="codeTextData",h(p))}}class pA{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const i=t||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&rh(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),rh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);rh(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);rh(this.left,t.reverse())}}}function rh(n,e){let t=0;if(e.length<1e4)n.push(...e);else for(;t<e.length;)n.push(...e.slice(t,t+1e4)),t+=1e4}function u2(n){const e={};let t=-1,r,i,s,o,l,c,h;const f=new pA(n);for(;++t<f.length;){for(;t in e;)t=e[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,mA(f,t)),t=e[t],h=!0);else if(r[1]._container){for(s=t,i=void 0;s--;)if(o=f.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,t),l.unshift(r),f.splice(i,t-i+1,l))}}return vs(n,0,Number.POSITIVE_INFINITY,f.slice(0)),!h}function mA(n,e){const t=n.get(e)[1],r=n.get(e)[2];let i=e-1;const s=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],h={};let f,p,m=-1,g=t,w=0,k=0;const C=[k];for(;g;){for(;n.get(++i)[1]!==g;);s.push(i),g._tokenizer||(f=r.sliceStream(g),g.next||f.push(null),p&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=t;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(k=m+1,C.push(k),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):C.pop(),m=C.length;m--;){const Q=l.slice(C[m],C[m+1]),M=s.pop();c.push([M,M+Q.length-1]),n.splice(M,2,Q)}for(c.reverse(),m=-1;++m<c.length;)h[w+c[m][0]]=w+c[m][1],w+=c[m][1]-c[m][0]-1;return h}const gA={resolve:yA,tokenize:xA},OA={partial:!0,tokenize:vA};function yA(n){return u2(n),n}function xA(n,e){let t;return r;function r(l){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):ut(l)?n.check(OA,o,s)(l):(n.consume(l),i)}function s(l){return n.exit("chunkContent"),n.exit("content"),e(l)}function o(l){return n.consume(l),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function vA(n,e,t){const r=this;return i;function i(o){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Gt(n,s,"linePrefix")}function s(o){if(o===null||ut(o))return t(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):n.interrupt(r.parser.constructs.flow,t,e)(o)}}function c2(n,e,t,r,i,s,o,l,c){const h=c||Number.POSITIVE_INFINITY;let f=0;return p;function p(Q){return Q===60?(n.enter(r),n.enter(i),n.enter(s),n.consume(Q),n.exit(s),m):Q===null||Q===32||Q===41||w0(Q)?t(Q):(n.enter(r),n.enter(o),n.enter(l),n.enter("chunkString",{contentType:"string"}),k(Q))}function m(Q){return Q===62?(n.enter(s),n.consume(Q),n.exit(s),n.exit(i),n.exit(r),e):(n.enter(l),n.enter("chunkString",{contentType:"string"}),g(Q))}function g(Q){return Q===62?(n.exit("chunkString"),n.exit(l),m(Q)):Q===null||Q===60||ut(Q)?t(Q):(n.consume(Q),Q===92?w:g)}function w(Q){return Q===60||Q===62||Q===92?(n.consume(Q),g):g(Q)}function k(Q){return!f&&(Q===null||Q===41||br(Q))?(n.exit("chunkString"),n.exit(l),n.exit(o),n.exit(r),e(Q)):f<h&&Q===40?(n.consume(Q),f++,k):Q===41?(n.consume(Q),f--,k):Q===null||Q===32||Q===40||w0(Q)?t(Q):(n.consume(Q),Q===92?C:k)}function C(Q){return Q===40||Q===41||Q===92?(n.consume(Q),k):k(Q)}}function h2(n,e,t,r,i,s){const o=this;let l=0,c;return h;function h(g){return n.enter(r),n.enter(i),n.consume(g),n.exit(i),n.enter(s),f}function f(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(n.exit(s),n.enter(i),n.consume(g),n.exit(i),n.exit(r),e):ut(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),f):(n.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||ut(g)||l++>999?(n.exit("chunkString"),f(g)):(n.consume(g),c||(c=!Lt(g)),g===92?m:p)}function m(g){return g===91||g===92||g===93?(n.consume(g),l++,p):p(g)}}function f2(n,e,t,r,i,s){let o;return l;function l(m){return m===34||m===39||m===40?(n.enter(r),n.enter(i),n.consume(m),n.exit(i),o=m===40?41:m,c):t(m)}function c(m){return m===o?(n.enter(i),n.consume(m),n.exit(i),n.exit(r),e):(n.enter(s),h(m))}function h(m){return m===o?(n.exit(s),c(o)):m===null?t(m):ut(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),Gt(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===o||m===null||ut(m)?(n.exit("chunkString"),h(m)):(n.consume(m),m===92?p:f)}function p(m){return m===o||m===92?(n.consume(m),f):f(m)}}function Ch(n,e){let t;return r;function r(i){return ut(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):Lt(i)?Gt(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const wA={name:"definition",tokenize:SA},kA={partial:!0,tokenize:bA};function SA(n,e,t){const r=this;let i;return s;function s(g){return n.enter("definition"),o(g)}function o(g){return h2.call(r,n,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=Su(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(n.enter("definitionMarker"),n.consume(g),n.exit("definitionMarker"),c):t(g)}function c(g){return br(g)?Ch(n,h)(g):h(g)}function h(g){return c2(n,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function f(g){return n.attempt(kA,p,p)(g)}function p(g){return Lt(g)?Gt(n,m,"whitespace")(g):m(g)}function m(g){return g===null||ut(g)?(n.exit("definition"),r.parser.defined.push(i),e(g)):t(g)}}function bA(n,e,t){return r;function r(l){return br(l)?Ch(n,i)(l):t(l)}function i(l){return f2(n,s,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Lt(l)?Gt(n,o,"whitespace")(l):o(l)}function o(l){return l===null||ut(l)?e(l):t(l)}}const PA={name:"hardBreakEscape",tokenize:QA};function QA(n,e,t){return r;function r(s){return n.enter("hardBreakEscape"),n.consume(s),i}function i(s){return ut(s)?(n.exit("hardBreakEscape"),e(s)):t(s)}}const CA={name:"headingAtx",resolve:TA,tokenize:$A};function TA(n,e){let t=n.length-2,r=3,i,s;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},s={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},vs(n,r,t-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),n}function $A(n,e,t){let r=0;return i;function i(f){return n.enter("atxHeading"),s(f)}function s(f){return n.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(n.consume(f),o):f===null||br(f)?(n.exit("atxHeadingSequence"),l(f)):t(f)}function l(f){return f===35?(n.enter("atxHeadingSequence"),c(f)):f===null||ut(f)?(n.exit("atxHeading"),e(f)):Lt(f)?Gt(n,l,"whitespace")(f):(n.enter("atxHeadingText"),h(f))}function c(f){return f===35?(n.consume(f),c):(n.exit("atxHeadingSequence"),l(f))}function h(f){return f===null||f===35||br(f)?(n.exit("atxHeadingText"),l(f)):(n.consume(f),h)}}const EA=["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"],Iw=["pre","script","style","textarea"],MA={concrete:!0,name:"htmlFlow",resolveTo:AA,tokenize:NA},jA={partial:!0,tokenize:zA},RA={partial:!0,tokenize:_A};function AA(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function NA(n,e,t){const r=this;let i,s,o,l,c;return h;function h(z){return f(z)}function f(z){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(z),p}function p(z){return z===33?(n.consume(z),m):z===47?(n.consume(z),s=!0,k):z===63?(n.consume(z),i=3,r.interrupt?e:A):fs(z)?(n.consume(z),o=String.fromCharCode(z),C):t(z)}function m(z){return z===45?(n.consume(z),i=2,g):z===91?(n.consume(z),i=5,l=0,w):fs(z)?(n.consume(z),i=4,r.interrupt?e:A):t(z)}function g(z){return z===45?(n.consume(z),r.interrupt?e:A):t(z)}function w(z){const Re="CDATA[";return z===Re.charCodeAt(l++)?(n.consume(z),l===Re.length?r.interrupt?e:Z:w):t(z)}function k(z){return fs(z)?(n.consume(z),o=String.fromCharCode(z),C):t(z)}function C(z){if(z===null||z===47||z===62||br(z)){const Re=z===47,_e=o.toLowerCase();return!Re&&!s&&Iw.includes(_e)?(i=1,r.interrupt?e(z):Z(z)):EA.includes(o.toLowerCase())?(i=6,Re?(n.consume(z),Q):r.interrupt?e(z):Z(z)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(z):s?M(z):E(z))}return z===45||Fr(z)?(n.consume(z),o+=String.fromCharCode(z),C):t(z)}function Q(z){return z===62?(n.consume(z),r.interrupt?e:Z):t(z)}function M(z){return Lt(z)?(n.consume(z),M):V(z)}function E(z){return z===47?(n.consume(z),V):z===58||z===95||fs(z)?(n.consume(z),I):Lt(z)?(n.consume(z),E):V(z)}function I(z){return z===45||z===46||z===58||z===95||Fr(z)?(n.consume(z),I):U(z)}function U(z){return z===61?(n.consume(z),_):Lt(z)?(n.consume(z),U):E(z)}function _(z){return z===null||z===60||z===61||z===62||z===96?t(z):z===34||z===39?(n.consume(z),c=z,R):Lt(z)?(n.consume(z),_):q(z)}function R(z){return z===c?(n.consume(z),c=null,G):z===null||ut(z)?t(z):(n.consume(z),R)}function q(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||br(z)?U(z):(n.consume(z),q)}function G(z){return z===47||z===62||Lt(z)?E(z):t(z)}function V(z){return z===62?(n.consume(z),D):t(z)}function D(z){return z===null||ut(z)?Z(z):Lt(z)?(n.consume(z),D):t(z)}function Z(z){return z===45&&i===2?(n.consume(z),Oe):z===60&&i===1?(n.consume(z),be):z===62&&i===4?(n.consume(z),Y):z===63&&i===3?(n.consume(z),A):z===93&&i===5?(n.consume(z),ye):ut(z)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(jA,ue,ae)(z)):z===null||ut(z)?(n.exit("htmlFlowData"),ae(z)):(n.consume(z),Z)}function ae(z){return n.check(RA,se,ue)(z)}function se(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),re}function re(z){return z===null||ut(z)?ae(z):(n.enter("htmlFlowData"),Z(z))}function Oe(z){return z===45?(n.consume(z),A):Z(z)}function be(z){return z===47?(n.consume(z),o="",he):Z(z)}function he(z){if(z===62){const Re=o.toLowerCase();return Iw.includes(Re)?(n.consume(z),Y):Z(z)}return fs(z)&&o.length<8?(n.consume(z),o+=String.fromCharCode(z),he):Z(z)}function ye(z){return z===93?(n.consume(z),A):Z(z)}function A(z){return z===62?(n.consume(z),Y):z===45&&i===2?(n.consume(z),A):Z(z)}function Y(z){return z===null||ut(z)?(n.exit("htmlFlowData"),ue(z)):(n.consume(z),Y)}function ue(z){return n.exit("htmlFlow"),e(z)}}function _A(n,e,t){const r=this;return i;function i(o){return ut(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),s):t(o)}function s(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}function zA(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(Kp,e,t)}}const LA={name:"htmlText",tokenize:DA};function DA(n,e,t){const r=this;let i,s,o;return l;function l(A){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(A),c}function c(A){return A===33?(n.consume(A),h):A===47?(n.consume(A),U):A===63?(n.consume(A),E):fs(A)?(n.consume(A),q):t(A)}function h(A){return A===45?(n.consume(A),f):A===91?(n.consume(A),s=0,w):fs(A)?(n.consume(A),M):t(A)}function f(A){return A===45?(n.consume(A),g):t(A)}function p(A){return A===null?t(A):A===45?(n.consume(A),m):ut(A)?(o=p,be(A)):(n.consume(A),p)}function m(A){return A===45?(n.consume(A),g):p(A)}function g(A){return A===62?Oe(A):A===45?m(A):p(A)}function w(A){const Y="CDATA[";return A===Y.charCodeAt(s++)?(n.consume(A),s===Y.length?k:w):t(A)}function k(A){return A===null?t(A):A===93?(n.consume(A),C):ut(A)?(o=k,be(A)):(n.consume(A),k)}function C(A){return A===93?(n.consume(A),Q):k(A)}function Q(A){return A===62?Oe(A):A===93?(n.consume(A),Q):k(A)}function M(A){return A===null||A===62?Oe(A):ut(A)?(o=M,be(A)):(n.consume(A),M)}function E(A){return A===null?t(A):A===63?(n.consume(A),I):ut(A)?(o=E,be(A)):(n.consume(A),E)}function I(A){return A===62?Oe(A):E(A)}function U(A){return fs(A)?(n.consume(A),_):t(A)}function _(A){return A===45||Fr(A)?(n.consume(A),_):R(A)}function R(A){return ut(A)?(o=R,be(A)):Lt(A)?(n.consume(A),R):Oe(A)}function q(A){return A===45||Fr(A)?(n.consume(A),q):A===47||A===62||br(A)?G(A):t(A)}function G(A){return A===47?(n.consume(A),Oe):A===58||A===95||fs(A)?(n.consume(A),V):ut(A)?(o=G,be(A)):Lt(A)?(n.consume(A),G):Oe(A)}function V(A){return A===45||A===46||A===58||A===95||Fr(A)?(n.consume(A),V):D(A)}function D(A){return A===61?(n.consume(A),Z):ut(A)?(o=D,be(A)):Lt(A)?(n.consume(A),D):G(A)}function Z(A){return A===null||A===60||A===61||A===62||A===96?t(A):A===34||A===39?(n.consume(A),i=A,ae):ut(A)?(o=Z,be(A)):Lt(A)?(n.consume(A),Z):(n.consume(A),se)}function ae(A){return A===i?(n.consume(A),i=void 0,re):A===null?t(A):ut(A)?(o=ae,be(A)):(n.consume(A),ae)}function se(A){return A===null||A===34||A===39||A===60||A===61||A===96?t(A):A===47||A===62||br(A)?G(A):(n.consume(A),se)}function re(A){return A===47||A===62||br(A)?G(A):t(A)}function Oe(A){return A===62?(n.consume(A),n.exit("htmlTextData"),n.exit("htmlText"),e):t(A)}function be(A){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),he}function he(A){return Lt(A)?Gt(n,ye,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):ye(A)}function ye(A){return n.enter("htmlTextData"),o(A)}}const tx={name:"labelEnd",resolveAll:VA,resolveTo:WA,tokenize:FA},IA={tokenize:BA},ZA={tokenize:YA},XA={tokenize:UA};function VA(n){let e=-1;const t=[];for(;++e<n.length;){const r=n[e][1];if(t.push(n[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return n.length!==t.length&&vs(n,0,n.length,t),n}function WA(n,e){let t=n.length,r=0,i,s,o,l;for(;t--;)if(i=n[t][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;n[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(n[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[s][1].start},end:{...n[o][1].end}},f={type:"labelText",start:{...n[s+r+2][1].end},end:{...n[o-2][1].start}};return l=[["enter",c,e],["enter",h,e]],l=ci(l,n.slice(s+1,s+r+3)),l=ci(l,[["enter",f,e]]),l=ci(l,ex(e.parser.constructs.insideSpan.null,n.slice(s+r+4,o-3),e)),l=ci(l,[["exit",f,e],n[o-2],n[o-1],["exit",h,e]]),l=ci(l,n.slice(o+1)),l=ci(l,[["exit",c,e]]),vs(n,s,n.length,l),n}function FA(n,e,t){const r=this;let i=r.events.length,s,o;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 l;function l(m){return s?s._inactive?p(m):(o=r.parser.defined.includes(Su(r.sliceSerialize({start:s.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),n.exit("labelEnd"),c):t(m)}function c(m){return m===40?n.attempt(IA,f,o?f:p)(m):m===91?n.attempt(ZA,f,o?h:p)(m):o?f(m):p(m)}function h(m){return n.attempt(XA,f,p)(m)}function f(m){return e(m)}function p(m){return s._balanced=!0,t(m)}}function BA(n,e,t){return r;function r(p){return n.enter("resource"),n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),i}function i(p){return br(p)?Ch(n,s)(p):s(p)}function s(p){return p===41?f(p):c2(n,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return br(p)?Ch(n,c)(p):f(p)}function l(p){return t(p)}function c(p){return p===34||p===39||p===40?f2(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function h(p){return br(p)?Ch(n,f)(p):f(p)}function f(p){return p===41?(n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),n.exit("resource"),e):t(p)}}function YA(n,e,t){const r=this;return i;function i(l){return h2.call(r,n,s,o,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Su(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):t(l)}function o(l){return t(l)}}function UA(n,e,t){return r;function r(s){return n.enter("reference"),n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),i}function i(s){return s===93?(n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),n.exit("reference"),e):t(s)}}const qA={name:"labelStartImage",resolveAll:tx.resolveAll,tokenize:HA};function HA(n,e,t){const r=this;return i;function i(l){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(l),n.exit("labelImageMarker"),s}function s(l){return l===91?(n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelImage"),o):t(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):e(l)}}const GA={name:"labelStartLink",resolveAll:tx.resolveAll,tokenize:KA};function KA(n,e,t){const r=this;return i;function i(o){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):e(o)}}const lO={name:"lineEnding",tokenize:JA};function JA(n,e){return t;function t(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),Gt(n,e,"linePrefix")}}const ip={name:"thematicBreak",tokenize:eN};function eN(n,e,t){let r=0,i;return s;function s(h){return n.enter("thematicBreak"),o(h)}function o(h){return i=h,l(h)}function l(h){return h===i?(n.enter("thematicBreakSequence"),c(h)):r>=3&&(h===null||ut(h))?(n.exit("thematicBreak"),e(h)):t(h)}function c(h){return h===i?(n.consume(h),r++,c):(n.exit("thematicBreakSequence"),Lt(h)?Gt(n,l,"whitespace")(h):l(h))}}const xr={continuation:{tokenize:iN},exit:oN,name:"list",tokenize:rN},tN={partial:!0,tokenize:aN},nN={partial:!0,tokenize:sN};function rN(n,e,t){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,o=0;return l;function l(g){const w=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:k0(g)){if(r.containerState.type||(r.containerState.type=w,n.enter(w,{_container:!0})),w==="listUnordered")return n.enter("listItemPrefix"),g===42||g===45?n.check(ip,t,h)(g):h(g);if(!r.interrupt||g===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(g)}return t(g)}function c(g){return k0(g)&&++o<10?(n.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(n.exit("listItemValue"),h(g)):t(g)}function h(g){return n.enter("listItemMarker"),n.consume(g),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,n.check(Kp,r.interrupt?t:f,n.attempt(tN,m,p))}function f(g){return r.containerState.initialBlankLine=!0,s++,m(g)}function p(g){return Lt(g)?(n.enter("listItemPrefixWhitespace"),n.consume(g),n.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=s+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(g)}}function iN(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(Kp,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Gt(n,e,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!Lt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(nN,e,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Gt(n,n.attempt(xr,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function sN(n,e,t){const r=this;return Gt(n,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(s):t(s)}}function oN(n){n.exit(this.containerState.type)}function aN(n,e,t){const r=this;return Gt(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Lt(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):t(s)}}const Zw={name:"setextUnderline",resolveTo:lN,tokenize:uN};function lN(n,e){let t=n.length,r,i,s;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!s&&n[t][1].type==="definition"&&(s=t);const o={type:"setextHeading",start:{...n[r][1].start},end:{...n[n.length-1][1].end}};return n[i][1].type="setextHeadingText",s?(n.splice(i,0,["enter",o,e]),n.splice(s+1,0,["exit",n[r][1],e]),n[r][1].end={...n[s][1].end}):n[r][1]=o,n.push(["exit",o,e]),n}function uN(n,e,t){const r=this;let i;return s;function s(h){let f=r.events.length,p;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){p=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(n.enter("setextHeadingLine"),i=h,o(h)):t(h)}function o(h){return n.enter("setextHeadingLineSequence"),l(h)}function l(h){return h===i?(n.consume(h),l):(n.exit("setextHeadingLineSequence"),Lt(h)?Gt(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||ut(h)?(n.exit("setextHeadingLine"),e(h)):t(h)}}const cN={tokenize:hN};function hN(n){const e=this,t=n.attempt(Kp,r,n.attempt(this.parser.constructs.flowInitial,i,Gt(n,n.attempt(this.parser.constructs.flow,i,n.attempt(gA,i)),"linePrefix")));return t;function r(s){if(s===null){n.consume(s);return}return n.enter("lineEndingBlank"),n.consume(s),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(s){if(s===null){n.consume(s);return}return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const fN={resolveAll:p2()},dN=d2("string"),pN=d2("text");function d2(n){return{resolveAll:p2(n==="text"?mN:void 0),tokenize:e};function e(t){const r=this,i=this.parser.constructs[n],s=t.attempt(i,o,l);return o;function o(f){return h(f)?s(f):l(f)}function l(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),c}function c(f){return h(f)?(t.exit("data"),s(f)):(t.consume(f),c)}function h(f){if(f===null)return!0;const p=i[f];let m=-1;if(p)for(;++m<p.length;){const g=p[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function p2(n){return e;function e(t,r){let i=-1,s;for(;++i<=t.length;)s===void 0?t[i]&&t[i][1].type==="data"&&(s=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),i=s+2),s=void 0);return n?n(t,r):t}}function mN(n,e){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const r=n[t-1][1],i=e.sliceStream(r);let s=i.length,o=-1,l=0,c;for(;s--;){const h=i[s];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(h===-2)c=!0,l++;else if(h!==-1){s++;break}}if(e._contentTypeTextTrailing&&t===n.length&&(l=0),l){const h={type:t===n.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(n.splice(t,0,["enter",h,e],["exit",h,e]),t+=2)}t++}return n}const gN={42:xr,43:xr,45:xr,48:xr,49:xr,50:xr,51:xr,52:xr,53:xr,54:xr,55:xr,56:xr,57:xr,62:o2},ON={91:wA},yN={[-2]:aO,[-1]:aO,32:aO},xN={35:CA,42:ip,45:[Zw,ip],60:MA,61:Zw,95:ip,96:Dw,126:Dw},vN={38:l2,92:a2},wN={[-5]:lO,[-4]:lO,[-3]:lO,33:qA,38:l2,42:S0,60:[G5,LA],91:GA,92:[PA,a2],93:tx,95:S0,96:cA},kN={null:[S0,fN]},SN={null:[42,95]},bN={null:[]},PN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SN,contentInitial:ON,disable:bN,document:gN,flow:xN,flowInitial:yN,insideSpan:kN,string:vN,text:wN},Symbol.toStringTag,{value:"Module"}));function QN(n,e,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},s=[];let o=[],l=[];const c={attempt:R(U),check:R(_),consume:M,enter:E,exit:I,interrupt:R(_,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:n,previous:null,sliceSerialize:m,sliceStream:g,write:p};let f=e.tokenize.call(h,c);return e.resolveAll&&s.push(e),h;function p(D){return o=ci(o,D),C(),o[o.length-1]!==null?[]:(q(e,0),h.events=ex(s,h.events,h),h.events)}function m(D,Z){return TN(g(D),Z)}function g(D){return CN(o,D)}function w(){const{_bufferIndex:D,_index:Z,line:ae,column:se,offset:re}=r;return{_bufferIndex:D,_index:Z,line:ae,column:se,offset:re}}function k(D){i[D.line]=D.column,V()}function C(){let D;for(;r._index<o.length;){const Z=o[r._index];if(typeof Z=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<Z.length;)Q(Z.charCodeAt(r._bufferIndex));else Q(Z)}}function Q(D){f=f(D)}function M(D){ut(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,V()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=D}function E(D,Z){const ae=Z||{};return ae.type=D,ae.start=w(),h.events.push(["enter",ae,h]),l.push(ae),ae}function I(D){const Z=l.pop();return Z.end=w(),h.events.push(["exit",Z,h]),Z}function U(D,Z){q(D,Z.from)}function _(D,Z){Z.restore()}function R(D,Z){return ae;function ae(se,re,Oe){let be,he,ye,A;return Array.isArray(se)?ue(se):"tokenize"in se?ue([se]):Y(se);function Y($e){return rt;function rt(st){const mt=st!==null&&$e[st],Xt=st!==null&&$e.null,Gn=[...Array.isArray(mt)?mt:mt?[mt]:[],...Array.isArray(Xt)?Xt:Xt?[Xt]:[]];return ue(Gn)(st)}}function ue($e){return be=$e,he=0,$e.length===0?Oe:z($e[he])}function z($e){return rt;function rt(st){return A=G(),ye=$e,$e.partial||(h.currentConstruct=$e),$e.name&&h.parser.constructs.disable.null.includes($e.name)?_e():$e.tokenize.call(Z?Object.assign(Object.create(h),Z):h,c,Re,_e)(st)}}function Re($e){return D(ye,A),re}function _e($e){return A.restore(),++he<be.length?z(be[he]):Oe}}}function q(D,Z){D.resolveAll&&!s.includes(D)&&s.push(D),D.resolve&&vs(h.events,Z,h.events.length-Z,D.resolve(h.events.slice(Z),h)),D.resolveTo&&(h.events=D.resolveTo(h.events,h))}function G(){const D=w(),Z=h.previous,ae=h.currentConstruct,se=h.events.length,re=Array.from(l);return{from:se,restore:Oe};function Oe(){r=D,h.previous=Z,h.currentConstruct=ae,h.events.length=se,l=re,V()}}function V(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function CN(n,e){const t=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let o;if(t===i)o=[n[t].slice(r,s)];else{if(o=n.slice(t,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}s>0&&o.push(n[i].slice(0,s))}return o}function TN(n,e){let t=-1;const r=[];let i;for(;++t<n.length;){const s=n[t];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
294
|
+
`;break}case-3:{o=`\r
|
|
295
|
+
`;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function $N(n){const r={constructs:_5([PN,...(n||{}).extensions||[]]),content:i(W5),defined:[],document:i(B5),flow:i(cN),lazy:{},string:i(dN),text:i(pN)};return r;function i(s){return o;function o(l){return QN(r,s,l)}}}function EN(n){for(;!u2(n););return n}const Xw=/[\0\t\n\r]/g;function MN(){let n=1,e="",t=!0,r;return i;function i(s,o,l){const c=[];let h,f,p,m,g;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,e="",t&&(s.charCodeAt(0)===65279&&p++,t=void 0);p<s.length;){if(Xw.lastIndex=p,h=Xw.exec(s),m=h&&h.index!==void 0?h.index:s.length,g=s.charCodeAt(m),!h){e=s.slice(p);break}if(g===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(s.slice(p,m)),n+=m-p),g){case 0:{c.push(65533),n++;break}case 9:{for(f=Math.ceil(n/4)*4,c.push(-2);n++<f;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:r=!0,n=1}p=m+1}return l&&(r&&c.push(-5),e&&c.push(e),c.push(null)),c}}const jN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RN(n){return n.replace(jN,AN)}function AN(n,e,t){if(e)return e;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),s=i===120||i===88;return s2(t.slice(s?2:1),s?16:10)}return Jy(t)||n}const m2={}.hasOwnProperty;function NN(n,e,t){return e&&typeof e=="object"&&(t=e,e=void 0),_N(t)(EN($N(t).document().write(MN()(n,e,!0))))}function _N(n){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s($r),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Tr),blockQuote:s(Xt),characterEscape:G,characterReference:G,codeFenced:s(Gn),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Gn,o),codeText:s(cn,o),codeTextData:G,data:G,codeFlowValue:G,definition:s(An),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Zi),hardBreakEscape:s(Kn),hardBreakTrailing:s(Kn),htmlFlow:s(Yr,o),htmlFlowData:G,htmlText:s(Yr,o),htmlTextData:G,image:s(ks),label:o,link:s($r),listItem:s(qr),listItemValue:m,listOrdered:s(Ur,p),listUnordered:s(Ur),paragraph:s(Ss),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Tr),strong:s(io),thematicBreak:s(Jn)},exit:{atxHeading:c(),atxHeadingSequence:U,autolink:c(),autolinkEmail:mt,autolinkProtocol:st,blockQuote:c(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:$e,characterReference:rt,codeFenced:c(C),codeFencedFence:k,codeFencedFenceInfo:g,codeFencedFenceMeta:w,codeFlowValue:V,codeIndented:c(Q),codeText:c(re),codeTextData:V,data:V,definition:c(),definitionDestinationString:I,definitionLabelString:M,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(Z),hardBreakTrailing:c(Z),htmlFlow:c(ae),htmlFlowData:V,htmlText:c(se),htmlTextData:V,image:c(be),label:ye,labelText:he,lineEnding:D,link:c(Oe),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Re,resourceDestinationString:A,resourceTitleString:Y,resource:ue,setextHeading:c(q),setextHeadingLineSequence:R,setextHeadingText:_,strong:c(),thematicBreak:c()}};g2(e,(n||{}).mdastExtensions||[]);const t={};return r;function r(fe){let Pe={type:"root",children:[]};const Fe={stack:[Pe],tokenStack:[],config:e,enter:l,exit:h,buffer:o,resume:f,data:t},nt=[];let yt=-1;for(;++yt<fe.length;)if(fe[yt][1].type==="listOrdered"||fe[yt][1].type==="listUnordered")if(fe[yt][0]==="enter")nt.push(yt);else{const Ke=nt.pop();yt=i(fe,Ke,yt)}for(yt=-1;++yt<fe.length;){const Ke=e[fe[yt][0]];m2.call(Ke,fe[yt][1].type)&&Ke[fe[yt][1].type].call(Object.assign({sliceSerialize:fe[yt][2].sliceSerialize},Fe),fe[yt][1])}if(Fe.tokenStack.length>0){const Ke=Fe.tokenStack[Fe.tokenStack.length-1];(Ke[1]||Vw).call(Fe,void 0,Ke[0])}for(Pe.position={start:Fo(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Fo(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},yt=-1;++yt<e.transforms.length;)Pe=e.transforms[yt](Pe)||Pe;return Pe}function i(fe,Pe,Fe){let nt=Pe-1,yt=-1,Ke=!1,er,xt,hr,bn;for(;++nt<=Fe;){const nn=fe[nt];switch(nn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nn[0]==="enter"?yt++:yt--,bn=void 0;break}case"lineEndingBlank":{nn[0]==="enter"&&(er&&!bn&&!yt&&!hr&&(hr=nt),bn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bn=void 0}if(!yt&&nn[0]==="enter"&&nn[1].type==="listItemPrefix"||yt===-1&&nn[0]==="exit"&&(nn[1].type==="listUnordered"||nn[1].type==="listOrdered")){if(er){let tr=nt;for(xt=void 0;tr--;){const Tn=fe[tr];if(Tn[1].type==="lineEnding"||Tn[1].type==="lineEndingBlank"){if(Tn[0]==="exit")continue;xt&&(fe[xt][1].type="lineEndingBlank",Ke=!0),Tn[1].type="lineEnding",xt=tr}else if(!(Tn[1].type==="linePrefix"||Tn[1].type==="blockQuotePrefix"||Tn[1].type==="blockQuotePrefixWhitespace"||Tn[1].type==="blockQuoteMarker"||Tn[1].type==="listItemIndent"))break}hr&&(!xt||hr<xt)&&(er._spread=!0),er.end=Object.assign({},xt?fe[xt][1].start:nn[1].end),fe.splice(xt||nt,0,["exit",er,nn[2]]),nt++,Fe++}if(nn[1].type==="listItemPrefix"){const tr={type:"listItem",_spread:!1,start:Object.assign({},nn[1].start),end:void 0};er=tr,fe.splice(nt,0,["enter",tr,nn[2]]),nt++,Fe++,hr=void 0,bn=!0}}}return fe[Pe][1]._spread=Ke,Fe}function s(fe,Pe){return Fe;function Fe(nt){l.call(this,fe(nt),nt),Pe&&Pe.call(this,nt)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(fe,Pe,Fe){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Pe,Fe||void 0]),fe.position={start:Fo(Pe.start),end:void 0}}function c(fe){return Pe;function Pe(Fe){fe&&fe.call(this,Fe),h.call(this,Fe)}}function h(fe,Pe){const Fe=this.stack.pop(),nt=this.tokenStack.pop();if(nt)nt[0].type!==fe.type&&(Pe?Pe.call(this,fe,nt[0]):(nt[1]||Vw).call(this,fe,nt[0]));else throw new Error("Cannot close `"+fe.type+"` ("+Qh({start:fe.start,end:fe.end})+"): it’s not open");Fe.position.end=Fo(fe.end)}function f(){return A5(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(fe){if(this.data.expectingFirstListItemValue){const Pe=this.stack[this.stack.length-2];Pe.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function g(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.lang=fe}function w(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.meta=fe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function Q(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe.replace(/(\r?\n|\r)$/g,"")}function M(fe){const Pe=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Pe,Fe.identifier=Su(this.sliceSerialize(fe)).toLowerCase()}function E(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.title=fe}function I(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.url=fe}function U(fe){const Pe=this.stack[this.stack.length-1];if(!Pe.depth){const Fe=this.sliceSerialize(fe).length;Pe.depth=Fe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function R(fe){const Pe=this.stack[this.stack.length-1];Pe.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function G(fe){const Fe=this.stack[this.stack.length-1].children;let nt=Fe[Fe.length-1];(!nt||nt.type!=="text")&&(nt=cr(),nt.position={start:Fo(fe.start),end:void 0},Fe.push(nt)),this.stack.push(nt)}function V(fe){const Pe=this.stack.pop();Pe.value+=this.sliceSerialize(fe),Pe.position.end=Fo(fe.end)}function D(fe){const Pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=Pe.children[Pe.children.length-1];Fe.position.end=Fo(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Pe.type)&&(G.call(this,fe),V.call(this,fe))}function Z(){this.data.atHardBreak=!0}function ae(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe}function se(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe}function re(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe}function Oe(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Pe=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Pe,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function be(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Pe=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Pe,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function he(fe){const Pe=this.sliceSerialize(fe),Fe=this.stack[this.stack.length-2];Fe.label=RN(Pe),Fe.identifier=Su(Pe).toLowerCase()}function ye(){const fe=this.stack[this.stack.length-1],Pe=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const nt=fe.children;Fe.children=nt}else Fe.alt=Pe}function A(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.url=fe}function Y(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.title=fe}function ue(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function Re(fe){const Pe=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Pe,Fe.identifier=Su(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function _e(fe){this.data.characterReferenceType=fe.type}function $e(fe){const Pe=this.sliceSerialize(fe),Fe=this.data.characterReferenceType;let nt;Fe?(nt=s2(Pe,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):nt=Jy(Pe);const yt=this.stack[this.stack.length-1];yt.value+=nt}function rt(fe){const Pe=this.stack.pop();Pe.position.end=Fo(fe.end)}function st(fe){V.call(this,fe);const Pe=this.stack[this.stack.length-1];Pe.url=this.sliceSerialize(fe)}function mt(fe){V.call(this,fe);const Pe=this.stack[this.stack.length-1];Pe.url="mailto:"+this.sliceSerialize(fe)}function Xt(){return{type:"blockquote",children:[]}}function Gn(){return{type:"code",lang:null,meta:null,value:""}}function cn(){return{type:"inlineCode",value:""}}function An(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zi(){return{type:"emphasis",children:[]}}function Tr(){return{type:"heading",depth:0,children:[]}}function Kn(){return{type:"break"}}function Yr(){return{type:"html",value:""}}function ks(){return{type:"image",title:null,url:"",alt:null}}function $r(){return{type:"link",title:null,url:"",children:[]}}function Ur(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function qr(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Ss(){return{type:"paragraph",children:[]}}function io(){return{type:"strong",children:[]}}function cr(){return{type:"text",value:""}}function Jn(){return{type:"thematicBreak"}}}function Fo(n){return{line:n.line,column:n.column,offset:n.offset}}function g2(n,e){let t=-1;for(;++t<e.length;){const r=e[t];Array.isArray(r)?g2(n,r):zN(n,r)}}function zN(n,e){let t;for(t in e)if(m2.call(e,t))switch(t){case"canContainEols":{const r=e[t];r&&n[t].push(...r);break}case"transforms":{const r=e[t];r&&n[t].push(...r);break}case"enter":case"exit":{const r=e[t];r&&Object.assign(n[t],r);break}}}function Vw(n,e){throw n?new Error("Cannot close `"+n.type+"` ("+Qh({start:n.start,end:n.end})+"): a different token (`"+e.type+"`, "+Qh({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Qh({start:e.start,end:e.end})+") is still open")}function LN(n){const e=this;e.parser=t;function t(r){return NN(r,{...e.data("settings"),...n,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function DN(n,e){const t={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(e),!0)};return n.patch(e,t),n.applyData(e,t)}function IN(n,e){const t={type:"element",tagName:"br",properties:{},children:[]};return n.patch(e,t),[n.applyData(e,t),{type:"text",value:`
|
|
296
|
+
`}]}function ZN(n,e){const t=e.value?e.value+`
|
|
297
|
+
`:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return e.meta&&(s.data={meta:e.meta}),n.patch(e,s),s=n.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},n.patch(e,s),s}function XN(n,e){const t={type:"element",tagName:"del",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function VN(n,e){const t={type:"element",tagName:"em",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function WN(n,e){const t=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=rc(r.toLowerCase()),s=n.footnoteOrder.indexOf(r);let o,l=n.footnoteCounts.get(r);l===void 0?(l=0,n.footnoteOrder.push(r),o=n.footnoteOrder.length):o=s+1,l+=1,n.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};n.patch(e,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(e,h),n.applyData(e,h)}function FN(n,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function BN(n,e){if(n.options.allowDangerousHtml){const t={type:"raw",value:e.value};return n.patch(e,t),n.applyData(e,t)}}function O2(n,e){const t=e.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=n.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function YN(n,e){const t=String(e.identifier).toUpperCase(),r=n.definitionById.get(t);if(!r)return O2(n,e);const i={src:rc(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return n.patch(e,s),n.applyData(e,s)}function UN(n,e){const t={src:rc(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"img",properties:t,children:[]};return n.patch(e,r),n.applyData(e,r)}function qN(n,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};n.patch(e,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return n.patch(e,r),n.applyData(e,r)}function HN(n,e){const t=String(e.identifier).toUpperCase(),r=n.definitionById.get(t);if(!r)return O2(n,e);const i={href:rc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:n.all(e)};return n.patch(e,s),n.applyData(e,s)}function GN(n,e){const t={href:rc(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"a",properties:t,children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function KN(n,e,t){const r=n.all(e),i=t?JN(t):y2(e),s={},o=[];if(typeof e.checked=="boolean"){const f=r[0];let p;f&&f.type==="element"&&f.tagName==="p"?p=f:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
|
|
298
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
299
|
+
`});const h={type:"element",tagName:"li",properties:s,children:o};return n.patch(e,h),n.applyData(e,h)}function JN(n){let e=!1;if(n.type==="list"){e=n.spread||!1;const t=n.children;let r=-1;for(;!e&&++r<t.length;)e=y2(t[r])}return e}function y2(n){const e=n.spread;return e??n.children.length>1}function e_(n,e){const t={},r=n.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:n.wrap(r,!0)};return n.patch(e,s),n.applyData(e,s)}function t_(n,e){const t={type:"element",tagName:"p",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function n_(n,e){const t={type:"root",children:n.wrap(n.all(e))};return n.patch(e,t),n.applyData(e,t)}function r_(n,e){const t={type:"element",tagName:"strong",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function i_(n,e){const t=n.all(e),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:n.wrap([r],!0)};n.patch(e.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:n.wrap(t,!0)},l=qy(e.children[1]),c=KP(e.children[e.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:n.wrap(i,!0)};return n.patch(e,s),n.applyData(e,s)}function s_(n,e,t){const r=t?t.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:e.children.length;let c=-1;const h=[];for(;++c<l;){const p=e.children[c],m={},g=o?o[c]:void 0;g&&(m.align=g);let w={type:"element",tagName:s,properties:m,children:[]};p&&(w.children=n.all(p),n.patch(p,w),w=n.applyData(p,w)),h.push(w)}const f={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(e,f),n.applyData(e,f)}function o_(n,e){const t={type:"element",tagName:"td",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}const Ww=9,Fw=32;function a_(n){const e=String(n),t=/\r?\n|\r/g;let r=t.exec(e),i=0;const s=[];for(;r;)s.push(Bw(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(e);return s.push(Bw(e.slice(i),i>0,!1)),s.join("")}function Bw(n,e,t){let r=0,i=n.length;if(e){let s=n.codePointAt(r);for(;s===Ww||s===Fw;)r++,s=n.codePointAt(r)}if(t){let s=n.codePointAt(i-1);for(;s===Ww||s===Fw;)i--,s=n.codePointAt(i-1)}return i>r?n.slice(r,i):""}function l_(n,e){const t={type:"text",value:a_(String(e.value))};return n.patch(e,t),n.applyData(e,t)}function u_(n,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(e,t),n.applyData(e,t)}const c_={blockquote:DN,break:IN,code:ZN,delete:XN,emphasis:VN,footnoteReference:WN,heading:FN,html:BN,imageReference:YN,image:UN,inlineCode:qN,linkReference:HN,link:GN,listItem:KN,list:e_,paragraph:t_,root:n_,strong:r_,table:i_,tableCell:o_,tableRow:s_,text:l_,thematicBreak:u_,toml:Ad,yaml:Ad,definition:Ad,footnoteDefinition:Ad};function Ad(){}const x2=-1,Jp=0,Th=1,wp=2,nx=3,rx=4,ix=5,sx=6,v2=7,w2=8,Yw=typeof self=="object"?self:globalThis,h_=(n,e)=>{const t=(i,s)=>(n.set(s,i),i),r=i=>{if(n.has(i))return n.get(i);const[s,o]=e[i];switch(s){case Jp:case x2:return t(o,i);case Th:{const l=t([],i);for(const c of o)l.push(r(c));return l}case wp:{const l=t({},i);for(const[c,h]of o)l[r(c)]=r(h);return l}case nx:return t(new Date(o),i);case rx:{const{source:l,flags:c}=o;return t(new RegExp(l,c),i)}case ix:{const l=t(new Map,i);for(const[c,h]of o)l.set(r(c),r(h));return l}case sx:{const l=t(new Set,i);for(const c of o)l.add(r(c));return l}case v2:{const{name:l,message:c}=o;return t(new Yw[l](c),i)}case w2:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(new Yw[s](o),i)};return r},Uw=n=>h_(new Map,n)(0),pu="",{toString:f_}={},{keys:d_}=Object,ih=n=>{const e=typeof n;if(e!=="object"||!n)return[Jp,e];const t=f_.call(n).slice(8,-1);switch(t){case"Array":return[Th,pu];case"Object":return[wp,pu];case"Date":return[nx,pu];case"RegExp":return[rx,pu];case"Map":return[ix,pu];case"Set":return[sx,pu];case"DataView":return[Th,t]}return t.includes("Array")?[Th,t]:t.includes("Error")?[v2,t]:[wp,t]},Nd=([n,e])=>n===Jp&&(e==="function"||e==="symbol"),p_=(n,e,t,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return t.set(l,c),c},s=o=>{if(t.has(o))return t.get(o);let[l,c]=ih(o);switch(l){case Jp:{let f=o;switch(c){case"bigint":l=w2,f=o.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([x2],o)}return i([l,f],o)}case Th:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const f=[],p=i([l,f],o);for(const m of o)f.push(s(m));return p}case wp:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const f=[],p=i([l,f],o);for(const m of d_(o))(n||!Nd(ih(o[m])))&&f.push([s(m),s(o[m])]);return p}case nx:return i([l,o.toISOString()],o);case rx:{const{source:f,flags:p}=o;return i([l,{source:f,flags:p}],o)}case ix:{const f=[],p=i([l,f],o);for(const[m,g]of o)(n||!(Nd(ih(m))||Nd(ih(g))))&&f.push([s(m),s(g)]);return p}case sx:{const f=[],p=i([l,f],o);for(const m of o)(n||!Nd(ih(m)))&&f.push(s(m));return p}}const{message:h}=o;return i([l,{name:c,message:h}],o)};return s},qw=(n,{json:e,lossy:t}={})=>{const r=[];return p_(!(e||t),!!e,new Map,r)(n),r},kp=typeof structuredClone=="function"?(n,e)=>e&&("json"in e||"lossy"in e)?Uw(qw(n,e)):structuredClone(n):(n,e)=>Uw(qw(n,e));function m_(n,e){const t=[{type:"text",value:"↩"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function g_(n,e){return"Back to reference "+(n+1)+(e>1?"-"+e:"")}function O_(n){const e=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",t=n.options.footnoteBackContent||m_,r=n.options.footnoteBackLabel||g_,i=n.options.footnoteLabel||"Footnotes",s=n.options.footnoteLabelTagName||"h2",o=n.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const f=n.all(h),p=String(h.identifier).toUpperCase(),m=rc(p.toLowerCase());let g=0;const w=[],k=n.footnoteCounts.get(p);for(;k!==void 0&&++g<=k;){w.length>0&&w.push({type:"text",value:" "});let M=typeof t=="string"?t:t(c,g);typeof M=="string"&&(M={type:"text",value:M}),w.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...w)}else f.push(...w);const Q={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:n.wrap(f,!0)};n.patch(h,Q),l.push(Q)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...kp(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
300
|
+
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(l,!0)},{type:"text",value:`
|
|
301
|
+
`}]}}const k2=function(n){if(n==null)return w_;if(typeof n=="function")return em(n);if(typeof n=="object")return Array.isArray(n)?y_(n):x_(n);if(typeof n=="string")return v_(n);throw new Error("Expected function, string, or object as test")};function y_(n){const e=[];let t=-1;for(;++t<n.length;)e[t]=k2(n[t]);return em(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function x_(n){const e=n;return em(t);function t(r){const i=r;let s;for(s in n)if(i[s]!==e[s])return!1;return!0}}function v_(n){return em(e);function e(t){return t&&t.type===n}}function em(n){return e;function e(t,r,i){return!!(k_(t)&&n.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function w_(){return!0}function k_(n){return n!==null&&typeof n=="object"&&"type"in n}const S2=[],S_=!0,Hw=!1,b_="skip";function P_(n,e,t,r){let i;typeof e=="function"&&typeof t!="function"?(r=t,t=e):i=e;const s=k2(i),o=r?-1:1;l(n,void 0,[])();function l(c,h,f){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=S2,w,k,C;if((!e||s(c,h,f[f.length-1]||void 0))&&(g=Q_(t(c,f)),g[0]===Hw))return g;if("children"in c&&c.children){const Q=c;if(Q.children&&g[0]!==b_)for(k=(r?Q.children.length:-1)+o,C=f.concat(Q);k>-1&&k<Q.children.length;){const M=Q.children[k];if(w=l(M,k,C)(),w[0]===Hw)return w;k=typeof w[1]=="number"?w[1]:k+o}}return g}}}function Q_(n){return Array.isArray(n)?n:typeof n=="number"?[S_,n]:n==null?S2:[n]}function b2(n,e,t,r){let i,s,o;typeof e=="function"&&typeof t!="function"?(s=void 0,o=e,i=t):(s=e,o=t,i=r),P_(n,s,l,i);function l(c,h){const f=h[h.length-1],p=f?f.children.indexOf(c):void 0;return o(c,p,f)}}const b0={}.hasOwnProperty,C_={};function T_(n,e){const t=e||C_,r=new Map,i=new Map,s=new Map,o={...c_,...t.handlers},l={all:h,applyData:E_,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:c,options:t,patch:$_,wrap:j_};return b2(n,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const p=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();p.has(m)||p.set(m,f)}}),l;function c(f,p){const m=f.type,g=l.handlers[m];if(b0.call(l.handlers,m)&&g)return g(l,f,p);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in f){const{children:k,...C}=f,Q=kp(C);return Q.children=l.all(f),Q}return kp(f)}return(l.options.unknownHandler||M_)(l,f,p)}function h(f){const p=[];if("children"in f){const m=f.children;let g=-1;for(;++g<m.length;){const w=l.one(m[g],f);if(w){if(g&&m[g-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Gw(w.value)),!Array.isArray(w)&&w.type==="element")){const k=w.children[0];k&&k.type==="text"&&(k.value=Gw(k.value))}Array.isArray(w)?p.push(...w):p.push(w)}}}return p}}function $_(n,e){n.position&&(e.position=f5(n))}function E_(n,e){let t=e;if(n&&n.data){const r=n.data.hName,i=n.data.hChildren,s=n.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&s&&Object.assign(t.properties,kp(s)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function M_(n,e){const t=e.data||{},r="value"in e&&!(b0.call(t,"hProperties")||b0.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function j_(n,e){const t=[];let r=-1;for(e&&t.push({type:"text",value:`
|
|
302
|
+
`});++r<n.length;)r&&t.push({type:"text",value:`
|
|
303
|
+
`}),t.push(n[r]);return e&&n.length>0&&t.push({type:"text",value:`
|
|
304
|
+
`}),t}function Gw(n){let e=0,t=n.charCodeAt(e);for(;t===9||t===32;)e++,t=n.charCodeAt(e);return n.slice(e)}function Kw(n,e){const t=T_(n,e),r=t.one(n,void 0),i=O_(t),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
305
|
+
`},i),s}function R_(n,e){return n&&"run"in n?async function(t,r){const i=Kw(t,{file:r,...e});await n.run(i,r)}:function(t,r){return Kw(t,{file:r,...n||e})}}function Jw(n){if(n)throw n}var uO,ek;function A_(){if(ek)return uO;ek=1;var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):e.call(h)==="[object Array]"},s=function(h){if(!h||e.call(h)!=="[object Object]")return!1;var f=n.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!f&&!p)return!1;var m;for(m in h);return typeof m>"u"||n.call(h,m)},o=function(h,f){t&&f.name==="__proto__"?t(h,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):h[f.name]=f.newValue},l=function(h,f){if(f==="__proto__")if(n.call(h,f)){if(r)return r(h,f).value}else return;return h[f]};return uO=function c(){var h,f,p,m,g,w,k=arguments[0],C=1,Q=arguments.length,M=!1;for(typeof k=="boolean"&&(M=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<Q;++C)if(h=arguments[C],h!=null)for(f in h)p=l(k,f),m=l(h,f),k!==m&&(M&&m&&(s(m)||(g=i(m)))?(g?(g=!1,w=p&&i(p)?p:[]):w=p&&s(p)?p:{},o(k,{name:f,newValue:c(M,w,m)})):typeof m<"u"&&o(k,{name:f,newValue:m}));return k},uO}var N_=A_();const cO=af(N_);function P0(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function __(){const n=[],e={run:t,use:r};return e;function t(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...h){const f=n[++s];let p=-1;if(c){o(c);return}for(;++p<i.length;)(h[p]===null||h[p]===void 0)&&(h[p]=i[p]);i=h,f?z_(f,l)(...h):o(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return n.push(i),e}}function z_(n,e){let t;return r;function r(...o){const l=n.length>o.length;let c;l&&o.push(i);try{c=n.apply(this,o)}catch(h){const f=h;if(l&&t)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(o,...l){t||(t=!0,e(o,...l))}function s(o){i(null,o)}}const ls={basename:L_,dirname:D_,extname:I_,join:Z_,sep:"/"};function L_(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ff(n);let t=0,r=-1,i=n.length,s;if(e===void 0||e.length===0||e.length>n.length){for(;i--;)if(n.codePointAt(i)===47){if(s){t=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":n.slice(t,r)}if(e===n)return"";let o=-1,l=e.length-1;for(;i--;)if(n.codePointAt(i)===47){if(s){t=i+1;break}}else o<0&&(s=!0,o=i+1),l>-1&&(n.codePointAt(i)===e.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return t===r?r=o:r<0&&(r=n.length),n.slice(t,r)}function D_(n){if(ff(n),n.length===0)return".";let e=-1,t=n.length,r;for(;--t;)if(n.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?n.codePointAt(0)===47?"/":".":e===1&&n.codePointAt(0)===47?"//":n.slice(0,e)}function I_(n){ff(n);let e=n.length,t=-1,r=0,i=-1,s=0,o;for(;e--;){const l=n.codePointAt(e);if(l===47){if(o){r=e+1;break}continue}t<0&&(o=!0,t=e+1),l===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||t<0||s===0||s===1&&i===t-1&&i===r+1?"":n.slice(i,t)}function Z_(...n){let e=-1,t;for(;++e<n.length;)ff(n[e]),n[e]&&(t=t===void 0?n[e]:t+"/"+n[e]);return t===void 0?".":X_(t)}function X_(n){ff(n);const e=n.codePointAt(0)===47;let t=V_(n,!e);return t.length===0&&!e&&(t="."),t.length>0&&n.codePointAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function V_(n,e){let t="",r=0,i=-1,s=0,o=-1,l,c;for(;++o<=n.length;){if(o<n.length)l=n.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,s=0;continue}}else if(t.length>0){t="",r=0,i=o,s=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+n.slice(i+1,o):t=n.slice(i+1,o),r=o-i-1;i=o,s=0}else l===46&&s>-1?s++:s=-1}return t}function ff(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const W_={cwd:F_};function F_(){return"/"}function Q0(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function B_(n){if(typeof n=="string")n=new URL(n);else if(!Q0(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Y_(n)}function Y_(n){if(n.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=n.pathname;let t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){const r=e.codePointAt(t+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(e)}const hO=["history","path","basename","stem","extname","dirname"];class P2{constructor(e){let t;e?Q0(e)?t={path:e}:typeof e=="string"||U_(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":W_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<hO.length;){const s=hO[r];s in t&&t[s]!==void 0&&t[s]!==null&&(this[s]=s==="history"?[...t[s]]:t[s])}let i;for(i in t)hO.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ls.basename(this.path):void 0}set basename(e){dO(e,"basename"),fO(e,"basename"),this.path=ls.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ls.dirname(this.path):void 0}set dirname(e){tk(this.basename,"dirname"),this.path=ls.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ls.extname(this.path):void 0}set extname(e){if(fO(e,"extname"),tk(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ls.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Q0(e)&&(e=B_(e)),dO(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ls.basename(this.path,this.extname):void 0}set stem(e){dO(e,"stem"),fO(e,"stem"),this.path=ls.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const i=this.message(e,t,r);throw i.fatal=!0,i}info(e,t,r){const i=this.message(e,t,r);return i.fatal=void 0,i}message(e,t,r){const i=new qn(e,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function fO(n,e){if(n&&n.includes(ls.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ls.sep+"`")}function dO(n,e){if(!n)throw new Error("`"+e+"` cannot be empty")}function tk(n,e){if(!n)throw new Error("Setting `"+e+"` requires `path` to be set too")}function U_(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const q_=function(n){const r=this.constructor.prototype,i=r[n],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},H_={}.hasOwnProperty;class ox extends q_{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=__()}copy(){const e=new ox;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(cO(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(gO("data",this.frozen),this.namespace[e]=t,this):H_.call(this.namespace,e)&&this.namespace[e]||void 0:e?(gO("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=_d(e),r=this.parser||this.Parser;return pO("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),pO("process",this.parser||this.Parser),mO("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(s,o){const l=_d(e),c=r.parse(l);r.run(c,l,function(f,p,m){if(f||!p||!m)return h(f);const g=p,w=r.stringify(g,m);J_(w)?m.value=w:m.result=w,h(f,m)});function h(f,p){f||!p?o(f):s?s(p):t(void 0,p)}}}processSync(e){let t=!1,r;return this.freeze(),pO("processSync",this.parser||this.Parser),mO("processSync",this.compiler||this.Compiler),this.process(e,i),rk("processSync","process",t),r;function i(s,o){t=!0,Jw(s),r=o}}run(e,t,r){nk(e),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?s(void 0,r):new Promise(s);function s(o,l){const c=_d(t);i.run(e,c,h);function h(f,p,m){const g=p||e;f?l(f):o?o(g):r(void 0,g,m)}}}runSync(e,t){let r=!1,i;return this.run(e,t,s),rk("runSync","run",r),i;function s(o,l){Jw(o),i=l,r=!0}}stringify(e,t){this.freeze();const r=_d(t),i=this.compiler||this.Compiler;return mO("stringify",i),nk(e),i(e,r)}use(e,...t){const r=this.attachers,i=this.namespace;if(gO("use",this.frozen),e!=null)if(typeof e=="function")c(e,t);else if(typeof e=="object")Array.isArray(e)?l(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[f,...p]=h;c(f,p)}else o(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function o(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(h.plugins),h.settings&&(i.settings=cO(!0,i.settings,h.settings))}function l(h){let f=-1;if(h!=null)if(Array.isArray(h))for(;++f<h.length;){const p=h[f];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,f){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===h){m=p;break}if(m===-1)r.push([h,...f]);else if(f.length>0){let[g,...w]=f;const k=r[m][1];P0(k)&&P0(g)&&(g=cO(!0,k,g)),r[m]=[h,g,...w]}}}}const G_=new ox().freeze();function pO(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function mO(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function gO(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nk(n){if(!P0(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function rk(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function _d(n){return K_(n)?n:new P2(n)}function K_(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function J_(n){return typeof n=="string"||ez(n)}function ez(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const tz="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ik=[],sk={allowDangerousHtml:!0},nz=/^(https?|ircs?|mailto|xmpp)$/i,rz=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Js(n){const e=iz(n),t=sz(n);return oz(e.runSync(e.parse(t),t),n)}function iz(n){const e=n.rehypePlugins||ik,t=n.remarkPlugins||ik,r=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...sk}:sk;return G_().use(LN).use(t).use(R_,r).use(e)}function sz(n){const e=n.children||"",t=new P2;return typeof e=="string"&&(t.value=e),t}function oz(n,e){const t=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,o=e.skipHtml,l=e.unwrapDisallowed,c=e.urlTransform||az;for(const f of rz)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+tz+f.id,void 0);return b2(n,h),O5(n,{Fragment:v.Fragment,components:i,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(f,p,m){if(f.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:f.value},p;if(f.type==="element"){let g;for(g in oO)if(Object.hasOwn(oO,g)&&Object.hasOwn(f.properties,g)){const w=f.properties[g],k=oO[g];(k===null||k.includes(f.tagName))&&(f.properties[g]=c(String(w||""),g,f))}}if(f.type==="element"){let g=t?!t.includes(f.tagName):s?s.includes(f.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(f,p,m)),g&&m&&typeof p=="number")return l&&f.children?m.children.splice(p,1,...f.children):m.children.splice(p,1),p}}}function az(n){const e=n.indexOf(":"),t=n.indexOf("?"),r=n.indexOf("#"),i=n.indexOf("/");return e===-1||i!==-1&&e>i||t!==-1&&e>t||r!==-1&&e>r||nz.test(n.slice(0,e))?n:""}function lz({call:n}){const e=n.status==="running",t=n.status==="error";return v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 my-1.5 rounded-lg bg-gray-100 dark:bg-zinc-800/50 border border-gray-200 dark:border-zinc-700/50 text-xs font-mono",children:[e?v.jsx(wl,{className:"h-3.5 w-3.5 text-indigo-400 animate-spin shrink-0"}):t?v.jsx(Xy,{className:"h-3.5 w-3.5 text-red-400 shrink-0"}):v.jsx(Zh,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0"}),v.jsx("span",{className:"text-indigo-600 dark:text-indigo-300 font-semibold",children:n.toolName}),n.duration_ms!=null&&v.jsxs("span",{className:"text-zinc-500 ml-auto",children:[String(n.duration_ms),"ms"]})]})}function uz({confirmation:n,onApprove:e,onDeny:t}){const r=n.status==="approved"||n.status==="denied";return v.jsxs("div",{className:"my-2 p-3 rounded-lg border border-amber-500/30 bg-amber-500/5",children:[v.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300 mb-1",children:[v.jsx(eR,{className:"h-4 w-4"}),v.jsx("span",{className:"uppercase text-[11px] font-bold bg-indigo-500 text-white px-1.5 py-0.5 rounded",children:n.method}),v.jsx("span",{className:"text-zinc-300",children:n.endpoint})]}),n.reason&&v.jsx("p",{className:"text-xs text-zinc-400 mb-2",children:n.reason}),r?v.jsx("span",{className:`text-xs font-semibold ${n.status==="approved"?"text-emerald-400":"text-red-400"}`,children:n.status==="approved"?"Approved":"Denied"}):v.jsxs("div",{className:"flex gap-2",children:[v.jsx("button",{onClick:e,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-emerald-600 text-white hover:bg-emerald-500 transition-colors",children:"Approve"}),v.jsx("button",{onClick:t,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-zinc-700 text-zinc-300 border border-zinc-600 hover:bg-zinc-600 transition-colors",children:"Deny"})]})]})}function cz({blocks:n,respondToConfirmation:e}){return v.jsx(v.Fragment,{children:n.map((t,r)=>{switch(t.type){case"text":return v.jsx("div",{className:"prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-900 dark:prose-headings:text-zinc-200 prose-p:text-gray-900 dark:prose-p:text-zinc-300 prose-strong:text-gray-900 dark:prose-strong:text-zinc-200 prose-code:text-indigo-700 dark:prose-code:text-indigo-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-gray-100 dark:prose-pre:bg-zinc-800/80 prose-pre:border prose-pre:border-gray-200 dark:prose-pre:border-zinc-700/50 prose-a:text-indigo-700 dark:prose-a:text-indigo-400 prose-li:text-gray-900 dark:prose-li:text-zinc-300",children:v.jsx(Js,{children:t.text})},`t-${String(r)}`);case"tool_calls":return v.jsx("div",{children:t.calls.map(i=>v.jsx(lz,{call:i},i.toolId))},`tc-${String(r)}`);case"confirmation":{const i=t.confirmation;return v.jsx(uz,{confirmation:i,onApprove:()=>{i.correlationId&&e(i.correlationId,!0)},onDeny:()=>{i.correlationId&&e(i.correlationId,!1)}},`cf-${String(r)}`)}default:return null}})})}function hz(){const{resumeSessionId:n}=ec(),[e]=ej(),t=e.get("resume"),r=F.useMemo(()=>t??n,[t,n]),{messages:i,send:s,isStreaming:o,activeToolCalls:l,respondToConfirmation:c,usage:h}=zj({initialSessionId:r}),[f,p]=F.useState(""),[m,g]=F.useState([]),w=F.useRef(null),k=F.useRef(null);F.useEffect(()=>{if(!r){g([]);return}fetch(`/session/${encodeURIComponent(r)}`).then(E=>E.ok?E.json():null).then(E=>{if(E&&typeof E=="object"&&"messages"in E&&Array.isArray(E.messages)){const I=E.messages;g(I.filter(U=>U.role==="user"||U.role==="assistant"))}}).catch(()=>{})},[r]),F.useEffect(()=>{var E;(E=w.current)==null||E.scrollIntoView({behavior:"smooth"})},[i,m]),F.useEffect(()=>{var E;o||(E=k.current)==null||E.focus()},[o]);const C=F.useCallback(E=>{E.preventDefault();const I=f.trim();!I||o||(p(""),k.current&&(k.current.style.height="auto"),s(I))},[f,o,s]),Q=F.useCallback(E=>{if(E.key==="Enter"&&!E.shiftKey){E.preventDefault();const I=f.trim();I&&!o&&(p(""),k.current&&(k.current.style.height="auto"),s(I))}},[f,o,s]),M=i.length>0||m.length>0;return v.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[v.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:M?v.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-6",children:[m.map((E,I)=>v.jsx("div",{className:E.role==="user"?"mb-6 flex justify-end":"mb-6",children:E.role==="user"?v.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600/60 text-white/80 text-[14px] leading-relaxed",children:E.text}):v.jsx("div",{className:"text-[14px] text-gray-400 dark:text-zinc-400 prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-400 dark:prose-headings:text-zinc-400 prose-p:text-gray-400 dark:prose-p:text-zinc-400 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-a:text-indigo-500/60 dark:prose-a:text-indigo-400/60",children:v.jsx(Js,{children:E.text})})},`hist-${String(I)}`)),m.length>0&&i.length===0&&v.jsx("div",{className:"text-center text-xs text-gray-400 dark:text-zinc-600 mb-4 py-2 border-t border-gray-200 dark:border-zinc-800/50",children:"Session resumed"}),i.map(E=>{switch(E.type){case"user":return v.jsx("div",{className:"mb-6 flex justify-end",children:v.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600 text-white text-[14px] leading-relaxed",children:E.text})},E.id);case"assistant_text":return v.jsx("div",{className:"mb-6",children:v.jsx("div",{className:"text-[14px] text-gray-900 dark:text-zinc-200",children:v.jsx(cz,{blocks:E.contentBlocks,respondToConfirmation:c})})},E.id);case"error":return v.jsx("div",{className:"mb-6 px-4 py-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-300 text-sm",children:E.message},E.id);default:return null}}),o&&l.length===0&&v.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-sm mb-4",children:[v.jsx(wl,{className:"h-4 w-4 animate-spin"}),v.jsx("span",{children:"Thinking..."})]}),v.jsx("div",{ref:w})]}):v.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center px-4",children:[v.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",className:"mb-5 opacity-30",children:[v.jsx("defs",{children:v.jsx("clipPath",{id:"empty-sq",children:v.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),v.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),v.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),v.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#empty-sq)"})]}),v.jsx("h2",{className:"text-lg font-medium text-gray-400 dark:text-zinc-400 mb-1",children:"What can I help with?"}),v.jsx("p",{className:"text-sm text-gray-400 dark:text-zinc-600 max-w-sm",children:"Ask me anything. I can search, analyze, and connect to your tools."})]})}),v.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800/80 bg-gray-50 dark:bg-[#0f0f17] px-4 py-4",children:[v.jsxs("form",{onSubmit:C,className:"max-w-3xl mx-auto relative",children:[v.jsx("textarea",{ref:k,value:f,onChange:E=>{p(E.target.value);const I=E.target;I.style.height="auto",I.style.height=`${Math.min(I.scrollHeight,160)}px`},onKeyDown:Q,placeholder:"Message...",disabled:o,rows:1,className:"w-full resize-none rounded-xl bg-white dark:bg-zinc-800/80 border border-gray-300 dark:border-zinc-700/60 px-4 py-3 pr-12 text-[14px] text-gray-900 dark:text-zinc-100 placeholder-gray-400 dark:placeholder-zinc-500 outline-none focus:border-indigo-500/60 focus:ring-1 focus:ring-indigo-500/20 transition-colors disabled:opacity-50 overflow-y-auto",style:{minHeight:"48px",maxHeight:"160px"}}),v.jsx("button",{type:"submit",disabled:o||f.trim().length===0,className:"absolute right-2 bottom-2 h-8 w-8 rounded-lg bg-indigo-600 text-white flex items-center justify-center hover:bg-indigo-500 transition-colors disabled:opacity-20 disabled:hover:bg-indigo-600",children:v.jsx(Kj,{className:"h-4 w-4"})})]}),(h.inputTokens>0||h.outputTokens>0)&&v.jsxs("div",{className:"max-w-3xl mx-auto mt-1.5 text-[11px] text-gray-400 dark:text-zinc-600 font-mono text-right",children:[(h.inputTokens+h.outputTokens).toLocaleString()," tokens (",h.inputTokens.toLocaleString()," in / ",h.outputTokens.toLocaleString()," out)"]})]})]})}function fz(n){const e=Date.now()-n,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${String(t)}m ago`;const r=Math.floor(t/60);if(r<24)return`${String(r)}h ago`;const i=Math.floor(r/24);return`${String(i)}d ago`}function dz(n){return new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function pz(){const[n,e]=F.useState([]),[t,r]=F.useState(!0);return F.useEffect(()=>{fetch("/sessions").then(i=>i.ok?i.json():{sessions:[]}).then(i=>{i&&typeof i=="object"&&"sessions"in i&&Array.isArray(i.sessions)&&e(i.sessions)}).catch(()=>{}).finally(()=>r(!1))},[]),v.jsxs("div",{className:"h-full flex flex-col bg-[#0a0a0f]",children:[v.jsxs("div",{className:"border-b border-zinc-800/50 px-6 py-4",children:[v.jsx("h1",{className:"text-lg font-semibold text-zinc-200",children:"Sessions"}),v.jsxs("p",{className:"text-sm text-zinc-500 mt-0.5",children:[n.length," conversation",n.length!==1?"s":""]})]}),v.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:t?v.jsx("div",{className:"flex items-center justify-center h-32 text-zinc-500 text-sm",children:"Loading..."}):n.length===0?v.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center px-4",children:[v.jsx(d0,{className:"h-8 w-8 text-zinc-700 mb-3"}),v.jsx("p",{className:"text-sm text-zinc-500",children:"No sessions yet. Start a conversation from the Chat page."})]}):v.jsx("div",{className:"divide-y divide-zinc-800/50",children:n.map(i=>v.jsxs(cf,{to:`/sessions/${i.id}`,className:"flex items-center gap-4 px-6 py-4 hover:bg-white/[0.02] transition-colors group",children:[v.jsx("div",{className:"h-9 w-9 rounded-lg bg-indigo-500/10 flex items-center justify-center shrink-0",children:v.jsx(d0,{className:"h-4 w-4 text-indigo-400"})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-sm font-medium text-zinc-300 truncate font-mono",children:i.id.slice(0,8)}),v.jsx("span",{className:"text-xs text-zinc-600",children:i.tenantId})]}),v.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[v.jsxs("span",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[v.jsx(Gp,{className:"h-3 w-3"}),dz(i.createdAt)]}),v.jsxs("span",{className:"text-xs text-zinc-600",children:["Last active ",fz(i.lastAccessedAt)]})]})]}),v.jsx(Zy,{className:"h-4 w-4 text-zinc-700 group-hover:text-zinc-500 transition-colors shrink-0"})]},i.id))})})]})}function mz(){const{sessionId:n}=Ju(),e=Ku(),[t,r]=F.useState([]),[i,s]=F.useState(!0),[o,l]=F.useState(null);F.useEffect(()=>{n&&fetch(`/session/${encodeURIComponent(n)}`).then(f=>{if(!f.ok)throw new Error("Session not found");return f.json()}).then(f=>{f&&typeof f=="object"&&"messages"in f&&Array.isArray(f.messages)&&r(f.messages)}).catch(f=>{l(f instanceof Error?f.message:"Failed to load session")}).finally(()=>s(!1))},[n]);const c=t.filter(f=>f.role==="user"),h=t.filter(f=>f.role==="assistant");return v.jsxs("div",{className:"h-full flex flex-col bg-[#0a0a0f]",children:[v.jsxs("div",{className:"border-b border-zinc-800/50 px-6 py-4 flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(cf,{to:"/sessions",className:"text-zinc-500 hover:text-zinc-300 transition-colors",children:v.jsx(Iy,{className:"h-4 w-4"})}),v.jsxs("div",{children:[v.jsxs("h1",{className:"text-sm font-semibold text-zinc-200 font-mono",children:[n==null?void 0:n.slice(0,8),"..."]}),v.jsxs("div",{className:"flex items-center gap-3 mt-0.5",children:[v.jsxs("span",{className:"text-xs text-zinc-500",children:[c.length," messages"]}),v.jsxs("span",{className:"text-xs text-zinc-500",children:[h.length," responses"]})]})]})]}),v.jsxs("button",{onClick:()=>{e(`/?resume=${n??""}`)},className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md bg-indigo-600 text-white hover:bg-indigo-500 transition-colors",children:[v.jsx(Fy,{className:"h-3 w-3"}),"Resume"]})]}),v.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:i?v.jsx("div",{className:"flex items-center justify-center h-32 text-zinc-500 text-sm",children:"Loading..."}):o?v.jsx("div",{className:"flex items-center justify-center h-32 text-red-400 text-sm",children:o}):v.jsx("div",{className:"max-w-3xl mx-auto px-4 py-6",children:t.map((f,p)=>v.jsx("div",{className:f.role==="user"?"mb-6 flex justify-end":"mb-6",children:f.role==="user"?v.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600/70 text-white text-[14px] leading-relaxed",children:f.text}):v.jsx("div",{className:"text-[14px] text-zinc-300 prose prose-invert prose-sm max-w-none prose-headings:text-zinc-200 prose-p:text-zinc-300 prose-strong:text-zinc-200 prose-code:text-indigo-300 prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-zinc-800/80 prose-pre:border prose-pre:border-zinc-700/50 prose-a:text-indigo-400 prose-li:text-zinc-300",children:v.jsx(Js,{children:f.text})})},`msg-${String(p)}`))})})]})}const ok=["bg-blue-100 dark:bg-blue-500/10 text-blue-800 dark:text-blue-400","bg-green-100 dark:bg-green-500/10 text-green-800 dark:text-green-400","bg-yellow-100 dark:bg-yellow-500/10 text-yellow-800 dark:text-yellow-400","bg-red-100 dark:bg-red-500/10 text-red-800 dark:text-red-400","bg-purple-100 dark:bg-purple-500/10 text-purple-800 dark:text-purple-400","bg-pink-100 dark:bg-pink-500/10 text-pink-800 dark:text-pink-400","bg-indigo-100 dark:bg-indigo-500/10 text-indigo-800 dark:text-indigo-400","bg-orange-100 dark:bg-orange-500/10 text-orange-800 dark:text-orange-400","bg-teal-100 dark:bg-teal-500/10 text-teal-800 dark:text-teal-400","bg-cyan-100 dark:bg-cyan-500/10 text-cyan-800 dark:text-cyan-400"];function gz(n){let e=0;for(let t=0;t<n.length;t++)e=(e<<5)-e+n.charCodeAt(t)|0;return Math.abs(e)}const Oz={P1:"bg-red-100 text-red-800",P2:"bg-orange-100 text-orange-800",P3:"bg-yellow-100 text-yellow-800",P4:"bg-blue-100 text-blue-800",critical:"bg-red-100 text-red-800",at_risk:"bg-orange-100 text-orange-800",attention:"bg-yellow-100 text-yellow-800",healthy:"bg-green-100 text-green-800",active:"bg-green-100 text-green-800",resolved:"bg-gray-100 text-gray-800",false_positive:"bg-gray-100 text-gray-600",immediate:"bg-red-100 text-red-800",soon:"bg-yellow-100 text-yellow-800",when_convenient:"bg-blue-100 text-blue-800"};function Q2({value:n,className:e}){const t=Oz[n]??ok[gz(n)%ok.length];return v.jsx("span",{className:Sr("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",t,e),children:n})}function yz(n){const e=new Date(String(n)),t=Date.now()-e.getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${String(r)}m ago`;const i=Math.floor(r/60);if(i<24)return`${String(i)}h ago`;const s=Math.floor(i/24);return s<30?`${String(s)}d ago`:e.toLocaleDateString()}function xz(n,e){const t=Object.entries(n);let r=null;const i=[],s=[];let o=null;for(const[l,c]of t)if(l!==e){if(c.type==="enum"){i.push(l);continue}if(c.type==="datetime"&&!o){o=l;continue}if(!r&&c.type==="string"&&["title","name","summary","subject"].includes(l)){r=l;continue}c.type==="string"&&s.push(l)}return!r&&s.length>0&&(r=s.shift()??null),{title:r,badges:i,textFields:s.slice(0,2),dateField:o}}function vz({storeName:n,schema:e,keyTemplate:t,documents:r,total:i}){const s=Ku(),o=t.replace(/[{}]/g,""),l=xz(e,o);return r.length===0?v.jsx("div",{className:"text-center py-16 text-gray-400 dark:text-zinc-600 text-sm",children:"No documents yet."}):v.jsxs("div",{children:[v.jsx("div",{className:"space-y-2",children:r.map(c=>{const h=c.payload,f=l.title?String(h[l.title]??c.key):c.key;return v.jsx("div",{onClick:()=>{s(`/entities/${n}/${c.key}`)},className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-zinc-900/50 transition-colors",children:v.jsxs("div",{className:"flex items-start justify-between gap-3",children:[v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-200 mb-1",children:f}),l.textFields.map(p=>{const m=h[p];if(!m)return null;const g=String(m);return v.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-400 mb-1.5 line-clamp-2",children:g.length>150?g.slice(0,150)+"...":g},p)}),l.badges.length>0&&v.jsx("div",{className:"flex items-center gap-1.5 flex-wrap mt-1",children:l.badges.map(p=>{const m=h[p];return m?v.jsx(Q2,{value:String(m)},p):null})})]}),v.jsxs("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[v.jsx("span",{className:"text-[11px] font-mono text-gray-400 dark:text-zinc-600",children:c.key}),l.dateField&&h[l.dateField]&&v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-600",children:yz(h[l.dateField])})]})]})},c.key)})}),i>r.length&&v.jsxs("div",{className:"mt-4 text-center text-xs text-gray-400 dark:text-zinc-600",children:["Showing ",r.length," of ",i.toLocaleString()]})]})}function wz(){const{storeName:n}=Ju(),{stores:e}=ec(),[t,r]=F.useState(),[i,s]=F.useState(),o=e.find(g=>g.name===n),{documents:l,total:c,isLoading:h,error:f}=Dj(n??"",{sort:t,filter:i,limit:50,refreshInterval:15e3}),p=F.useCallback(g=>{r(g)},[]),m=F.useCallback(g=>{s(Object.keys(g).length>0?g:void 0)},[]);return o?v.jsxs("div",{className:"max-w-[1200px] mx-auto px-6 pt-8 pb-12",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[v.jsx("div",{className:"h-9 w-9 rounded-lg bg-indigo-100 dark:bg-indigo-500/10 flex items-center justify-center",children:v.jsx(AP,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-400"})}),v.jsxs("div",{children:[v.jsx("h1",{className:"text-xl font-semibold tracking-tight text-gray-900 dark:text-zinc-200",children:o.entity.name}),v.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500",children:[c.toLocaleString()," document",c!==1?"s":""," in ",v.jsx("span",{className:"font-mono text-xs",children:o.name})]})]})]}),f&&v.jsx("div",{className:"mb-4 p-3 rounded-md bg-red-50 dark:bg-red-500/10 border border-red-200 dark:border-red-500/20 text-red-700 dark:text-red-300 text-sm",children:f}),h?v.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."}):v.jsx(vz,{storeName:n??"",schema:o.entity.schema,keyTemplate:o.entity.key,documents:l,total:c,onSortChange:p,onFilterChange:m})]}):v.jsxs("div",{className:"flex items-center justify-center h-full text-gray-400 dark:text-zinc-500 text-sm",children:["Store “",n,"” not found."]})}function ax({field:n,value:e,mode:t}){if(e==null)return v.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"—"});switch(n.type){case"string":return v.jsx(kz,{value:e,mode:t});case"number":return v.jsx(Sz,{value:e,field:n,mode:t});case"boolean":return v.jsx(bz,{value:e});case"datetime":return v.jsx(Pz,{value:e,mode:t});case"enum":return v.jsx(Q2,{value:String(e)});case"array":return v.jsx(Qz,{value:e,field:n,mode:t});case"object":return v.jsx(Cz,{value:e,field:n,mode:t});case"ref":return v.jsx(Tz,{value:e,field:n});default:return v.jsx("span",{children:String(e)})}}function kz({value:n,mode:e}){const t=String(n);return e==="table"&&t.length>50?v.jsxs("span",{title:t,children:[t.slice(0,50),"…"]}):v.jsx("span",{children:t})}function Sz({value:n,field:e,mode:t}){const r=Number(n);if(e.min===0&&e.max===1){const i=Math.round(r*100);return t==="table"?v.jsxs("span",{className:"tabular-nums",children:[i,"%"]}):v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"flex-1 h-2 bg-gray-100 dark:bg-zinc-800 rounded-full max-w-[200px]",children:v.jsx("div",{className:"h-2 bg-indigo-600 dark:bg-indigo-500 rounded-full",style:{width:`${i}%`}})}),v.jsxs("span",{className:"text-sm tabular-nums",children:[i,"%"]})]})}return v.jsx("span",{className:"tabular-nums",children:r.toLocaleString()})}function bz({value:n}){return n?v.jsx(Fj,{className:"h-4 w-4 text-green-600"}):v.jsx(tR,{className:"h-4 w-4 text-gray-400 dark:text-zinc-500"})}function Pz({value:n,mode:e}){const t=new Date(String(n)),r=$z(t);return e==="table"?v.jsx("span",{className:"text-gray-400 dark:text-zinc-500",title:t.toISOString(),children:r}):v.jsxs("div",{children:[v.jsx("div",{children:t.toLocaleString()}),v.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-500",children:r})]})}function Qz({value:n,field:e,mode:t}){return Array.isArray(n)?t==="table"?v.jsxs("span",{className:"inline-flex items-center rounded-full bg-gray-100 dark:bg-zinc-800 px-2 py-0.5 text-xs",children:[n.length," item",n.length!==1?"s":""]}):n.length===0?v.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"Empty array"}):v.jsx("div",{className:"space-y-1",children:n.map((r,i)=>v.jsx("div",{className:"pl-3 border-l-2 border-gray-200 dark:border-zinc-700",children:e.item?v.jsx(ax,{field:e.item,value:r,mode:"detail"}):v.jsx("span",{children:String(r)})},i))}):v.jsx("span",{children:String(n)})}function Cz({value:n,field:e,mode:t}){if(typeof n!="object"||n===null)return v.jsx("span",{children:String(n)});if(t==="table")return v.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"{...}"});const r=n;return e.fields?v.jsx("div",{className:"border rounded-md divide-y",children:Object.entries(e.fields).map(([i,s])=>v.jsxs("div",{className:"px-3 py-2 flex",children:[v.jsx("div",{className:"w-32 text-xs font-medium text-gray-400 dark:text-zinc-500 shrink-0",children:i}),v.jsx("div",{className:"flex-1 min-w-0 text-sm",children:v.jsx(ax,{field:s,value:r[i],mode:"detail"})})]},i))}):v.jsx("pre",{className:"text-xs whitespace-pre-wrap bg-gray-100 dark:bg-zinc-800/30 rounded p-2",children:JSON.stringify(n,null,2)})}function Tz({value:n,field:e}){const t=e.store;return t?v.jsx(cf,{to:`/entities/${t}/${String(n)}`,className:"text-indigo-600 dark:text-indigo-400 hover:underline",children:String(n)}):v.jsx("span",{children:String(n)})}function $z(n){const t=Date.now()-n.getTime();if(t<0)return"just now";const r=Math.floor(t/1e3);if(r<60)return`${r}s ago`;const i=Math.floor(r/60);if(i<60)return`${i} min ago`;const s=Math.floor(i/60);if(s<24)return`${s}h ago`;const o=Math.floor(s/24);return o<30?`${o}d ago`:n.toLocaleDateString()}/**
|
|
306
|
+
* @license
|
|
307
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
308
|
+
* SPDX-License-Identifier: MIT
|
|
309
|
+
*/function Ez({history:n}){return n.length===0?null:v.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[v.jsx("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider",children:"Version History"}),v.jsx("div",{className:"space-y-3",children:n.map(e=>v.jsxs("div",{className:"relative pl-6 pb-3 border-l-2 border-muted last:pb-0",children:[v.jsx("div",{className:"absolute -left-[5px] top-1 h-2 w-2 rounded-full bg-muted-foreground"}),v.jsxs("div",{className:"flex items-center justify-between mb-1",children:[v.jsxs("span",{className:"text-sm font-medium",children:["v",e.version]}),v.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(e.meta.computedAt).toLocaleString()})]}),v.jsxs("details",{className:"text-xs",children:[v.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View payload"}),v.jsx("pre",{className:"mt-1 whitespace-pre-wrap bg-muted/30 rounded p-2 overflow-auto max-h-40",children:JSON.stringify(e.payload,null,2)})]})]},e.version))})]})}function Mz({schema:n,document:e,meta:t,history:r,hasTrace:i}){return v.jsxs("div",{className:"space-y-5",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-tight text-gray-900 dark:text-zinc-200",children:e.key}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-500 bg-gray-100 dark:bg-zinc-800 px-2 py-0.5 rounded font-mono",children:["v",String(e.version)]}),t.stale&&v.jsx("span",{className:"px-2 py-0.5 rounded bg-amber-50 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-500/20 text-xs font-medium",children:"Stale"})]})]}),v.jsx("div",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl divide-y divide-gray-100 dark:divide-zinc-800/50",children:Object.entries(n).map(([s,o])=>v.jsxs("div",{className:"px-5 py-3.5 flex",children:[v.jsxs("div",{className:"w-44 text-sm font-medium text-gray-500 dark:text-zinc-400 shrink-0 pt-0.5",children:[s,o.nullable&&v.jsx("span",{className:"text-[10px] ml-1 text-gray-300 dark:text-zinc-600",children:"?"})]}),v.jsx("div",{className:"text-sm flex-1 min-w-0 text-gray-900 dark:text-zinc-200",children:v.jsx(ax,{field:o,value:e.payload[s],mode:"detail"})})]},s))}),v.jsxs("div",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-5",children:[v.jsx("h2",{className:"text-xs font-semibold text-gray-400 dark:text-zinc-500 uppercase tracking-widest mb-3",children:"Metadata"}),v.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-3",children:[v.jsx(Bo,{icon:v.jsx(Gp,{className:"h-3.5 w-3.5"}),label:"Computed",value:jz(t.computedAt)}),t.ttl!==void 0&&v.jsx(Bo,{icon:v.jsx(eO,{className:"h-3.5 w-3.5"}),label:"TTL",value:`${String(t.ttl)}s`}),t.modelUsed&&v.jsx(Bo,{icon:v.jsx(Vy,{className:"h-3.5 w-3.5"}),label:"Model",value:t.modelUsed}),t.durationMs!==void 0&&v.jsx(Bo,{icon:v.jsx(Zu,{className:"h-3.5 w-3.5"}),label:"Duration",value:`${String(t.durationMs)}ms`}),t.tokenCost!==void 0&&v.jsx(Bo,{icon:v.jsx(eO,{className:"h-3.5 w-3.5"}),label:"Tokens",value:t.tokenCost.toLocaleString()}),t.estimatedCostUsd!==void 0&&v.jsx(Bo,{icon:v.jsx(Bj,{className:"h-3.5 w-3.5"}),label:"Cost",value:`$${t.estimatedCostUsd.toFixed(4)}`}),t.automationId&&v.jsx(Bo,{icon:v.jsx(Zu,{className:"h-3.5 w-3.5"}),label:"Automation",value:t.automationId}),t.skillId&&v.jsx(Bo,{icon:v.jsx(eO,{className:"h-3.5 w-3.5"}),label:"Skill",value:t.skillId})]})]}),i&&t.trace&&v.jsxs("details",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl group",children:[v.jsx("summary",{className:"px-5 py-3.5 cursor-pointer text-sm font-medium text-gray-500 dark:text-zinc-400 hover:text-gray-700 dark:hover:text-zinc-300 transition-colors",children:"Reasoning Trace"}),v.jsx("pre",{className:"px-5 py-4 border-t border-gray-100 dark:border-zinc-800 text-xs whitespace-pre-wrap text-gray-600 dark:text-zinc-400 bg-gray-50/50 dark:bg-zinc-900/30 overflow-auto max-h-96 scrollbar-thin font-mono",children:t.trace})]}),v.jsx(Ez,{history:r})]})}function Bo({icon:n,label:e,value:t}){return v.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[v.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:n}),v.jsxs("span",{className:"text-gray-500 dark:text-zinc-500",children:[e,":"]}),v.jsx("span",{className:"text-gray-700 dark:text-zinc-300 font-mono text-xs truncate",children:t})]})}function jz(n){const e=new Date(n),r=Date.now()-e.getTime();return r<6e4?"just now":r<36e5?`${String(Math.floor(r/6e4))} min ago`:r<864e5?`${String(Math.floor(r/36e5))}h ago`:e.toLocaleString()}function Rz(){const{storeName:n,key:e}=Ju(),t=Ku(),{stores:r}=ec(),i=r.find(f=>f.name===n),{document:s,meta:o,history:l,isLoading:c,error:h}=Lj(n??"",{key:e??"",refreshInterval:15e3});return i?v.jsx("div",{className:"h-full bg-white dark:bg-[#0a0a0f]",children:v.jsxs("div",{className:"max-w-[900px] mx-auto px-6 pt-8 pb-12",children:[v.jsxs("button",{onClick:()=>{t(`/entities/${n??""}`)},className:"flex items-center gap-1.5 text-sm text-gray-500 dark:text-zinc-400 hover:text-indigo-600 dark:hover:text-indigo-400 mb-5 transition-colors",children:[v.jsx(Iy,{className:"h-4 w-4"}),"Back to ",i.entity.name]}),h&&v.jsx("div",{className:"mb-4 p-3 rounded-md bg-red-50 dark:bg-red-500/10 border border-red-200 dark:border-red-500/20 text-red-700 dark:text-red-300 text-sm",children:h}),c?v.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."}):!s||!o?v.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Document not found."}):v.jsx(Mz,{schema:i.entity.schema,document:s,meta:o,history:l,hasTrace:i.trace})]})}):v.jsxs("div",{className:"flex items-center justify-center h-full text-gray-400 dark:text-zinc-500 text-sm",children:["Store “",n,"” not found."]})}var Ka={},_r={},sh={},Ja={},OO={},ak;function Az(){return ak||(ak=1,Object.defineProperty(OO,"__esModule",{value:!0})),OO}var oh={},ah={},lk;function $l(){var e,t,r,i,s,C2,l;if(lk)return ah;lk=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.CronField=void 0;let n=(l=class{constructor(h,f={rawValue:""}){Ie(this,s);Ie(this,e,!1);Ie(this,t,!1);Ie(this,r,!1);Ie(this,i,[]);Yc(this,"options",{rawValue:""});if(!Array.isArray(h))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(h.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...f,rawValue:f.rawValue??""},ge(this,i,h.sort(l.sorter)),ge(this,r,this.options.wildcard!==void 0?this.options.wildcard:Ee(this,s,C2).call(this)),ge(this,e,this.options.rawValue.includes("L")||h.includes("L")),ge(this,t,this.options.rawValue.includes("?")||h.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return L(this,e)}get hasQuestionMarkChar(){return L(this,t)}get isWildcard(){return L(this,r)}get values(){return L(this,i)}static sorter(h,f){const p=typeof h=="number",m=typeof f=="number";return p&&m?h-f:!p&&!m?h.localeCompare(f):p?-1:1}static findNearestValueInList(h,f,p=!1){if(p){for(let m=h.length-1;m>=0;m--)if(h[m]<f)return h[m];return null}for(let m=0;m<h.length;m++)if(h[m]>f)return h[m];return null}findNearestValue(h,f=!1){return this.constructor.findNearestValueInList(this.values,h,f)}serialize(){return{wildcard:L(this,r),values:L(this,i)}}validate(){let h;const f=this.chars.length>0?` or chars ${this.chars.join("")}`:"",p=k=>C=>new RegExp(`^\\d{0,2}${C}$`).test(k),m=k=>(h=k,typeof k=="number"?k>=this.min&&k<=this.max:this.chars.some(p(k)));if(!L(this,i).every(m))throw new Error(`${this.constructor.name} Validation error, got value ${h} expected range ${this.min}-${this.max}${f}`);const w=L(this,i).find((k,C)=>L(this,i).indexOf(k)!==C);if(w)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${w}`)}},e=new WeakMap,t=new WeakMap,r=new WeakMap,i=new WeakMap,s=new WeakSet,C2=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(h,f)=>f+this.min).every(h=>L(this,i).includes(h))},l);return ah.CronField=n,ah}var uk;function Nz(){if(uk)return oh;uk=1,Object.defineProperty(oh,"__esModule",{value:!0}),oh.CronDayOfMonth=void 0;const n=$l(),e=1,t=31,r=Object.freeze(["L"]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return oh.CronDayOfMonth=i,oh}var lh={},ck;function _z(){if(ck)return lh;ck=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.CronDayOfWeek=void 0;const n=$l(),e=0,t=7,r=Object.freeze(["L"]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return lh.CronDayOfWeek=i,lh}var uh={},hk;function zz(){if(hk)return uh;hk=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.CronHour=void 0;const n=$l(),e=0,t=23,r=Object.freeze([]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return uh.CronHour=i,uh}var ch={},fk;function Lz(){if(fk)return ch;fk=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.CronMinute=void 0;const n=$l(),e=0,t=59,r=Object.freeze([]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return ch.CronMinute=i,ch}var hh={},yO={},yr={},dk;function Dz(){if(dk)return yr;dk=1,Object.defineProperty(yr,"__esModule",{value:!0});class n extends Error{}class e extends n{constructor(O){super(`Invalid DateTime: ${O.toMessage()}`)}}class t extends n{constructor(O){super(`Invalid Interval: ${O.toMessage()}`)}}class r extends n{constructor(O){super(`Invalid Duration: ${O.toMessage()}`)}}class i extends n{}class s extends n{constructor(O){super(`Invalid unit ${O}`)}}class o extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const c="numeric",h="short",f="long",p={year:c,month:c,day:c},m={year:c,month:h,day:c},g={year:c,month:h,day:c,weekday:h},w={year:c,month:f,day:c},k={year:c,month:f,day:c,weekday:f},C={hour:c,minute:c},Q={hour:c,minute:c,second:c},M={hour:c,minute:c,second:c,timeZoneName:h},E={hour:c,minute:c,second:c,timeZoneName:f},I={hour:c,minute:c,hourCycle:"h23"},U={hour:c,minute:c,second:c,hourCycle:"h23"},_={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:h},R={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:f},q={year:c,month:c,day:c,hour:c,minute:c},G={year:c,month:c,day:c,hour:c,minute:c,second:c},V={year:c,month:h,day:c,hour:c,minute:c},D={year:c,month:h,day:c,hour:c,minute:c,second:c},Z={year:c,month:h,day:c,weekday:h,hour:c,minute:c},ae={year:c,month:f,day:c,hour:c,minute:c,timeZoneName:h},se={year:c,month:f,day:c,hour:c,minute:c,second:c,timeZoneName:h},re={year:c,month:f,day:c,weekday:f,hour:c,minute:c,timeZoneName:f},Oe={year:c,month:f,day:c,weekday:f,hour:c,minute:c,second:c,timeZoneName:f};class be{get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(O,S){throw new l}formatOffset(O,S){throw new l}offset(O){throw new l}equals(O){throw new l}get isValid(){throw new l}}let he=null;class ye extends be{static get instance(){return he===null&&(he=new ye),he}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(O,{format:S,locale:T}){return Sf(O,S,T)}formatOffset(O,S){return fo(this.offset(O),S)}offset(O){return-new Date(O).getTimezoneOffset()}equals(O){return O.type==="system"}get isValid(){return!0}}const A=new Map;function Y(P){let O=A.get(P);return O===void 0&&(O=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:P,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),A.set(P,O)),O}const ue={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function z(P,O){const S=P.format(O).replace(/\u200E/g,""),T=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(S),[,j,W,K,te,ne,xe,He]=T;return[K,j,W,te,ne,xe,He]}function Re(P,O){const S=P.formatToParts(O),T=[];for(let j=0;j<S.length;j++){const{type:W,value:K}=S[j],te=ue[W];W==="era"?T[te]=K:qe(te)||(T[te]=parseInt(K,10))}return T}const _e=new Map;class $e extends be{static create(O){let S=_e.get(O);return S===void 0&&_e.set(O,S=new $e(O)),S}static resetCache(){_e.clear(),A.clear()}static isValidSpecifier(O){return this.isValidZone(O)}static isValidZone(O){if(!O)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:O}).format(),!0}catch{return!1}}constructor(O){super(),this.zoneName=O,this.valid=$e.isValidZone(O)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(O,{format:S,locale:T}){return Sf(O,S,T,this.name)}formatOffset(O,S){return fo(this.offset(O),S)}offset(O){if(!this.valid)return NaN;const S=new Date(O);if(isNaN(S))return NaN;const T=Y(this.name);let[j,W,K,te,ne,xe,He]=T.formatToParts?Re(T,S):z(T,S);te==="BC"&&(j=-Math.abs(j)+1);const wt=co({year:j,month:W,day:K,hour:ne===24?0:ne,minute:xe,second:He,millisecond:0});let Ge=+S;const It=Ge%1e3;return Ge-=It>=0?It:1e3+It,(wt-Ge)/(60*1e3)}equals(O){return O.type==="iana"&&O.name===this.name}get isValid(){return this.valid}}let rt={};function st(P,O={}){const S=JSON.stringify([P,O]);let T=rt[S];return T||(T=new Intl.ListFormat(P,O),rt[S]=T),T}const mt=new Map;function Xt(P,O={}){const S=JSON.stringify([P,O]);let T=mt.get(S);return T===void 0&&(T=new Intl.DateTimeFormat(P,O),mt.set(S,T)),T}const Gn=new Map;function cn(P,O={}){const S=JSON.stringify([P,O]);let T=Gn.get(S);return T===void 0&&(T=new Intl.NumberFormat(P,O),Gn.set(S,T)),T}const An=new Map;function Zi(P,O={}){const{base:S,...T}=O,j=JSON.stringify([P,T]);let W=An.get(j);return W===void 0&&(W=new Intl.RelativeTimeFormat(P,O),An.set(j,W)),W}let Tr=null;function Kn(){return Tr||(Tr=new Intl.DateTimeFormat().resolvedOptions().locale,Tr)}const Yr=new Map;function ks(P){let O=Yr.get(P);return O===void 0&&(O=new Intl.DateTimeFormat(P).resolvedOptions(),Yr.set(P,O)),O}const $r=new Map;function Ur(P){let O=$r.get(P);if(!O){const S=new Intl.Locale(P);O="getWeekInfo"in S?S.getWeekInfo():S.weekInfo,"minimalDays"in O||(O={...yt,...O}),$r.set(P,O)}return O}function qr(P){const O=P.indexOf("-x-");O!==-1&&(P=P.substring(0,O));const S=P.indexOf("-u-");if(S===-1)return[P];{let T,j;try{T=Xt(P).resolvedOptions(),j=P}catch{const ne=P.substring(0,S);T=Xt(ne).resolvedOptions(),j=ne}const{numberingSystem:W,calendar:K}=T;return[j,W,K]}}function Ss(P,O,S){return(S||O)&&(P.includes("-u-")||(P+="-u"),S&&(P+=`-ca-${S}`),O&&(P+=`-nu-${O}`)),P}function io(P){const O=[];for(let S=1;S<=12;S++){const T=it.utc(2009,S,1);O.push(P(T))}return O}function cr(P){const O=[];for(let S=1;S<=7;S++){const T=it.utc(2016,11,13+S);O.push(P(T))}return O}function Jn(P,O,S,T){const j=P.listingMode();return j==="error"?null:j==="en"?S(O):T(O)}function fe(P){return P.numberingSystem&&P.numberingSystem!=="latn"?!1:P.numberingSystem==="latn"||!P.locale||P.locale.startsWith("en")||ks(P.locale).numberingSystem==="latn"}class Pe{constructor(O,S,T){this.padTo=T.padTo||0,this.floor=T.floor||!1;const{padTo:j,floor:W,...K}=T;if(!S||Object.keys(K).length>0){const te={useGrouping:!1,...T};T.padTo>0&&(te.minimumIntegerDigits=T.padTo),this.inf=cn(O,te)}}format(O){if(this.inf){const S=this.floor?Math.floor(O):O;return this.inf.format(S)}else{const S=this.floor?Math.floor(O):bs(O,3);return Kt(S,this.padTo)}}}class Fe{constructor(O,S,T){this.opts=T,this.originalZone=void 0;let j;if(this.opts.timeZone)this.dt=O;else if(O.zone.type==="fixed"){const K=-1*(O.offset/60),te=K>=0?`Etc/GMT+${K}`:`Etc/GMT${K}`;O.offset!==0&&$e.create(te).valid?(j=te,this.dt=O):(j="UTC",this.dt=O.offset===0?O:O.setZone("UTC").plus({minutes:O.offset}),this.originalZone=O.zone)}else O.zone.type==="system"?this.dt=O:O.zone.type==="iana"?(this.dt=O,j=O.zone.name):(j="UTC",this.dt=O.setZone("UTC").plus({minutes:O.offset}),this.originalZone=O.zone);const W={...this.opts};W.timeZone=W.timeZone||j,this.dtf=Xt(S,W)}format(){return this.originalZone?this.formatToParts().map(({value:O})=>O).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const O=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?O.map(S=>{if(S.type==="timeZoneName"){const T=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...S,value:T}}else return S}):O}resolvedOptions(){return this.dtf.resolvedOptions()}}class nt{constructor(O,S,T){this.opts={style:"long",...T},!S&&Er()&&(this.rtf=Zi(O,T))}format(O,S){return this.rtf?this.rtf.format(O,S):Cf(S,O,this.opts.numeric,this.opts.style!=="long")}formatToParts(O,S){return this.rtf?this.rtf.formatToParts(O,S):[]}}const yt={firstDay:1,minimalDays:4,weekend:[6,7]};class Ke{static fromOpts(O){return Ke.create(O.locale,O.numberingSystem,O.outputCalendar,O.weekSettings,O.defaultToEN)}static create(O,S,T,j,W=!1){const K=O||B.defaultLocale,te=K||(W?"en-US":Kn()),ne=S||B.defaultNumberingSystem,xe=T||B.defaultOutputCalendar,He=vi(j)||B.defaultWeekSettings;return new Ke(te,ne,xe,He,K)}static resetCache(){Tr=null,mt.clear(),Gn.clear(),An.clear(),Yr.clear(),$r.clear()}static fromObject({locale:O,numberingSystem:S,outputCalendar:T,weekSettings:j}={}){return Ke.create(O,S,T,j)}constructor(O,S,T,j,W){const[K,te,ne]=qr(O);this.locale=K,this.numberingSystem=S||te||null,this.outputCalendar=T||ne||null,this.weekSettings=j,this.intl=Ss(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=W,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=fe(this)),this.fastNumbersCached}listingMode(){const O=this.isEnglish(),S=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return O&&S?"en":"intl"}clone(O){return!O||Object.getOwnPropertyNames(O).length===0?this:Ke.create(O.locale||this.specifiedLocale,O.numberingSystem||this.numberingSystem,O.outputCalendar||this.outputCalendar,vi(O.weekSettings)||this.weekSettings,O.defaultToEN||!1)}redefaultToEN(O={}){return this.clone({...O,defaultToEN:!0})}redefaultToSystem(O={}){return this.clone({...O,defaultToEN:!1})}months(O,S=!1){return Jn(this,O,Nl,()=>{const T=this.intl==="ja"||this.intl.startsWith("ja-");S&=!T;const j=S?{month:O,day:"numeric"}:{month:O},W=S?"format":"standalone";if(!this.monthsCache[W][O]){const K=T?te=>this.dtFormatter(te,j).format():te=>this.extract(te,j,"month");this.monthsCache[W][O]=io(K)}return this.monthsCache[W][O]})}weekdays(O,S=!1){return Jn(this,O,ki,()=>{const T=S?{weekday:O,year:"numeric",month:"long",day:"numeric"}:{weekday:O},j=S?"format":"standalone";return this.weekdaysCache[j][O]||(this.weekdaysCache[j][O]=cr(W=>this.extract(W,T,"weekday"))),this.weekdaysCache[j][O]})}meridiems(){return Jn(this,void 0,()=>mo,()=>{if(!this.meridiemCache){const O={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[it.utc(2016,11,13,9),it.utc(2016,11,13,19)].map(S=>this.extract(S,O,"dayperiod"))}return this.meridiemCache})}eras(O){return Jn(this,O,uc,()=>{const S={era:O};return this.eraCache[O]||(this.eraCache[O]=[it.utc(-40,1,1),it.utc(2017,1,1)].map(T=>this.extract(T,S,"era"))),this.eraCache[O]})}extract(O,S,T){const j=this.dtFormatter(O,S),W=j.formatToParts(),K=W.find(te=>te.type.toLowerCase()===T);return K?K.value:null}numberFormatter(O={}){return new Pe(this.intl,O.forceSimple||this.fastNumbers,O)}dtFormatter(O,S={}){return new Fe(O,this.intl,S)}relFormatter(O={}){return new nt(this.intl,this.isEnglish(),O)}listFormatter(O={}){return st(this.intl,O)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ks(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Kr()?Ur(this.locale):yt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(O){return this.locale===O.locale&&this.numberingSystem===O.numberingSystem&&this.outputCalendar===O.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let er=null;class xt extends be{static get utcInstance(){return er===null&&(er=new xt(0)),er}static instance(O){return O===0?xt.utcInstance:new xt(O)}static parseSpecifier(O){if(O){const S=O.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(S)return new xt(ho(S[1],S[2]))}return null}constructor(O){super(),this.fixed=O}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${fo(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${fo(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(O,S){return fo(this.fixed,S)}get isUniversal(){return!0}offset(){return this.fixed}equals(O){return O.type==="fixed"&&O.fixed===this.fixed}get isValid(){return!0}}class hr extends be{constructor(O){super(),this.zoneName=O}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function bn(P,O){if(qe(P)||P===null)return O;if(P instanceof be)return P;if(ka(P)){const S=P.toLowerCase();return S==="default"?O:S==="local"||S==="system"?ye.instance:S==="utc"||S==="gmt"?xt.utcInstance:xt.parseSpecifier(S)||$e.create(P)}else return vn(P)?xt.instance(P):typeof P=="object"&&"offset"in P&&typeof P.offset=="function"?P:new hr(P)}const nn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Tn=nn.hanidec.replace(/[\[|\]]/g,"").split("");function Xi(P){let O=parseInt(P,10);if(isNaN(O)){O="";for(let S=0;S<P.length;S++){const T=P.charCodeAt(S);if(P[S].search(nn.hanidec)!==-1)O+=Tn.indexOf(P[S]);else for(const j in tr){const[W,K]=tr[j];T>=W&&T<=K&&(O+=T-W)}}return parseInt(O,10)}else return O}const Vi=new Map;function Hr(){Vi.clear()}function hn({numberingSystem:P},O=""){const S=P||"latn";let T=Vi.get(S);T===void 0&&(T=new Map,Vi.set(S,T));let j=T.get(O);return j===void 0&&(j=new RegExp(`${nn[S]}${O}`),T.set(O,j)),j}let xa=()=>Date.now(),so="system",va=null,oo=null,Wi=null,yi=60,wa,Fi=null;class B{static get now(){return xa}static set now(O){xa=O}static set defaultZone(O){so=O}static get defaultZone(){return bn(so,ye.instance)}static get defaultLocale(){return va}static set defaultLocale(O){va=O}static get defaultNumberingSystem(){return oo}static set defaultNumberingSystem(O){oo=O}static get defaultOutputCalendar(){return Wi}static set defaultOutputCalendar(O){Wi=O}static get defaultWeekSettings(){return Fi}static set defaultWeekSettings(O){Fi=vi(O)}static get twoDigitCutoffYear(){return yi}static set twoDigitCutoffYear(O){yi=O%100}static get throwOnInvalid(){return wa}static set throwOnInvalid(O){wa=O}static resetCaches(){Ke.resetCache(),$e.resetCache(),it.resetCache(),Hr()}}class ee{constructor(O,S){this.reason=O,this.explanation=S}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ce=[0,31,59,90,120,151,181,212,243,273,304,334],de=[0,31,60,91,121,152,182,213,244,274,305,335];function ke(P,O){return new ee("unit out of range",`you specified ${O} (of type ${typeof O}) as a ${P}, which is invalid`)}function Xe(P,O,S){const T=new Date(Date.UTC(P,O-1,S));P<100&&P>=0&&T.setUTCFullYear(T.getUTCFullYear()-1900);const j=T.getUTCDay();return j===0?7:j}function Je(P,O,S){return S+(Yi(P)?de:ce)[O-1]}function Ne(P,O){const S=Yi(P)?de:ce,T=S.findIndex(W=>W<O),j=O-S[T];return{month:T+1,day:j}}function ze(P,O){return(P-O+7)%7+1}function Me(P,O=4,S=1){const{year:T,month:j,day:W}=P,K=Je(T,j,W),te=ze(Xe(T,j,W),S);let ne=Math.floor((K-te+14-O)/7),xe;return ne<1?(xe=T-1,ne=Ps(xe,O,S)):ne>Ps(T,O,S)?(xe=T+1,ne=1):xe=T,{weekYear:xe,weekNumber:ne,weekday:te,...po(P)}}function Ae(P,O=4,S=1){const{weekYear:T,weekNumber:j,weekday:W}=P,K=ze(Xe(T,1,O),S),te=uo(T);let ne=j*7+W-K-7+O,xe;ne<1?(xe=T-1,ne+=uo(xe)):ne>te?(xe=T+1,ne-=uo(T)):xe=T;const{month:He,day:at}=Ne(xe,ne);return{year:xe,month:He,day:at,...po(P)}}function ot(P){const{year:O,month:S,day:T}=P,j=Je(O,S,T);return{year:O,ordinal:j,...po(P)}}function gt(P){const{year:O,ordinal:S}=P,{month:T,day:j}=Ne(O,S);return{year:O,month:T,day:j,...po(P)}}function fn(P,O){if(!qe(P.localWeekday)||!qe(P.localWeekNumber)||!qe(P.localWeekYear)){if(!qe(P.weekday)||!qe(P.weekNumber)||!qe(P.weekYear))throw new i("Cannot mix locale-based week fields with ISO-based week fields");return qe(P.localWeekday)||(P.weekday=P.localWeekday),qe(P.localWeekNumber)||(P.weekNumber=P.localWeekNumber),qe(P.localWeekYear)||(P.weekYear=P.localWeekYear),delete P.localWeekday,delete P.localWeekNumber,delete P.localWeekYear,{minDaysInFirstWeek:O.getMinDaysInFirstWeek(),startOfWeek:O.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function _t(P,O=4,S=1){const T=bt(P.weekYear),j=ht(P.weekNumber,1,Ps(P.weekYear,O,S)),W=ht(P.weekday,1,7);return T?j?W?!1:ke("weekday",P.weekday):ke("week",P.weekNumber):ke("weekYear",P.weekYear)}function Qt(P){const O=bt(P.year),S=ht(P.ordinal,1,uo(P.year));return O?S?!1:ke("ordinal",P.ordinal):ke("year",P.year)}function Ft(P){const O=bt(P.year),S=ht(P.month,1,12),T=ht(P.day,1,Al(P.year,P.month));return O?S?T?!1:ke("day",P.day):ke("month",P.month):ke("year",P.year)}function Gr(P){const{hour:O,minute:S,second:T,millisecond:j}=P,W=ht(O,0,23)||O===24&&S===0&&T===0&&j===0,K=ht(S,0,59),te=ht(T,0,59),ne=ht(j,0,999);return W?K?te?ne?!1:ke("millisecond",j):ke("second",T):ke("minute",S):ke("hour",O)}function qe(P){return typeof P>"u"}function vn(P){return typeof P=="number"}function bt(P){return typeof P=="number"&&P%1===0}function ka(P){return typeof P=="string"}function xi(P){return Object.prototype.toString.call(P)==="[object Date]"}function Er(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Kr(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ao(P){return Array.isArray(P)?P:[P]}function vt(P,O,S){if(P.length!==0)return P.reduce((T,j)=>{const W=[O(j),j];return T&&S(T[0],W[0])===T[0]?T:W},null)[1]}function Vt(P,O){return O.reduce((S,T)=>(S[T]=P[T],S),{})}function rn(P,O){return Object.prototype.hasOwnProperty.call(P,O)}function vi(P){if(P==null)return null;if(typeof P!="object")throw new o("Week settings must be an object");if(!ht(P.firstDay,1,7)||!ht(P.minimalDays,1,7)||!Array.isArray(P.weekend)||P.weekend.some(O=>!ht(O,1,7)))throw new o("Invalid week settings");return{firstDay:P.firstDay,minimalDays:P.minimalDays,weekend:Array.from(P.weekend)}}function ht(P,O,S){return bt(P)&&P>=O&&P<=S}function Bi(P,O){return P-O*Math.floor(P/O)}function Kt(P,O=2){const S=P<0;let T;return S?T="-"+(""+-P).padStart(O,"0"):T=(""+P).padStart(O,"0"),T}function Jr(P){if(!(qe(P)||P===null||P===""))return parseInt(P,10)}function ei(P){if(!(qe(P)||P===null||P===""))return parseFloat(P)}function lo(P){if(!(qe(P)||P===null||P==="")){const O=parseFloat("0."+P)*1e3;return Math.floor(O)}}function bs(P,O,S="round"){const T=10**O;switch(S){case"expand":return P>0?Math.ceil(P*T)/T:Math.floor(P*T)/T;case"trunc":return Math.trunc(P*T)/T;case"round":return Math.round(P*T)/T;case"floor":return Math.floor(P*T)/T;case"ceil":return Math.ceil(P*T)/T;default:throw new RangeError(`Value rounding ${S} is out of range`)}}function Yi(P){return P%4===0&&(P%100!==0||P%400===0)}function uo(P){return Yi(P)?366:365}function Al(P,O){const S=Bi(O-1,12)+1,T=P+(O-S)/12;return S===2?Yi(T)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][S-1]}function co(P){let O=Date.UTC(P.year,P.month-1,P.day,P.hour,P.minute,P.second,P.millisecond);return P.year<100&&P.year>=0&&(O=new Date(O),O.setUTCFullYear(P.year,P.month-1,P.day)),+O}function ac(P,O,S){return-ze(Xe(P,1,O),S)+O-1}function Ps(P,O=4,S=1){const T=ac(P,O,S),j=ac(P+1,O,S);return(uo(P)-T+j)/7}function Qs(P){return P>99?P:P>B.twoDigitCutoffYear?1900+P:2e3+P}function Sf(P,O,S,T=null){const j=new Date(P),W={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};T&&(W.timeZone=T);const K={timeZoneName:O,...W},te=new Intl.DateTimeFormat(S,K).formatToParts(j).find(ne=>ne.type.toLowerCase()==="timezonename");return te?te.value:null}function ho(P,O){let S=parseInt(P,10);Number.isNaN(S)&&(S=0);const T=parseInt(O,10)||0,j=S<0||Object.is(S,-0)?-T:T;return S*60+j}function jt(P){const O=Number(P);if(typeof P=="boolean"||P===""||!Number.isFinite(O))throw new o(`Invalid unit value ${P}`);return O}function Sa(P,O){const S={};for(const T in P)if(rn(P,T)){const j=P[T];if(j==null)continue;S[O(T)]=jt(j)}return S}function fo(P,O){const S=Math.trunc(Math.abs(P/60)),T=Math.trunc(Math.abs(P%60)),j=P>=0?"+":"-";switch(O){case"short":return`${j}${Kt(S,2)}:${Kt(T,2)}`;case"narrow":return`${j}${S}${T>0?`:${T}`:""}`;case"techie":return`${j}${Kt(S,2)}${Kt(T,2)}`;default:throw new RangeError(`Value format ${O} is out of range for property format`)}}function po(P){return Vt(P,["hour","minute","second","millisecond"])}const bf=["January","February","March","April","May","June","July","August","September","October","November","December"],lc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pf=["J","F","M","A","M","J","J","A","S","O","N","D"];function Nl(P){switch(P){case"narrow":return[...Pf];case"short":return[...lc];case"long":return[...bf];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ba=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],wi=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ui=["M","T","W","T","F","S","S"];function ki(P){switch(P){case"narrow":return[...Ui];case"short":return[...wi];case"long":return[...ba];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const mo=["AM","PM"],Pa=["Before Christ","Anno Domini"],qi=["BC","AD"],mm=["B","A"];function uc(P){switch(P){case"narrow":return[...mm];case"short":return[...qi];case"long":return[...Pa];default:return null}}function Qa(P){return mo[P.hour<12?0:1]}function gm(P,O){return ki(O)[P.weekday-1]}function Qf(P,O){return Nl(O)[P.month-1]}function _l(P,O){return uc(O)[P.year<0?0:1]}function Cf(P,O,S="always",T=!1){const j={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},W=["hours","minutes","seconds"].indexOf(P)===-1;if(S==="auto"&&W){const at=P==="days";switch(O){case 1:return at?"tomorrow":`next ${j[P][0]}`;case-1:return at?"yesterday":`last ${j[P][0]}`;case 0:return at?"today":`this ${j[P][0]}`}}const K=Object.is(O,-0)||O<0,te=Math.abs(O),ne=te===1,xe=j[P],He=T?ne?xe[1]:xe[2]||xe[1]:ne?j[P][0]:P;return K?`${te} ${He} ago`:`in ${te} ${He}`}function Tf(P,O){let S="";for(const T of P)T.literal?S+=T.val:S+=O(T.val);return S}const Ca={D:p,DD:m,DDD:w,DDDD:k,t:C,tt:Q,ttt:M,tttt:E,T:I,TT:U,TTT:_,TTTT:R,f:q,ff:V,fff:ae,ffff:re,F:G,FF:D,FFF:se,FFFF:Oe};class dn{static create(O,S={}){return new dn(O,S)}static parseFormat(O){let S=null,T="",j=!1;const W=[];for(let K=0;K<O.length;K++){const te=O.charAt(K);te==="'"?((T.length>0||j)&&W.push({literal:j||/^\s+$/.test(T),val:T===""?"'":T}),S=null,T="",j=!j):j||te===S?T+=te:(T.length>0&&W.push({literal:/^\s+$/.test(T),val:T}),T=te,S=te)}return T.length>0&&W.push({literal:j||/^\s+$/.test(T),val:T}),W}static macroTokenToFormatOpts(O){return Ca[O]}constructor(O,S){this.opts=S,this.loc=O,this.systemLoc=null}formatWithSystemDefault(O,S){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(O,{...this.opts,...S}).format()}dtFormatter(O,S={}){return this.loc.dtFormatter(O,{...this.opts,...S})}formatDateTime(O,S){return this.dtFormatter(O,S).format()}formatDateTimeParts(O,S){return this.dtFormatter(O,S).formatToParts()}formatInterval(O,S){return this.dtFormatter(O.start,S).dtf.formatRange(O.start.toJSDate(),O.end.toJSDate())}resolvedOptions(O,S){return this.dtFormatter(O,S).resolvedOptions()}num(O,S=0,T=void 0){if(this.opts.forceSimple)return Kt(O,S);const j={...this.opts};return S>0&&(j.padTo=S),T&&(j.signDisplay=T),this.loc.numberFormatter(j).format(O)}formatDateTimeFromString(O,S){const T=this.loc.listingMode()==="en",j=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",W=(Ge,It)=>this.loc.extract(O,Ge,It),K=Ge=>O.isOffsetFixed&&O.offset===0&&Ge.allowZ?"Z":O.isValid?O.zone.formatOffset(O.ts,Ge.format):"",te=()=>T?Qa(O):W({hour:"numeric",hourCycle:"h12"},"dayperiod"),ne=(Ge,It)=>T?Qf(O,Ge):W(It?{month:Ge}:{month:Ge,day:"numeric"},"month"),xe=(Ge,It)=>T?gm(O,Ge):W(It?{weekday:Ge}:{weekday:Ge,month:"long",day:"numeric"},"weekday"),He=Ge=>{const It=dn.macroTokenToFormatOpts(Ge);return It?this.formatWithSystemDefault(O,It):Ge},at=Ge=>T?_l(O,Ge):W({era:Ge},"era"),wt=Ge=>{switch(Ge){case"S":return this.num(O.millisecond);case"u":case"SSS":return this.num(O.millisecond,3);case"s":return this.num(O.second);case"ss":return this.num(O.second,2);case"uu":return this.num(Math.floor(O.millisecond/10),2);case"uuu":return this.num(Math.floor(O.millisecond/100));case"m":return this.num(O.minute);case"mm":return this.num(O.minute,2);case"h":return this.num(O.hour%12===0?12:O.hour%12);case"hh":return this.num(O.hour%12===0?12:O.hour%12,2);case"H":return this.num(O.hour);case"HH":return this.num(O.hour,2);case"Z":return K({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return K({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return K({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return O.zone.offsetName(O.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return O.zone.offsetName(O.ts,{format:"long",locale:this.loc.locale});case"z":return O.zoneName;case"a":return te();case"d":return j?W({day:"numeric"},"day"):this.num(O.day);case"dd":return j?W({day:"2-digit"},"day"):this.num(O.day,2);case"c":return this.num(O.weekday);case"ccc":return xe("short",!0);case"cccc":return xe("long",!0);case"ccccc":return xe("narrow",!0);case"E":return this.num(O.weekday);case"EEE":return xe("short",!1);case"EEEE":return xe("long",!1);case"EEEEE":return xe("narrow",!1);case"L":return j?W({month:"numeric",day:"numeric"},"month"):this.num(O.month);case"LL":return j?W({month:"2-digit",day:"numeric"},"month"):this.num(O.month,2);case"LLL":return ne("short",!0);case"LLLL":return ne("long",!0);case"LLLLL":return ne("narrow",!0);case"M":return j?W({month:"numeric"},"month"):this.num(O.month);case"MM":return j?W({month:"2-digit"},"month"):this.num(O.month,2);case"MMM":return ne("short",!1);case"MMMM":return ne("long",!1);case"MMMMM":return ne("narrow",!1);case"y":return j?W({year:"numeric"},"year"):this.num(O.year);case"yy":return j?W({year:"2-digit"},"year"):this.num(O.year.toString().slice(-2),2);case"yyyy":return j?W({year:"numeric"},"year"):this.num(O.year,4);case"yyyyyy":return j?W({year:"numeric"},"year"):this.num(O.year,6);case"G":return at("short");case"GG":return at("long");case"GGGGG":return at("narrow");case"kk":return this.num(O.weekYear.toString().slice(-2),2);case"kkkk":return this.num(O.weekYear,4);case"W":return this.num(O.weekNumber);case"WW":return this.num(O.weekNumber,2);case"n":return this.num(O.localWeekNumber);case"nn":return this.num(O.localWeekNumber,2);case"ii":return this.num(O.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(O.localWeekYear,4);case"o":return this.num(O.ordinal);case"ooo":return this.num(O.ordinal,3);case"q":return this.num(O.quarter);case"qq":return this.num(O.quarter,2);case"X":return this.num(Math.floor(O.ts/1e3));case"x":return this.num(O.ts);default:return He(Ge)}};return Tf(dn.parseFormat(S),wt)}formatDurationFromString(O,S){const T=this.opts.signMode==="negativeLargestOnly"?-1:1,j=He=>{switch(He[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},W=(He,at)=>wt=>{const Ge=j(wt);if(Ge){const It=at.isNegativeDuration&&Ge!==at.largestUnit?T:1;let ir;return this.opts.signMode==="negativeLargestOnly"&&Ge!==at.largestUnit?ir="never":this.opts.signMode==="all"?ir="always":ir="auto",this.num(He.get(Ge)*It,wt.length,ir)}else return wt},K=dn.parseFormat(S),te=K.reduce((He,{literal:at,val:wt})=>at?He:He.concat(wt),[]),ne=O.shiftTo(...te.map(j).filter(He=>He)),xe={isNegativeDuration:ne<0,largestUnit:Object.keys(ne.values)[0]};return Tf(K,W(ne,xe))}}const Cs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Si(...P){const O=P.reduce((S,T)=>S+T.source,"");return RegExp(`^${O}$`)}function go(...P){return O=>P.reduce(([S,T,j],W)=>{const[K,te,ne]=W(O,j);return[{...S,...K},te||T,ne]},[{},null,1]).slice(0,2)}function Oo(P,...O){if(P==null)return[null,null];for(const[S,T]of O){const j=S.exec(P);if(j)return T(j)}return[null,null]}function zl(...P){return(O,S)=>{const T={};let j;for(j=0;j<P.length;j++)T[P[j]]=Jr(O[S+j]);return[T,null,S+j]}}const Ta=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cc=`(?:${Ta.source}?(?:\\[(${Cs.source})\\])?)?`,Ll=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,bi=RegExp(`${Ll.source}${cc}`),$a=RegExp(`(?:[Tt]${bi.source})?`),Dl=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,$f=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Il=/(\d{4})-?(\d{3})/,Zl=zl("weekYear","weekNumber","weekDay"),Ef=zl("year","ordinal"),nr=/(\d{4})-(\d\d)-(\d\d)/,Ts=RegExp(`${Ll.source} ?(?:${Ta.source}|(${Cs.source}))?`),hc=RegExp(`(?: ${Ts.source})?`);function ti(P,O,S){const T=P[O];return qe(T)?S:Jr(T)}function Om(P,O){return[{year:ti(P,O),month:ti(P,O+1,1),day:ti(P,O+2,1)},null,O+3]}function Hi(P,O){return[{hours:ti(P,O,0),minutes:ti(P,O+1,0),seconds:ti(P,O+2,0),milliseconds:lo(P[O+3])},null,O+4]}function $s(P,O){const S=!P[O]&&!P[O+1],T=ho(P[O+1],P[O+2]),j=S?null:xt.instance(T);return[{},j,O+3]}function Pi(P,O){const S=P[O]?$e.create(P[O]):null;return[{},S,O+1]}const Xl=RegExp(`^T?${Ll.source}$`),Mf=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function ym(P){const[O,S,T,j,W,K,te,ne,xe]=P,He=O[0]==="-",at=ne&&ne[0]==="-",wt=(Ge,It=!1)=>Ge!==void 0&&(It||Ge&&He)?-Ge:Ge;return[{years:wt(ei(S)),months:wt(ei(T)),weeks:wt(ei(j)),days:wt(ei(W)),hours:wt(ei(K)),minutes:wt(ei(te)),seconds:wt(ei(ne),ne==="-0"),milliseconds:wt(lo(xe),at)}]}const xm={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fc(P,O,S,T,j,W,K){const te={year:O.length===2?Qs(Jr(O)):Jr(O),month:lc.indexOf(S)+1,day:Jr(T),hour:Jr(j),minute:Jr(W)};return K&&(te.second=Jr(K)),P&&(te.weekday=P.length>3?ba.indexOf(P)+1:wi.indexOf(P)+1),te}const dc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function vm(P){const[,O,S,T,j,W,K,te,ne,xe,He,at]=P,wt=fc(O,j,T,S,W,K,te);let Ge;return ne?Ge=xm[ne]:xe?Ge=0:Ge=ho(He,at),[wt,new xt(Ge)]}function wm(P){return P.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const km=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Sm=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,bm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function pc(P){const[,O,S,T,j,W,K,te]=P;return[fc(O,j,T,S,W,K,te),xt.utcInstance]}function Pm(P){const[,O,S,T,j,W,K,te]=P;return[fc(O,te,S,T,j,W,K),xt.utcInstance]}const Qm=Si(Dl,$a),Cm=Si($f,$a),Tm=Si(Il,$a),mc=Si(bi),jf=go(Om,Hi,$s,Pi),$m=go(Zl,Hi,$s,Pi),Em=go(Ef,Hi,$s,Pi),Rf=go(Hi,$s,Pi);function Mm(P){return Oo(P,[Qm,jf],[Cm,$m],[Tm,Em],[mc,Rf])}function jm(P){return Oo(wm(P),[dc,vm])}function Rm(P){return Oo(P,[km,pc],[Sm,pc],[bm,Pm])}function Am(P){return Oo(P,[Mf,ym])}const Nm=go(Hi);function _m(P){return Oo(P,[Xl,Nm])}const zm=Si(nr,hc),gc=Si(Ts),Ea=go(Hi,$s,Pi);function Lm(P){return Oo(P,[zm,jf],[gc,Ea])}const Oc="Invalid Duration",yc={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Af={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...yc},rr=146097/400,Es=146097/4800,yo={years:{quarters:4,months:12,weeks:rr/7,days:rr,hours:rr*24,minutes:rr*24*60,seconds:rr*24*60*60,milliseconds:rr*24*60*60*1e3},quarters:{months:3,weeks:rr/28,days:rr/4,hours:rr*24/4,minutes:rr*24*60/4,seconds:rr*24*60*60/4,milliseconds:rr*24*60*60*1e3/4},months:{weeks:Es/7,days:Es,hours:Es*24,minutes:Es*24*60,seconds:Es*24*60*60,milliseconds:Es*24*60*60*1e3},...yc},Ms=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Dm=Ms.slice(0).reverse();function Qi(P,O,S=!1){const T={values:S?O.values:{...P.values,...O.values||{}},loc:P.loc.clone(O.loc),conversionAccuracy:O.conversionAccuracy||P.conversionAccuracy,matrix:O.matrix||P.matrix};return new Ot(T)}function xc(P,O){var S;let T=(S=O.milliseconds)!=null?S:0;for(const j of Dm.slice(1))O[j]&&(T+=O[j]*P[j].milliseconds);return T}function vc(P,O){const S=xc(P,O)<0?-1:1;Ms.reduceRight((T,j)=>{if(qe(O[j]))return T;if(T){const W=O[T]*S,K=P[j][T],te=Math.floor(W/K);O[j]+=te*S,O[T]-=te*K*S}return j},null),Ms.reduce((T,j)=>{if(qe(O[j]))return T;if(T){const W=O[T]%1;O[T]-=W,O[j]+=W*P[T][j]}return j},null)}function xo(P){const O={};for(const[S,T]of Object.entries(P))T!==0&&(O[S]=T);return O}class Ot{constructor(O){const S=O.conversionAccuracy==="longterm"||!1;let T=S?yo:Af;O.matrix&&(T=O.matrix),this.values=O.values,this.loc=O.loc||Ke.create(),this.conversionAccuracy=S?"longterm":"casual",this.invalid=O.invalid||null,this.matrix=T,this.isLuxonDuration=!0}static fromMillis(O,S){return Ot.fromObject({milliseconds:O},S)}static fromObject(O,S={}){if(O==null||typeof O!="object")throw new o(`Duration.fromObject: argument expected to be an object, got ${O===null?"null":typeof O}`);return new Ot({values:Sa(O,Ot.normalizeUnit),loc:Ke.fromObject(S),conversionAccuracy:S.conversionAccuracy,matrix:S.matrix})}static fromDurationLike(O){if(vn(O))return Ot.fromMillis(O);if(Ot.isDuration(O))return O;if(typeof O=="object")return Ot.fromObject(O);throw new o(`Unknown duration argument ${O} of type ${typeof O}`)}static fromISO(O,S){const[T]=Am(O);return T?Ot.fromObject(T,S):Ot.invalid("unparsable",`the input "${O}" can't be parsed as ISO 8601`)}static fromISOTime(O,S){const[T]=_m(O);return T?Ot.fromObject(T,S):Ot.invalid("unparsable",`the input "${O}" can't be parsed as ISO 8601`)}static invalid(O,S=null){if(!O)throw new o("need to specify a reason the Duration is invalid");const T=O instanceof ee?O:new ee(O,S);if(B.throwOnInvalid)throw new r(T);return new Ot({invalid:T})}static normalizeUnit(O){const S={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[O&&O.toLowerCase()];if(!S)throw new s(O);return S}static isDuration(O){return O&&O.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(O,S={}){const T={...S,floor:S.round!==!1&&S.floor!==!1};return this.isValid?dn.create(this.loc,T).formatDurationFromString(this,O):Oc}toHuman(O={}){if(!this.isValid)return Oc;const S=O.showZeros!==!1,T=Ms.map(j=>{const W=this.values[j];return qe(W)||W===0&&!S?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...O,unit:j.slice(0,-1)}).format(W)}).filter(j=>j);return this.loc.listFormatter({type:"conjunction",style:O.listStyle||"narrow",...O}).format(T)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let O="P";return this.years!==0&&(O+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(O+=this.months+this.quarters*3+"M"),this.weeks!==0&&(O+=this.weeks+"W"),this.days!==0&&(O+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(O+="T"),this.hours!==0&&(O+=this.hours+"H"),this.minutes!==0&&(O+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(O+=bs(this.seconds+this.milliseconds/1e3,3)+"S"),O==="P"&&(O+="T0S"),O}toISOTime(O={}){if(!this.isValid)return null;const S=this.toMillis();return S<0||S>=864e5?null:(O={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...O,includeOffset:!1},it.fromMillis(S,{zone:"UTC"}).toISOTime(O))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?xc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O),T={};for(const j of Ms)(rn(S.values,j)||rn(this.values,j))&&(T[j]=S.get(j)+this.get(j));return Qi(this,{values:T},!0)}minus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O);return this.plus(S.negate())}mapUnits(O){if(!this.isValid)return this;const S={};for(const T of Object.keys(this.values))S[T]=jt(O(this.values[T],T));return Qi(this,{values:S},!0)}get(O){return this[Ot.normalizeUnit(O)]}set(O){if(!this.isValid)return this;const S={...this.values,...Sa(O,Ot.normalizeUnit)};return Qi(this,{values:S})}reconfigure({locale:O,numberingSystem:S,conversionAccuracy:T,matrix:j}={}){const K={loc:this.loc.clone({locale:O,numberingSystem:S}),matrix:j,conversionAccuracy:T};return Qi(this,K)}as(O){return this.isValid?this.shiftTo(O).get(O):NaN}normalize(){if(!this.isValid)return this;const O=this.toObject();return vc(this.matrix,O),Qi(this,{values:O},!0)}rescale(){if(!this.isValid)return this;const O=xo(this.normalize().shiftToAll().toObject());return Qi(this,{values:O},!0)}shiftTo(...O){if(!this.isValid)return this;if(O.length===0)return this;O=O.map(K=>Ot.normalizeUnit(K));const S={},T={},j=this.toObject();let W;for(const K of Ms)if(O.indexOf(K)>=0){W=K;let te=0;for(const xe in T)te+=this.matrix[xe][K]*T[xe],T[xe]=0;vn(j[K])&&(te+=j[K]);const ne=Math.trunc(te);S[K]=ne,T[K]=(te*1e3-ne*1e3)/1e3}else vn(j[K])&&(T[K]=j[K]);for(const K in T)T[K]!==0&&(S[W]+=K===W?T[K]:T[K]/this.matrix[W][K]);return vc(this.matrix,S),Qi(this,{values:S},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const O={};for(const S of Object.keys(this.values))O[S]=this.values[S]===0?0:-this.values[S];return Qi(this,{values:O},!0)}removeZeros(){if(!this.isValid)return this;const O=xo(this.values);return Qi(this,{values:O},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(O){if(!this.isValid||!O.isValid||!this.loc.equals(O.loc))return!1;function S(T,j){return T===void 0||T===0?j===void 0||j===0:T===j}for(const T of Ms)if(!S(this.values[T],O.values[T]))return!1;return!0}}const vo="Invalid Interval";function Vl(P,O){return!P||!P.isValid?Jt.invalid("missing or invalid start"):!O||!O.isValid?Jt.invalid("missing or invalid end"):O<P?Jt.invalid("end before start",`The end of an interval must be after its start, but you had start=${P.toISO()} and end=${O.toISO()}`):null}class Jt{constructor(O){this.s=O.start,this.e=O.end,this.invalid=O.invalid||null,this.isLuxonInterval=!0}static invalid(O,S=null){if(!O)throw new o("need to specify a reason the Interval is invalid");const T=O instanceof ee?O:new ee(O,S);if(B.throwOnInvalid)throw new t(T);return new Jt({invalid:T})}static fromDateTimes(O,S){const T=Ki(O),j=Ki(S),W=Vl(T,j);return W??new Jt({start:T,end:j})}static after(O,S){const T=Ot.fromDurationLike(S),j=Ki(O);return Jt.fromDateTimes(j,j.plus(T))}static before(O,S){const T=Ot.fromDurationLike(S),j=Ki(O);return Jt.fromDateTimes(j.minus(T),j)}static fromISO(O,S){const[T,j]=(O||"").split("/",2);if(T&&j){let W,K;try{W=it.fromISO(T,S),K=W.isValid}catch{K=!1}let te,ne;try{te=it.fromISO(j,S),ne=te.isValid}catch{ne=!1}if(K&&ne)return Jt.fromDateTimes(W,te);if(K){const xe=Ot.fromISO(j,S);if(xe.isValid)return Jt.after(W,xe)}else if(ne){const xe=Ot.fromISO(T,S);if(xe.isValid)return Jt.before(te,xe)}}return Jt.invalid("unparsable",`the input "${O}" can't be parsed as ISO 8601`)}static isInterval(O){return O&&O.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(O="milliseconds"){return this.isValid?this.toDuration(O).get(O):NaN}count(O="milliseconds",S){if(!this.isValid)return NaN;const T=this.start.startOf(O,S);let j;return S!=null&&S.useLocaleWeeks?j=this.end.reconfigure({locale:T.locale}):j=this.end,j=j.startOf(O,S),Math.floor(j.diff(T,O).get(O))+(j.valueOf()!==this.end.valueOf())}hasSame(O){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,O):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(O){return this.isValid?this.s>O:!1}isBefore(O){return this.isValid?this.e<=O:!1}contains(O){return this.isValid?this.s<=O&&this.e>O:!1}set({start:O,end:S}={}){return this.isValid?Jt.fromDateTimes(O||this.s,S||this.e):this}splitAt(...O){if(!this.isValid)return[];const S=O.map(Ki).filter(K=>this.contains(K)).sort((K,te)=>K.toMillis()-te.toMillis()),T=[];let{s:j}=this,W=0;for(;j<this.e;){const K=S[W]||this.e,te=+K>+this.e?this.e:K;T.push(Jt.fromDateTimes(j,te)),j=te,W+=1}return T}splitBy(O){const S=Ot.fromDurationLike(O);if(!this.isValid||!S.isValid||S.as("milliseconds")===0)return[];let{s:T}=this,j=1,W;const K=[];for(;T<this.e;){const te=this.start.plus(S.mapUnits(ne=>ne*j));W=+te>+this.e?this.e:te,K.push(Jt.fromDateTimes(T,W)),T=W,j+=1}return K}divideEqually(O){return this.isValid?this.splitBy(this.length()/O).slice(0,O):[]}overlaps(O){return this.e>O.s&&this.s<O.e}abutsStart(O){return this.isValid?+this.e==+O.s:!1}abutsEnd(O){return this.isValid?+O.e==+this.s:!1}engulfs(O){return this.isValid?this.s<=O.s&&this.e>=O.e:!1}equals(O){return!this.isValid||!O.isValid?!1:this.s.equals(O.s)&&this.e.equals(O.e)}intersection(O){if(!this.isValid)return this;const S=this.s>O.s?this.s:O.s,T=this.e<O.e?this.e:O.e;return S>=T?null:Jt.fromDateTimes(S,T)}union(O){if(!this.isValid)return this;const S=this.s<O.s?this.s:O.s,T=this.e>O.e?this.e:O.e;return Jt.fromDateTimes(S,T)}static merge(O){const[S,T]=O.sort((j,W)=>j.s-W.s).reduce(([j,W],K)=>W?W.overlaps(K)||W.abutsStart(K)?[j,W.union(K)]:[j.concat([W]),K]:[j,K],[[],null]);return T&&S.push(T),S}static xor(O){let S=null,T=0;const j=[],W=O.map(ne=>[{time:ne.s,type:"s"},{time:ne.e,type:"e"}]),K=Array.prototype.concat(...W),te=K.sort((ne,xe)=>ne.time-xe.time);for(const ne of te)T+=ne.type==="s"?1:-1,T===1?S=ne.time:(S&&+S!=+ne.time&&j.push(Jt.fromDateTimes(S,ne.time)),S=null);return Jt.merge(j)}difference(...O){return Jt.xor([this].concat(O)).map(S=>this.intersection(S)).filter(S=>S&&!S.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:vo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(O=p,S={}){return this.isValid?dn.create(this.s.loc.clone(S),O).formatInterval(this):vo}toISO(O){return this.isValid?`${this.s.toISO(O)}/${this.e.toISO(O)}`:vo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vo}toISOTime(O){return this.isValid?`${this.s.toISOTime(O)}/${this.e.toISOTime(O)}`:vo}toFormat(O,{separator:S=" – "}={}){return this.isValid?`${this.s.toFormat(O)}${S}${this.e.toFormat(O)}`:vo}toDuration(O,S){return this.isValid?this.e.diff(this.s,O,S):Ot.invalid(this.invalidReason)}mapEndpoints(O){return Jt.fromDateTimes(O(this.s),O(this.e))}}class wo{static hasDST(O=B.defaultZone){const S=it.now().setZone(O).set({month:12});return!O.isUniversal&&S.offset!==S.set({month:6}).offset}static isValidIANAZone(O){return $e.isValidZone(O)}static normalizeZone(O){return bn(O,B.defaultZone)}static getStartOfWeek({locale:O=null,locObj:S=null}={}){return(S||Ke.create(O)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:O=null,locObj:S=null}={}){return(S||Ke.create(O)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:O=null,locObj:S=null}={}){return(S||Ke.create(O)).getWeekendDays().slice()}static months(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null,outputCalendar:W="gregory"}={}){return(j||Ke.create(S,T,W)).months(O)}static monthsFormat(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null,outputCalendar:W="gregory"}={}){return(j||Ke.create(S,T,W)).months(O,!0)}static weekdays(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null}={}){return(j||Ke.create(S,T,null)).weekdays(O)}static weekdaysFormat(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null}={}){return(j||Ke.create(S,T,null)).weekdays(O,!0)}static meridiems({locale:O=null}={}){return Ke.create(O).meridiems()}static eras(O="short",{locale:S=null}={}){return Ke.create(S,null,"gregory").eras(O)}static features(){return{relative:Er(),localeWeek:Kr()}}}function Wl(P,O){const S=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),T=S(O)-S(P);return Math.floor(Ot.fromMillis(T).as("days"))}function wc(P,O,S){const T=[["years",(ne,xe)=>xe.year-ne.year],["quarters",(ne,xe)=>xe.quarter-ne.quarter+(xe.year-ne.year)*4],["months",(ne,xe)=>xe.month-ne.month+(xe.year-ne.year)*12],["weeks",(ne,xe)=>{const He=Wl(ne,xe);return(He-He%7)/7}],["days",Wl]],j={},W=P;let K,te;for(const[ne,xe]of T)S.indexOf(ne)>=0&&(K=ne,j[ne]=xe(P,O),te=W.plus(j),te>O?(j[ne]--,P=W.plus(j),P>O&&(te=P,j[ne]--,P=W.plus(j))):P=te);return[P,j,te,K]}function Nf(P,O,S,T){let[j,W,K,te]=wc(P,O,S);const ne=O-j,xe=S.filter(at=>["hours","minutes","seconds","milliseconds"].indexOf(at)>=0);xe.length===0&&(K<O&&(K=j.plus({[te]:1})),K!==j&&(W[te]=(W[te]||0)+ne/(K-j)));const He=Ot.fromObject(W,T);return xe.length>0?Ot.fromMillis(ne,T).shiftTo(...xe).plus(He):He}const _f="missing Intl.DateTimeFormat.formatToParts support";function Tt(P,O=S=>S){return{regex:P,deser:([S])=>O(Xi(S))}}const zf="[ ]",Lf=new RegExp(zf,"g");function Im(P){return P.replace(/\./g,"\\.?").replace(Lf,zf)}function Df(P){return P.replace(/\./g,"").replace(Lf," ").toLowerCase()}function an(P,O){return P===null?null:{regex:RegExp(P.map(Im).join("|")),deser:([S])=>P.findIndex(T=>Df(S)===Df(T))+O}}function ko(P,O){return{regex:P,deser:([,S,T])=>ho(S,T),groups:O}}function Ma(P){return{regex:P,deser:([O])=>O}}function If(P){return P.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zf(P,O){const S=hn(O),T=hn(O,"{2}"),j=hn(O,"{3}"),W=hn(O,"{4}"),K=hn(O,"{6}"),te=hn(O,"{1,2}"),ne=hn(O,"{1,3}"),xe=hn(O,"{1,6}"),He=hn(O,"{1,9}"),at=hn(O,"{2,4}"),wt=hn(O,"{4,6}"),Ge=ni=>({regex:RegExp(If(ni.val)),deser:([$o])=>$o,literal:!0}),ir=(ni=>{if(P.literal)return Ge(ni);switch(ni.val){case"G":return an(O.eras("short"),0);case"GG":return an(O.eras("long"),0);case"y":return Tt(xe);case"yy":return Tt(at,Qs);case"yyyy":return Tt(W);case"yyyyy":return Tt(wt);case"yyyyyy":return Tt(K);case"M":return Tt(te);case"MM":return Tt(T);case"MMM":return an(O.months("short",!0),1);case"MMMM":return an(O.months("long",!0),1);case"L":return Tt(te);case"LL":return Tt(T);case"LLL":return an(O.months("short",!1),1);case"LLLL":return an(O.months("long",!1),1);case"d":return Tt(te);case"dd":return Tt(T);case"o":return Tt(ne);case"ooo":return Tt(j);case"HH":return Tt(T);case"H":return Tt(te);case"hh":return Tt(T);case"h":return Tt(te);case"mm":return Tt(T);case"m":return Tt(te);case"q":return Tt(te);case"qq":return Tt(T);case"s":return Tt(te);case"ss":return Tt(T);case"S":return Tt(ne);case"SSS":return Tt(j);case"u":return Ma(He);case"uu":return Ma(te);case"uuu":return Tt(S);case"a":return an(O.meridiems(),0);case"kkkk":return Tt(W);case"kk":return Tt(at,Qs);case"W":return Tt(te);case"WW":return Tt(T);case"E":case"c":return Tt(S);case"EEE":return an(O.weekdays("short",!1),1);case"EEEE":return an(O.weekdays("long",!1),1);case"ccc":return an(O.weekdays("short",!0),1);case"cccc":return an(O.weekdays("long",!0),1);case"Z":case"ZZ":return ko(new RegExp(`([+-]${te.source})(?::(${T.source}))?`),2);case"ZZZ":return ko(new RegExp(`([+-]${te.source})(${T.source})?`),2);case"z":return Ma(/[a-z_+-/]{1,256}?/i);case" ":return Ma(/[^\S\n\r]/);default:return Ge(ni)}})(P)||{invalidReason:_f};return ir.token=P,ir}const Xf={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function kc(P,O,S){const{type:T,value:j}=P;if(T==="literal"){const ne=/^\s+$/.test(j);return{literal:!ne,val:ne?" ":j}}const W=O[T];let K=T;T==="hour"&&(O.hour12!=null?K=O.hour12?"hour12":"hour24":O.hourCycle!=null?O.hourCycle==="h11"||O.hourCycle==="h12"?K="hour12":K="hour24":K=S.hour12?"hour12":"hour24");let te=Xf[K];if(typeof te=="object"&&(te=te[W]),te)return{literal:!1,val:te}}function Zm(P){return[`^${P.map(S=>S.regex).reduce((S,T)=>`${S}(${T.source})`,"")}$`,P]}function Xm(P,O,S){const T=P.match(O);if(T){const j={};let W=1;for(const K in S)if(rn(S,K)){const te=S[K],ne=te.groups?te.groups+1:1;!te.literal&&te.token&&(j[te.token.val[0]]=te.deser(T.slice(W,W+ne))),W+=ne}return[T,j]}else return[T,{}]}function So(P){const O=W=>{switch(W){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let S=null,T;return qe(P.z)||(S=$e.create(P.z)),qe(P.Z)||(S||(S=new xt(P.Z)),T=P.Z),qe(P.q)||(P.M=(P.q-1)*3+1),qe(P.h)||(P.h<12&&P.a===1?P.h+=12:P.h===12&&P.a===0&&(P.h=0)),P.G===0&&P.y&&(P.y=-P.y),qe(P.u)||(P.S=lo(P.u)),[Object.keys(P).reduce((W,K)=>{const te=O(K);return te&&(W[te]=P[K]),W},{}),S,T]}let ja=null;function Ra(){return ja||(ja=it.fromMillis(1555555555555)),ja}function Sc(P,O){if(P.literal)return P;const S=dn.macroTokenToFormatOpts(P.val),T=Qc(S,O);return T==null||T.includes(void 0)?P:T}function bc(P,O){return Array.prototype.concat(...P.map(S=>Sc(S,O)))}class Aa{constructor(O,S){if(this.locale=O,this.format=S,this.tokens=bc(dn.parseFormat(S),O),this.units=this.tokens.map(T=>Zf(T,O)),this.disqualifyingUnit=this.units.find(T=>T.invalidReason),!this.disqualifyingUnit){const[T,j]=Zm(this.units);this.regex=RegExp(T,"i"),this.handlers=j}}explainFromTokens(O){if(this.isValid){const[S,T]=Xm(O,this.regex,this.handlers),[j,W,K]=T?So(T):[null,null,void 0];if(rn(T,"a")&&rn(T,"H"))throw new i("Can't include meridiem when specifying 24-hour format");return{input:O,tokens:this.tokens,regex:this.regex,rawMatches:S,matches:T,result:j,zone:W,specificOffset:K}}else return{input:O,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function js(P,O,S){return new Aa(P,S).explainFromTokens(O)}function Pc(P,O,S){const{result:T,zone:j,specificOffset:W,invalidReason:K}=js(P,O,S);return[T,j,W,K]}function Qc(P,O){if(!P)return null;const T=dn.create(O,P).dtFormatter(Ra()),j=T.formatToParts(),W=T.resolvedOptions();return j.map(K=>kc(K,P,W))}const bo="Invalid DateTime",Cc=864e13;function Po(P){return new ee("unsupported zone",`the zone "${P.name}" is not supported`)}function Fl(P){return P.weekData===null&&(P.weekData=Me(P.c)),P.weekData}function Bl(P){return P.localWeekData===null&&(P.localWeekData=Me(P.c,P.loc.getMinDaysInFirstWeek(),P.loc.getStartOfWeek())),P.localWeekData}function Gi(P,O){const S={ts:P.ts,zone:P.zone,c:P.c,o:P.o,loc:P.loc,invalid:P.invalid};return new it({...S,...O,old:S})}function Tc(P,O,S){let T=P-O*60*1e3;const j=S.offset(T);if(O===j)return[T,O];T-=(j-O)*60*1e3;const W=S.offset(T);return j===W?[T,j]:[P-Math.min(j,W)*60*1e3,Math.max(j,W)]}function Mr(P,O){P+=O*60*1e3;const S=new Date(P);return{year:S.getUTCFullYear(),month:S.getUTCMonth()+1,day:S.getUTCDate(),hour:S.getUTCHours(),minute:S.getUTCMinutes(),second:S.getUTCSeconds(),millisecond:S.getUTCMilliseconds()}}function Qo(P,O,S){return Tc(co(P),O,S)}function Yl(P,O){const S=P.o,T=P.c.year+Math.trunc(O.years),j=P.c.month+Math.trunc(O.months)+Math.trunc(O.quarters)*3,W={...P.c,year:T,month:j,day:Math.min(P.c.day,Al(T,j))+Math.trunc(O.days)+Math.trunc(O.weeks)*7},K=Ot.fromObject({years:O.years-Math.trunc(O.years),quarters:O.quarters-Math.trunc(O.quarters),months:O.months-Math.trunc(O.months),weeks:O.weeks-Math.trunc(O.weeks),days:O.days-Math.trunc(O.days),hours:O.hours,minutes:O.minutes,seconds:O.seconds,milliseconds:O.milliseconds}).as("milliseconds"),te=co(W);let[ne,xe]=Tc(te,S,P.zone);return K!==0&&(ne+=K,xe=P.zone.offset(ne)),{ts:ne,o:xe}}function Co(P,O,S,T,j,W){const{setZone:K,zone:te}=S;if(P&&Object.keys(P).length!==0||O){const ne=O||te,xe=it.fromObject(P,{...S,zone:ne,specificOffset:W});return K?xe:xe.setZone(te)}else return it.invalid(new ee("unparsable",`the input "${j}" can't be parsed as ${T}`))}function Ul(P,O,S=!0){return P.isValid?dn.create(Ke.create("en-US"),{allowZ:S,forceSimple:!0}).formatDateTimeFromString(P,O):null}function Rs(P,O,S){const T=P.c.year>9999||P.c.year<0;let j="";if(T&&P.c.year>=0&&(j+="+"),j+=Kt(P.c.year,T?6:4),S==="year")return j;if(O){if(j+="-",j+=Kt(P.c.month),S==="month")return j;j+="-"}else if(j+=Kt(P.c.month),S==="month")return j;return j+=Kt(P.c.day),j}function Vf(P,O,S,T,j,W,K){let te=!S||P.c.millisecond!==0||P.c.second!==0,ne="";switch(K){case"day":case"month":case"year":break;default:if(ne+=Kt(P.c.hour),K==="hour")break;if(O){if(ne+=":",ne+=Kt(P.c.minute),K==="minute")break;te&&(ne+=":",ne+=Kt(P.c.second))}else{if(ne+=Kt(P.c.minute),K==="minute")break;te&&(ne+=Kt(P.c.second))}if(K==="second")break;te&&(!T||P.c.millisecond!==0)&&(ne+=".",ne+=Kt(P.c.millisecond,3))}return j&&(P.isOffsetFixed&&P.offset===0&&!W?ne+="Z":P.o<0?(ne+="-",ne+=Kt(Math.trunc(-P.o/60)),ne+=":",ne+=Kt(Math.trunc(-P.o%60))):(ne+="+",ne+=Kt(Math.trunc(P.o/60)),ne+=":",ne+=Kt(Math.trunc(P.o%60)))),W&&(ne+="["+P.zone.ianaName+"]"),ne}const $c={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Wf={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Bt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},To=["year","month","day","hour","minute","second","millisecond"],ql=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Na=["year","ordinal","hour","minute","second","millisecond"];function _a(P){const O={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[P.toLowerCase()];if(!O)throw new s(P);return O}function Hl(P){switch(P.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return _a(P)}}function za(P){if(Da===void 0&&(Da=B.now()),P.type!=="iana")return P.offset(Da);const O=P.name;let S=Mc.get(O);return S===void 0&&(S=P.offset(Da),Mc.set(O,S)),S}function La(P,O){const S=bn(O.zone,B.defaultZone);if(!S.isValid)return it.invalid(Po(S));const T=Ke.fromObject(O);let j,W;if(qe(P.year))j=B.now();else{for(const ne of To)qe(P[ne])&&(P[ne]=$c[ne]);const K=Ft(P)||Gr(P);if(K)return it.invalid(K);const te=za(S);[j,W]=Qo(P,te,S)}return new it({ts:j,zone:S,loc:T,o:W})}function As(P,O,S){const T=qe(S.round)?!0:S.round,j=qe(S.rounding)?"trunc":S.rounding,W=(te,ne)=>(te=bs(te,T||S.calendary?0:2,S.calendary?"round":j),O.loc.clone(S).relFormatter(S).format(te,ne)),K=te=>S.calendary?O.hasSame(P,te)?0:O.startOf(te).diff(P.startOf(te),te).get(te):O.diff(P,te).get(te);if(S.unit)return W(K(S.unit),S.unit);for(const te of S.units){const ne=K(te);if(Math.abs(ne)>=1)return W(ne,te)}return W(P>O?-0:0,S.units[S.units.length-1])}function Ec(P){let O={},S;return P.length>0&&typeof P[P.length-1]=="object"?(O=P[P.length-1],S=Array.from(P).slice(0,P.length-1)):S=Array.from(P),[O,S]}let Da;const Mc=new Map;class it{constructor(O){const S=O.zone||B.defaultZone;let T=O.invalid||(Number.isNaN(O.ts)?new ee("invalid input"):null)||(S.isValid?null:Po(S));this.ts=qe(O.ts)?B.now():O.ts;let j=null,W=null;if(!T)if(O.old&&O.old.ts===this.ts&&O.old.zone.equals(S))[j,W]=[O.old.c,O.old.o];else{const te=vn(O.o)&&!O.old?O.o:S.offset(this.ts);j=Mr(this.ts,te),T=Number.isNaN(j.year)?new ee("invalid input"):null,j=T?null:j,W=T?null:te}this._zone=S,this.loc=O.loc||Ke.create(),this.invalid=T,this.weekData=null,this.localWeekData=null,this.c=j,this.o=W,this.isLuxonDateTime=!0}static now(){return new it({})}static local(){const[O,S]=Ec(arguments),[T,j,W,K,te,ne,xe]=S;return La({year:T,month:j,day:W,hour:K,minute:te,second:ne,millisecond:xe},O)}static utc(){const[O,S]=Ec(arguments),[T,j,W,K,te,ne,xe]=S;return O.zone=xt.utcInstance,La({year:T,month:j,day:W,hour:K,minute:te,second:ne,millisecond:xe},O)}static fromJSDate(O,S={}){const T=xi(O)?O.valueOf():NaN;if(Number.isNaN(T))return it.invalid("invalid input");const j=bn(S.zone,B.defaultZone);return j.isValid?new it({ts:T,zone:j,loc:Ke.fromObject(S)}):it.invalid(Po(j))}static fromMillis(O,S={}){if(vn(O))return O<-Cc||O>Cc?it.invalid("Timestamp out of range"):new it({ts:O,zone:bn(S.zone,B.defaultZone),loc:Ke.fromObject(S)});throw new o(`fromMillis requires a numerical input, but received a ${typeof O} with value ${O}`)}static fromSeconds(O,S={}){if(vn(O))return new it({ts:O*1e3,zone:bn(S.zone,B.defaultZone),loc:Ke.fromObject(S)});throw new o("fromSeconds requires a numerical input")}static fromObject(O,S={}){O=O||{};const T=bn(S.zone,B.defaultZone);if(!T.isValid)return it.invalid(Po(T));const j=Ke.fromObject(S),W=Sa(O,Hl),{minDaysInFirstWeek:K,startOfWeek:te}=fn(W,j),ne=B.now(),xe=qe(S.specificOffset)?T.offset(ne):S.specificOffset,He=!qe(W.ordinal),at=!qe(W.year),wt=!qe(W.month)||!qe(W.day),Ge=at||wt,It=W.weekYear||W.weekNumber;if((Ge||He)&&It)throw new i("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(wt&&He)throw new i("Can't mix ordinal dates with month/day");const ir=It||W.weekday&&!Ge;let ni,$o,jr=Mr(ne,xe);ir?(ni=ql,$o=Wf,jr=Me(jr,K,te)):He?(ni=Na,$o=Bt,jr=ot(jr)):(ni=To,$o=$c);let Eo=!1;for(const Rt of ni){const es=W[Rt];qe(es)?Eo?W[Rt]=$o[Rt]:W[Rt]=jr[Rt]:Eo=!0}const Mo=ir?_t(W,K,te):He?Qt(W):Ft(W),Ia=Mo||Gr(W);if(Ia)return it.invalid(Ia);const jc=ir?Ae(W,K,te):He?gt(W):W,[jo,Ji]=Qo(jc,xe,T),zt=new it({ts:jo,zone:T,o:Ji,loc:j});return W.weekday&&Ge&&O.weekday!==zt.weekday?it.invalid("mismatched weekday",`you can't specify both a weekday of ${W.weekday} and a date of ${zt.toISO()}`):zt.isValid?zt:it.invalid(zt.invalid)}static fromISO(O,S={}){const[T,j]=Mm(O);return Co(T,j,S,"ISO 8601",O)}static fromRFC2822(O,S={}){const[T,j]=jm(O);return Co(T,j,S,"RFC 2822",O)}static fromHTTP(O,S={}){const[T,j]=Rm(O);return Co(T,j,S,"HTTP",S)}static fromFormat(O,S,T={}){if(qe(O)||qe(S))throw new o("fromFormat requires an input string and a format");const{locale:j=null,numberingSystem:W=null}=T,K=Ke.fromOpts({locale:j,numberingSystem:W,defaultToEN:!0}),[te,ne,xe,He]=Pc(K,O,S);return He?it.invalid(He):Co(te,ne,T,`format ${S}`,O,xe)}static fromString(O,S,T={}){return it.fromFormat(O,S,T)}static fromSQL(O,S={}){const[T,j]=Lm(O);return Co(T,j,S,"SQL",O)}static invalid(O,S=null){if(!O)throw new o("need to specify a reason the DateTime is invalid");const T=O instanceof ee?O:new ee(O,S);if(B.throwOnInvalid)throw new e(T);return new it({invalid:T})}static isDateTime(O){return O&&O.isLuxonDateTime||!1}static parseFormatForOpts(O,S={}){const T=Qc(O,Ke.fromObject(S));return T?T.map(j=>j?j.val:null).join(""):null}static expandFormat(O,S={}){return bc(dn.parseFormat(O),Ke.fromObject(S)).map(j=>j.val).join("")}static resetCache(){Da=void 0,Mc.clear()}get(O){return this[O]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Fl(this).weekYear:NaN}get weekNumber(){return this.isValid?Fl(this).weekNumber:NaN}get weekday(){return this.isValid?Fl(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Bl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Bl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Bl(this).weekYear:NaN}get ordinal(){return this.isValid?ot(this.c).ordinal:NaN}get monthShort(){return this.isValid?wo.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?wo.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?wo.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?wo.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const O=864e5,S=6e4,T=co(this.c),j=this.zone.offset(T-O),W=this.zone.offset(T+O),K=this.zone.offset(T-j*S),te=this.zone.offset(T-W*S);if(K===te)return[this];const ne=T-K*S,xe=T-te*S,He=Mr(ne,K),at=Mr(xe,te);return He.hour===at.hour&&He.minute===at.minute&&He.second===at.second&&He.millisecond===at.millisecond?[Gi(this,{ts:ne}),Gi(this,{ts:xe})]:[this]}get isInLeapYear(){return Yi(this.year)}get daysInMonth(){return Al(this.year,this.month)}get daysInYear(){return this.isValid?uo(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ps(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ps(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(O={}){const{locale:S,numberingSystem:T,calendar:j}=dn.create(this.loc.clone(O),O).resolvedOptions(this);return{locale:S,numberingSystem:T,outputCalendar:j}}toUTC(O=0,S={}){return this.setZone(xt.instance(O),S)}toLocal(){return this.setZone(B.defaultZone)}setZone(O,{keepLocalTime:S=!1,keepCalendarTime:T=!1}={}){if(O=bn(O,B.defaultZone),O.equals(this.zone))return this;if(O.isValid){let j=this.ts;if(S||T){const W=O.offset(this.ts),K=this.toObject();[j]=Qo(K,W,O)}return Gi(this,{ts:j,zone:O})}else return it.invalid(Po(O))}reconfigure({locale:O,numberingSystem:S,outputCalendar:T}={}){const j=this.loc.clone({locale:O,numberingSystem:S,outputCalendar:T});return Gi(this,{loc:j})}setLocale(O){return this.reconfigure({locale:O})}set(O){if(!this.isValid)return this;const S=Sa(O,Hl),{minDaysInFirstWeek:T,startOfWeek:j}=fn(S,this.loc),W=!qe(S.weekYear)||!qe(S.weekNumber)||!qe(S.weekday),K=!qe(S.ordinal),te=!qe(S.year),ne=!qe(S.month)||!qe(S.day),xe=te||ne,He=S.weekYear||S.weekNumber;if((xe||K)&&He)throw new i("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(ne&&K)throw new i("Can't mix ordinal dates with month/day");let at;W?at=Ae({...Me(this.c,T,j),...S},T,j):qe(S.ordinal)?(at={...this.toObject(),...S},qe(S.day)&&(at.day=Math.min(Al(at.year,at.month),at.day))):at=gt({...ot(this.c),...S});const[wt,Ge]=Qo(at,this.o,this.zone);return Gi(this,{ts:wt,o:Ge})}plus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O);return Gi(this,Yl(this,S))}minus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O).negate();return Gi(this,Yl(this,S))}startOf(O,{useLocaleWeeks:S=!1}={}){if(!this.isValid)return this;const T={},j=Ot.normalizeUnit(O);switch(j){case"years":T.month=1;case"quarters":case"months":T.day=1;case"weeks":case"days":T.hour=0;case"hours":T.minute=0;case"minutes":T.second=0;case"seconds":T.millisecond=0;break}if(j==="weeks")if(S){const W=this.loc.getStartOfWeek(),{weekday:K}=this;K<W&&(T.weekNumber=this.weekNumber-1),T.weekday=W}else T.weekday=1;if(j==="quarters"){const W=Math.ceil(this.month/3);T.month=(W-1)*3+1}return this.set(T)}endOf(O,S){return this.isValid?this.plus({[O]:1}).startOf(O,S).minus(1):this}toFormat(O,S={}){return this.isValid?dn.create(this.loc.redefaultToEN(S)).formatDateTimeFromString(this,O):bo}toLocaleString(O=p,S={}){return this.isValid?dn.create(this.loc.clone(S),O).formatDateTime(this):bo}toLocaleParts(O={}){return this.isValid?dn.create(this.loc.clone(O),O).formatDateTimeParts(this):[]}toISO({format:O="extended",suppressSeconds:S=!1,suppressMilliseconds:T=!1,includeOffset:j=!0,extendedZone:W=!1,precision:K="milliseconds"}={}){if(!this.isValid)return null;K=_a(K);const te=O==="extended";let ne=Rs(this,te,K);return To.indexOf(K)>=3&&(ne+="T"),ne+=Vf(this,te,S,T,j,W,K),ne}toISODate({format:O="extended",precision:S="day"}={}){return this.isValid?Rs(this,O==="extended",_a(S)):null}toISOWeekDate(){return Ul(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:O=!1,suppressSeconds:S=!1,includeOffset:T=!0,includePrefix:j=!1,extendedZone:W=!1,format:K="extended",precision:te="milliseconds"}={}){return this.isValid?(te=_a(te),(j&&To.indexOf(te)>=3?"T":"")+Vf(this,K==="extended",S,O,T,W,te)):null}toRFC2822(){return Ul(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ul(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Rs(this,!0):null}toSQLTime({includeOffset:O=!0,includeZone:S=!1,includeOffsetSpace:T=!0}={}){let j="HH:mm:ss.SSS";return(S||O)&&(T&&(j+=" "),S?j+="z":O&&(j+="ZZ")),Ul(this,j,!0)}toSQL(O={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(O)}`:null}toString(){return this.isValid?this.toISO():bo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(O={}){if(!this.isValid)return{};const S={...this.c};return O.includeConfig&&(S.outputCalendar=this.outputCalendar,S.numberingSystem=this.loc.numberingSystem,S.locale=this.loc.locale),S}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(O,S="milliseconds",T={}){if(!this.isValid||!O.isValid)return Ot.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...T},W=ao(S).map(Ot.normalizeUnit),K=O.valueOf()>this.valueOf(),te=K?this:O,ne=K?O:this,xe=Nf(te,ne,W,j);return K?xe.negate():xe}diffNow(O="milliseconds",S={}){return this.diff(it.now(),O,S)}until(O){return this.isValid?Jt.fromDateTimes(this,O):this}hasSame(O,S,T){if(!this.isValid)return!1;const j=O.valueOf(),W=this.setZone(O.zone,{keepLocalTime:!0});return W.startOf(S,T)<=j&&j<=W.endOf(S,T)}equals(O){return this.isValid&&O.isValid&&this.valueOf()===O.valueOf()&&this.zone.equals(O.zone)&&this.loc.equals(O.loc)}toRelative(O={}){if(!this.isValid)return null;const S=O.base||it.fromObject({},{zone:this.zone}),T=O.padding?this<S?-O.padding:O.padding:0;let j=["years","months","days","hours","minutes","seconds"],W=O.unit;return Array.isArray(O.unit)&&(j=O.unit,W=void 0),As(S,this.plus(T),{...O,numeric:"always",units:j,unit:W})}toRelativeCalendar(O={}){return this.isValid?As(O.base||it.fromObject({},{zone:this.zone}),this,{...O,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...O){if(!O.every(it.isDateTime))throw new o("min requires all arguments be DateTimes");return vt(O,S=>S.valueOf(),Math.min)}static max(...O){if(!O.every(it.isDateTime))throw new o("max requires all arguments be DateTimes");return vt(O,S=>S.valueOf(),Math.max)}static fromFormatExplain(O,S,T={}){const{locale:j=null,numberingSystem:W=null}=T,K=Ke.fromOpts({locale:j,numberingSystem:W,defaultToEN:!0});return js(K,O,S)}static fromStringExplain(O,S,T={}){return it.fromFormatExplain(O,S,T)}static buildFormatParser(O,S={}){const{locale:T=null,numberingSystem:j=null}=S,W=Ke.fromOpts({locale:T,numberingSystem:j,defaultToEN:!0});return new Aa(W,O)}static fromFormatParser(O,S,T={}){if(qe(O)||qe(S))throw new o("fromFormatParser requires an input string and a format parser");const{locale:j=null,numberingSystem:W=null}=T,K=Ke.fromOpts({locale:j,numberingSystem:W,defaultToEN:!0});if(!K.equals(S.locale))throw new o(`fromFormatParser called with a locale of ${K}, but the format parser was created for ${S.locale}`);const{result:te,zone:ne,specificOffset:xe,invalidReason:He}=S.explainFromTokens(O);return He?it.invalid(He):Co(te,ne,T,`format ${S.format}`,O,xe)}static get DATE_SHORT(){return p}static get DATE_MED(){return m}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return w}static get DATE_HUGE(){return k}static get TIME_SIMPLE(){return C}static get TIME_WITH_SECONDS(){return Q}static get TIME_WITH_SHORT_OFFSET(){return M}static get TIME_WITH_LONG_OFFSET(){return E}static get TIME_24_SIMPLE(){return I}static get TIME_24_WITH_SECONDS(){return U}static get TIME_24_WITH_SHORT_OFFSET(){return _}static get TIME_24_WITH_LONG_OFFSET(){return R}static get DATETIME_SHORT(){return q}static get DATETIME_SHORT_WITH_SECONDS(){return G}static get DATETIME_MED(){return V}static get DATETIME_MED_WITH_SECONDS(){return D}static get DATETIME_MED_WITH_WEEKDAY(){return Z}static get DATETIME_FULL(){return ae}static get DATETIME_FULL_WITH_SECONDS(){return se}static get DATETIME_HUGE(){return re}static get DATETIME_HUGE_WITH_SECONDS(){return Oe}}function Ki(P){if(it.isDateTime(P))return P;if(P&&P.valueOf&&vn(P.valueOf()))return it.fromJSDate(P);if(P&&typeof P=="object")return it.fromObject(P);throw new o(`Unknown datetime argument: ${P}, of type ${typeof P}`)}const Gl="3.7.2";return yr.DateTime=it,yr.Duration=Ot,yr.FixedOffsetZone=xt,yr.IANAZone=$e,yr.Info=wo,yr.Interval=Jt,yr.InvalidZone=hr,yr.Settings=B,yr.SystemZone=ye,yr.VERSION=Gl,yr.Zone=be,yr}var pk;function lx(){return pk||(pk=1,function(n){var s,o,l,c,h,C0,p,Ho;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const e=Dz();var t;(function(w){w.Second="Second",w.Minute="Minute",w.Hour="Hour",w.Day="Day",w.Month="Month",w.Year="Year"})(t||(n.TimeUnit=t={}));var r;(function(w){w.Add="Add",w.Subtract="Subtract"})(r||(n.DateMathOp=r={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const g=class g{constructor(k,C){Ie(this,p);Ie(this,s);Ie(this,o,null);Ie(this,l,null);Ie(this,c,{add:{[t.Year]:this.addYear.bind(this),[t.Month]:this.addMonth.bind(this),[t.Day]:this.addDay.bind(this),[t.Hour]:this.addHour.bind(this),[t.Minute]:this.addMinute.bind(this),[t.Second]:this.addSecond.bind(this)},subtract:{[t.Year]:this.subtractYear.bind(this),[t.Month]:this.subtractMonth.bind(this),[t.Day]:this.subtractDay.bind(this),[t.Hour]:this.subtractHour.bind(this),[t.Minute]:this.subtractMinute.bind(this),[t.Second]:this.subtractSecond.bind(this)}});const Q={zone:C};if(k?k instanceof g?(ge(this,s,L(k,s)),ge(this,o,L(k,o)),ge(this,l,L(k,l))):k instanceof Date?ge(this,s,e.DateTime.fromJSDate(k,Q)):typeof k=="number"?ge(this,s,e.DateTime.fromMillis(k,Q)):(ge(this,s,e.DateTime.fromISO(k,Q)),L(this,s).isValid||ge(this,s,e.DateTime.fromRFC2822(k,Q)),L(this,s).isValid||ge(this,s,e.DateTime.fromSQL(k,Q)),L(this,s).isValid||ge(this,s,e.DateTime.fromFormat(k,"EEE, d MMM yyyy HH:mm:ss",Q))):ge(this,s,e.DateTime.local()),!L(this,s).isValid)throw new Error(`CronDate: unhandled timestamp: ${k}`);C&&C!==L(this,s).zoneName&&ge(this,s,L(this,s).setZone(C))}get dstStart(){return L(this,o)}set dstStart(k){ge(this,o,k)}get dstEnd(){return L(this,l)}set dstEnd(k){ge(this,l,k)}addYear(){ge(this,s,L(this,s).plus({years:1}))}addMonth(){ge(this,s,L(this,s).plus({months:1}).startOf("month"))}addDay(){ge(this,s,L(this,s).plus({days:1}).startOf("day"))}addHour(){ge(this,s,L(this,s).plus({hours:1}).startOf("hour"))}addMinute(){ge(this,s,L(this,s).plus({minutes:1}).startOf("minute"))}addSecond(){ge(this,s,L(this,s).plus({seconds:1}))}subtractYear(){ge(this,s,L(this,s).minus({years:1}))}subtractMonth(){ge(this,s,L(this,s).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){ge(this,s,L(this,s).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){ge(this,s,L(this,s).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){ge(this,s,L(this,s).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){ge(this,s,L(this,s).minus({seconds:1}))}addUnit(k){L(this,c).add[k]()}subtractUnit(k){L(this,c).subtract[k]()}invokeDateOperation(k,C){if(k===r.Add){this.addUnit(C);return}if(k===r.Subtract){this.subtractUnit(C);return}throw new Error(`Invalid verb: ${k}`)}getDate(){return L(this,s).day}getFullYear(){return L(this,s).year}getDay(){const k=L(this,s).weekday;return k===7?0:k}getMonth(){return L(this,s).month-1}getHours(){return L(this,s).hour}getMinutes(){return L(this,s).minute}getSeconds(){return L(this,s).second}getMilliseconds(){return L(this,s).millisecond}getUTCOffset(){return L(this,s).offset}setStartOfDay(){ge(this,s,L(this,s).startOf("day"))}setEndOfDay(){ge(this,s,L(this,s).endOf("day"))}getTime(){return L(this,s).valueOf()}getUTCDate(){return Ee(this,p,Ho).call(this).day}getUTCFullYear(){return Ee(this,p,Ho).call(this).year}getUTCDay(){const k=Ee(this,p,Ho).call(this).weekday;return k===7?0:k}getUTCMonth(){return Ee(this,p,Ho).call(this).month-1}getUTCHours(){return Ee(this,p,Ho).call(this).hour}getUTCMinutes(){return Ee(this,p,Ho).call(this).minute}getUTCSeconds(){return Ee(this,p,Ho).call(this).second}toISOString(){return L(this,s).toUTC().toISO()}toJSON(){return L(this,s).toJSON()}setDate(k){ge(this,s,L(this,s).set({day:k}))}setFullYear(k){ge(this,s,L(this,s).set({year:k}))}setDay(k){ge(this,s,L(this,s).set({weekday:k}))}setMonth(k){ge(this,s,L(this,s).set({month:k+1}))}setHours(k){ge(this,s,L(this,s).set({hour:k}))}setMinutes(k){ge(this,s,L(this,s).set({minute:k}))}setSeconds(k){ge(this,s,L(this,s).set({second:k}))}setMilliseconds(k){ge(this,s,L(this,s).set({millisecond:k}))}toString(){return this.toDate().toString()}toDate(){return L(this,s).toJSDate()}isLastDayOfMonth(){var Q;const{day:k,month:C}=L(this,s);if(C===2){const M=Ee(Q=g,h,C0).call(Q,L(this,s).year);return k===n.DAYS_IN_MONTH[C-1]-(M?0:1)}return k===n.DAYS_IN_MONTH[C-1]}isLastWeekdayOfMonth(){var M;const{day:k,month:C}=L(this,s);let Q;return C===2?Q=n.DAYS_IN_MONTH[C-1]-(Ee(M=g,h,C0).call(M,L(this,s).year)?0:1):Q=n.DAYS_IN_MONTH[C-1],k>Q-7}applyDateOperation(k,C,Q){if(C===t.Month||C===t.Day){this.invokeDateOperation(k,C);return}const M=this.getHours();this.invokeDateOperation(k,C);const E=this.getHours(),I=E-M;I===2?Q!==24&&(this.dstStart=E):I===0&&this.getMinutes()===0&&this.getSeconds()===0&&Q!==24&&(this.dstEnd=E)}};s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakSet,C0=function(k){return k%4===0&&k%100!==0||k%400===0},p=new WeakSet,Ho=function(){return L(this,s).toUTC()},Ie(g,h);let i=g;n.CronDate=i,n.default=i}(yO)),yO}var mk;function Iz(){if(mk)return hh;mk=1,Object.defineProperty(hh,"__esModule",{value:!0}),hh.CronMonth=void 0;const n=lx(),e=$l(),t=1,r=12,i=Object.freeze([]);let s=class extends e.CronField{static get min(){return t}static get max(){return r}static get chars(){return i}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(l,c){super(l,c),this.validate()}get values(){return super.values}};return hh.CronMonth=s,hh}var fh={},gk;function Zz(){if(gk)return fh;gk=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.CronSecond=void 0;const n=$l(),e=0,t=59,r=Object.freeze([]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return fh.CronSecond=i,fh}var Ok;function ux(){return Ok||(Ok=1,function(n){var e=Ja&&Ja.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var l=Object.getOwnPropertyDescriptor(i,s);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,l)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),t=Ja&&Ja.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,r,s)};Object.defineProperty(n,"__esModule",{value:!0}),t(Az(),n),t(Nz(),n),t(_z(),n),t($l(),n),t(zz(),n),t(Lz(),n),t(Iz(),n),t(Zz(),n)}(Ja)),Ja}var yk;function E2(){var t,r,i,s,o,l,c,h,T2,$2;if(yk)return sh;yk=1,Object.defineProperty(sh,"__esModule",{value:!0}),sh.CronFieldCollection=void 0;const n=ux();let e=(h=class{constructor({second:g,minute:w,hour:k,dayOfMonth:C,month:Q,dayOfWeek:M}){Ie(this,t);Ie(this,r);Ie(this,i);Ie(this,s);Ie(this,o);Ie(this,l);if(!g)throw new Error("Validation error, Field second is missing");if(!w)throw new Error("Validation error, Field minute is missing");if(!k)throw new Error("Validation error, Field hour is missing");if(!C)throw new Error("Validation error, Field dayOfMonth is missing");if(!Q)throw new Error("Validation error, Field month is missing");if(!M)throw new Error("Validation error, Field dayOfWeek is missing");if(Q.values.length===1&&!C.hasLastChar&&!(parseInt(C.values[0],10)<=n.CronMonth.daysInMonth[Q.values[0]-1]))throw new Error("Invalid explicit day of month definition");ge(this,t,g),ge(this,r,w),ge(this,i,k),ge(this,o,Q),ge(this,l,M),ge(this,s,C)}static from(g,w){return new h({second:this.resolveField(n.CronSecond,g.second,w.second),minute:this.resolveField(n.CronMinute,g.minute,w.minute),hour:this.resolveField(n.CronHour,g.hour,w.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,g.dayOfMonth,w.dayOfMonth),month:this.resolveField(n.CronMonth,g.month,w.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,g.dayOfWeek,w.dayOfWeek)})}static resolveField(g,w,k){return k?k instanceof n.CronField?k:new g(k):w}get second(){return L(this,t)}get minute(){return L(this,r)}get hour(){return L(this,i)}get dayOfMonth(){return L(this,s)}get month(){return L(this,o)}get dayOfWeek(){return L(this,l)}static compactField(g){if(g.length===0)return[];const w=[];let k;return g.forEach((C,Q,M)=>{if(k===void 0){k={start:C,count:1};return}const E=M[Q-1]||k.start,I=M[Q+1];if(C==="L"||C==="W"){w.push(k),w.push({start:C,count:1}),k=void 0;return}if(k.step===void 0&&I!==void 0){const U=C-E,_=I-C;if(U<=_){k={...k,count:2,end:C,step:U};return}k.step=1}C-(k.end??0)===k.step?(k.count++,k.end=C):(k.count===1?w.push({start:k.start,count:1}):k.count===2?(w.push({start:k.start,count:1}),w.push({start:k.end??E,count:1})):w.push(k),k={start:C,count:1})}),k&&w.push(k),w}stringifyField(g){var Q;let w=g.max,k=g.values;if(g instanceof n.CronDayOfWeek){w=6;const M=L(this,l).values;k=M[M.length-1]===7?M.slice(0,-1):M}g instanceof n.CronDayOfMonth&&(w=L(this,o).values.length===1?n.CronMonth.daysInMonth[L(this,o).values[0]-1]:g.max);const C=h.compactField(k);if(C.length===1){const M=Ee(Q=h,c,T2).call(Q,g,C[0],w);if(M)return M}return C.map(M=>{var I;const E=M.count===1?M.start.toString():Ee(I=h,c,$2).call(I,M,w);return g instanceof n.CronDayOfWeek&&g.nthDay>0?`${E}#${g.nthDay}`:E}).join(",")}stringify(g=!1){const w=[];return g&&w.push(this.stringifyField(L(this,t))),w.push(this.stringifyField(L(this,r)),this.stringifyField(L(this,i)),this.stringifyField(L(this,s)),this.stringifyField(L(this,o)),this.stringifyField(L(this,l))),w.join(" ")}serialize(){return{second:L(this,t).serialize(),minute:L(this,r).serialize(),hour:L(this,i).serialize(),dayOfMonth:L(this,s).serialize(),month:L(this,o).serialize(),dayOfWeek:L(this,l).serialize()}}},t=new WeakMap,r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakSet,T2=function(g,w,k){const C=w.step;return C?C===1&&w.start===g.min&&w.end&&w.end>=k?g.hasQuestionMarkChar?"?":"*":C!==1&&w.start===g.min&&w.end&&w.end>=k-C+1?`*/${C}`:null:null},$2=function(g,w){const k=g.step;if(k===1)return`${g.start}-${g.end}`;const C=g.start===0?g.count-1:g.count;if(!k)throw new Error("Unexpected range step");if(!g.end)throw new Error("Unexpected range end");if(k*C>g.end){const Q=(E,I)=>{if(typeof g.start!="number")throw new Error("Unexpected range start");return I%k===0?g.start+I:null};if(typeof g.start!="number")throw new Error("Unexpected range start");const M={length:g.end-g.start+1};return Array.from(M,Q).filter(E=>E!==null).join(",")}return g.end===w-k+1?`${g.start}/${k}`:`${g.start}-${g.end}/${k}`},Ie(h,c),h);return sh.CronFieldCollection=e,sh}var xO={},xk;function z2(){return xk||(xk=1,function(n){var i,s,o,l,c,h,f,p,m,Go,w,tl,M2,j2,R2,A2,T0,N2,_2,Ou;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const e=lx();n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const t=1e4,q=class q{constructor(V,D){Ie(this,w);Ie(this,i);Ie(this,s);Ie(this,o);Ie(this,l);Ie(this,c);Ie(this,h);Ie(this,f,null);Ie(this,p,!1);ge(this,i,D),ge(this,s,D.tz),ge(this,l,D.startDate?new e.CronDate(D.startDate,L(this,s)):null),ge(this,c,D.endDate?new e.CronDate(D.endDate,L(this,s)):null);let Z=D.currentDate??D.startDate;if(Z){const ae=new e.CronDate(Z,L(this,s));L(this,l)&&ae.getTime()<L(this,l).getTime()?Z=L(this,l):L(this,c)&&ae.getTime()>L(this,c).getTime()&&(Z=L(this,c))}ge(this,o,new e.CronDate(Z,L(this,s))),ge(this,h,V)}get fields(){return L(this,h)}static fieldsToExpression(V,D){return new q(V,D||{})}next(){return Ee(this,w,Ou).call(this)}prev(){return Ee(this,w,Ou).call(this,!0)}hasNext(){const V=L(this,o);try{return Ee(this,w,Ou).call(this),!0}catch{return!1}finally{ge(this,o,V)}}hasPrev(){const V=L(this,o);try{return Ee(this,w,Ou).call(this,!0),!0}catch{return!1}finally{ge(this,o,V)}}take(V){const D=[];if(V>=0)for(let Z=0;Z<V;Z++)try{D.push(this.next())}catch{return D}else for(let Z=0;Z>V;Z--)try{D.push(this.prev())}catch{return D}return D}reset(V){ge(this,o,new e.CronDate(V||L(this,i).currentDate))}stringify(V=!1){return L(this,h).stringify(V)}includesDate(V){const{second:D,minute:Z,hour:ae,month:se}=L(this,h),re=new e.CronDate(V,L(this,s));return!(!D.values.includes(re.getSeconds())||!Z.values.includes(re.getMinutes())||!ae.values.includes(re.getHours())||!se.values.includes(re.getMonth()+1)||!Ee(this,w,T0).call(this,re)||L(this,h).dayOfWeek.nthDay>0&&Math.ceil(re.getDate()/7)!==L(this,h).dayOfWeek.nthDay)}toString(){return L(this,i).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ee(this,w,Ou).call(this),done:!this.hasNext()})}}};i=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakSet,Go=function(V,D){return D.some(Z=>Z===V)},w=new WeakSet,tl=function(V,D){return V[D?V.length-1:0]},M2=function(V){const D=`${V.getFullYear()}-${V.getMonth()+1}-${V.getDate()}`;if(L(this,f)===D)return L(this,p);const Z=new e.CronDate(V);Z.setStartOfDay();const ae=new e.CronDate(V);return ae.setEndOfDay(),ge(this,f,D),ge(this,p,Z.getUTCOffset()!==ae.getUTCOffset()),L(this,p)},j2=function(V,D,Z){const ae=L(this,h).second.values,se=V.getSeconds(),re=L(this,h).second.findNearestValue(se,Z);if(re!==null){V.setSeconds(re);return}V.applyDateOperation(D,e.TimeUnit.Minute,L(this,h).hour.values.length),V.setSeconds(Ee(this,w,tl).call(this,ae,Z))},R2=function(V,D,Z){const ae=L(this,h).minute.values,se=L(this,h).second.values,re=V.getMinutes(),Oe=L(this,h).minute.findNearestValue(re,Z);if(Oe!==null){V.setMinutes(Oe),V.setSeconds(Ee(this,w,tl).call(this,se,Z));return}V.applyDateOperation(D,e.TimeUnit.Hour,L(this,h).hour.values.length),V.setMinutes(Ee(this,w,tl).call(this,ae,Z)),V.setSeconds(Ee(this,w,tl).call(this,se,Z))},A2=function(V,D){const Z=D.isLastWeekdayOfMonth();return V.some(ae=>{const se=parseInt(ae.toString().charAt(0),10)%7;if(Number.isNaN(se))throw new Error(`Invalid last weekday of the month expression: ${ae}`);return D.getDay()===se&&Z})},T0=function(V){var be,he,ye;const D=L(this,h).dayOfMonth.isWildcard,Z=!D,ae=L(this,h).dayOfWeek.isWildcard,se=!ae,re=Ee(be=q,m,Go).call(be,V.getDate(),L(this,h).dayOfMonth.values)||L(this,h).dayOfMonth.hasLastChar&&V.isLastDayOfMonth(),Oe=Ee(he=q,m,Go).call(he,V.getDay(),L(this,h).dayOfWeek.values)||L(this,h).dayOfWeek.hasLastChar&&Ee(ye=q,m,A2).call(ye,L(this,h).dayOfWeek.values,V);return!!(Z&&se&&(re||Oe)||re&&!se||D&&!ae&&Oe)},N2=function(V,D,Z){var A,Y;const ae=L(this,h).hour.values,se=ae,re=V.getHours(),Oe=Ee(A=q,m,Go).call(A,re,ae),be=V.dstStart===re,he=V.dstEnd===re;if(be)return Ee(Y=q,m,Go).call(Y,re-1,ae)?!0:(V.invokeDateOperation(D,e.TimeUnit.Hour),!1);if(he&&!Z)return V.dstEnd=null,V.applyDateOperation(e.DateMathOp.Add,e.TimeUnit.Hour,se.length),!1;if(Oe)return!0;V.dstStart=null;const ye=L(this,h).hour.findNearestValue(re,Z);if(ye===null)return V.applyDateOperation(D,e.TimeUnit.Day,se.length),!1;if(Ee(this,w,M2).call(this,V)){const ue=Z?re-ye:ye-re;for(let z=0;z<ue;z++)V.applyDateOperation(D,e.TimeUnit.Hour,se.length)}else V.setHours(ye);return V.setMinutes(Ee(this,w,tl).call(this,L(this,h).minute.values,Z)),V.setSeconds(Ee(this,w,tl).call(this,L(this,h).second.values,Z)),!1},_2=function(V){if(!L(this,l)&&!L(this,c))return;const D=V.getTime();if(L(this,l)&&D<L(this,l).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(L(this,c)&&D>L(this,c).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Ou=function(V=!1){var re,Oe,be;const D=V?e.DateMathOp.Subtract:e.DateMathOp.Add,Z=new e.CronDate(L(this,o)),ae=Z.getTime();let se=0;for(;++se<t;){if(Ee(this,w,_2).call(this,Z),!Ee(this,w,T0).call(this,Z)){Z.applyDateOperation(D,e.TimeUnit.Day,L(this,h).hour.values.length);continue}if(!(L(this,h).dayOfWeek.nthDay<=0||Math.ceil(Z.getDate()/7)===L(this,h).dayOfWeek.nthDay)){Z.applyDateOperation(D,e.TimeUnit.Day,L(this,h).hour.values.length);continue}if(!Ee(re=q,m,Go).call(re,Z.getMonth()+1,L(this,h).month.values)){Z.applyDateOperation(D,e.TimeUnit.Month,L(this,h).hour.values.length);continue}if(Ee(this,w,N2).call(this,Z,D,V)){if(!Ee(Oe=q,m,Go).call(Oe,Z.getMinutes(),L(this,h).minute.values)){Ee(this,w,R2).call(this,Z,D,V);continue}if(!Ee(be=q,m,Go).call(be,Z.getSeconds(),L(this,h).second.values)){Ee(this,w,j2).call(this,Z,D,V);continue}if(ae===Z.getTime()){(D==="Add"||Z.getMilliseconds()===0)&&Z.applyDateOperation(D,e.TimeUnit.Second,L(this,h).hour.values.length);continue}break}}if(se>t)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return Z.getMilliseconds()!==0&&Z.setMilliseconds(0),ge(this,o,Z),Z},Ie(q,m);let r=q;n.CronExpression=r,n.default=r}(xO)),xO}var zd={},vk;function Xz(){if(vk)return zd;vk=1,Object.defineProperty(zd,"__esModule",{value:!0}),zd.seededRandom=t;function n(r){let i=2166136261;for(let s=0;s<r.length;s++)i^=r.charCodeAt(s),i=Math.imul(i,16777619);return()=>i>>>0}function e(r){return()=>{let i=r+=1831565813;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296}}function t(r){const i=r?n(r)():Math.floor(Math.random()*1e10);return e(i)}return zd}var wk;function E0(){var h,f,L2,nl,D2,I2,Z2,X2,V2,W2,F2,$0,B2,Y2;if(wk)return _r;wk=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.CronExpressionParser=_r.DayOfWeek=_r.Months=_r.CronUnit=_r.PredefinedExpressions=void 0;const n=E2(),e=z2(),t=Xz(),r=ux();var i;(function(R){R["@yearly"]="0 0 0 1 1 *",R["@annually"]="0 0 0 1 1 *",R["@monthly"]="0 0 0 1 * *",R["@weekly"]="0 0 0 * * 0",R["@daily"]="0 0 0 * * *",R["@hourly"]="0 0 * * * *",R["@minutely"]="0 * * * * *",R["@secondly"]="* * * * * *",R["@weekdays"]="0 0 0 * * 1-5",R["@weekends"]="0 0 0 * * 0,6"})(i||(_r.PredefinedExpressions=i={}));var s;(function(R){R.Second="Second",R.Minute="Minute",R.Hour="Hour",R.DayOfMonth="DayOfMonth",R.Month="Month",R.DayOfWeek="DayOfWeek"})(s||(_r.CronUnit=s={}));var o;(function(R){R[R.jan=1]="jan",R[R.feb=2]="feb",R[R.mar=3]="mar",R[R.apr=4]="apr",R[R.may=5]="may",R[R.jun=6]="jun",R[R.jul=7]="jul",R[R.aug=8]="aug",R[R.sep=9]="sep",R[R.oct=10]="oct",R[R.nov=11]="nov",R[R.dec=12]="dec"})(o||(_r.Months=o={}));var l;(function(R){R[R.sun=0]="sun",R[R.mon=1]="mon",R[R.tue=2]="tue",R[R.wed=3]="wed",R[R.thu=4]="thu",R[R.fri=5]="fri",R[R.sat=6]="sat"})(l||(_r.DayOfWeek=l={}));let c=(f=class{static parse(q,G={}){var z,Re,_e,$e,rt,st,mt,Xt;const{strict:V=!1,hashSeed:D}=G,Z=(0,t.seededRandom)(D);q=i[q]||q;const ae=Ee(z=f,h,L2).call(z,q,V);if(!(ae.dayOfMonth==="*"||ae.dayOfWeek==="*"||!V))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const se=Ee(Re=f,h,nl).call(Re,s.Second,ae.second,r.CronSecond.constraints,Z),re=Ee(_e=f,h,nl).call(_e,s.Minute,ae.minute,r.CronMinute.constraints,Z),Oe=Ee($e=f,h,nl).call($e,s.Hour,ae.hour,r.CronHour.constraints,Z),be=Ee(rt=f,h,nl).call(rt,s.Month,ae.month,r.CronMonth.constraints,Z),he=Ee(st=f,h,nl).call(st,s.DayOfMonth,ae.dayOfMonth,r.CronDayOfMonth.constraints,Z),{dayOfWeek:ye,nthDayOfWeek:A}=Ee(mt=f,h,B2).call(mt,ae.dayOfWeek),Y=Ee(Xt=f,h,nl).call(Xt,s.DayOfWeek,ye,r.CronDayOfWeek.constraints,Z),ue=new n.CronFieldCollection({second:new r.CronSecond(se,{rawValue:ae.second}),minute:new r.CronMinute(re,{rawValue:ae.minute}),hour:new r.CronHour(Oe,{rawValue:ae.hour}),dayOfMonth:new r.CronDayOfMonth(he,{rawValue:ae.dayOfMonth}),month:new r.CronMonth(be,{rawValue:ae.month}),dayOfWeek:new r.CronDayOfWeek(Y,{rawValue:ae.dayOfWeek,nthDayOfWeek:A})});return new e.CronExpression(ue,{...G,expression:q})}},h=new WeakSet,L2=function(q,G){if(G&&!q.length)throw new Error("Invalid cron expression");q=q||"0 * * * * *";const V=q.trim().split(/\s+/);if(G&&V.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(V.length>6)throw new Error("Invalid cron expression, too many fields");const D=["*","*","*","*","*","0"];V.length<D.length&&V.unshift(...D.slice(V.length));const[Z,ae,se,re,Oe,be]=V;return{second:Z,minute:ae,hour:se,dayOfMonth:re,month:Oe,dayOfWeek:be}},nl=function(q,G,V,D){if((q===s.Month||q===s.DayOfWeek)&&(G=G.replace(/[a-z]{3}/gi,Z=>{Z=Z.toLowerCase();const ae=o[Z]||l[Z];if(ae===void 0)throw new Error(`Validation error, cannot resolve alias "${Z}"`);return ae.toString()})),!V.validChars.test(G))throw new Error(`Invalid characters, got value: ${G}`);return G=Ee(this,h,D2).call(this,G,V),G=Ee(this,h,I2).call(this,G,V,D),Ee(this,h,Z2).call(this,q,G,V)},D2=function(q,G){return q.replace(/[*?]/g,G.min+"-"+G.max)},I2=function(q,G,V){const D=V();return q.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(Z,ae,se,re)=>{if(ae&&se&&re){const Oe=parseInt(ae,10),be=parseInt(se,10),he=parseInt(re,10);if(Oe>be)throw new Error(`Invalid range: ${Oe}-${be}, min > max`);if(he<=0)throw new Error(`Invalid step: ${he}, must be positive`);const ye=Math.max(Oe,G.min),A=Math.floor(D*he),Y=[];for(let ue=Math.floor(ye/he)*he+A;ue<=be;ue+=he)ue>=ye&&Y.push(ue);return Y.join(",")}else if(ae&&se){const Oe=parseInt(ae,10),be=parseInt(se,10);if(Oe>be)throw new Error(`Invalid range: ${Oe}-${be}, min > max`);return String(Math.floor(D*(be-Oe+1))+Oe)}else if(re){const Oe=parseInt(re,10);if(Oe<=0)throw new Error(`Invalid step: ${Oe}, must be positive`);const be=Math.floor(D*Oe),he=[];for(let ye=Math.floor(G.min/Oe)*Oe+be;ye<=G.max;ye+=Oe)ye>=G.min&&he.push(ye);return he.join(",")}else return String(Math.floor(D*(G.max-G.min+1)+G.min))})},Z2=function(q,G,V){const D=[];function Z(se,re){var Oe;if(Array.isArray(se))D.push(...se);else if(Ee(Oe=f,h,Y2).call(Oe,re,se))D.push(se);else{const be=parseInt(se.toString(),10);if(!(be>=re.min&&be<=re.max))throw new Error(`Constraint error, got value ${se} expected range ${re.min}-${re.max}`);D.push(q===s.DayOfWeek?be%7:se)}}return G.split(",").forEach(se=>{var re;if(!(se.length>0))throw new Error("Invalid list value format");Z(Ee(re=f,h,X2).call(re,q,se,V),V)}),D},X2=function(q,G,V){var Z,ae;const D=G.split("/");if(D.length>2)throw new Error(`Invalid repeat: ${G}`);return D.length===2?(isNaN(parseInt(D[0],10))||(D[0]=`${D[0]}-${V.max}`),Ee(Z=f,h,$0).call(Z,q,D[0],parseInt(D[1],10),V)):Ee(ae=f,h,$0).call(ae,q,G,1,V)},V2=function(q,G,V){if(!(!isNaN(q)&&!isNaN(G)&&q>=V.min&&G<=V.max))throw new Error(`Constraint error, got range ${q}-${G} expected range ${V.min}-${V.max}`);if(q>G)throw new Error(`Invalid range: ${q}-${G}, min(${q}) > max(${G})`)},W2=function(q){if(!(!isNaN(q)&&q>0))throw new Error(`Constraint error, cannot repeat at every ${q} time.`)},F2=function(q,G,V,D){const Z=[];q===s.DayOfWeek&&V%7===0&&Z.push(0);for(let ae=G;ae<=V;ae+=D)Z.indexOf(ae)===-1&&Z.push(ae);return Z},$0=function(q,G,V,D){const Z=G.split("-");if(Z.length<=1)return isNaN(+G)?G:+G;const[ae,se]=Z.map(re=>parseInt(re,10));return Ee(this,h,V2).call(this,ae,se,D),Ee(this,h,W2).call(this,V),Ee(this,h,F2).call(this,q,ae,se,V)},B2=function(q){const G=q.split("#");if(G.length<=1)return{dayOfWeek:G[0]};const V=+G[G.length-1],D=q.match(/([,-/])/);if(D!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${D==null?void 0:D[0]}\` special characters are incompatible`);if(!(G.length<=2&&!isNaN(V)&&V>=1&&V<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:G[0],nthDayOfWeek:V}},Y2=function(q,G){return q.chars.some(V=>G.toString().includes(V))},Ie(f,h),f);return _r.CronExpressionParser=c,_r}var ji={};const Vz={},Wz=Object.freeze(Object.defineProperty({__proto__:null,default:Vz},Symbol.toStringTag,{value:"Module"})),kk=oE(Wz);var Sk;function Fz(){var s,o,M0,U2;if(Sk)return ji;Sk=1;var n=ji&&ji.__createBinding||(Object.create?function(h,f,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(f,p);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(h,m,g)}:function(h,f,p,m){m===void 0&&(m=p),h[m]=f[p]}),e=ji&&ji.__setModuleDefault||(Object.create?function(h,f){Object.defineProperty(h,"default",{enumerable:!0,value:f})}:function(h,f){h.default=f}),t=ji&&ji.__importStar||function(){var h=function(f){return h=Object.getOwnPropertyNames||function(p){var m=[];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(m[m.length]=g);return m},h(f)};return function(f){if(f&&f.__esModule)return f;var p={};if(f!=null)for(var m=h(f),g=0;g<m.length;g++)m[g]!=="default"&&n(p,f,m[g]);return e(p,f),p}}();Object.defineProperty(ji,"__esModule",{value:!0}),ji.CronFileParser=void 0;const r=E0();let i=(o=class{static async parseFile(f){var g;const{readFile:p}=await Promise.resolve().then(()=>t(kk)),m=await p(f,"utf8");return Ee(g=o,s,M0).call(g,m)}static parseFileSync(f){var g;const{readFileSync:p}=kk,m=p(f,"utf8");return Ee(g=o,s,M0).call(g,m)}},s=new WeakSet,M0=function(f){var g;const p=f.split(`
|
|
310
|
+
`),m={variables:{},expressions:[],errors:{}};for(const w of p){const k=w.trim();if(k.length===0||k.startsWith("#"))continue;const C=k.match(/^(.*)=(.*)$/);if(C){const[,Q,M]=C;m.variables[Q]=M.replace(/["']/g,"");continue}try{const Q=Ee(g=o,s,U2).call(g,k);m.expressions.push(Q.interval)}catch(Q){m.errors[k]=Q}}return m},U2=function(f){const p=f.split(" ");return{interval:r.CronExpressionParser.parse(p.slice(0,5).join(" ")),command:p.slice(5,p.length)}},Ie(o,s),o);return ji.CronFileParser=i,ji}var bk;function Bz(){return bk||(bk=1,function(n){var e=Ka&&Ka.__createBinding||(Object.create?function(h,f,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(f,p);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(h,m,g)}:function(h,f,p,m){m===void 0&&(m=p),h[m]=f[p]}),t=Ka&&Ka.__exportStar||function(h,f){for(var p in h)p!=="default"&&!Object.prototype.hasOwnProperty.call(f,p)&&e(f,h,p)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const r=E0();var i=lx();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var s=E2();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return s.CronFieldCollection}});var o=z2();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var l=E0();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return l.CronExpressionParser}});var c=Fz();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),t(ux(),n),n.default=r.CronExpressionParser}(Ka)),Ka}var q2=Bz(),vO={exports:{}},Pk;function Yz(){return Pk||(Pk=1,function(n,e){(function(r,i){n.exports=i()})(globalThis,()=>(()=>{var t={949(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.CronParser=void 0;var h=c(515),f=function(){function p(m,g,w){g===void 0&&(g=!0),w===void 0&&(w=!1),this.expression=m,this.dayOfWeekStartIndexZero=g,this.monthStartIndexZero=w}return p.prototype.parse=function(){var m,g,w=(m=this.expression)!==null&&m!==void 0?m:"";if(w==="@reboot")return g=["@reboot","","","","","",""],g;if(w.startsWith("@")){var k=this.parseSpecial(this.expression);g=this.extractParts(k)}else g=this.extractParts(this.expression);return this.normalize(g),this.validate(g),g},p.prototype.parseSpecial=function(m){var g={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},w=g[m];if(!w)throw new Error("Unknown special expression.");return w},p.prototype.extractParts=function(m){if(!this.expression)throw new Error("cron expression is empty");for(var g=m.trim().split(/[ ]+/),w=0;w<g.length;w++)if(g[w].includes(",")){var k=g[w].split(",").map(function(Q){return Q.trim()}).filter(function(Q){return Q!==""}).map(function(Q){return isNaN(Number(Q))?Q:Number(Q)}).filter(function(Q){return Q!==null&&Q!==""});k.length===0&&k.push("*"),k.sort(function(Q,M){return Q!==null&&M!==null?Q-M:0}),g[w]=k.map(function(Q){return Q!==null?Q.toString():""}).join(",")}if(g.length<5)throw new Error("Expression has only ".concat(g.length," part").concat(g.length==1?"":"s",". At least 5 parts are required."));if(g.length==5)g.unshift(""),g.push("");else if(g.length==6){var C=/\d{4}$/.test(g[5])||g[4]=="?"||g[2]=="?";C?g.unshift(""):g.push("")}else if(g.length>7)throw new Error("Expression has ".concat(g.length," parts; too many!"));return g},p.prototype.normalize=function(m){var g=this;if(m[3]=m[3].replace("?","*"),m[5]=m[5].replace("?","*"),m[2]=m[2].replace("?","*"),m[0].indexOf("0/")==0&&(m[0]=m[0].replace("0/","*/")),m[1].indexOf("0/")==0&&(m[1]=m[1].replace("0/","*/")),m[2].indexOf("0/")==0&&(m[2]=m[2].replace("0/","*/")),m[3].indexOf("1/")==0&&(m[3]=m[3].replace("1/","*/")),m[4].indexOf("1/")==0&&(m[4]=m[4].replace("1/","*/")),m[6].indexOf("1/")==0&&(m[6]=m[6].replace("1/","*/")),m[5]=m[5].replace(/(^\d)|([^#/\s]\d)/g,function(U){var _=U.replace(/\D/,""),R=_;return g.dayOfWeekStartIndexZero?_=="7"&&(R="0"):R=(parseInt(_)-1).toString(),U.replace(_,R)}),m[5]=="L"&&(m[5]="6"),m[3]=="?"&&(m[3]="*"),m[3].indexOf("W")>-1&&(m[3].indexOf(",")>-1||m[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var w={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var k in w)m[5]=m[5].replace(new RegExp(k,"gi"),w[k].toString());m[4]=m[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(U){var _=U.replace(/\D/,""),R=_;return g.monthStartIndexZero&&(R=(parseInt(_)+1).toString()),U.replace(_,R)});var C={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var Q in C)m[4]=m[4].replace(new RegExp(Q,"gi"),C[Q].toString());m[0]=="0"&&(m[0]=""),!/\*|\-|\,|\//.test(m[2])&&(/\*|\//.test(m[1])||/\*|\//.test(m[0]))&&(m[2]+="-".concat(m[2]));for(var M=0;M<m.length;M++)if(m[M].indexOf(",")!=-1&&(m[M]=m[M].split(",").filter(function(U){return U!==""}).join(",")||"*"),m[M]=="*/1"&&(m[M]="*"),m[M].indexOf("/")>-1&&!/^\*|\-|\,/.test(m[M])){var E=null;switch(M){case 4:E="12";break;case 5:E="6";break;case 6:E="9999";break;default:E=null;break}if(E!==null){var I=m[M].split("/");m[M]="".concat(I[0],"-").concat(E,"/").concat(I[1])}}},p.prototype.validate=function(m){var g="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(m[0],g),this.validateOnlyExpectedCharactersFound(m[1],g),this.validateOnlyExpectedCharactersFound(m[2],g),this.validateOnlyExpectedCharactersFound(m[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(m[4],g),this.validateOnlyExpectedCharactersFound(m[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(m[6],g),this.validateAnyRanges(m)},p.prototype.validateAnyRanges=function(m){h.default.secondRange(m[0]),h.default.minuteRange(m[1]),h.default.hourRange(m[2]),h.default.dayOfMonthRange(m[3]),h.default.monthRange(m[4],this.monthStartIndexZero),h.default.dayOfWeekRange(m[5],this.dayOfWeekStartIndexZero)},p.prototype.validateOnlyExpectedCharactersFound=function(m,g){var w=m.match(new RegExp("[^".concat(g,"]+"),"gi"));if(w&&w.length)throw new Error("Expression contains invalid values: '".concat(w.toString(),"'"))},p}();l.CronParser=f},333(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.ExpressionDescriptor=void 0;var h=c(823),f=c(949),p=function(){function m(g,w){if(this.expression=g,this.options=w,this.expressionParts=new Array(5),!this.options.locale&&m.defaultLocale&&(this.options.locale=m.defaultLocale),!m.locales[this.options.locale]){var k=Object.keys(m.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(k,"'.")),this.options.locale=k}this.i18n=m.locales[this.options.locale],w.use24HourTimeFormat===void 0&&(w.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return m.toString=function(g,w){var k=w===void 0?{}:w,C=k.throwExceptionOnParseError,Q=C===void 0?!0:C,M=k.verbose,E=M===void 0?!1:M,I=k.dayOfWeekStartIndexZero,U=I===void 0?!0:I,_=k.monthStartIndexZero,R=_===void 0?!1:_,q=k.use24HourTimeFormat,G=k.trimHoursLeadingZero,V=G===void 0?!1:G,D=k.locale,Z=D===void 0?null:D,ae=k.logicalAndDayFields,se=ae===void 0?!1:ae,re={throwExceptionOnParseError:Q,verbose:E,dayOfWeekStartIndexZero:U,monthStartIndexZero:R,use24HourTimeFormat:q,trimHoursLeadingZero:V,locale:Z,logicalAndDayFields:se};re.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var Oe=new m(g,re);return Oe.getFullDescription()},m.initialize=function(g,w){w===void 0&&(w="en"),m.specialCharacters=["/","-",",","*"],m.defaultLocale=w,g.load(m.locales)},m.prototype.getFullDescription=function(){var g,w,k="";try{var C=new f.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=C.parse(),this.expressionParts[0]==="@reboot")return((w=(g=this.i18n).atReboot)===null||w===void 0?void 0:w.call(g))||"Run once, at startup";var Q=this.getTimeOfDayDescription(),M=this.getDayOfMonthDescription(),E=this.getMonthDescription(),I=this.getDayOfWeekDescription(),U=this.getYearDescription();k+=Q+M+I+E+U,k=this.transformVerbosity(k,!!this.options.verbose),k=k.charAt(0).toLocaleUpperCase()+k.substr(1)}catch(_){if(!this.options.throwExceptionOnParseError)k=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(_)}return k},m.prototype.getTimeOfDayDescription=function(){var g=this.expressionParts[0],w=this.expressionParts[1],k=this.expressionParts[2],C="";if(!h.StringUtilities.containsAny(w,m.specialCharacters)&&!h.StringUtilities.containsAny(k,m.specialCharacters)&&!h.StringUtilities.containsAny(g,m.specialCharacters))C+=this.i18n.atSpace()+this.formatTime(k,w,g);else if(!g&&w.indexOf("-")>-1&&!(w.indexOf(",")>-1)&&!(w.indexOf("/")>-1)&&!h.StringUtilities.containsAny(k,m.specialCharacters)){var Q=w.split("-");C+=h.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(k,Q[0],""),this.formatTime(k,Q[1],""))}else if(!g&&k.indexOf(",")>-1&&k.indexOf("-")==-1&&k.indexOf("/")==-1&&!h.StringUtilities.containsAny(w,m.specialCharacters)){var M=k.split(",");C+=this.i18n.at();for(var E=0;E<M.length;E++)C+=" ",C+=this.formatTime(M[E],w,""),E<M.length-2&&(C+=","),E==M.length-2&&(C+=this.i18n.spaceAnd())}else{var I=this.getSecondsDescription(),U=this.getMinutesDescription(),_=this.getHoursDescription();if(C+=I,C&&U&&(C+=", "),C+=U,U===_)return C;C&&_&&(C+=", "),C+=_}return C},m.prototype.getSecondsDescription=function(){var g=this,w=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(k){return k},function(k){return h.StringUtilities.format(g.i18n.everyX0Seconds(k),k)},function(k){return g.i18n.secondsX0ThroughX1PastTheMinute()},function(k){return k=="0"?"":parseInt(k)<20?g.i18n.atX0SecondsPastTheMinute(k):g.i18n.atX0SecondsPastTheMinuteGt20()||g.i18n.atX0SecondsPastTheMinute(k)});return w},m.prototype.getMinutesDescription=function(){var g=this,w=this.expressionParts[0],k=this.expressionParts[2],C=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(Q){return Q},function(Q){return h.StringUtilities.format(g.i18n.everyX0Minutes(Q),Q)},function(Q){return g.i18n.minutesX0ThroughX1PastTheHour()},function(Q){var M,E;try{return Q=="0"&&k.indexOf("/")==-1&&w==""?g.i18n.everyHour():Q=="0"?((E=(M=g.i18n).onTheHour)===null||E===void 0?void 0:E.call(M))||g.i18n.atX0MinutesPastTheHour(Q):parseInt(Q)<20?g.i18n.atX0MinutesPastTheHour(Q):g.i18n.atX0MinutesPastTheHourGt20()||g.i18n.atX0MinutesPastTheHour(Q)}catch{return g.i18n.atX0MinutesPastTheHour(Q)}});return C},m.prototype.getHoursDescription=function(){var g=this,w=this.expressionParts[2],k=0,C=[];w.split("/")[0].split(",").forEach(function(E){var I=E.split("-");I.length===2&&C.push({value:I[1],index:k+1}),k+=I.length});var Q=0,M=this.getSegmentDescription(w,this.i18n.everyHour(),function(E){var I=C.find(function(_){return _.value===E&&_.index===Q}),U=I&&g.expressionParts[1]!=="0";return Q++,U?g.formatTime(E,"59",""):g.formatTime(E,"0","")},function(E){return h.StringUtilities.format(g.i18n.everyX0Hours(E),E)},function(E){return g.i18n.betweenX0AndX1()},function(E){return g.i18n.atX0()});return M},m.prototype.getDayOfWeekDescription=function(){var g=this,w=this.i18n.daysOfTheWeek(),k=null;return this.expressionParts[5]=="*"?k="":k=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(C,Q){var M=C;C.indexOf("#")>-1?M=C.substring(0,C.indexOf("#")):C.indexOf("L")>-1&&(M=M.replace("L",""));var E=parseInt(M),I=g.i18n.daysOfTheWeekInCase?g.i18n.daysOfTheWeekInCase(Q)[E]:w[E];if(C.indexOf("#")>-1){var U=null,_=C.substring(C.indexOf("#")+1),R=C.substring(0,C.indexOf("#"));switch(_){case"1":U=g.i18n.first(R);break;case"2":U=g.i18n.second(R);break;case"3":U=g.i18n.third(R);break;case"4":U=g.i18n.fourth(R);break;case"5":U=g.i18n.fifth(R);break}I=U+" "+I}return I},function(C){return parseInt(C)==1?"":h.StringUtilities.format(g.i18n.commaEveryX0DaysOfTheWeek(C),C)},function(C){var Q=C.substring(0,C.indexOf("-")),M=g.expressionParts[3]!="*";return M?g.i18n.commaAndX0ThroughX1(Q):g.i18n.commaX0ThroughX1(Q)},function(C){var Q=null;if(C.indexOf("#")>-1){var M=C.substring(C.indexOf("#")+1),E=C.substring(0,C.indexOf("#"));Q=g.i18n.commaOnThe(M,E).trim()+g.i18n.spaceX0OfTheMonth()}else if(C.indexOf("L")>-1)Q=g.i18n.commaOnTheLastX0OfTheMonth(C.replace("L",""));else{var I=g.expressionParts[3]!="*";I?g.options.logicalAndDayFields?Q=g.i18n.commaOnlyOnX0(C):Q=g.i18n.commaAndOnX0():Q=g.i18n.commaOnlyOnX0(C)}return Q}),k},m.prototype.getMonthDescription=function(){var g=this,w=this.i18n.monthsOfTheYear(),k=this.getSegmentDescription(this.expressionParts[4],"",function(C,Q){return Q&&g.i18n.monthsOfTheYearInCase?g.i18n.monthsOfTheYearInCase(Q)[parseInt(C)-1]:w[parseInt(C)-1]},function(C){return parseInt(C)==1?"":h.StringUtilities.format(g.i18n.commaEveryX0Months(C),C)},function(C){return g.i18n.commaMonthX0ThroughMonthX1()||g.i18n.commaX0ThroughX1()},function(C){return g.i18n.commaOnlyInMonthX0?g.i18n.commaOnlyInMonthX0():g.i18n.commaOnlyInX0()});return k},m.prototype.getDayOfMonthDescription=function(){var g=this,w=null,k=this.expressionParts[3];switch(k){case"L":w=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":w=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var C=k.match(/(\d{1,2}W)|(W\d{1,2})/);if(C){var Q=parseInt(C[0].replace("W","")),M=Q==1?this.i18n.firstWeekday():h.StringUtilities.format(this.i18n.weekdayNearestDayX0(),Q.toString());w=h.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),M);break}else{var E=k.match(/L-(\d{1,2})/);if(E){var I=E[1];w=h.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(I),I);break}else{if(k=="*"&&this.expressionParts[5]!="*")return"";w=this.getSegmentDescription(k,this.i18n.commaEveryDay(),function(U){return U=="L"?g.i18n.lastDay():g.i18n.dayX0?h.StringUtilities.format(g.i18n.dayX0(),U):U},function(U){return U=="1"?g.i18n.commaEveryDay():g.i18n.commaEveryX0Days(U)},function(U){return g.i18n.commaBetweenDayX0AndX1OfTheMonth(U)},function(U){return g.i18n.commaOnDayX0OfTheMonth(U)})}break}}return w},m.prototype.getYearDescription=function(){var g=this,w=this.getSegmentDescription(this.expressionParts[6],"",function(k){return/^\d+$/.test(k)?new Date(parseInt(k),1).getFullYear().toString():k},function(k){return h.StringUtilities.format(g.i18n.commaEveryX0Years(k),k)},function(k){return g.i18n.commaYearX0ThroughYearX1()||g.i18n.commaX0ThroughX1()},function(k){return g.i18n.commaOnlyInYearX0?g.i18n.commaOnlyInYearX0():g.i18n.commaOnlyInX0()});return w},m.prototype.getSegmentDescription=function(g,w,k,C,Q,M){var E=null,I=g.indexOf("/")>-1,U=g.indexOf("-")>-1,_=g.indexOf(",")>-1;if(!g)E="";else if(g==="*")E=w;else if(!I&&!U&&!_)E=h.StringUtilities.format(M(g),k(g));else if(_){for(var R=g.split(","),q="",G=0;G<R.length;G++)if(G>0&&R.length>2&&(q+=",",G<R.length-1&&(q+=" ")),G>0&&R.length>1&&(G==R.length-1||R.length==2)&&(q+="".concat(this.i18n.spaceAnd()," ")),R[G].indexOf("/")>-1||R[G].indexOf("-")>-1){var V=R[G].indexOf("-")>-1&&R[G].indexOf("/")==-1,D=this.getSegmentDescription(R[G],w,k,C,V?this.i18n.commaX0ThroughX1:Q,M);V&&(D=D.replace(", ","")),q+=D}else if(!I)q+=k(R[G]);else{var Z=this.getSegmentDescription(R[G],w,k,C,Q,M);Z&&Z.startsWith(", ")&&(Z=Z.substring(2)),q+=Z}I?E=q:E=h.StringUtilities.format(M(g),q)}else if(I){var R=g.split("/");if(E=h.StringUtilities.format(C(R[1]),R[1]),R[0].indexOf("-")>-1){var ae=this.generateRangeSegmentDescription(R[0],Q,k);ae.indexOf(", ")!=0&&(E+=", "),E+=ae}else if(R[0].indexOf("*")==-1){var se=h.StringUtilities.format(M(R[0]),k(R[0]));se=se.replace(", ",""),E+=h.StringUtilities.format(this.i18n.commaStartingX0(),se)}}else U&&(E=this.generateRangeSegmentDescription(g,Q,k));return E},m.prototype.generateRangeSegmentDescription=function(g,w,k){var C="",Q=g.split("-"),M=k(Q[0],1),E=k(Q[1],2),I=w(g);return C+=h.StringUtilities.format(I,M,E),C},m.prototype.formatTime=function(g,w,k){var C=0,Q=0,M=parseInt(g)+C,E=parseInt(w)+Q;E>=60?(E-=60,M+=1):E<0&&(E+=60,M-=1),M>=24?M=M-24:M<0&&(M=24+M);var I="",U=!1;this.options.use24HourTimeFormat||(U=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),I=U?"".concat(this.getPeriod(M)," "):" ".concat(this.getPeriod(M)),M>12&&(M-=12),M===0&&(M=12));var _="";k&&(_=":".concat(("00"+k).substring(k.length)));var R=M.toString(),q=("00"+R).substring(R.length),G=E.toString(),V=("00"+G).substring(G.length),D=this.options.trimHoursLeadingZero?R:q;return"".concat(U?I:"").concat(D,":").concat(V).concat(_).concat(U?"":I)},m.prototype.transformVerbosity=function(g,w){if(!w&&(g=g.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),g=g.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),g=g.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),g=g.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var k=0,C=Object.entries(this.i18n.conciseVerbosityReplacements());k<C.length;k++){var Q=C[k],M=Q[0],E=Q[1];g=g.replace(new RegExp(M,"g"),E)}return g},m.prototype.getPeriod=function(g){return g>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},m.locales={},m}();l.ExpressionDescriptor=p},747(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.enLocaleLoader=void 0;var h=c(486),f=function(){function p(){}return p.prototype.load=function(m){m.en=new h.en},p}();l.enLocaleLoader=f},486(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.en=void 0;var c=function(){function h(){}return h.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},h.prototype.atX0MinutesPastTheHourGt20=function(){return null},h.prototype.commaMonthX0ThroughMonthX1=function(){return null},h.prototype.commaYearX0ThroughYearX1=function(){return null},h.prototype.use24HourTimeFormatByDefault=function(){return!1},h.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},h.prototype.everyMinute=function(){return"every minute"},h.prototype.everyHour=function(){return"every hour"},h.prototype.atSpace=function(){return"At "},h.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},h.prototype.at=function(){return"At"},h.prototype.spaceAnd=function(){return" and"},h.prototype.everySecond=function(){return"every second"},h.prototype.everyX0Seconds=function(){return"every %s seconds"},h.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},h.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},h.prototype.everyX0Minutes=function(){return"every %s minutes"},h.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},h.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},h.prototype.everyX0Hours=function(){return"every %s hours"},h.prototype.betweenX0AndX1=function(){return"between %s and %s"},h.prototype.atX0=function(){return"at %s"},h.prototype.commaEveryDay=function(){return", every day"},h.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},h.prototype.commaX0ThroughX1=function(){return", %s through %s"},h.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},h.prototype.first=function(){return"first"},h.prototype.second=function(){return"second"},h.prototype.third=function(){return"third"},h.prototype.fourth=function(){return"fourth"},h.prototype.fifth=function(){return"fifth"},h.prototype.commaOnThe=function(){return", on the "},h.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},h.prototype.lastDay=function(){return"the last day"},h.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},h.prototype.commaOnlyOnX0=function(){return", only on %s"},h.prototype.commaAndOnX0=function(){return", and on %s"},h.prototype.commaEveryX0Months=function(){return", every %s months"},h.prototype.commaOnlyInX0=function(){return", only in %s"},h.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},h.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},h.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},h.prototype.firstWeekday=function(){return"first weekday"},h.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},h.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},h.prototype.commaEveryX0Days=function(){return", every %s days in a month"},h.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},h.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},h.prototype.commaEveryHour=function(){return", every hour"},h.prototype.commaEveryX0Years=function(){return", every %s years"},h.prototype.commaStartingX0=function(){return", starting %s"},h.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},h.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},h.prototype.atReboot=function(){return"Run once, at startup"},h.prototype.onTheHour=function(){return"on the hour"},h}();l.en=c},515(o,l){Object.defineProperty(l,"__esModule",{value:!0});function c(f,p){if(!f)throw new Error(p)}var h=function(){function f(){}return f.secondRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var w=parseInt(m[g],10);c(w>=0&&w<=59,"seconds part must be >= 0 and <= 59")}},f.minuteRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var w=parseInt(m[g],10);c(w>=0&&w<=59,"minutes part must be >= 0 and <= 59")}},f.hourRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var w=parseInt(m[g],10);c(w>=0&&w<=23,"hours part must be >= 0 and <= 23")}},f.dayOfMonthRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var w=parseInt(m[g],10);c(w>=1&&w<=31,"DOM part must be >= 1 and <= 31")}},f.monthRange=function(p,m){for(var g=p.split(","),w=0;w<g.length;w++)if(!isNaN(parseInt(g[w],10))){var k=parseInt(g[w],10);c(k>=1&&k<=12,m?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},f.dayOfWeekRange=function(p,m){for(var g=p.split(","),w=0;w<g.length;w++)if(!isNaN(parseInt(g[w],10))){var k=parseInt(g[w],10);c(k>=0&&k<=6,m?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},f}();l.default=h},823(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.StringUtilities=void 0;var c=function(){function h(){}return h.format=function(f){for(var p=[],m=1;m<arguments.length;m++)p[m-1]=arguments[m];return f.replace(/%s/g,function(g){return p.shift()})},h.containsAny=function(f,p){return p.some(function(m){return f.indexOf(m)>-1})},h}();l.StringUtilities=c}},r={};function i(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,i),c.exports}var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.toString=void 0;var l=i(333),c=i(747);l.ExpressionDescriptor.initialize(new c.enLocaleLoader),o.default=l.ExpressionDescriptor;var h=l.ExpressionDescriptor.toString;o.toString=h})(),s})())}(vO)),vO.exports}var Uz=Yz();const H2=af(Uz);function qz(n){const r=q2.CronExpressionParser.parse(n).next().toDate().getTime()-Date.now(),i=Math.floor(r/6e4);if(i<1)return"less than 1m";if(i<60)return`${String(i)}m`;const s=Math.floor(i/60),o=i%60;if(s<24)return o>0?`${String(s)}h ${String(o)}m`:`${String(s)}h`;const l=Math.floor(s/24);return`${String(l)}d`}function Hz(n){const e=Date.now()-new Date(n).getTime(),t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${String(t)}m ago`;const r=Math.floor(t/60);if(r<24)return`${String(r)}h ago`;const i=Math.floor(r/24);return`${String(i)}d ago`}function Gz(){const[n,e]=F.useState([]),[t,r]=F.useState(!0),[i,s]=F.useState(new Set),o=F.useCallback(async()=>{try{const c=await fetch("/automations");if(c.ok){const h=await c.json();e(h.automations)}}catch{}finally{r(!1)}},[]);F.useEffect(()=>{o()},[o]);const l=F.useCallback(async c=>{s(h=>new Set([...h,c]));try{await fetch(`/automations/${encodeURIComponent(c)}/run`,{method:"POST"})}catch{}finally{s(h=>{const f=new Set(h);return f.delete(c),f}),o()}},[o]);return v.jsxs("div",{className:"h-full bg-white dark:bg-[#0a0a0f]",children:[v.jsxs("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:[v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:"Automations"}),v.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mt-0.5",children:[n.length," automation",n.length!==1?"s":""," configured"]})]}),v.jsx("div",{className:"p-6 max-w-3xl",children:t?v.jsx("div",{className:"text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."}):n.length===0?v.jsxs("div",{className:"text-center py-12",children:[v.jsx(Zu,{className:"h-8 w-8 text-gray-300 dark:text-zinc-700 mx-auto mb-3"}),v.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500",children:["No automations defined. Add ",v.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:".json"})," files to ",v.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"automations/"}),"."]})]}):v.jsx("div",{className:"space-y-3",children:n.map(c=>{const h=i.has(c.name);return v.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-5 bg-gray-50 dark:bg-zinc-900/50",children:v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("a",{href:`/automations/${encodeURIComponent(c.name)}`,className:"flex items-center gap-2 mb-1 hover:opacity-80 transition-opacity",children:[v.jsx(Zu,{className:"h-4 w-4 text-purple-500 shrink-0"}),v.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-zinc-200",children:c.title})]}),v.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-purple-100 dark:bg-purple-500/10 text-purple-700 dark:text-purple-400 font-medium",children:c.trigger}),c.schedule&&v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500 dark:text-zinc-500",children:[v.jsx(Gp,{className:"h-3 w-3"}),H2.toString(c.schedule,{use24HourTimeFormat:!0})]}),(()=>{const f=qz(c.schedule);return f?v.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-600",children:["Next in ",f]}):null})()]})]}),v.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 leading-relaxed line-clamp-2",children:c.prompt}),c.lastRun&&v.jsxs("div",{className:"flex items-center gap-2 mt-3 text-xs",children:[c.lastRunStatus==="success"?v.jsx(Zh,{className:"h-3 w-3 text-emerald-500"}):v.jsx(Xy,{className:"h-3 w-3 text-red-400"}),v.jsxs("span",{className:"text-gray-500 dark:text-zinc-500",children:["Last run ",Hz(c.lastRun),c.lastRunStatus==="error"&&c.lastRunError&&v.jsxs("span",{className:"text-red-400 ml-1",children:["— ",c.lastRunError]})]}),c.lastRunSessionId&&v.jsx("a",{href:`/sessions/${c.lastRunSessionId}`,className:"text-xs text-indigo-500 hover:text-indigo-400 ml-2",children:"View session"})]})]}),v.jsx("button",{onClick:()=>{l(c.name)},disabled:h,className:"flex items-center gap-1.5 px-3 py-2 text-xs font-medium rounded-lg bg-purple-600 text-white hover:bg-purple-500 transition-colors disabled:opacity-50 disabled:cursor-not-allowed shrink-0",children:h?v.jsxs(v.Fragment,{children:[v.jsx(wl,{className:"h-3.5 w-3.5 animate-spin"}),"Running..."]}):v.jsxs(v.Fragment,{children:[v.jsx(Fy,{className:"h-3.5 w-3.5"}),"Run Now"]})})]})},c.name)})})})]})}function Kz(n){const e=Date.now()-n,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${String(t)}m ago`;const r=Math.floor(t/60);if(r<24)return`${String(r)}h ago`;const i=Math.floor(r/24);return`${String(i)}d ago`}function Jz(n){const r=q2.CronExpressionParser.parse(n).next().toDate().getTime()-Date.now(),i=Math.floor(r/6e4);if(i<1)return"less than 1m";if(i<60)return`${String(i)}m`;const s=Math.floor(i/60),o=i%60;return s<24?o>0?`${String(s)}h ${String(o)}m`:`${String(s)}h`:`${String(Math.floor(s/24))}d`}function e4(){const{automationName:n}=Ju(),[e,t]=F.useState(null),[r,i]=F.useState([]),[s,o]=F.useState(null),[l,c]=F.useState({}),[h,f]=F.useState(!1),[p,m]=F.useState(""),[g,w]=F.useState(!0),k=F.useCallback(async()=>{if(n){try{const E=await fetch("/automations");if(E.ok){const _=(await E.json()).automations.find(R=>R.name===n);_&&t(_)}const I=await fetch(`/sessions?automation=${encodeURIComponent(n)}&_t=${Date.now()}`);if(I.ok){const U=await I.json();i(U.sessions)}}catch{}w(!1)}},[n]);F.useEffect(()=>{k()},[k]);const C=F.useCallback(async()=>{var E;if(n){f(!0),m("");try{const U=(E=(await fetch(`/automations/${encodeURIComponent(n)}/stream`,{method:"POST"})).body)==null?void 0:E.getReader(),_=new TextDecoder;if(U){let R="";for(;;){const{done:q,value:G}=await U.read();if(q)break;R+=_.decode(G,{stream:!0});const V=R.split(`
|
|
311
|
+
`);R=V.pop()??"";for(const D of V)if(D.startsWith("data: "))try{const Z=JSON.parse(D.substring(6));Z.type==="text_delta"&&typeof Z.content=="string"&&m(ae=>ae+String(Z.content))}catch{}}}}catch{}f(!1),k()}},[n,k]),Q=F.useCallback(async E=>{if(l[E]){o(s===E?null:E);return}try{const I=await fetch(`/session/${encodeURIComponent(E)}`);if(I.ok){const U=await I.json();c(_=>({..._,[E]:U.messages})),o(E)}}catch{}},[l,s]);if(g)return v.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."});if(!e)return v.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500",children:"Automation not found"});const M=e.schedule?Jz(e.schedule):null;return v.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[v.jsx("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"flex items-center gap-3",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Zu,{className:"h-4 w-4 text-purple-500"}),v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:e.title})]}),v.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-purple-100 dark:bg-purple-500/10 text-purple-700 dark:text-purple-400 font-medium",children:e.trigger}),e.schedule&&v.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500 dark:text-zinc-500",children:[v.jsx(Gp,{className:"h-3 w-3"}),H2.toString(e.schedule,{use24HourTimeFormat:!0})]}),M&&v.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-600",children:["Next in ",M]})]}),v.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 leading-relaxed mt-2 max-w-2xl line-clamp-3",children:e.prompt})]})}),v.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.schedule&&v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[v.jsx("span",{className:"text-xs text-gray-500 dark:text-zinc-400",children:e.running?"Scheduled":"Paused"}),v.jsx("button",{onClick:()=>{const E=e.running?"stop":"start";fetch(`/automations/${encodeURIComponent(n??"")}/${E}`,{method:"POST"}).then(()=>k())},className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e.running?"bg-emerald-500":"bg-gray-300 dark:bg-zinc-700"}`,children:v.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${e.running?"translate-x-6":"translate-x-1"}`})})]}),v.jsx("button",{onClick:()=>{C()},disabled:h,className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-lg bg-purple-600 text-white hover:bg-purple-500 transition-colors disabled:opacity-50",children:h?v.jsxs(v.Fragment,{children:[v.jsx(wl,{className:"h-4 w-4 animate-spin"})," Running..."]}):v.jsxs(v.Fragment,{children:[v.jsx(Fy,{className:"h-4 w-4"})," Run Now"]})})]})]})}),v.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:v.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-6",children:[(h||p)&&v.jsxs("div",{className:"mb-6 border border-purple-500/20 rounded-xl p-4 bg-purple-500/5",children:[v.jsx("div",{className:"flex items-center gap-2 mb-3 text-xs text-purple-400 font-medium",children:h?v.jsxs(v.Fragment,{children:[v.jsx(wl,{className:"h-3.5 w-3.5 animate-spin"})," Running now..."]}):v.jsxs(v.Fragment,{children:[v.jsx(Zh,{className:"h-3.5 w-3.5 text-emerald-500"})," Latest run"]})}),p?v.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:v.jsx(Js,{children:p})}):v.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600",children:"Waiting for agent response..."})]}),r.length===0&&!h?v.jsx("div",{className:"text-center py-12 text-gray-400 dark:text-zinc-600 text-sm",children:"No runs yet. Click Run Now to trigger this automation."}):v.jsx("div",{className:"space-y-4",children:r.map(E=>{const I=s===E.id,U=l[E.id];return v.jsxs("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl overflow-hidden",children:[v.jsxs("button",{onClick:()=>{Q(E.id)},className:"w-full flex items-center justify-between px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-zinc-900/50 transition-colors",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Zh,{className:"h-3.5 w-3.5 text-emerald-500 shrink-0"}),v.jsxs("span",{className:"text-sm text-gray-700 dark:text-zinc-300",children:["Run ",Kz(E.createdAt)]})]}),v.jsx("span",{className:"text-xs text-gray-400 dark:text-zinc-600 font-mono",children:E.id.slice(0,8)})]}),I&&U&&v.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800 px-4 py-4 bg-gray-50 dark:bg-zinc-900/30",children:[U.filter(_=>_.role==="assistant"&&_.text).map((_,R)=>v.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-800 dark:prose-headings:text-zinc-200 prose-p:text-gray-700 dark:prose-p:text-zinc-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded",children:v.jsx(Js,{children:_.text})},`msg-${String(R)}`)),U.filter(_=>_.role==="assistant"&&_.text).length===0&&v.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600",children:"No response text captured"})]})]},E.id)})})]})})]})}function t4(){const{pageName:n}=Ju(),[e,t]=F.useState(null),[r,i]=F.useState(!1);return F.useEffect(()=>{if(!n)return;t(null),i(!1);const s=window.__AMODAL_PAGES__;if(s!=null&&s[n]){t(()=>s[n]);return}const o=document.createElement("script");o.src=`/pages-bundle/${n}.js`,o.onload=()=>{const l=window.__AMODAL_PAGES__;l!=null&&l[n]?t(()=>l[n]):i(!0)},o.onerror=()=>i(!0),document.head.appendChild(o)},[n]),r?v.jsx(n4,{name:n??""}):e?v.jsx(e,{}):v.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading page..."})}function n4({name:n}){return v.jsxs("div",{className:"p-6",children:[v.jsx("h1",{className:"text-xl font-bold mb-2 text-gray-900 dark:text-zinc-200",children:"Page Not Found"}),v.jsx("p",{className:"text-gray-500 dark:text-zinc-500",children:n?`No page named "${n}" found in pages/.`:"No page specified."})]})}const r4={connections:{icon:p0,color:"emerald",label:"REST Connection"},mcp:{icon:RP,color:"violet",label:"MCP Server"},skills:{icon:m0,color:"amber",label:"Skill"},knowledge:{icon:f0,color:"blue",label:"Knowledge"}};function i4({data:n}){return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-emerald-100 dark:bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 font-medium",children:n.spec.format}),v.jsxs("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-600 dark:text-zinc-400 font-medium",children:["auth: ",n.spec.authType]}),n.spec.baseUrl&&v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:n.spec.baseUrl})]}),n.surface.length>0&&v.jsxs("section",{children:[v.jsxs("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:["API Surface (",String(n.surface.length)," endpoints)"]}),v.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:v.jsxs("table",{className:"w-full text-[13px]",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"bg-gray-50 dark:bg-zinc-900/50",children:[v.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium w-20",children:"Method"}),v.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium",children:"Path"}),v.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium",children:"Description"})]})}),v.jsx("tbody",{children:n.surface.map((e,t)=>v.jsxs("tr",{className:"border-t border-gray-100 dark:border-zinc-800/50",children:[v.jsx("td",{className:"px-3 py-2",children:v.jsx("span",{className:`text-[10px] font-mono font-bold uppercase ${e.method==="GET"?"text-blue-500":e.method==="POST"?"text-emerald-500":e.method==="PUT"?"text-amber-500":e.method==="DELETE"?"text-red-500":"text-gray-500"}`,children:e.method})}),v.jsx("td",{className:"px-3 py-2 font-mono text-gray-700 dark:text-zinc-300",children:e.path}),v.jsx("td",{className:"px-3 py-2 text-gray-500 dark:text-zinc-500",children:e.description})]},`endpoint-${String(t)}`))})]})})]}),n.entities&&v.jsxs("section",{children:[v.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Entities"}),v.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4",children:v.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:v.jsx(Js,{children:n.entities})})})]}),n.rules&&v.jsxs("section",{children:[v.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Rules"}),v.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4",children:v.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:v.jsx(Js,{children:n.rules})})})]})]})}function s4({data:n}){return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-violet-100 dark:bg-violet-500/10 text-violet-700 dark:text-violet-400 font-medium",children:n.transport}),v.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full font-medium ${n.status==="connected"?"bg-emerald-100 dark:bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"bg-red-100 dark:bg-red-500/10 text-red-700 dark:text-red-400"}`,children:n.status}),n.command&&v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:n.command}),n.url&&v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:n.url})]}),n.error&&v.jsx("div",{className:"bg-red-50 dark:bg-red-500/5 border border-red-200 dark:border-red-500/20 rounded-lg px-4 py-3",children:v.jsx("p",{className:"text-sm text-red-700 dark:text-red-400 font-mono",children:n.error})}),n.tools.length>0&&v.jsxs("section",{children:[v.jsxs("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:["Tools (",String(n.tools.length),")"]}),v.jsx("div",{className:"space-y-3",children:n.tools.map(e=>v.jsxs("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:[v.jsxs("div",{className:"px-4 py-3 bg-gray-50 dark:bg-zinc-900/50",children:[v.jsx("div",{className:"flex items-center gap-2",children:v.jsx("span",{className:"text-sm font-mono font-semibold text-gray-800 dark:text-zinc-200",children:e.name})}),e.description&&v.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 mt-1",children:e.description})]}),e.parameters&&Object.keys(e.parameters).length>0&&v.jsx("div",{className:"px-4 py-3 border-t border-gray-100 dark:border-zinc-800/50",children:v.jsx("pre",{className:"text-[12px] text-gray-600 dark:text-zinc-400 font-mono whitespace-pre-wrap overflow-auto leading-relaxed",children:JSON.stringify(e.parameters,null,2)})})]},e.name))})]}),n.tools.length===0&&n.status==="connected"&&v.jsx("div",{className:"text-center py-8 text-gray-400 dark:text-zinc-600 text-sm",children:"Connected but no tools discovered."})]})}function o4({data:n}){return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"space-y-2",children:[n.description&&v.jsx("p",{className:"text-sm text-gray-600 dark:text-zinc-400",children:n.description}),n.trigger&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-amber-100 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400 font-medium",children:"trigger"}),v.jsx("span",{className:"text-xs text-gray-500 dark:text-zinc-500 font-mono",children:n.trigger})]})]}),v.jsxs("section",{children:[v.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Skill Definition"}),v.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4 overflow-auto prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-900 dark:prose-headings:text-zinc-200 prose-p:text-gray-900 dark:prose-p:text-zinc-300 prose-strong:text-gray-900 dark:prose-strong:text-zinc-200 prose-code:text-indigo-700 dark:prose-code:text-indigo-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-li:text-gray-900 dark:prose-li:text-zinc-300",children:v.jsx(Js,{children:n.body})})]})]})}function a4({data:n}){return v.jsxs("div",{className:"space-y-6",children:[n.title&&n.title!==n.name&&v.jsx("p",{className:"text-sm text-gray-600 dark:text-zinc-400",children:n.title}),v.jsx("section",{children:v.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4 overflow-auto",children:v.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:v.jsx(Js,{children:n.body})})})})]})}function l4(){const{kind:n,name:e}=Ju(),[t,r]=F.useState(null),[i,s]=F.useState(!0),[o,l]=F.useState(null),h=n&&new Set(["connections","mcp","skills","knowledge"]).has(n)?n:void 0,f=h?r4[h]:void 0;if(F.useEffect(()=>{!h||!e||(s(!0),l(null),fetch(`/inspect/${h}/${encodeURIComponent(e)}`).then(g=>{if(!g.ok)throw new Error(`${String(g.status)} ${g.statusText}`);return g.json()}).then(g=>{r(g)}).catch(g=>{l(g instanceof Error?g.message:"Failed to load")}).finally(()=>{s(!1)}))},[h,e]),!f)return v.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500",children:"Unknown inspect type"});if(i)return v.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."});if(o||!t)return v.jsx("div",{className:"p-6 text-red-500 text-sm",children:o??"Not found"});const p=f.icon,m=(e==null?void 0:e.replace(/[-_]/g," ").replace(/\b\w/g,g=>g.toUpperCase()))??"";return v.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[v.jsxs("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(p,{className:`h-4 w-4 text-${f.color}-500`}),v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:m})]}),v.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[v.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full bg-${f.color}-100 dark:bg-${f.color}-500/10 text-${f.color}-700 dark:text-${f.color}-400 font-medium`,children:f.label}),"location"in t&&t.location&&v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-600 font-mono",children:t.location})]})]}),v.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:v.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6",children:[h==="connections"&&v.jsx(i4,{data:t}),h==="mcp"&&v.jsx(s4,{data:t}),h==="skills"&&v.jsx(o4,{data:t}),h==="knowledge"&&v.jsx(a4,{data:t})]})})]})}function u4(){const[n,e]=F.useState("checking"),t=F.useRef();return F.useEffect(()=>{const r=()=>{fetch("/inspect/health",{signal:AbortSignal.timeout(3e3)}).then(i=>{e(i.ok?"connected":"disconnected")}).catch(()=>{e("disconnected")})};return r(),t.current=setInterval(r,1e4),()=>clearInterval(t.current)},[]),n}function c4(){const[n,e]=F.useState(()=>document.documentElement.classList.contains("dark")),t=F.useCallback(()=>{const r=!n;e(r),document.documentElement.classList.toggle("dark",r);try{localStorage.setItem("amodal-theme",r?"dark":"light")}catch{}},[n]);return F.useEffect(()=>{try{localStorage.getItem("amodal-theme")==="light"&&(e(!1),document.documentElement.classList.remove("dark"))}catch{}},[]),{dark:n,toggle:t}}function mu({to:n,children:e,end:t}){return v.jsx(Iu,{to:n,end:t,className:({isActive:r})=>Sr("flex items-center gap-2.5 px-3 py-[7px] rounded-md text-[13px] transition-colors duration-150",r?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 font-medium":"text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04]"),children:e})}function h4(){const{name:n,model:e}=ec(),{dark:t,toggle:r}=c4(),i=u4();return v.jsxs("div",{className:"flex flex-col h-screen overflow-hidden bg-white dark:bg-[#0a0a0f]",children:[v.jsxs("header",{className:"h-14 bg-gray-50 dark:bg-[#0f0f17] border-b border-gray-200 dark:border-white/[0.06] text-gray-900 dark:text-white flex items-center justify-between px-5 shrink-0 z-20",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:[v.jsx("defs",{children:v.jsx("clipPath",{id:"logo-sq",children:v.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),v.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),v.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),v.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#logo-sq)"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"font-semibold tracking-tight text-[15px] text-gray-900 dark:text-white/90",children:"amodal"}),n&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-gray-300 dark:text-white/20",children:"/"}),v.jsx("span",{className:"text-[13px] text-gray-500 dark:text-white/50 font-medium",children:n})]})]})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Iu,{to:"/config",className:"h-8 w-8 rounded-lg flex items-center justify-center text-indigo-500 dark:text-indigo-400 bg-indigo-500/10 transition-colors",title:"Configuration",children:v.jsx(zP,{className:"h-4 w-4"})}),v.jsx("button",{onClick:r,className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:t?"Switch to light mode":"Switch to dark mode",children:t?v.jsx(LP,{className:"h-4 w-4"}):v.jsx(_P,{className:"h-4 w-4"})}),e&&v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25 font-mono",children:e.replace(/-\d{8}$/,"")}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:`h-2 w-2 rounded-full ${i==="connected"?"bg-emerald-400 animate-pulse":i==="checking"?"bg-amber-400 animate-pulse":"bg-red-400"}`}),v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/40 font-medium tracking-wide uppercase",children:i==="connected"?"Connected":i==="checking"?"Connecting":"Disconnected"})]})]})]}),v.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[v.jsx("aside",{className:"w-[260px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex flex-col shrink-0 overflow-hidden",children:v.jsxs("nav",{className:"flex-1 overflow-y-auto scrollbar-thin px-2 py-2",children:[v.jsxs(Iu,{to:"/",className:"flex items-center gap-2.5 w-full px-3 py-2 mb-1 rounded-md text-[13px] text-gray-500 dark:text-white/60 hover:text-gray-800 dark:hover:text-white/90 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[v.jsx(Iy,{className:"h-4 w-4 shrink-0"}),"Back to app"]}),v.jsx("div",{className:"px-3 pt-5 pb-1.5",children:v.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:"Configuration"})}),v.jsxs("div",{className:"space-y-0.5",children:[v.jsxs(mu,{to:"/config",end:!0,children:[v.jsx(Wj,{className:"h-4 w-4 shrink-0"}),"Agent"]}),v.jsxs(mu,{to:"/config/models",children:[v.jsx(Vy,{className:"h-4 w-4 shrink-0"}),"Models"]}),v.jsxs(mu,{to:"/config/prompt",children:[v.jsx(Wy,{className:"h-4 w-4 shrink-0"}),"Prompt"]}),v.jsxs(mu,{to:"/config/secrets",children:[v.jsx(NP,{className:"h-4 w-4 shrink-0"}),"Secrets"]}),v.jsxs(mu,{to:"/config/files",children:[v.jsx(Yj,{className:"h-4 w-4 shrink-0"}),"Files"]}),v.jsxs(mu,{to:"/config/system",children:[v.jsx(gu,{className:"h-4 w-4 shrink-0"}),"System"]})]})]})}),v.jsx("main",{className:"flex-1 overflow-auto bg-white dark:bg-[#0a0a0f] scrollbar-thin",children:v.jsx(OP,{})})]})]})}function f4(){const[n,e]=F.useState(null);if(F.useEffect(()=>{fetch("/api/config").then(r=>r.ok?r.json():null).then(r=>{r&&e(r)}).catch(()=>{})},[]),!n)return v.jsx("div",{className:"p-8 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."});const t=n.models.main;return v.jsxs("div",{className:"p-8 max-w-2xl",children:[v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-6",children:"Agent"}),v.jsxs("div",{className:"space-y-6",children:[v.jsx(Ld,{label:"Name",value:n.name||"(unnamed)"}),v.jsx(Ld,{label:"Version",value:n.version}),n.description&&v.jsx(Ld,{label:"Description",value:n.description}),v.jsx(Ld,{label:"Repo Path",value:n.repoPath,mono:!0}),v.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800 pt-6",children:[v.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-300 mb-4",children:"Primary Model"}),t?v.jsxs("div",{className:"bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-4 space-y-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-sm text-gray-900 dark:text-zinc-200 font-medium",children:t.model.replace(/-\d{8}$/,"")}),v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-400 font-medium",children:t.provider})]}),v.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-500 font-mono",children:t.model})]}):v.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"No model configured"})]}),Object.keys(n.models).length>1&&v.jsxs("div",{children:[v.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-300 mb-3",children:"Other Models"}),v.jsx("div",{className:"space-y-2",children:Object.entries(n.models).filter(([r])=>r!=="main").map(([r,i])=>v.jsxs("div",{className:"flex items-center justify-between bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg px-4 py-3",children:[v.jsxs("div",{children:[v.jsx("span",{className:"text-sm text-gray-700 dark:text-zinc-300",children:r}),v.jsx("span",{className:"text-xs text-gray-400 dark:text-zinc-500 ml-2 font-mono",children:i.model})]}),v.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-500",children:i.provider})]},r))})]})]})]})}function Ld({label:n,value:e,mono:t}){return v.jsxs("div",{children:[v.jsx("div",{className:"text-xs font-medium text-gray-500 dark:text-zinc-400 mb-1",children:n}),v.jsx("div",{className:`text-sm text-gray-900 dark:text-zinc-200 ${t?"font-mono text-xs":""}`,children:e})]})}function d4(){const[n,e]=F.useState({});F.useEffect(()=>{fetch("/api/config").then(r=>r.ok?r.json():null).then(r=>{r&&typeof r=="object"&&"models"in r&&e(r.models)}).catch(()=>{})},[]);const t=Object.entries(n);return v.jsxs("div",{className:"p-8 max-w-2xl",children:[v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-2",children:"Models"}),v.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mb-6",children:["Configured in ",v.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"amodal.json"})," under ",v.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"models"}),"."]}),t.length===0?v.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"No models configured."}):v.jsx("div",{className:"space-y-3",children:t.map(([r,i])=>v.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-5 bg-gray-50 dark:bg-zinc-900/50",children:v.jsx("div",{className:"flex items-start justify-between gap-3",children:v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Vy,{className:"h-5 w-5 text-indigo-500 shrink-0"}),v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-zinc-200",children:i.model.replace(/-\d{8}$/,"")}),v.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-400 font-medium",children:r})]}),v.jsxs("div",{className:"text-xs text-gray-500 dark:text-zinc-500 mt-1",children:["Provider: ",v.jsx("span",{className:"font-medium text-gray-700 dark:text-zinc-300",children:i.provider})]}),v.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600 font-mono mt-0.5",children:i.model})]})]})})},r))})]})}function p4(){const[n,e]=F.useState(null),[t,r]=F.useState(!1);if(F.useEffect(()=>{fetch("/inspect/context").then(s=>s.ok?s.json():null).then(s=>{s&&e(s)}).catch(()=>{})},[]),!n)return v.jsx("div",{className:"p-8 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."});const i=Math.round(n.token_usage.used/n.token_usage.total*100);return v.jsxs("div",{className:"p-8 max-w-2xl",children:[v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-2",children:"System Prompt"}),v.jsx("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mb-6",children:"The compiled prompt the LLM receives at the start of every session."}),v.jsxs("div",{className:"mb-6",children:[v.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 dark:text-zinc-400 mb-1.5",children:[v.jsxs("span",{children:[n.token_usage.used.toLocaleString()," tokens used"]}),v.jsxs("span",{children:[n.token_usage.total.toLocaleString()," context window"]})]}),v.jsx("div",{className:"h-3 bg-gray-200 dark:bg-zinc-800 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-full rounded-full transition-all ${i>80?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${String(i)}%`}})}),v.jsxs("div",{className:"text-xs text-gray-400 dark:text-zinc-600 mt-1",children:[i,"% used — ",n.token_usage.remaining.toLocaleString()," tokens remaining for conversation"]})]}),v.jsxs("div",{className:"mb-6",children:[v.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-300 mb-3",children:"Sections"}),v.jsx("div",{className:"space-y-2",children:n.sections.map(s=>{const o=n.token_usage.used>0?Math.round(s.tokens/n.token_usage.used*100):0;return v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"w-28 text-xs text-gray-600 dark:text-zinc-400 font-medium truncate",children:s.name}),v.jsx("div",{className:"flex-1 h-2 bg-gray-200 dark:bg-zinc-800 rounded-full overflow-hidden",children:v.jsx("div",{className:"h-full bg-indigo-400/60 rounded-full",style:{width:`${String(o)}%`}})}),v.jsx("div",{className:"w-20 text-right text-xs text-gray-500 dark:text-zinc-500 tabular-nums",children:s.tokens.toLocaleString()}),s.trimmed&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-100 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400",children:"trimmed"})]},s.name)})})]}),v.jsxs("div",{children:[v.jsxs("button",{onClick:()=>r(!t),className:"flex items-center gap-2 text-sm text-gray-600 dark:text-zinc-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors mb-3",children:[v.jsx(Wy,{className:"h-4 w-4"}),t?"Hide full prompt":"View full prompt"," (",n.system_prompt_length.toLocaleString()," chars)"]}),t&&v.jsx("pre",{className:"bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-4 text-xs text-gray-700 dark:text-zinc-300 font-mono whitespace-pre-wrap overflow-auto max-h-[600px] scrollbar-thin leading-relaxed",children:n.system_prompt})]})]})}function m4(){const[n,e]=F.useState([]),[t,r]=F.useState(!0);F.useEffect(()=>{fetch("/api/config").then(o=>o.ok?o.json():null).then(o=>{o&&typeof o=="object"&&"envRefs"in o&&e(o.envRefs)}).catch(()=>{}).finally(()=>r(!1))},[]);const i=n.filter(o=>o.set).length,s=n.filter(o=>!o.set).length;return v.jsxs("div",{className:"p-8 max-w-2xl",children:[v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-2",children:"Secrets"}),v.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mb-6",children:["Environment variables referenced by connection specs. Values are read from ",v.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:".env"}),"."]}),t?v.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"Loading..."}):n.length===0?v.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"No environment variables referenced by connections."}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex items-center gap-4 mb-4 text-xs",children:[v.jsxs("span",{className:"flex items-center gap-1 text-emerald-600 dark:text-emerald-400",children:[v.jsx(Zh,{className:"h-3.5 w-3.5"})," ",String(i)," set"]}),s>0&&v.jsxs("span",{className:"flex items-center gap-1 text-red-500 dark:text-red-400",children:[v.jsx(Xy,{className:"h-3.5 w-3.5"})," ",String(s)," missing"]})]}),v.jsx("div",{className:"space-y-2",children:n.map(o=>v.jsxs("div",{className:"flex items-center justify-between border border-gray-200 dark:border-zinc-800 rounded-lg px-4 py-3",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(NP,{className:`h-4 w-4 shrink-0 ${o.set?"text-emerald-500":"text-red-400"}`}),v.jsxs("div",{children:[v.jsx("div",{className:"text-sm font-mono text-gray-900 dark:text-zinc-200",children:o.name}),v.jsxs("div",{className:"text-xs text-gray-400 dark:text-zinc-500",children:["Used by ",o.connection]})]})]}),o.set?v.jsx("span",{className:"text-xs text-emerald-600 dark:text-emerald-400 font-medium",children:"Set"}):v.jsx("span",{className:"text-xs text-red-500 dark:text-red-400 font-medium",children:"Missing"})]},`${o.connection}-${o.name}`))})]})]})}function g4(n){if(n<60)return`${String(n)}s`;const e=Math.floor(n/60);if(e<60)return`${String(e)}m ${String(n%60)}s`;const t=Math.floor(e/60);return`${String(t)}h ${String(e%60)}m`}function O4(){const[n,e]=F.useState(null);return F.useEffect(()=>{fetch("/api/config").then(t=>t.ok?t.json():null).then(t=>{t&&e(t)}).catch(()=>{})},[]),n?v.jsxs("div",{className:"p-8 max-w-2xl",children:[v.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-6",children:"System"}),v.jsxs("div",{className:"space-y-4",children:[v.jsx(dh,{icon:v.jsx(gu,{className:"h-4 w-4"}),label:"Runtime Version",value:n.runtimeVersion}),v.jsx(dh,{icon:v.jsx(gu,{className:"h-4 w-4"}),label:"Node.js",value:n.nodeVersion}),v.jsx(dh,{icon:v.jsx(gu,{className:"h-4 w-4"}),label:"Uptime",value:g4(n.uptime)}),v.jsx(dh,{icon:v.jsx(gu,{className:"h-4 w-4"}),label:"Repo Path",value:n.repoPath,mono:!0}),n.stores&&v.jsx(dh,{icon:v.jsx(gu,{className:"h-4 w-4"}),label:"Store Backend",value:n.stores.backend??"pglite"})]})]}):v.jsx("div",{className:"p-8 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."})}function dh({icon:n,label:e,value:t,mono:r}){return v.jsxs("div",{className:"flex items-center gap-3 border border-gray-200 dark:border-zinc-800 rounded-lg px-4 py-3",children:[v.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:n}),v.jsxs("div",{className:"flex-1",children:[v.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-500",children:e}),v.jsx("div",{className:`text-sm text-gray-900 dark:text-zinc-200 ${r?"font-mono text-xs":""}`,children:t})]})]})}let j0=[],G2=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?G2:j0).push(t=t+n[e])})();function y4(n){if(n<768)return!1;for(let e=0,t=j0.length;;){let r=e+t>>1;if(n<j0[r])t=r;else if(n>=G2[r])e=r+1;else return!0;if(e==t)return!1}}function Qk(n){return n>=127462&&n<=127487}const Ck=8205;function x4(n,e,t=!0,r=!0){return(t?K2:v4)(n,e,r)}function K2(n,e,t){if(e==n.length)return e;e&&J2(n.charCodeAt(e))&&eQ(n.charCodeAt(e-1))&&e--;let r=wO(n,e);for(e+=Tk(r);e<n.length;){let i=wO(n,e);if(r==Ck||i==Ck||t&&y4(i))e+=Tk(i),r=i;else if(Qk(i)){let s=0,o=e-2;for(;o>=0&&Qk(wO(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function v4(n,e,t){for(;e>0;){let r=K2(n,e-2,t);if(r<e)return r;e--}return 0}function wO(n,e){let t=n.charCodeAt(e);if(!eQ(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return J2(r)?(t-55296<<10)+(r-56320)+65536:t}function J2(n){return n>=56320&&n<57344}function eQ(n){return n>=55296&&n<56320}function Tk(n){return n<65536?1:2}class Et{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Xu(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),ds.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xu(this,e,t);let r=[];return this.decompose(e,t,r,0),ds.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new $h(this),s=new $h(e);for(let o=t,l=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new $h(this,e)}iterRange(e,t=this.length){return new tQ(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new nQ(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Et.empty:e.length<=32?new yn(e):ds.from(yn.split(e,[]))}}class yn extends Et{constructor(e,t=w4(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((t?r:l)>=e)return new k4(i,l,r,o);i=l+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new yn($k(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=sp(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new yn(l,o.length+s.length));else{let c=l.length>>1;r.push(new yn(l.slice(0,c)),new yn(l.slice(c)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof yn))return super.replace(e,t,r);[e,t]=Xu(this,e,t);let i=sp(this.text,sp(r.text,$k(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new yn(i,s):ds.from(yn.split(i,[]),s)}sliceString(e,t=this.length,r=`
|
|
312
|
+
`){[e,t]=Xu(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],c=s+l.length;s>e&&o&&(i+=r),e<c&&t>s&&(i+=l.slice(Math.max(0,e-s),t-s)),s=c+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new yn(r,i)),r=[],i=-1);return i>-1&&t.push(new yn(r,i)),t}}class ds extends Et{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,c=r+o.lines-1;if((t?c:l)>=e)return o.lineInner(e,t,r,i);i=l+1,r=c+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],c=o+l.length;if(e<=c&&t>=o){let h=i&((o<=e?1:0)|(c>=t?2:0));o>=e&&c<=t&&!h?r.push(l):l.decompose(e-o,t-o,r,h)}o=c+1}}replace(e,t,r){if([e,t]=Xu(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&t<=l){let c=o.replace(e-s,t-s,r),h=this.lines-o.lines+c.lines;if(c.lines<h>>4&&c.lines>h>>6){let f=this.children.slice();return f[i]=c,new ds(f,this.length-(t-e)+r.length)}return super.replace(s,l,c)}s=l+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
|
|
313
|
+
`){[e,t]=Xu(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],c=o+l.length;o>e&&s&&(i+=r),e<c&&t>o&&(i+=l.sliceString(e-o,t-o,r)),o=c+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ds))return 0;let r=0,[i,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==l)return r;let c=this.children[i],h=e.children[s];if(c!=h)return r+c.scanIdentical(h,t);r+=c.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let g of e)r+=g.lines;if(r<32){let g=[];for(let w of e)w.flatten(g);return new yn(g,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],c=0,h=-1,f=[];function p(g){let w;if(g.lines>s&&g instanceof ds)for(let k of g.children)p(k);else g.lines>o&&(c>o||!c)?(m(),l.push(g)):g instanceof yn&&c&&(w=f[f.length-1])instanceof yn&&g.lines+w.lines<=32?(c+=g.lines,h+=g.length+1,f[f.length-1]=new yn(w.text.concat(g.text),w.length+1+g.length)):(c+g.lines>i&&m(),c+=g.lines,h+=g.length+1,f.push(g))}function m(){c!=0&&(l.push(f.length==1?f[0]:ds.from(f,h)),h=-1,c=f.length=0)}for(let g of e)p(g);return m(),l.length==1?l[0]:new ds(l,t)}}Et.empty=new yn([""],0);function w4(n){let e=-1;for(let t of n)e+=t.length+1;return e}function sp(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let l=n[s],c=i+l.length;c>=t&&(c>r&&(l=l.slice(0,r-i)),i<t&&(l=l.slice(t-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=c+1}return e}function $k(n,e,t){return sp(n,[""],e,t)}class $h{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof yn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof yn?i.text.length:i.children.length;if(o==(t>0?l:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
314
|
+
`,this;e--}else if(i instanceof yn){let c=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=i.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof yn?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class tQ{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new $h(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class nQ{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Et.prototype[Symbol.iterator]=function(){return this.iter()},$h.prototype[Symbol.iterator]=tQ.prototype[Symbol.iterator]=nQ.prototype[Symbol.iterator]=function(){return this});let k4=class{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}};function Xu(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Yn(n,e,t=!0,r=!0){return x4(n,e,t,r)}function S4(n){return n>=56320&&n<57344}function b4(n){return n>=55296&&n<56320}function df(n,e){let t=n.charCodeAt(e);if(!b4(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return S4(r)?(t-55296<<10)+(r-56320)+65536:t}function rQ(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function tm(n){return n<65536?1:2}const R0=/\r\n?|\n/;var Bn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Bn||(Bn={}));class qs{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){A0(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new qs(e)}composeDesc(e){return this.empty?e:e.empty?this:iQ(this,e)}mapDesc(e,t=!1){return e.empty?this:N0(this,e,t)}mapPos(e,t=-1,r=Bn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],c=this.sections[o++],h=i+l;if(c<0){if(h>e)return s+(e-i);s+=l}else{if(r!=Bn.Simple&&h>=e&&(r==Bn.TrackDel&&i<e&&h>e||r==Bn.TrackBefore&&i<e||r==Bn.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==i||t<0?s:s+c;s+=c}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=t&&l>=e)return i<e&&l>t?"cover":!0;i=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new qs(e)}static create(e){return new qs(e)}}class Rn extends qs{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return A0(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return N0(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],l=t[i+1];if(l>=0){t[i]=l,t[i+1]=o;let c=i>>1;for(;r.length<c;)r.push(Et.empty);r.push(o?e.slice(s,s+o):Et.empty)}s+=o}return new Rn(t,r)}compose(e){return this.empty?e:e.empty?this:iQ(this,e,!0)}map(e,t=!1){return e.empty?this:N0(this,e,t,!0)}iterChanges(e,t=!1){A0(this,e,t)}get desc(){return qs.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new Vh(this);e:for(let o=0,l=0;;){let c=o==e.length?1e9:e[o++];for(;l<c||l==c&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,c-l);Fn(i,f,-1);let p=s.ins==-1?-1:s.off==0?s.ins:0;Fn(t,f,p),p>0&&la(r,t,s.text),s.forward(f),l+=f}let h=e[o++];for(;l<h;){if(s.done)break e;let f=Math.min(s.len,h-l);Fn(t,f,-1),Fn(i,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new Rn(t,r),filtered:qs.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],o=0,l=null;function c(f=!1){if(!f&&!i.length)return;o<t&&Fn(i,t-o,-1);let p=new Rn(i,s);l=l?l.compose(p.map(l)):p,i=[],s=[],o=0}function h(f){if(Array.isArray(f))for(let p of f)h(p);else if(f instanceof Rn){if(f.length!=t)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${t})`);c(),l=l?l.compose(f.map(l)):f}else{let{from:p,to:m=p,insert:g}=f;if(p>m||p<0||m>t)throw new RangeError(`Invalid change range ${p} to ${m} (in doc of length ${t})`);let w=g?typeof g=="string"?Et.of(g.split(r||R0)):g:Et.empty,k=w.length;if(p==m&&k==0)return;p<o&&c(),p>o&&Fn(i,p-o,-1),Fn(i,m-p,k),la(s,i,w),o=m}}return h(e),c(!l),l}static empty(e){return new Rn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(Et.empty);r[i]=Et.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new Rn(t,r)}static createSet(e,t){return new Rn(e,t)}}function Fn(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function la(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(Et.empty);n.push(t)}}function A0(n,e,t){let r=n.inserted;for(let i=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],c=n.sections[o++];if(c<0)i+=l,s+=l;else{let h=i,f=s,p=Et.empty;for(;h+=l,f+=c,c&&r&&(p=p.append(r[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],c=n.sections[o++];e(i,h,s,f,p),i=h,s=f}}}function N0(n,e,t,r=!1){let i=[],s=r?[]:null,o=new Vh(n),l=new Vh(e);for(let c=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Fn(i,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(Fn(i,l.ins,-1);h;){let f=Math.min(o.len,h);o.ins>=0&&c<o.i&&o.len<=f&&(Fn(i,0,o.ins),s&&la(s,i,o.text),c=o.i),o.forward(f),h-=f}l.next()}else if(o.ins>=0){let h=0,f=o.len;for(;f;)if(l.ins==-1){let p=Math.min(f,l.len);h+=p,f-=p,l.forward(p)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Fn(i,h,c<o.i?o.ins:0),s&&c<o.i&&la(s,i,o.text),c=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?Rn.createSet(i,s):qs.create(i);throw new Error("Mismatched change set lengths")}}}function iQ(n,e,t=!1){let r=[],i=t?[]:null,s=new Vh(n),o=new Vh(e);for(let l=!1;;){if(s.done&&o.done)return i?Rn.createSet(r,i):qs.create(r);if(s.ins==0)Fn(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)Fn(r,0,o.ins,l),i&&la(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(s.len2,o.len),h=r.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;Fn(r,c,f,l),i&&f&&la(i,r,o.text)}else o.ins==-1?(Fn(r,s.off?0:s.len,c,l),i&&la(i,r,s.textBit(c))):(Fn(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&la(i,r,o.text));l=(s.ins>c||o.ins>=0&&o.len>c)&&(l||r.length>h),s.forward2(c),o.forward(c)}}}}class Vh{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Et.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Et.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ul{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ul(r,i,this.flags)}extend(e,t=e,r=0){if(e<=this.anchor&&t>=this.anchor)return pe.range(e,t,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return pe.range(this.anchor,i,void 0,void 0,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return pe.range(e.anchor,e.head)}static create(e,t,r){return new ul(e,t,r)}}class pe{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:pe.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new pe([this.main],0)}addRange(e,t=!0){return pe.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,pe.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new pe(e.ranges.map(t=>ul.fromJSON(t)),e.main)}static single(e,t=e){return new pe([pe.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return pe.normalized(e.slice(),t);r=s.to}return new pe(e,t)}static cursor(e,t=0,r,i){return ul.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i,s){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=t&&(s=t<e?1:-1),t<e?ul.create(t,e,48|o):ul.create(e,t,(s?s<0?8:16:0)|o)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,c=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?pe.range(c,l):pe.range(l,c))}}return new pe(e,t)}}function sQ(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let cx=0;class Ye{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=cx++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ye(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:hx),!!e.static,e.enables)}of(e){return new op([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new op(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new op(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function hx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class op{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=cx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,c=!1,h=!1,f=[];for(let p of this.dependencies)p=="doc"?c=!0:p=="selection"?h=!0:(((t=e[p.id])!==null&&t!==void 0?t:1)&1)==0&&f.push(e[p.id]);return{create(p){return p.values[o]=r(p),1},update(p,m){if(c&&m.docChanged||h&&(m.docChanged||m.selection)||_0(p,f)){let g=r(p);if(l?!Ek(g,p.values[o],i):!i(g,p.values[o]))return p.values[o]=g,1}return 0},reconfigure:(p,m)=>{let g,w=m.config.address[s];if(w!=null){let k=bp(m,w);if(this.dependencies.every(C=>C instanceof Ye?m.facet(C)===p.facet(C):C instanceof ws?m.field(C,!1)==p.field(C,!1):!0)||(l?Ek(g=r(p),k,i):i(g=r(p),k)))return p.values[o]=k,0}else g=r(p);return p.values[o]=g,1}}}}function Ek(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function _0(n,e){let t=!1;for(let r of e)Eh(n,r)&1&&(t=!0);return t}function P4(n,e,t){let r=t.map(c=>n[c.id]),i=t.map(c=>c.type),s=r.filter(c=>!(c&1)),o=n[e.id]>>1;function l(c){let h=[];for(let f=0;f<r.length;f++){let p=bp(c,r[f]);if(i[f]==2)for(let m of p)h.push(m);else h.push(p)}return e.combine(h)}return{create(c){for(let h of r)Eh(c,h);return c.values[o]=l(c),1},update(c,h){if(!_0(c,s))return 0;let f=l(c);return e.compare(f,c.values[o])?0:(c.values[o]=f,1)},reconfigure(c,h){let f=_0(c,r),p=h.config.facets[e.id],m=h.facet(e);if(p&&!f&&hx(t,p))return c.values[o]=m,0;let g=l(c);return e.compare(g,m)?(c.values[o]=m,0):(c.values[o]=g,1)}}}const Dd=Ye.define({static:!0});class ws{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new ws(cx++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Dd).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Dd),o=i.facet(Dd),l;return(l=s.find(c=>c.field==this))&&l!=o.find(c=>c.field==this)?(r.values[t]=l.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,Dd.of({field:this,create:e})]}get extension(){return this}}const ol={lowest:4,low:3,default:2,high:1,highest:0};function ph(n){return e=>new oQ(e,n)}const pf={highest:ph(ol.highest),high:ph(ol.high),default:ph(ol.default),low:ph(ol.low),lowest:ph(ol.lowest)};class oQ{constructor(e,t){this.inner=e,this.prec=t}}class nm{of(e){return new z0(this,e)}reconfigure(e){return nm.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class z0{constructor(e,t){this.compartment=e,this.inner=t}}class Sp{constructor(e,t,r,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),o=new Map;for(let m of Q4(e,t,o))m instanceof ws?i.push(m):(s[m.facet.id]||(s[m.facet.id]=[])).push(m);let l=Object.create(null),c=[],h=[];for(let m of i)l[m.id]=h.length<<1,h.push(g=>m.slot(g));let f=r==null?void 0:r.config.facets;for(let m in s){let g=s[m],w=g[0].facet,k=f&&f[m]||[];if(g.every(C=>C.type==0))if(l[w.id]=c.length<<1|1,hx(k,g))c.push(r.facet(w));else{let C=w.combine(g.map(Q=>Q.value));c.push(r&&w.compare(C,r.facet(w))?r.facet(w):C)}else{for(let C of g)C.type==0?(l[C.id]=c.length<<1|1,c.push(C.value)):(l[C.id]=h.length<<1,h.push(Q=>C.dynamicSlot(Q)));l[w.id]=h.length<<1,h.push(C=>P4(C,w,g))}}let p=h.map(m=>m(l));return new Sp(e,o,p,l,c,s)}}function Q4(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let c=i.get(o);if(c!=null){if(c<=l)return;let h=r[c].indexOf(o);h>-1&&r[c].splice(h,1),o instanceof z0&&t.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof z0){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof oQ)s(o.inner,o.prec);else if(o instanceof ws)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof op)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,ol.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,ol.default),r.reduce((o,l)=>o.concat(l))}function Eh(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function bp(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const aQ=Ye.define(),L0=Ye.define({combine:n=>n.some(e=>e),static:!0}),lQ=Ye.define({combine:n=>n.length?n[0]:void 0,static:!0}),uQ=Ye.define(),cQ=Ye.define(),hQ=Ye.define(),fQ=Ye.define({combine:n=>n.length?n[0]:!1});class El{constructor(e,t){this.type=e,this.value=t}static define(){return new C4}}class C4{of(e){return new El(this,e)}}class T4{constructor(e){this.map=e}of(e){return new tn(this,e)}}class tn{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new tn(this.type,t)}is(e){return this.type==e}static define(e={}){return new T4(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}tn.reconfigure=tn.define();tn.appendConfig=tn.define();class Dn{constructor(e,t,r,i,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&sQ(r,t.newLength),s.some(l=>l.type==Dn.time)||(this.annotations=s.concat(Dn.time.of(Date.now())))}static create(e,t,r,i,s,o){return new Dn(e,t,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Dn.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Dn.time=El.define();Dn.userEvent=El.define();Dn.addToHistory=El.define();Dn.remote=El.define();function $4(n,e){let t=[];for(let r=0,i=0;;){let s,o;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],o=n[r++];else if(i<e.length)s=e[i++],o=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function dQ(n,e,t){var r;let i,s,o;return t?(i=e.changes,s=Rn.empty(e.changes.length),o=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:tn.mapEffects(n.effects,i).concat(tn.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function D0(n,e,t){let r=e.selection,i=bu(e.annotations);return e.userEvent&&(i=i.concat(Dn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Rn?e.changes:Rn.of(e.changes||[],t,n.facet(lQ)),selection:r&&(r instanceof pe?r:pe.single(r.anchor,r.head)),effects:bu(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function pQ(n,e,t){let r=D0(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;r=dQ(r,D0(n,e[s],o?r.changes.newLength:n.doc.length),o)}let i=Dn.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return M4(t?E4(i):i)}function E4(n){let e=n.startState,t=!0;for(let i of e.facet(uQ)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:$4(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=Rn.empty(e.doc.length);else{let o=n.changes.filter(t);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=Dn.create(e,i,n.selection&&n.selection.map(s),tn.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(cQ);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof Dn?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Dn?n=s[0]:n=pQ(e,bu(s),!1)}return n}function M4(n){let e=n.startState,t=e.facet(hQ),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=dQ(r,D0(e,s,n.changes.newLength),!0))}return r==n?n:Dn.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const j4=[];function bu(n){return n==null?j4:Array.isArray(n)?n:[n]}var Un=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Un||(Un={}));const R4=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let I0;try{I0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function A4(n){if(I0)return I0.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||R4.test(t)))return!0}return!1}function N4(n){return e=>{if(!/\S/.test(e))return Un.Space;if(A4(e))return Un.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Un.Word;return Un.Other}}class Nt{constructor(e,t,r,i,s,o){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Eh(this,l<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return Eh(this,r),bp(this,r)}update(...e){return pQ(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let l of e.effects)l.is(nm.reconfigure)?(t&&(i=new Map,t.compartments.forEach((c,h)=>i.set(h,c)),t=null),i.set(l.value.compartment,l.value.extension)):l.is(tn.reconfigure)?(t=null,r=l.value):l.is(tn.appendConfig)&&(t=null,r=bu(r).concat(l.value));let s;t?s=e.startState.values.slice():(t=Sp.resolve(r,i,this),s=new Nt(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let o=e.startState.facet(L0)?e.newSelection:e.newSelection.asSingle();new Nt(t,e.newDoc,o,s,(l,c)=>c.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:pe.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],o=bu(r.effects);for(let l=1;l<t.ranges.length;l++){let c=e(t.ranges[l]),h=this.changes(c.changes),f=h.map(i);for(let m=0;m<l;m++)s[m]=s[m].map(f);let p=i.mapDesc(h,!0);s.push(c.range.map(p)),i=i.compose(f),o=tn.mapEffects(o,f).concat(tn.mapEffects(bu(c.effects),p))}return{changes:i,selection:pe.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof Rn?e:Rn.of(e,this.doc.length,this.facet(Nt.lineSeparator))}toText(e){return Et.of(e.split(this.facet(Nt.lineSeparator)||R0))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Eh(this,t),bp(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof ws&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],l=e[s];i.push(o.init(c=>o.spec.fromJSON(l,c)))}}return Nt.create({doc:e.doc,selection:pe.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Sp.resolve(e.extensions||[],new Map),r=e.doc instanceof Et?e.doc:Et.of((e.doc||"").split(t.staticFacet(Nt.lineSeparator)||R0)),i=e.selection?e.selection instanceof pe?e.selection:pe.single(e.selection.anchor,e.selection.head):pe.single(0);return sQ(i,r.length),t.staticFacet(L0)||(i=i.asSingle()),new Nt(t,r,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Nt.tabSize)}get lineBreak(){return this.facet(Nt.lineSeparator)||`
|
|
315
|
+
`}get readOnly(){return this.facet(fQ)}phrase(e,...t){for(let r of this.facet(Nt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(aQ))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return N4(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let c=Yn(t,o,!1);if(s(t.slice(c,o))!=Un.Word)break;o=c}for(;l<i;){let c=Yn(t,l);if(s(t.slice(l,c))!=Un.Word)break;l=c}return o==l?null:pe.range(o+r,l+r)}}Nt.allowMultipleSelections=L0;Nt.tabSize=Ye.define({combine:n=>n.length?n[0]:4});Nt.lineSeparator=lQ;Nt.readOnly=fQ;Nt.phrases=Ye.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Nt.languageData=aQ;Nt.changeFilter=uQ;Nt.transactionFilter=cQ;Nt.transactionExtender=hQ;nm.reconfigure=tn.define();function rm(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class ua{eq(e){return this==e}range(e,t=e){return Z0.create(e,t,this)}}ua.prototype.startSide=ua.prototype.endSide=0;ua.prototype.point=!1;ua.prototype.mapMode=Bn.TrackDel;function fx(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Z0=class mQ{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new mQ(e,t,r)}};function X0(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class dx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let c=o+l>>1,h=s[c]-e||(r?this.value[c].endSide:this.value[c].startSide)-t;if(c==o)return h>=0?o:l;h>=0?l=c:o=c+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,l=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],f=this.from[c]+e,p=this.to[c]+e,m,g;if(f==p){let w=t.mapPos(f,h.startSide,h.mapMode);if(w==null||(m=g=w,h.startSide!=h.endSide&&(g=t.mapPos(f,h.endSide),g<m)))continue}else if(m=t.mapPos(f,h.startSide),g=t.mapPos(p,h.endSide),m>g||m==g&&h.startSide>0&&h.endSide<=0)continue;(g-m||h.endSide-h.startSide)<0||(o<0&&(o=m),h.point&&(l=Math.max(l,g-m)),r.push(h),i.push(m-o),s.push(g-o))}return{mapped:r.length?new dx(i,s,r,l):null,pos:o}}}class Pt{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Pt(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(X0)),this.isEmpty)return t.length?Pt.of(t):this;let l=new gQ(this,null,-1).goto(0),c=0,h=[],f=new Vu;for(;l.value||c<t.length;)if(c<t.length&&(l.from-t[c].from||l.startSide-t[c].value.startSide)>=0){let p=t[c++];f.addInner(p.from,p.to,p.value)||h.push(p)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(l.chunkIndex)<t[c].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||h.push(Z0.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?Pt.empty:this.nextLayer.update({add:h,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],c=this.chunk[o],h=e.touchesRange(l,l+c.length);if(h===!1)i=Math.max(i,c.maxPoint),t.push(c),r.push(e.mapPos(l));else if(h===!0){let{mapped:f,pos:p}=c.map(l,e);f&&(i=Math.max(i,f.maxPoint),t.push(f),r.push(p))}}let s=this.nextLayer.map(e);return t.length==0?s:new Pt(r,t,s||Pt.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Wh.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Wh.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),l=t.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),c=Mk(o,l,r),h=new mh(o,c,s),f=new mh(l,c,s);r.iterGaps((p,m,g)=>jk(h,p,f,m,g,i)),r.empty&&r.length==0&&jk(h,0,f,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),o=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=Mk(s,o),c=new mh(s,l,0).goto(r),h=new mh(o,l,0).goto(r);for(;;){if(c.to!=h.to||!V0(c.active,h.active)||c.point&&(!h.point||!fx(c.point,h.point)))return!1;if(c.to>i)return!0;c.next(),h.next()}}static spans(e,t,r,i,s=-1){let o=new mh(e,null,s).goto(t),l=t,c=o.openStart;for(;;){let h=Math.min(o.to,r);if(o.point){let f=o.activeForPoint(o.to),p=o.pointFrom<t?f.length+1:o.point.startSide<0?f.length:Math.min(f.length,c);i.point(l,h,o.point,f,p,o.pointRank),c=Math.min(o.openEnd(h),f.length)}else h>l&&(i.span(l,h,o.active,c),c=o.openEnd(h));if(o.to>r)return c+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,t=!1){let r=new Vu;for(let i of e instanceof Z0?[e]:t?_4(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Pt.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Pt.empty;i=i.nextLayer)t=new Pt(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Pt.empty=new Pt([],[],null,-1);function _4(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(X0(e,r)>0)return n.slice().sort(X0);e=r}return n}Pt.empty.nextLayer=Pt.empty;class Vu{finishChunk(e){this.chunks.push(new dx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Vu)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Pt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Pt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Mk(n,e,t){let r=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[o]&&!(t!=null&&t.touchesRange(l,l+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class gQ{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Wh{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new gQ(o,t,r,s));return i.length==1?i[0]:new Wh(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)kO(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)kO(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),kO(this.heap,0)}}}function kO(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class mh{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Wh.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Id(this.active,e),Id(this.activeTo,e),Id(this.activeRank,e),this.minActive=Rk(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;Zd(this.active,t,r),Zd(this.activeTo,t,i),Zd(this.activeRank,t,s),e&&Zd(e,t,this.cursor.from),this.minActive=Rk(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Id(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function jk(n,e,t,r,i,s){n.goto(e),t.goto(r);let o=r+i,l=r,c=r-e,h=!!s.boundChange;for(let f=!1;;){let p=n.to+c-t.to,m=p||n.endSide-t.endSide,g=m<0?n.to+c:t.to,w=Math.min(g,o);if(n.point||t.point?(n.point&&t.point&&fx(n.point,t.point)&&V0(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(l,w,n.point,t.point),f=!1):(f&&s.boundChange(l),w>l&&!V0(n.active,t.active)&&s.compareRange(l,w,n.active,t.active),h&&w<o&&(p||n.openEnd(g)!=t.openEnd(g))&&(f=!0)),g>o)break;l=g,m<=0&&n.next(),m>=0&&t.next()}}function V0(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!fx(n[t],e[t]))return!1;return!0}function Id(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function Zd(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function Rk(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function eo(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Yn(n,i));return r}function z4(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Yn(n,i)}return n.length}const W0="ͼ",Ak=typeof Symbol>"u"?"__"+W0:Symbol.for(W0),F0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Nk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ca{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,c,h){let f=[],p=/^@(\w+)\b/.exec(o[0]),m=p&&p[1]=="keyframes";if(p&&l==null)return c.push(o[0]+";");for(let g in l){let w=l[g];if(/&/.test(g))s(g.split(/,\s*/).map(k=>o.map(C=>k.replace(/&/,C))).reduce((k,C)=>k.concat(C)),w,c);else if(w&&typeof w=="object"){if(!p)throw new RangeError("The value of a property ("+g+") should be a primitive value.");s(i(g),w,f,m)}else w!=null&&f.push(g.replace(/_.*/,"").replace(/[A-Z]/g,k=>"-"+k.toLowerCase())+": "+w+";")}(f.length||m)&&c.push((r&&!p&&!h?o.map(r):o).join(", ")+" {"+f.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
316
|
+
`)}static newName(){let e=Nk[Ak]||1;return Nk[Ak]=e+1,W0+e.toString(36)}static mount(e,t,r){let i=e[F0],s=r&&r.nonce;i?s&&i.setNonce(s):i=new L4(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let _k=new Map;class L4{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=_k.get(r);if(s)return e[F0]=s;this.sheet=new i.CSSStyleSheet,_k.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[F0]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],c=this.modules.indexOf(l);if(c<s&&c>-1&&(this.modules.splice(c,1),s--,c=-1),c==-1){if(this.modules.splice(s++,0,l),r)for(let h=0;h<l.rules.length;h++)r.insertRule(l.rules[h],i++)}else{for(;s<c;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
|
|
317
|
+
`;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var ha={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Fh={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},D4=typeof navigator<"u"&&/Mac/.test(navigator.platform),I4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ln=0;Ln<10;Ln++)ha[48+Ln]=ha[96+Ln]=String(Ln);for(var Ln=1;Ln<=24;Ln++)ha[Ln+111]="F"+Ln;for(var Ln=65;Ln<=90;Ln++)ha[Ln]=String.fromCharCode(Ln+32),Fh[Ln]=String.fromCharCode(Ln);for(var SO in ha)Fh.hasOwnProperty(SO)||(Fh[SO]=ha[SO]);function Z4(n){var e=D4&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||I4&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Fh:ha)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}let ar=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},B0=typeof document<"u"?document:{documentElement:{style:{}}};const Y0=/Edge\/(\d+)/.exec(ar.userAgent),OQ=/MSIE \d/.test(ar.userAgent),U0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ar.userAgent),im=!!(OQ||U0||Y0),zk=!im&&/gecko\/(\d+)/i.test(ar.userAgent),bO=!im&&/Chrome\/(\d+)/.exec(ar.userAgent),X4="webkitFontSmoothing"in B0.documentElement.style,q0=!im&&/Apple Computer/.test(ar.vendor),Lk=q0&&(/Mobile\/\w+/.test(ar.userAgent)||ar.maxTouchPoints>2);var De={mac:Lk||/Mac/.test(ar.platform),windows:/Win/.test(ar.platform),linux:/Linux|X11/.test(ar.platform),ie:im,ie_version:OQ?B0.documentMode||6:U0?+U0[1]:Y0?+Y0[1]:0,gecko:zk,gecko_version:zk?+(/Firefox\/(\d+)/.exec(ar.userAgent)||[0,0])[1]:0,chrome:!!bO,chrome_version:bO?+bO[1]:0,ios:Lk,android:/Android\b/.test(ar.userAgent),webkit_version:X4?+(/\bAppleWebKit\/(\d+)/.exec(ar.userAgent)||[0,0])[1]:0,safari:q0,safari_version:q0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(ar.userAgent)||[0,0])[1]:0,tabSize:B0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function px(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Pp=Object.create(null);function mx(n,e,t){if(n==e)return!0;n||(n=Pp),e||(e=Pp);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function V4(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function Dk(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function W4(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class Ml{eq(e){return!1}updateDOM(e,t,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Pr=function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n}(Pr||(Pr={}));class pt extends ua{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new mf(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new kl(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=yQ(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new kl(e,r,i,t,e.widget||null,!0)}static line(e){return new gf(e)}static set(e,t=!1){return Pt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}pt.none=Pt.empty;class mf extends pt{constructor(e){let{start:t,end:r}=yQ(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?px(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Pp}eq(e){return this==e||e instanceof mf&&this.tagName==e.tagName&&mx(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}mf.prototype.point=!1;class gf extends pt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof gf&&this.spec.class==e.spec.class&&mx(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}gf.prototype.mapMode=Bn.TrackBefore;gf.prototype.point=!0;class kl extends pt{constructor(e,t,r,i,s,o){super(t,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Bn.TrackBefore:Bn.TrackAfter:Bn.TrackDel}get type(){return this.startSide!=this.endSide?Pr.WidgetRange:this.startSide<=0?Pr.WidgetBefore:Pr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof kl&&F4(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}kl.prototype.point=!0;function yQ(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function F4(n,e){return n==e||!!(n&&e&&n.compare(e))}function Pu(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Bh extends ua{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof Bh&&this.tagName==e.tagName&&mx(this.attributes,e.attributes)}static create(e){return new Bh(e.tagName,e.attributes||Pp)}static set(e,t=!1){return Pt.of(e,t)}}Bh.prototype.startSide=Bh.prototype.endSide=-1;function Yh(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function H0(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Mh(n,e){if(!e.anchorNode)return!1;try{return H0(n,e.anchorNode)}catch{return!1}}function ap(n){return n.nodeType==3?Uh(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function jh(n,e,t,r){return t?Ik(n,e,t,r,-1)||Ik(n,e,t,r,1):!1}function fa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Qp(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Ik(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:to(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=fa(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?to(n):0}else return!1}}function to(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Cp(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function B4(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function xQ(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function Y4(n,e,t,r,i,s,o,l){let c=n.ownerDocument,h=c.defaultView||window;for(let f=n,p=!1;f&&!p;)if(f.nodeType==1){let m,g=f==c.body,w=1,k=1;if(g)m=B4(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(p=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let M=f.getBoundingClientRect();({scaleX:w,scaleY:k}=xQ(f,M)),m={left:M.left,right:M.left+f.clientWidth*w,top:M.top,bottom:M.top+f.clientHeight*k}}let C=0,Q=0;if(i=="nearest")e.top<m.top?(Q=e.top-(m.top+o),t>0&&e.bottom>m.bottom+Q&&(Q=e.bottom-m.bottom+o)):e.bottom>m.bottom&&(Q=e.bottom-m.bottom+o,t<0&&e.top-Q<m.top&&(Q=e.top-(m.top+o)));else{let M=e.bottom-e.top,E=m.bottom-m.top;Q=(i=="center"&&M<=E?e.top+M/2-E/2:i=="start"||i=="center"&&t<0?e.top-o:e.bottom-E+o)-m.top}if(r=="nearest"?e.left<m.left?(C=e.left-(m.left+s),t>0&&e.right>m.right+C&&(C=e.right-m.right+s)):e.right>m.right&&(C=e.right-m.right+s,t<0&&e.left<m.left+C&&(C=e.left-(m.left+s))):C=(r=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:r=="start"==l?e.left-s:e.right-(m.right-m.left)+s)-m.left,C||Q)if(g)h.scrollBy(C,Q);else{let M=0,E=0;if(Q){let I=f.scrollTop;f.scrollTop+=Q/k,E=(f.scrollTop-I)*k}if(C){let I=f.scrollLeft;f.scrollLeft+=C/w,M=(f.scrollLeft-I)*w}e={left:e.left-M,top:e.top-E,right:e.right-M,bottom:e.bottom-E},M&&Math.abs(M-C)<1&&(r="nearest"),E&&Math.abs(E-Q)<1&&(i="nearest")}if(g)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function vQ(n,e=!0){let t=n.ownerDocument,r=null,i=null;for(let s=n.parentNode;s&&!(s==t.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class U4{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?to(t):0),r,Math.min(e.focusOffset,r?to(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let rl=null;De.safari&&De.safari_version>=26&&(rl=!1);function wQ(n){if(n.setActive)return n.setActive();if(rl)return n.focus(rl);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(rl==null?{get preventScroll(){return rl={preventScroll:!0},!0}}:void 0),!rl){rl=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let Zk;function Uh(n,e,t=e){let r=Zk||(Zk=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function Qu(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,n.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function q4(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function H4(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,to(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=to(t))}else{if(t==n)return!0;r=fa(t),t=t.parentNode}}function kQ(n){return n instanceof Window?n.pageYOffset>Math.max(0,n.document.documentElement.scrollHeight-n.innerHeight-4):n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function SQ(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=to(t)}else if(t.parentNode&&!Qp(t))r=fa(t),t=t.parentNode;else return null}}function bQ(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Qp(t))r=fa(t)+1,t=t.parentNode;else return null}}class zi{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new zi(e.parentNode,fa(e),t)}static after(e,t){return new zi(e.parentNode,fa(e)+1,t)}}var xn=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(xn||(xn={}));const Sl=xn.LTR,gx=xn.RTL;function PQ(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const G4=PQ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),K4=PQ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),G0=Object.create(null),is=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);G0[e]=t,G0[t]=-e}function QQ(n){return n<=247?G4[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?K4[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const J4=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ms{get dir(){return this.level%2?gx:Sl}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=t&&l.to>=t){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function CQ(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!CQ(r.inner,i.inner))return!1}return!0}const Yt=[];function eL(n,e,t,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,l=s<r.length?r[s].from:t,c=s?256:i;for(let h=o,f=c,p=c;h<l;h++){let m=QQ(n.charCodeAt(h));m==512?m=f:m==8&&p==4&&(m=16),Yt[h]=m==4?2:m,m&7&&(p=m),f=m}for(let h=o,f=c,p=c;h<l;h++){let m=Yt[h];if(m==128)h<l-1&&f==Yt[h+1]&&f&24?m=Yt[h]=f:Yt[h]=256;else if(m==64){let g=h+1;for(;g<l&&Yt[g]==64;)g++;let w=h&&f==8||g<t&&Yt[g]==8?p==1?1:8:256;for(let k=h;k<g;k++)Yt[k]=w;h=g-1}else m==8&&p==1&&(Yt[h]=1);f=m,m&7&&(p=m)}}}function tL(n,e,t,r,i){let s=i==1?2:1;for(let o=0,l=0,c=0;o<=r.length;o++){let h=o?r[o-1].to:e,f=o<r.length?r[o].from:t;for(let p=h,m,g,w;p<f;p++)if(g=G0[m=n.charCodeAt(p)])if(g<0){for(let k=l-3;k>=0;k-=3)if(is[k+1]==-g){let C=is[k+2],Q=C&2?i:C&4?C&1?s:i:0;Q&&(Yt[p]=Yt[is[k]]=Q),l=k;break}}else{if(is.length==189)break;is[l++]=p,is[l++]=m,is[l++]=c}else if((w=Yt[p])==2||w==1){let k=w==i;c=k?0:1;for(let C=l-3;C>=0;C-=3){let Q=is[C+2];if(Q&2)break;if(k)is[C+2]|=2;else{if(Q&4)break;is[C+2]|=4}}}}}function nL(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let o=i?t[i-1].to:n,l=i<t.length?t[i].from:e;for(let c=o;c<l;){let h=Yt[c];if(h==256){let f=c+1;for(;;)if(f==l){if(i==t.length)break;f=t[i++].to,l=i<t.length?t[i].from:e}else if(Yt[f]==256)f++;else break;let p=s==1,m=(f<e?Yt[f]:r)==1,g=p==m?p?1:2:r;for(let w=f,k=i,C=k?t[k-1].to:n;w>c;)w==C&&(w=t[--k].from,C=k?t[k-1].to:n),Yt[--w]=g;c=f}else s=h,c++}}}function K0(n,e,t,r,i,s,o){let l=r%2?2:1;if(r%2==i%2)for(let c=e,h=0;c<t;){let f=!0,p=!1;if(h==s.length||c<s[h].from){let k=Yt[c];k!=l&&(f=!1,p=k==16)}let m=!f&&l==1?[]:null,g=f?r:r+1,w=c;e:for(;;)if(h<s.length&&w==s[h].from){if(p)break e;let k=s[h];if(!f)for(let C=k.to,Q=h+1;;){if(C==t)break e;if(Q<s.length&&s[Q].from==C)C=s[Q++].to;else{if(Yt[C]==l)break e;break}}if(h++,m)m.push(k);else{k.from>c&&o.push(new ms(c,k.from,g));let C=k.direction==Sl!=!(g%2);J0(n,C?r+1:r,i,k.inner,k.from,k.to,o),c=k.to}w=k.to}else{if(w==t||(f?Yt[w]!=l:Yt[w]==l))break;w++}m?K0(n,c,w,r+1,i,m,o):c<w&&o.push(new ms(c,w,g)),c=w}else for(let c=t,h=s.length;c>e;){let f=!0,p=!1;if(!h||c>s[h-1].to){let k=Yt[c-1];k!=l&&(f=!1,p=k==16)}let m=!f&&l==1?[]:null,g=f?r:r+1,w=c;e:for(;;)if(h&&w==s[h-1].to){if(p)break e;let k=s[--h];if(!f)for(let C=k.from,Q=h;;){if(C==e)break e;if(Q&&s[Q-1].to==C)C=s[--Q].from;else{if(Yt[C-1]==l)break e;break}}if(m)m.push(k);else{k.to<c&&o.push(new ms(k.to,c,g));let C=k.direction==Sl!=!(g%2);J0(n,C?r+1:r,i,k.inner,k.from,k.to,o),c=k.from}w=k.from}else{if(w==e||(f?Yt[w-1]!=l:Yt[w-1]==l))break;w--}m?K0(n,w,c,r+1,i,m,o):w<c&&o.push(new ms(w,c,g)),c=w}}function J0(n,e,t,r,i,s,o){let l=e%2?2:1;eL(n,i,s,r,l),tL(n,i,s,r,l),nL(i,s,r,l),K0(n,i,s,e,t,r,o)}function rL(n,e,t){if(!n)return[new ms(0,0,e==gx?1:0)];if(e==Sl&&!t.length&&!J4.test(n))return TQ(n.length);if(t.length)for(;n.length>Yt.length;)Yt[Yt.length]=256;let r=[],i=e==Sl?0:1;return J0(n,i,i,t,0,n.length,r),r}function TQ(n){return[new ms(0,n,0)]}let $Q="";function iL(n,e,t,r,i){var s;let o=r.head-n.from,l=ms.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),c=e[l],h=c.side(i,t);if(o==h){let m=l+=i?1:-1;if(m<0||m>=e.length)return null;c=e[l=m],o=c.side(!i,t),h=c.side(i,t)}let f=Yn(n.text,o,c.forward(i,t));(f<c.from||f>c.to)&&(f=h),$Q=n.text.slice(Math.min(o,f),Math.max(o,f));let p=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return p&&f==h&&p.level+(i?0:1)<c.level?pe.cursor(p.side(!i,t)+n.from,p.forward(i,t)?1:-1,p.level):pe.cursor(f+n.from,c.forward(i,t)?-1:1,c.level)}function sL(n,e,t){for(let r=e;r<t;r++){let i=QQ(n.charCodeAt(r));if(i==1)return Sl;if(i==2||i==4)return gx}return Sl}const EQ=Ye.define(),MQ=Ye.define(),jQ=Ye.define(),RQ=Ye.define(),ey=Ye.define(),AQ=Ye.define(),NQ=Ye.define(),Ox=Ye.define(),yx=Ye.define(),_Q=Ye.define({combine:n=>n.some(e=>e)}),oL=Ye.define({combine:n=>n.some(e=>e)}),zQ=Ye.define();class Cu{constructor(e,t="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Cu(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Cu(pe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Xd=tn.define({map:(n,e)=>n.map(e)}),LQ=tn.define();function gs(n,e,t){let r=n.facet(RQ);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const Ys=Ye.define({combine:n=>n.length?n[0]:!0});let aL=0;const xu=Ye.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class pi{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(xu.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(xu.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=t||{};return new pi(aL++,e,r,i,l=>{let c=[];return o&&c.push(sm.of(h=>{let f=h.plugin(l);return f?o(f):pt.none})),s&&c.push(s(l)),c})}static fromClass(e,t){return pi.define((r,i)=>new e(r,i),t)}}class PO{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(gs(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){gs(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){gs(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const DQ=Ye.define(),xx=Ye.define(),sm=Ye.define(),IQ=Ye.define(),vx=Ye.define(),Of=Ye.define(),ZQ=Ye.define();function Xk(n,e){let t=n.state.facet(ZQ);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Pt.spans(r,e.from,e.to,{point(){},span(s,o,l,c){let h=s-e.from,f=o-e.from,p=i;for(let m=l.length-1;m>=0;m--,c--){let g=l[m].spec.bidiIsolate,w;if(g==null&&(g=sL(e.text,h,f)),c>0&&p.length&&(w=p[p.length-1]).to==h&&w.direction==g)w.to=f,p=w.inner;else{let k={from:h,to:f,direction:g,inner:[]};p.push(k),p=k.inner}}}}),i}const XQ=Ye.define();function VQ(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(XQ)){let o=s(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Sh=Ye.define();class hi{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new hi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let l=i<e.length?e[i].fromB:1e9,c=s<t.length?t[s]:1e9,h=Math.min(l,c);if(h==1e9)break;let f=h+o,p=h,m=f;for(;;)if(s<t.length&&t[s]<=p){let g=t[s+1];s+=2,p=Math.max(p,g);for(let w=i;w<e.length&&e[w].fromB<=p;w++)o=e[w].toA-e[w].toB;m=Math.max(m,g+o)}else if(i<e.length&&e[i].fromB<=p){let g=e[i++];p=Math.max(p,g.toB),m=Math.max(m,g.toA),o=g.toA-g.toB}else break;r.push(new hi(f,m,h,p))}return r}}class Tp{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Rn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,c)=>i.push(new hi(s,o,l,c))),this.changedRanges=i}static create(e,t,r){return new Tp(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const lL=[];class gn{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return lL}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&V4(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=fa(this.dom),i=this.length?e>0:t>0;return new zi(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof am)return e;return null}static get(e){return e.cmTile}}class om extends gn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=(e==null?void 0:e.node)==t?e:null,o=0;for(let l of this.children){if(l.sync(e),o+=l.length+l.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=l.dom&&(s.written=!0),l.dom.parentNode==t)for(;i&&i!=l.dom;)i=Vk(i);else t.insertBefore(l.dom,i);r=l.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=Vk(i);this.length=o}}function Vk(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class am extends om{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=gn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let o=r.children[i++];if(o instanceof Hs)t.push(i),r=o,i=0;else{let l=s+o.length,c=e(o,s);if(c!==void 0)return c;s=l+o.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,o=-1;if(this.blockTiles((l,c)=>{let h=c+l.length;if(e>=c&&e<=h){if(l.isWidget()&&t>=-1&&t<=1){if(l.flags&32)return!0;l.flags&16&&(r=void 0)}(c<e||e==h&&(t<-1?l.length:l.covers(1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,i=e-c),(h>e||e==c&&(t>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,o=e-c)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Hs extends om{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Hs(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Wu extends om{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new Wu(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,o=null,l=-1;function c(f,p){for(let m=0,g=0;m<f.children.length&&g<=p;m++){let w=f.children[m],k=g+w.length;k>=p&&(w.isComposite()?c(w,p-g):(!o||o.isHidden&&(t>0||r&&cL(o,w)))&&(k>p||w.flags&32)?(o=w,l=p-g):(g<p||w.flags&16&&!w.isHidden)&&(i=w,s=p-g)),g=k}}c(this,e);let h=(t<0?i:o)||i||o;return h?{tile:h,offset:h==i?s:l}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):uL(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new zi(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let o=r.tile.parent,l=!1;for(let c of o.children){if(l)return new zi(c.dom,0);c==r.tile&&(l=!0)}}return new zi(this.dom,0)}}function uL(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=ap(e);return t[t.length-1]||null}function cL(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class kr extends om{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new kr(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class cl extends gn{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?De.chrome||De.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):t<0?i--:s<r&&s++;let l=Uh(this.dom,i,s).getClientRects();if(!l.length)return null;let c=l[(o?o<0:t>=0)?0:l.length-1];return De.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(l,h=>h.width)||c),o?Cp(c,o<0):c||null}static of(e,t){let r=new cl(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class bl extends gn{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Cp(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:e>0;for(let c=l?s.length-1:0;o=s[c],!(e>0?c==0:c==s.length-1||o.top<o.bottom);c+=l?-1:1);return Cp(o,!l)}}get overrideDOMText(){if(!this.length)return Et.empty;let{root:e}=this;if(!e)return Et.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new bl(s,r,e,i)}}class $p extends gn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Et.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class hL{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:o,parents:l}=this;for(;e||t>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!l.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++}else{let c=i.children[s],h=c.breakAfter;(t>0?c.length<=e:c.length<e)&&(!r||r.skip(c,0,c.length)!==!1||!c.isComposite)?(o=!!h,s++,e-=c.length):(l.push({tile:i,index:s}),i=c,s=0,r&&c.isComposite()&&r.enter(c))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++;else if(e){let c=Math.min(e,i.length-s);r&&r.skip(i,s,s+c),e-=c,s+=c}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class fL{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class dL{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let o=this.ensureMarks(t,r),l=o.lastChild;if(l&&l.isText()&&!(l.flags&8)&&l.length+e.length<512){this.cache.reused.set(l,2);let c=o.children[o.children.length-1]=new cl(l.dom,l.text+e);c.parent=o}else o.append(i||cl.of(e,(s=this.cache.find(cl))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?QO(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let l=t.marks.length-1;l>=0;l--){let c=t.marks[l],h=i.lastChild;if(h instanceof kr&&h.mark.eq(c.mark))h.dom!=c.dom&&h.setDOM(QO(c.dom)),i=h;else{if(this.cache.reused.get(c)){let p=gn.get(c.dom);p&&p.setDOM(QO(c.dom))}let f=kr.of(c.mark,c.dom);i.append(f),i=f}this.cache.reused.set(c,2)}let s=gn.get(e.text);s&&this.cache.reused.set(s,2);let o=new cl(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=WQ);let i=Wu.start(e,t||((r=this.cache.find(Wu))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],l;if(t>0&&(l=i.lastChild)&&l instanceof kr&&l.mark.eq(o))i=l,t--;else{let c=kr.of(o,(r=this.cache.find(kr,h=>h.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(c),i=c,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Wk(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(De.ios&&Wk(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(CO,0,32)||new bl(CO.toDOM(),0,CO,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new fL(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Hs&&i.wrapper.eq(r.wrapper))t=i;else{let s=Hs.of(r.wrapper,(e=this.cache.find(Hs,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find($p,void 0,1);return r&&(r.flags=t),r||new $p(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class pL{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let l=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,l)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const Ep=[bl,Wu,cl,kr,$p,Hs,am];for(let n=0;n<Ep.length;n++)Ep[n].bucket=n;class mL{constructor(e){this.view=e,this.buckets=Ep.map(()=>[]),this.index=Ep.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let l=s.length-1;l>=0;l--){let c=(l+o)%s.length,h=s[c];if((!t||t(h))&&!this.reused.has(h))return s.splice(c,1),c<o&&this.index[i]--,this.reused.set(h,r),h}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let l=i[s];if(!this.reused.has(l)&&(o==0?l.widget.compare(e):l.widget.constructor==e.constructor&&e.updateDOM(l.dom,this.view,l.widget)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,l.widget==e&&l.length==t&&(l.flags&497)==r?(this.reused.set(l,1),l):(this.reused.set(l,2),new bl(l.dom,t,e,l.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class gL{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new mL(e),this.text=new pL(e.state.doc),this.builder=new dL(this.cache,new am(e,e.contentDOM),Pt.iter(r)),this.cache.reused.set(t,2),this.old=new hL(t),this.reuseWalker={skip:(o,l,c)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,o=0;;){let l=o<e.length?e[o++]:null,c=l?l.fromA:this.old.root.length;if(c>i){let h=c-i;this.preserve(h,!o,!l),i=c,s+=h}if(!l)break;t&&l.fromA<=t.range.fromA&&l.toA>=t.range.toA?(this.forward(l.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,l.toA),this.emit(t.range.toB,l.toB)):(this.forward(l.fromA,l.toA),this.emit(s,l.toB)),s=l.toB,i=l.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=xL(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,l,c)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(c-l);else{let h=c>0||l<o.length?bl.of(o.widget,this.view,c-l,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!l&&c==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(l,c),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof $p)this.cache.add(o);else if(o instanceof kr)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof kr&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof kr&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,o=Pt.spans(this.decorations,e,t,{point:(l,c,h,f,p,m)=>{if(h instanceof kl){if(this.disallowBlockEffectsFor[m]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(c>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=f.length,p>f.length)i.continueWidget(c-l);else{let g=h.widget||(h.block?Fu.block:Fu.inline),w=OL(h),k=this.cache.findWidget(g,c-l,w)||bl.of(g,this.view,c-l,w);h.block?(h.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(k)):(i.ensureLine(r),i.addInlineWidget(k,f,p))}r=null}else r=yL(r,h);c>l&&this.text.skip(c-l)},span:(l,c,h,f)=>{for(let p=l;p<c;){let m=this.text.next(Math.min(512,c-p));m==null?(i.addLineStartIfNotCovered(r),i.addBreak(),p++):(i.ensureLine(r),i.addText(m,h,p==l?f:h.length),p+=m.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=gn.get(i);if(i==this.view.contentDOM)break;s instanceof kr?t.push(s):s!=null&&s.isLine()?r=s:s instanceof Hs||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Wu(i,WQ):r||t.push(kr.of(new mf({tagName:i.nodeName.toLowerCase(),attributes:W4(i)}),i)))}return{line:r,marks:t}}}function Wk(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function OL(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const WQ={class:"cm-line"};function yL(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&px(t,n),r&&(n.class+=" "+r)),n}function xL(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof kr&&e.push(r.mark)}return e}function QO(n){let e=gn.get(n);return e&&e.setDOM(n.cloneNode()),n}class Fu extends Ml{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Fu.inline=new Fu("span");Fu.block=new Fu("div");const CO=new class extends Ml{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Fk{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=pt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new am(e,e.contentDOM),this.updateInner([new hi(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:f,toA:p})=>p<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!TL(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?wL(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:f,to:p}=this.hasComposition;r=new hi(f,p,e.changes.mapPos(f,-1),e.changes.mapPos(p,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(De.ie||De.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let c=bL(o,this.decorations,e.changes);c.length&&(r=hi.extendWithRanges(r,c));let h=QL(l,this.blockWrappers,e.changes);return h.length&&(r=hi.extendWithRanges(r,h)),s&&!r.some(f=>f.fromA<=s.range.fromA&&f.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let o=this.tile,l=new gL(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&gn.get(t.text)&&l.cache.reused.set(gn.get(t.text),2),this.tile=l.run(e,t),ty(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=De.chrome||De.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof TO&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(LQ)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(Ys)||r.tabIndex>-1)&&Mh(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let l=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,h,f;if(c.empty?f=h=this.inlineDOMNearPos(c.anchor,c.assoc||1):(f=this.inlineDOMNearPos(c.head,c.head==c.from?1:-1),h=this.inlineDOMNearPos(c.anchor,c.anchor==c.from?1:-1)),De.gecko&&c.empty&&!this.hasComposition&&vL(h)){let m=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(m,h.node.childNodes[h.offset]||null)),h=f=new zi(m,0),l=!0}let p=this.view.observer.selectionRange;(l||!p.focusNode||(!jh(h.node,h.offset,p.anchorNode,p.anchorOffset)||!jh(f.node,f.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,c))&&(this.view.observer.ignore(()=>{De.android&&De.chrome&&r.contains(p.focusNode)&&CL(p.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let m=Yh(this.view.root);if(m)if(c.empty){if(De.gecko){let g=kL(h.node,h.offset);if(g&&g!=3){let w=(g==1?SQ:bQ)(h.node,h.offset);w&&(h=new zi(w.node,w.offset))}}m.collapse(h.node,h.offset),c.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=c.bidiLevel)}else if(m.extend){m.collapse(h.node,h.offset);try{m.extend(f.node,f.offset)}catch{}}else{let g=document.createRange();c.anchor>c.head&&([h,f]=[f,h]),g.setEnd(f.node,f.offset),g.setStart(h.node,h.offset),m.removeAllRanges(),m.addRange(g)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,f)),this.impreciseAnchor=h.precise?null:new zi(p.anchorNode,p.anchorOffset),this.impreciseHead=f.precise?null:new zi(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&jh(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Yh(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let c=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!c||!h||c.bottom>h.top)return;let f=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(f.node,f.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let o=to(e)==0?0:t==0?-1:1;for(;;){let l=e.parentNode;if(l==r.dom)break;o==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?o=-1:o=1),e=l}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!gn.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,l=i;;o++){let c=r.children[o];if(c.dom==s)return l;l+=c.length+c.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,o,l=-1,c=!1;return this.tile.blockTiles((h,f)=>{if(h.isWidget()){if(h.flags&32&&f>=e)return!0;h.flags&16&&(s=!0)}else{let p=f+h.length;if(f<=e&&(r=h,i=e-f,s=p<e),p>=e&&!o&&(o=h,l=e-f,c=f>e),f>e&&o)return!0}}),!r&&!o?this.domAtPos(e,t):(s&&o?r=null:c&&r&&(o=null),r&&t<0||!o?r.domIn(i,t):o.domIn(l,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof TO?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,o){if(s.isComposite())for(let l of s.children){if(l.length>=o){let c=i(l,o);if(c)return c}if(o-=l.length,o<0)break}else if(s.isText()&&o<s.length){let l=Yn(s.text,o);if(l==o)return null;let c=Uh(s.dom,o,l).getClientRects();for(let h=0;h<c.length;h++){let f=c[h];if(h==c.length-1||f.top<f.bottom&&f.left<f.right)return f}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==xn.LTR,h=0,f=(p,m,g)=>{for(let w=0;w<p.children.length&&!(m>i);w++){let k=p.children[w],C=m+k.length,Q=k.dom.getBoundingClientRect(),{height:M}=Q;if(g&&!w&&(h+=Q.top-g.top),k instanceof Hs)C>r&&f(k,m,Q);else if(m>=r&&(h>0&&t.push(-h),t.push(M+h),h=0,o)){let E=k.dom.lastChild,I=E?ap(E):[];if(I.length){let U=I[I.length-1],_=c?U.right-Q.left:Q.right-U.left;_>l&&(l=_,this.minWidth=s,this.minWidthFrom=m,this.minWidthTo=C)}}g&&w==p.children.length-1&&(h+=g.bottom-Q.bottom),m=C+k.breakAfter}};return f(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?xn.RTL:xn.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,c;for(let h of o.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let f=ap(h.dom);if(f.length!=1)return;l+=f[0].width,c=f[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:c}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=ap(t.firstChild)[0];r=t.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(pt.replace({widget:new TO(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return pt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(sm).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(vx).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Pt.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(IQ).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var t;if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(zQ))try{if(f(this.view,e.range,e))return!0}catch(p){gs(this.view.state,p,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(t=r.assoc)!==null&&t!==void 0?t:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let o=VQ(this.view),l={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:c,offsetHeight:h}=this.view.scrollDOM;if(Y4(this.view.scrollDOM,l,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,c),-c),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==xn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let f=this.view.docView.lineAt(r.head,1);f&&f.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){ty(this.tile)}}function ty(n,e){let t=e==null?void 0:e.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)ty(r,e)}}function vL(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function FQ(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=SQ(t.focusNode,t.focusOffset),i=bQ(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let l=gn.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let c=gn.get(r.node);!c||c.isText()&&c.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function wL(n,e,t){let r=FQ(n,t);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||n.state.doc.sliceString(r.from,r.to)!=l)return null;let c=e.invertedDesc;return{range:new hi(c.mapPos(s),c.mapPos(o),s,o),text:i}}function kL(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let SL=class{constructor(){this.changes=[]}compareRange(e,t){Pu(e,t,this.changes)}comparePoint(e,t){Pu(e,t,this.changes)}boundChange(e){Pu(e,e,this.changes)}};function bL(n,e,t){let r=new SL;return Pt.compare(n,e,t,r),r.changes}class PL{constructor(){this.changes=[]}compareRange(e,t){Pu(e,t,this.changes)}comparePoint(){}boundChange(e){Pu(e,e,this.changes)}}function QL(n,e,t){let r=new PL;return Pt.compare(n,e,t,r),r.changes}function CL(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function TL(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class TO extends Ml{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function $L(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return pe.cursor(e);s==0?t=1:s==i.length&&(t=-1);let o=s,l=s;t<0?o=Yn(i.text,s,!1):l=Yn(i.text,s);let c=r(i.text.slice(o,l));for(;o>0;){let h=Yn(i.text,o,!1);if(r(i.text.slice(h,o))!=c)break;o=h}for(;l<i.length;){let h=Yn(i.text,l);if(r(i.text.slice(l,h))!=c)break;l=h}return pe.range(o+i.from,l+i.from)}function EL(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,c=Math.floor((i-t.top-(n.defaultLineHeight-l)*.5)/l);s+=c*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+z4(o,s,n.state.tabSize)}function ML(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Pr.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function jL(n,e,t,r){let i=ML(n,e.head,e.assoc||-1),s=!r||i.type!=Pr.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(i.from),c=n.posAtCoords({x:t==(l==xn.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(c!=null)return pe.cursor(c,t?-1:1)}return pe.cursor(t?i.to:i.from,t?-1:1)}function Bk(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),o=n.textDirectionAt(i.from);for(let l=e,c=null;;){let h=iL(i,s,o,l,t),f=$Q;if(!h){if(i.number==(t?n.state.doc.lines:1))return l;f=`
|
|
318
|
+
`,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),h=n.visualLineSide(i,!t)}if(c){if(!c(f))return l}else{if(!r)return h;c=r(f)}l=h}}function RL(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==Un.Space&&(i=o),i==o}}function AL(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return pe.cursor(i,e.assoc);let o=e.goalColumn,l,c=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(i,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),f=n.documentTop;if(h)o==null&&(o=h.left-c.left),l=s<0?h.top:h.bottom;else{let w=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(c.right-c.left,n.defaultCharacterWidth*(i-w.from))),l=(s<0?w.top:w.bottom)+f}let p=c.left+o,m=n.viewState.heightOracle.textHeight>>1,g=r??m;for(let w=0;;w+=m){let k=l+(g+w)*s,C=ny(n,{x:p,y:k},!1,s);if(t?k>c.bottom:k<c.top)return pe.cursor(C.pos,C.assoc);let Q=n.coordsAtPos(C.pos,C.assoc),M=Q?(Q.top+Q.bottom)/2:0;if(!Q||(t?M>l:M<l))return pe.cursor(C.pos,C.assoc,void 0,o)}}function Rh(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let c=r||t||(e-s<o-e?-1:1);e=c<0?s:o,r=c}});if(!r)return e}}function BQ(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Rh(n,i.from,0);o!=i.from&&(s=pe.cursor(o,-1))}else{let o=Rh(n,i.from,-1),l=Rh(n,i.to,1);(o!=i.from||l!=i.to)&&(s=pe.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?pe.create(t,e.mainIndex):e}function $O(n,e,t){let r=Rh(n.state.facet(Of).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:pe.cursor(r,r<t.from?1:-1)}class ps{constructor(e,t){this.pos=e,this.assoc=t}}function ny(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:l}=e,c=l-s,h;for(;;){if(c<0)return new ps(0,1);if(c>n.viewState.docHeight)return new ps(n.state.doc.length,-1);if(h=n.elementAtHeight(c),r==null)break;if(h.type==Pr.Text){if(r<0?h.to<n.viewport.from:h.from>n.viewport.to)break;let m=n.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(m&&(r<0?m.top<=c+s:m.bottom>=c+s))break}let p=n.viewState.heightOracle.textHeight/2;c=r>0?h.bottom+p:h.top-p}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==Pr.Text){let p=EL(n,i,h,o,l);return new ps(p,p==h.from?1:-1)}}if(h.type!=Pr.Text)return c<(h.top+h.bottom)/2?new ps(h.from,1):new ps(h.to,-1);let f=n.docView.lineAt(h.from,2);return(!f||f.length!=h.length)&&(f=n.docView.lineAt(h.from,-2)),new NL(n,o,l,n.textDirectionAt(h.from)).scanTile(f,h.from)}class NL{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[ms.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[ms.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),l,c,h=-1,f=1e9,p;e:for(;r<i;){let g=i-r,w=r+i>>1;t:if(s.has(w)){let C=r+Math.floor(Math.random()*g);for(let Q=0;Q<g;Q++){if(!s.has(C)){w=C;break t}C++,C==i&&(C=r)}break e}s.add(w);let k=t(w);if(k)for(let C=0;C<k.length;C++){let Q=k[C],M=0;if(!(Q.width==0&&k.length>1)){if(Q.bottom<this.y)(!l||l.bottom<Q.bottom)&&(l=Q),M=1;else if(Q.top>this.y)(!c||c.top>Q.top)&&(c=Q),M=-1;else{let E=Q.left>this.x?this.x-Q.left:Q.right<this.x?this.x-Q.right:0,I=Math.abs(E);I<f&&(h=w,f=I,p=Q),E&&(M=E<0==(this.baseDir==xn.LTR)?-1:1)}M==-1&&(!o||this.baseDirAt(e[w],1))?i=w:M==1&&(!o||this.baseDirAt(e[w+1],-1))&&(r=w+1)}}}if(!p){let g=l&&(!c||this.y-l.bottom<c.top-this.y)?l:c;return this.y=(g.top+g.bottom)/2,this.scan(e,t)}let m=(o?this.dirAt(e[h],1):this.baseDir)==xn.LTR;return{i:h,after:this.x>(p.left+p.right)/2==m}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Yn(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,l=r[s+1]-t;return Uh(e.dom,o,l).getClientRects()});return i.after?new ps(r[i.i+1],-1):new ps(r[i.i],1)}scanTile(e,t){if(!e.length)return new ps(t,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,t);if(l.isComposite())return this.scanTile(l,t)}let r=[t];for(let l=0,c=t;l<e.children.length;l++)r.push(c+=e.children[l].length);let i=this.scan(r,l=>{let c=e.children[l];return c.flags&48?null:(c.dom.nodeType==1?c.dom:Uh(c.dom,0,c.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new ps(r[i.i+1],-1):new ps(o,1)}}const yu="";class _L{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Nt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=yu}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=gn.get(i),l=i.nextSibling;if(l==t){o!=null&&o.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let c=gn.get(l);(o&&c?o.breakAfter:(o?o.breakAfter:Qp(i))||Qp(l)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!LL(l,t)&&this.lineBreak(),i=l}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);r=s+o}}readNode(e){let t=gn.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(zL(e,r.node,r.offset)?t:0))}}function zL(n,e,t){for(;;){if(!e||t<to(e))return!1;if(e==n)return!0;t=fa(e)+1,e=e.parentNode}}function LL(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=gn.get(n);if(!(r!=null&&r.isWidget()))return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class Yk{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class DL{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,l=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=YQ(e.docView.tile,t,r,0))){let c=s||o?[]:ZL(e),h=new _L(c,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=XL(c,this.bounds.from)}else{let c=e.observer.selectionRange,h=s&&s.node==c.focusNode&&s.offset==c.focusOffset||!H0(e.contentDOM,c.focusNode)?l.main.head:e.docView.posFromDOM(c.focusNode,c.focusOffset),f=o&&o.node==c.anchorNode&&o.offset==c.anchorOffset||!H0(e.contentDOM,c.anchorNode)?l.main.anchor:e.docView.posFromDOM(c.anchorNode,c.anchorOffset),p=e.viewport;if((De.ios||De.chrome)&&l.main.empty&&h!=f&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(h,f),g=Math.max(h,f),w=p.from-m,k=p.to-g;(w==0||w==1||m==0)&&(k==0||k==-1||g==e.state.doc.length)&&(h=0,f=e.state.doc.length)}if(e.inputState.composing>-1&&l.ranges.length>1)this.newSel=l.replaceRange(pe.range(f,h));else if(e.lineWrapping&&f==h&&!(l.main.empty&&l.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(h,-1),g=0;m&&(g=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=pe.create([pe.cursor(h,g)])}else this.newSel=pe.single(f,h)}}}function YQ(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,o=-1,l=-1;for(let c=0,h=r,f=r;c<n.children.length;c++){let p=n.children[c],m=h+p.length;if(h<e&&m>t)return YQ(p,e,t,h);if(m>=e&&i==-1&&(i=c,s=h),h>t&&p.dom.parentNode==n.dom){o=c,l=f;break}f=m,h=m+p.breakAfter}return{from:s,to:l<0?r+n.length:l,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:o<n.children.length&&o>=0?n.children[o].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function UQ(n,e){let t,{newSel:r}=e,{state:i}=n,s=i.selection.main,o=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:c}=e.bounds,h=s.from,f=null;(o===8||De.android&&e.text.length<c-l)&&(h=s.to,f="end");let p=i.doc.sliceString(l,c,yu),m,g;!s.empty&&s.from>=l&&s.to<=c&&(e.typeOver||p!=e.text)&&p.slice(0,s.from-l)==e.text.slice(0,s.from-l)&&p.slice(s.to-l)==e.text.slice(m=e.text.length-(p.length-(s.to-l)))?t={from:s.from,to:s.to,insert:Et.of(e.text.slice(s.from-l,m).split(yu))}:(g=qQ(p,e.text,h-l,f))&&(De.chrome&&o==13&&g.toB==g.from+2&&e.text.slice(g.from,g.toB)==yu+yu&&g.toB--,t={from:l+g.from,to:l+g.toA,insert:Et.of(e.text.slice(g.from,g.toB).split(yu))})}else r&&(!n.hasFocus&&i.facet(Ys)||Mp(r,s))&&(r=null);if(!t&&!r)return!1;if((De.mac||De.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=pe.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:Et.of([t.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&n.docView.lineHasWidget(s.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.toText(n.inputState.insertingText)}:De.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
|
|
319
|
+
`&&n.lineWrapping&&(r&&(r=pe.single(r.main.anchor-1,r.main.head-1)),t={from:s.from,to:s.to,insert:Et.of([" "])}),t)return wx(n,t,r,o);if(r&&!Mp(r,s)){let l=!1,c="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(l=!0),c=n.inputState.lastSelectionOrigin,c=="select.pointer"&&(r=BQ(i.facet(Of).map(h=>h(n)),r))),n.dispatch({selection:r,scrollIntoView:l,userEvent:c}),!0}else return!1}function wx(n,e,t,r=-1){if(De.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(De.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Qu(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Qu(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Qu(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=IL(n,e,t));return n.state.facet(AQ).some(c=>c(n,e.from,e.to,s,l))||n.dispatch(l()),!0}function IL(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let c=e.from<s.from?-1:1,h=c<0?s.from:s.to,f=Rh(i.facet(Of).map(p=>p(n)),h,c);e.from==f&&(o=f)}if(o>-1)r={changes:e,selection:pe.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let c=s.from<e.from?i.sliceDoc(s.from,e.from):"",h=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(c+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let c=i.changes(e),h=t&&t.main.to<=c.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let f=n.state.sliceDoc(e.from,e.to),p,m=t&&FQ(n,t.main.head);if(m){let w=e.insert.length-(e.to-e.from);p={from:m.from,to:m.to-w}}else p=n.state.doc.lineAt(s.head);let g=s.to-e.to;r=i.changeByRange(w=>{if(w.from==s.from&&w.to==s.to)return{changes:c,range:h||w.map(c)};let k=w.to-g,C=k-f.length;if(n.state.sliceDoc(C,k)!=f||k>=p.from&&C<=p.to)return{range:w};let Q=i.changes({from:C,to:k,insert:e.insert}),M=w.to-s.to;return{changes:Q,range:h?pe.range(Math.max(0,h.anchor+M),Math.max(0,h.head+M)):w.map(Q)}})}else r={changes:c,selection:h&&i.selection.replaceRange(h)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function qQ(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let c=Math.max(0,s-Math.min(o,l));t-=o+c-s}if(o<s&&n.length<e.length){let c=t<=s&&t>=o?s-t:0;s-=c,l=s+(l-o),o=s}else if(l<s){let c=t<=s&&t>=l?s-t:0;s-=c,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function ZL(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new Yk(t,r)),(i!=t||s!=r)&&e.push(new Yk(i,s))),e}function XL(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?pe.single(t+e,r+e):null}function Mp(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class VL{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,De.safari&&e.contentDOM.addEventListener("input",()=>null),De.gecko&&iD(e.contentDOM.ownerDocument)}handleEvent(e){!GL(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=WL(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(i.removeEventListener(s,this.handleEvent),l=null),l||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&GQ.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),De.android&&De.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return De.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=HQ.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||FL.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Qu(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:De.safari&&!De.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Uk(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){gs(t.state,i)}}}function WL(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let l in s){let c=s[l];c&&t(l).handlers.push(Uk(r.value,c))}if(o)for(let l in o){let c=o[l];c&&t(l).observers.push(Uk(r.value,c))}}for(let r in Li)t(r).handlers.push(Li[r]);for(let r in Qr)t(r).observers.push(Qr[r]);return e}const HQ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],FL="dthko",GQ=[16,17,18,20,91,92,224,225],Vd=6;function Wd(n){return Math.max(0,n)*.7+8}function BL(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class YL{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=vQ(e.contentDOM),this.atoms=e.state.facet(Of).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Nt.allowMultipleSelections)&&UL(e,t),this.dragging=HL(e,t)&&eC(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&BL(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=VQ(this.view);e.clientX-c.left<=i+Vd?t=-Wd(i-e.clientX):e.clientX+c.right>=o-Vd&&(t=Wd(e.clientX-o)),e.clientY-c.top<=s+Vd?r=-Wd(s-e.clientY):e.clientY+c.bottom>=l-Vd&&(r=Wd(e.clientY-l)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=BQ(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function UL(n,e){let t=n.state.facet(EQ);return t.length?t[0](e):De.mac?e.metaKey:e.ctrlKey}function qL(n,e){let t=n.state.facet(MQ);return t.length?t[0](e):De.mac?!e.altKey:!e.ctrlKey}function HL(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Yh(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function GL(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=gn.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Li=Object.create(null),Qr=Object.create(null),KQ=De.ie&&De.ie_version<15||De.ios&&De.webkit_version<604;function KL(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),JQ(n,t.value)},50)}function lm(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function JQ(n,e){e=lm(n.state,Ox,e);let{state:t}=n,r,i=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(ry!=null&&t.selection.ranges.every(c=>c.empty)&&ry==s.toString()){let c=-1;r=t.changeByRange(h=>{let f=t.doc.lineAt(h.from);if(f.from==c)return{range:h};c=f.from;let p=t.toText((o?s.line(i++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:p},range:pe.cursor(h.from+p.length)}})}else o?r=t.changeByRange(c=>{let h=s.line(i++);return{changes:{from:c.from,to:c.to,insert:h.text},range:pe.cursor(c.from+h.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Qr.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};Qr.wheel=Qr.mousewheel=n=>{n.inputState.lastWheelEvent=Date.now()};Li.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Qr.touchstart=(n,e)=>{let t=n.inputState,r=e.targetTouches[0];t.lastTouchTime=Date.now(),r&&(t.lastTouchX=r.clientX,t.lastTouchY=r.clientY),t.setSelectionOrigin("select.pointer")};Qr.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Li.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(jQ))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=eD(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new YL(n,e,t,r)),r&&n.observer.ignore(()=>{wQ(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function qk(n,e,t,r){if(r==1)return pe.cursor(e,t);if(r==2)return $L(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<n.state.doc.length&&l==s.to&&l++,pe.range(o,l)}}const JL=De.ie&&De.ie_version<=11;let Hk=null,Gk=0,Kk=0;function eC(n){if(!JL)return n.detail;let e=Hk,t=Kk;return Hk=n,Kk=Date.now(),Gk=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Gk+1)%3:1}function eD(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=eC(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,o,l){let c=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,f=qk(n,c.pos,c.assoc,r);if(t.pos!=c.pos&&!o){let p=qk(n,t.pos,t.assoc,r),m=Math.min(p.from,f.from),g=Math.max(p.to,f.to);f=m<f.from?pe.range(m,g,f.assoc):pe.range(g,m,f.assoc)}return o?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(h=tD(i,c.pos))?h:l?i.addRange(f):pe.create([f])}}}function tD(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return pe.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Li.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=pe.range(s,o))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",lm(n.state,yx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Li.dragend=n=>(n.inputState.draggedContent=null,!1);function Jk(n,e,t,r){if(t=lm(n.state,Ox,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,o=r&&s&&qL(n,e)?{from:s.from,to:s.to}:null,l={from:i,insert:t},c=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Li.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&Jk(n,e,r.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Jk(n,e,r,!0),!0}return!1};Li.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=KQ?null:e.clipboardData;return t?(JQ(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(KL(n),!1)};function nD(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function rD(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),i=o.number}r=!0}return{text:lm(n,yx,e.join(n.lineBreak)),ranges:t,linewise:r}}let ry=null;Li.copy=Li.cut=(n,e)=>{if(!Mh(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=rD(n.state);if(!t&&!i)return!1;ry=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=KQ?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(nD(n,t),!1)};const tC=El.define();function nC(n,e){let t=[];for(let r of n.facet(NQ)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:tC.of(!0)}):null}function rC(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=nC(n.state,e);t?n.dispatch(t):n.update([])}},10)}Qr.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),rC(n)};Qr.blur=n=>{n.observer.clearSelectionRange(),rC(n)};Qr.compositionstart=Qr.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Qr.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,De.chrome&&De.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Qr.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Li.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],c=n.posAtDOM(l.startContainer,l.startOffset),h=n.posAtDOM(l.endContainer,l.endOffset);return wx(n,{from:c,to:h,insert:n.state.toText(s)},null),!0}}let i;if(De.chrome&&De.android&&(i=HQ.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return De.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),De.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Qr.compositionend(n,e),20),!1};const eS=new Set;function iD(n){eS.has(n)||(eS.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const tS=["pre-wrap","normal","pre-line","break-spaces"];let Bu=!1;function nS(){Bu=!1}class sD{constructor(e){this.lineWrapping=e,this.doc=Et.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return tS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,o){let l=tS.indexOf(e)>-1,c=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=l||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,c){this.heightSamples={};for(let h=0;h<o.length;h++){let f=o[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return c}}class oD{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class _i{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Pr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof kl?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new _i(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ht=function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n}(Ht||(Ht={}));const lp=.001;class ur{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>lp&&(Bu=!0),this.height=e)}replace(e,t,r){return ur.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:c,toA:h,fromB:f,toB:p}=i[l],m=s.lineAt(c,Ht.ByPosNoHeight,r.setDoc(t),0,0),g=m.to>=h?m:s.lineAt(h,Ht.ByPosNoHeight,r,0,0);for(p+=g.to-h,h=g.to;l>0&&m.from<=i[l-1].toA;)c=i[l-1].fromA,f=i[l-1].fromB,l--,c<m.from&&(m=s.lineAt(c,Ht.ByPosNoHeight,r,0,0));f+=m.from-c,c=m.from;let w=kx.build(r.setDoc(o),e,f,p);s=jp(s,s.replace(c,h,w))}return s.updateHeight(r,0)}static empty(){return new Ir(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[t++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,r++),new lD(ur.of(e.slice(0,t)),o,ur.of(e.slice(r)))}}function jp(n,e){return n==e?n:(n.constructor!=e.constructor&&(Bu=!0),e)}ur.prototype.size=1;const aD=pt.replace({});class iC extends ur{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new _i(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new _i(i,0,r,this.spaceAbove,aD):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,t,r,i,s,o){e<=s+this.length&&t>=s&&o(this.lineAt(0,Ht.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ir extends iC{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new _i(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Ir||i instanceof zn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof zn?i=new Ir(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):ur.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class zn extends ur{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*s);o=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,t,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:c}=this.heightMetrics(t,i);if(t.lineWrapping){let h=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=t.doc.lineAt(h),p=l+f.length*c,m=Math.max(r,e-p/2);return new _i(f.from,f.length,m,p,0)}else{let h=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:f,length:p}=t.doc.line(s+h);return new _i(f,p,r+l*h,l,0)}}lineAt(e,t,r,i,s){if(t==Ht.ByHeight)return this.blockAt(e,r,i,s);if(t==Ht.ByPosNoHeight){let{from:g,to:w}=r.doc.lineAt(e);return new _i(g,w-g,0,0,0)}let{firstLine:o,perLine:l,perChar:c}=this.heightMetrics(r,s),h=r.doc.lineAt(e),f=l+h.length*c,p=h.number-o,m=i+l*p+c*(h.from-s-p);return new _i(h.from,h.length,Math.max(i,Math.min(m,i+this.height-f)),f,0)}forEachLine(e,t,r,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:c,perChar:h}=this.heightMetrics(r,s);for(let f=e,p=i;f<=t;){let m=r.doc.lineAt(f);if(f==e){let w=m.number-l;p+=c*w+h*(e-s-w)}let g=c+h*m.length;o(new _i(m.from,m.length,p,g,0)),p+=g,f=m.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof zn?r[r.length-1]=new zn(s.length+i):r.push(null,new zn(i-1))}if(e>0){let s=r[0];s instanceof zn?r[0]=new zn(e+s.length):r.unshift(new zn(e-1),null)}return ur.of(r)}decomposeLeft(e,t){t.push(new zn(e-1),null)}decomposeRight(e,t){t.push(null,new zn(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],l=Math.max(t,i.from),c=-1;for(i.from>t&&o.push(new zn(i.from-t-1).updateHeight(e,t));l<=s&&i.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let p=i.heights[i.index++],m=0;p<0&&(m=-p,p=i.heights[i.index++]),c==-1?c=p:Math.abs(p-c)>=lp&&(c=-2);let g=new Ir(f,p,m);g.outdated=!1,o.push(g),l+=f+1}l<=s&&o.push(null,new zn(s-l).updateHeight(e,l));let h=ur.of(o);return(c<0||Math.abs(h.height-this.height)>=lp||Math.abs(c-this.heightMetrics(e,t).perLine)>=lp)&&(Bu=!0),jp(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class lD extends ur{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,c=t==Ht.ByHeight?e<o:e<l,h=c?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,o,l);if(this.break||(c?h.to<l:h.from>l))return h;let f=t==Ht.ByPosNoHeight?Ht.ByPosNoHeight:Ht.ByPos;return c?h.join(this.right.lineAt(l,f,r,o,l)):this.left.lineAt(l,f,r,i,s).join(h)}forEachLine(e,t,r,i,s,o){let l=i+this.left.height,c=s+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,r,i,s,o),t>=c&&this.right.forEachLine(e,t,r,l,c,o);else{let h=this.lineAt(c,Ht.ByPos,r,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,s,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,r,l,c,o)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&rS(s,o-1),t<this.length){let l=s.length;this.decomposeRight(t,s),rS(s,l)}return ur.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ur.of(this.break?[e,null,t]:[e,t]):(this.left=jp(this.left,e),this.right=jp(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:o}=this,l=t+s.length+this.break,c=null;return i&&i.from<=t+s.length&&i.more?c=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=l+o.length&&i.more?c=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),c?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function rS(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof zn&&(r=n[e+1])instanceof zn&&n.splice(e-1,3,new zn(t.length+1+r.length))}const uD=5;class kx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ir?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ir(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;r.block?this.addBlock(new iC(o,i,r)):(o||s||i>=uD)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ir(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new zn(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ir)return e;let t=new Ir(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ir)&&!this.isCovered?this.nodes.push(new Ir(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Ir&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new kx(r,e);return Pt.spans(t,r,i,s,0),s.finish(r)}}function cD(n,e,t){let r=new hD;return Pt.compare(n,e,t,r,0),r.changes}class hD{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&Pu(e,t,this.changes,5)}}function fD(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),l=Math.max(0,t.top),c=Math.min(i.innerHeight,t.bottom);for(let h=n.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,p=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&p.overflow!="visible"){let m=f.getBoundingClientRect();s=Math.max(s,m.left),o=Math.min(o,m.right),l=Math.max(l,m.top),c=Math.min(h==n.parentNode?i.innerHeight:c,m.bottom)}h=p.position=="absolute"||p.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,c)-(t.top+e)}}function dD(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function pD(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class EO{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return pt.replace({widget:new mD(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class mD extends Ml{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class iS{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=sS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=xn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=t.facet(xx).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new sD(r),this.stateDeco=oS(t),this.heightMap=ur.empty().applyChanges(this.stateDeco,Et.empty,this.heightOracle.setDoc(t.doc),[new hi(0,0,0,t.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=pt.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Fd(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?sS:new Sx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(bh(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=oS(this.state);let i=e.changedRanges,s=hi.extendWithRanges(i,cD(r,this.stateDeco,e?e.changes:Rn.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);nS(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Bu)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(oL)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?xn.RTL:xn.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=t.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,f=0;if(l.width&&l.height){let{scaleX:U,scaleY:_}=xQ(t,l);(U>.005&&Math.abs(this.scaleX-U)>.005||_>.005&&Math.abs(this.scaleY-_)>.005)&&(this.scaleX=U,this.scaleY=_,h|=16,o=c=!0)}let p=(parseInt(r.paddingTop)||0)*this.scaleY,m=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let g=vQ(this.view.contentDOM,!1).y;g!=this.scrollParent&&(this.scrollParent=g,this.scrollAnchorHeight=-1,this.scrollOffset=0);let w=this.getScrollOffset();this.scrollOffset!=w&&(this.scrollAnchorHeight=-1,this.scrollOffset=w),this.scrolledToBottom=kQ(this.scrollParent||e.win);let k=(this.printing?pD:fD)(t,this.paddingTop),C=k.top-this.pixelViewport.top,Q=k.bottom-this.pixelViewport.bottom;this.pixelViewport=k;let M=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(M!=this.inView&&(this.inView=M,M&&(c=!0)),!this.inView&&!this.scrollTarget&&!dD(e.dom))return 0;let E=l.width;if((this.contentDOMWidth!=E||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let U=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(U)&&(o=!0),o||i.lineWrapping&&Math.abs(E-this.contentDOMWidth)>i.charWidth){let{lineHeight:_,charWidth:R,textHeight:q}=e.docView.measureTextSize();o=_>0&&i.refresh(s,_,R,q,Math.max(5,E/R),U),o&&(e.docView.minWidth=0,h|=16)}C>0&&Q>0?f=Math.max(C,Q):C<0&&Q<0&&(f=Math.min(C,Q)),nS();for(let _ of this.viewports){let R=_.from==this.viewport.from?U:e.docView.measureVisibleLineHeights(_);this.heightMap=(o?ur.empty().applyChanges(this.stateDeco,Et.empty,this.heightOracle,[new hi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new oD(_.from,R))}Bu&&(h|=2)}let I=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return I&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||I)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,c=new Fd(i.lineAt(o-r*1e3,Ht.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,Ht.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(h<c.from||h>c.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=i.lineAt(h,Ht.ByPos,s,0,0),m;t.y=="center"?m=(p.top+p.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&h<c.from?m=p.top:m=p.bottom-f,c=new Fd(i.lineAt(m-1e3/2,Ht.ByHeight,s,0,0).from,i.lineAt(m+f+1e3/2,Ht.ByHeight,s,0,0).to)}}return c}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new Fd(this.heightMap.lineAt(r,Ht.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Ht.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Ht.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Ht.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new EO(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=xn.LTR&&!r)return[];let l=[],c=(f,p,m,g)=>{if(p-f<s)return;let w=this.state.selection.main,k=[w.from];w.empty||k.push(w.to);for(let Q of k)if(Q>f&&Q<p){c(f,Q-10,m,g),c(Q+10,p,m,g);return}let C=OD(e,Q=>Q.from>=m.from&&Q.to<=m.to&&Math.abs(Q.from-f)<s&&Math.abs(Q.to-p)<s&&!k.some(M=>Q.from<M&&Q.to>M));if(!C){if(p<m.to&&t&&r&&t.visibleRanges.some(E=>E.from<=p&&E.to>=p)){let E=t.moveToLineBoundary(pe.cursor(p),!1,!0).head;E>f&&(p=E)}let Q=this.gapSize(m,f,p,g),M=r||Q<2e6?Q:2e6;C=new EO(f,p,Q,M)}l.push(C)},h=f=>{if(f.length<o||f.type!=Pr.Text)return;let p=gD(f.from,f.to,this.stateDeco);if(p.total<o)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,g,w;if(r){let k=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,Q;if(m!=null){let M=Yd(p,m),E=((this.visibleBottom-this.visibleTop)/2+k)/f.height;C=M-E,Q=M+E}else C=(this.visibleTop-f.top-k)/f.height,Q=(this.visibleBottom-f.top+k)/f.height;g=Bd(p,C),w=Bd(p,Q)}else{let k=p.total*this.heightOracle.charWidth,C=i*this.heightOracle.charWidth,Q=0;if(k>2e6)for(let _ of e)_.from>=f.from&&_.from<f.to&&_.size!=_.displaySize&&_.from*this.heightOracle.charWidth+Q<this.pixelViewport.left&&(Q=_.size-_.displaySize);let M=this.pixelViewport.left+Q,E=this.pixelViewport.right+Q,I,U;if(m!=null){let _=Yd(p,m),R=((E-M)/2+C)/k;I=_-R,U=_+R}else I=(M-C)/k,U=(E+C)/k;g=Bd(p,I),w=Bd(p,U)}g>f.from&&c(f.from,g,f,p),w<f.to&&c(w,f.to,f,p)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return l}gapSize(e,t,r,i){let s=Yd(i,r)-Yd(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){EO.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=pt.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Pt.spans(t,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],l=r[s];(o.from!=l.from||o.to!=l.to)&&(i|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||bh(this.heightMap.lineAt(e,Ht.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||bh(this.heightMap.lineAt(this.scaler.fromDOM(e),Ht.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return bh(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fd{constructor(e,t){this.from=e,this.to=t}}function gD(n,e,t){let r=[],i=n,s=0;return Pt.spans(t,n,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Bd({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function Yd(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function OD(n,e){for(let t of n)if(e(t))return t}const sS={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function oS(n){let e=n.facet(sm).filter(r=>typeof r!="function"),t=n.facet(vx).filter(r=>typeof r!="function");return t.length&&e.push(Pt.join(t)),e}class Sx{constructor(e,t,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:c})=>{let h=t.lineAt(l,Ht.ByPos,e,0,0).top,f=t.lineAt(c,Ht.ByPos,e,0,0).bottom;return i+=f-h,{from:l,to:c,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof Sx?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function bh(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new _i(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>bh(i,e)):n._content)}const Ud=Ye.define({combine:n=>n.join(" ")}),iy=Ye.define({combine:n=>n.indexOf(!0)>-1}),sy=ca.newName(),sC=ca.newName(),oC=ca.newName(),aC={"&light":"."+sC,"&dark":"."+oC};function oy(n,e,t){return new ca(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const yD=oy("."+sy,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},aC),xD={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},MO=De.ie&&De.ie_version<=11;class vD{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new U4,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(De.ie&&De.ie_version<=11||De.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&De.android&&e.constructor.EDIT_CONTEXT!==!1&&!(De.chrome&&De.chrome_version<126)&&(this.editContext=new kD(e),e.state.facet(Ys)&&(e.contentDOM.editContext=this.editContext.editContext)),MO&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Ys)?r.root.activeElement!=this.dom:!Mh(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(De.ie&&De.ie_version<=11||De.android&&De.chrome)&&!r.state.selection.main.empty&&i.focusNode&&jh(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Yh(e.root);if(!t)return!1;let r=De.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&wD(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Mh(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&H4(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,xD),MO&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),MO&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Qu(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Mh(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new DL(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=UQ(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!Mp(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=aS(t,e.previousSibling||e.target.previousSibling,-1),i=aS(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ys)!=e.state.facet(Ys)&&(e.view.contentDOM.editContext=e.state.facet(Ys)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function aS(n,e,t){for(;e;){let r=gn.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function lS(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor,1);return jh(o.node,o.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function wD(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return lS(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?lS(n,t):null}class kD{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,l=this.toEditorPos(r.updateRangeStart),c=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:l,drifted:!1});let h=c-l>r.text.length;l==this.from&&s<this.from?l=s:c==this.to&&s>this.to&&(c=s);let f=qQ(e.state.sliceDoc(l,c),r.text,(h?i.from:i.to)-l,h?"end":null);if(!f){let m=pe.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));Mp(m,i)||e.dispatch({selection:m,userEvent:"select"});return}let p={from:f.from+l,to:f.toA+l,insert:Et.of(r.text.slice(f.from,f.toB).split(`
|
|
320
|
+
`))};if((De.mac||De.android)&&p.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:l,to:c,insert:Et.of([r.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let m=this.to-this.from+(p.to-p.from+p.insert.length);wx(e,p,pe.single(this.toEditorPos(r.selectionStart,m),this.toEditorPos(r.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let c=e.coordsForChar(o);s=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let c=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(c<h){let f=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(pt.mark({attributes:{style:f}}).range(c,h))}}}e.dispatch({effects:LQ.of(pt.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Yh(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,c,h)=>{if(r)return;let f=h.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(h)){i=this.pendingContextChange=null,t+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),h.toString()),this.to+=f}t+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Ue{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||q4(e.parent)||document,this.viewState=new iS(this,e.state||Nt.create(e)),e.scrollTo&&e.scrollTo.is(Xd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(xu).map(i=>new PO(i));for(let i of this.plugins)i.update(this);this.observer=new vD(this),this.inputState=new VL(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Fk(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Dn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let m of e){if(m.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=m.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,c=null;e.some(m=>m.annotation(tC))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=nC(s,o),c||(l=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(Nt.phrases)!=this.state.facet(Nt.phrases))return this.setState(s);i=Tp.create(this,s,e),i.flags|=l;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(p&&(p=p.map(m.changes)),m.scrollIntoView){let{main:g}=m.state.selection;p=new Cu(g.empty?g:pe.cursor(g.head,g.head>g.anchor?-1:1))}for(let g of m.effects)g.is(Xd)&&(p=g.value.clip(this.state))}this.viewState.update(i,p),this.bidiCache=Rp.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Sh)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Ud)!=i.state.facet(Ud)&&(this.viewState.mustMeasureContent=!0),(t||r||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let m of this.state.facet(ey))try{m(i)}catch(g){gs(this.state,g,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!UQ(this,f)&&h.force&&Qu(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new iS(this,e),this.plugins=e.facet(xu).map(r=>new PO(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Fk(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(xu),r=e.state.facet(xu);if(t!=r){let i=[];for(let s of r){let o=t.indexOf(s);if(o<0)i.push(new PO(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){gs(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(kQ(r||this.win))s=-1,o=this.viewState.heightMap.height;else{let g=this.viewState.scrollAnchorAt(i);s=g.from,o=g.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(g=>{try{return g.read(this)}catch(w){return gs(this.state,w),uS}}),p=Tp.create(this,this.state,[]),m=!1;p.flags|=c,t?t.flags|=c:t=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p),m&&this.docViewUpdate());for(let g=0;g<h.length;g++)if(f[g]!=uS)try{let w=h[g];w.write&&w.write(f[g],this)}catch(w){gs(this.state,w)}if(m&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let w=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o)/this.scaleY;if((w>1||w<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+w,r?r.scrollTop+=w:this.win.scrollBy(0,w),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(ey))l(t)}get themeClasses(){return sy+" "+(this.state.facet(iy)?oC:sC)+" "+this.state.facet(Ud)}updateAttrs(){let e=cS(this,DQ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ys)?"true":"false",class:"cm-content",style:`${De.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),cS(this,xx,t);let r=this.observer.ignore(()=>{let i=Dk(this.contentDOM,this.contentAttrs,t),s=Dk(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Ue.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Sh);let e=this.state.facet(Ue.cspNonce);ca.mount(this.root,this.styleModules.concat(yD).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return $O(this,e,Bk(this,e,t,r))}moveByGroup(e,t){return $O(this,e,Bk(this,e,t,r=>RL(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return pe.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return jL(this,e,t,r)}moveVertically(e,t,r){return $O(this,e,AL(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=ny(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),ny(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[ms.find(s,e-i.from,-1,t)];return Cp(r,o.dir==xn.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(_Q)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>SD)return TQ(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||CQ(s.isolates,r=Xk(this,e))))return s.order;r||(r=Xk(this,e));let i=rL(e.text,t,r);return this.bidiCache.push(new Rp(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||De.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{wQ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Xd.of(new Cu(typeof e=="number"?pe.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Xd.of(new Cu(pe.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return pi.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return pi.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=ca.newName(),i=[Ud.of(r),Sh.of(oy(`.${r}`,e))];return t&&t.dark&&i.push(iy.of(!0)),i}static baseTheme(e){return pf.lowest(Sh.of(oy("."+sy,e,aC)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&gn.get(r)||gn.get(e);return((t=i==null?void 0:i.root)===null||t===void 0?void 0:t.view)||null}}Ue.styleModule=Sh;Ue.inputHandler=AQ;Ue.clipboardInputFilter=Ox;Ue.clipboardOutputFilter=yx;Ue.scrollHandler=zQ;Ue.focusChangeEffect=NQ;Ue.perLineTextDirection=_Q;Ue.exceptionSink=RQ;Ue.updateListener=ey;Ue.editable=Ys;Ue.mouseSelectionStyle=jQ;Ue.dragMovesSelection=MQ;Ue.clickAddsSelectionRange=EQ;Ue.decorations=sm;Ue.blockWrappers=IQ;Ue.outerDecorations=vx;Ue.atomicRanges=Of;Ue.bidiIsolatedRanges=ZQ;Ue.scrollMargins=XQ;Ue.darkTheme=iy;Ue.cspNonce=Ye.define({combine:n=>n.length?n[0]:""});Ue.contentAttributes=xx;Ue.editorAttributes=DQ;Ue.lineWrapping=Ue.contentAttributes.of({class:"cm-lineWrapping"});Ue.announce=tn.define();const SD=4096,uS={};class Rp{constructor(e,t,r,i,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:xn.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!t.touchesRange(o.from,o.to)&&r.push(new Rp(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function cS(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(n):s;o&&px(o,t)}return t}const bD=De.mac?"mac":De.windows?"win":De.linux?"linux":"key";function PD(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let c=0;c<t.length-1;++c){const h=t[c];if(/^(cmd|meta|m)$/i.test(h))l=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function qd(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const QD=pf.default(Ue.domEventHandlers({keydown(n,e){return ED(CD(e.state),n,e,"editor")}})),um=Ye.define({enables:QD}),hS=new WeakMap;function CD(n){let e=n.facet(um),t=hS.get(e);return t||hS.set(e,t=$D(e.reduce((r,i)=>r.concat(i),[]))),t}let ea=null;const TD=4e3;function $D(n,e=bD){let t=Object.create(null),r=Object.create(null),i=(o,l)=>{let c=r[o];if(c==null)r[o]=l;else if(c!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,c,h,f)=>{var p,m;let g=t[o]||(t[o]=Object.create(null)),w=l.split(/ (?!$)/).map(Q=>PD(Q,e));for(let Q=1;Q<w.length;Q++){let M=w.slice(0,Q).join(" ");i(M,!0),g[M]||(g[M]={preventDefault:!0,stopPropagation:!1,run:[E=>{let I=ea={view:E,prefix:M,scope:o};return setTimeout(()=>{ea==I&&(ea=null)},TD),!0}]})}let k=w.join(" ");i(k,!1);let C=g[k]||(g[k]={preventDefault:!1,stopPropagation:!1,run:((m=(p=g._any)===null||p===void 0?void 0:p.run)===null||m===void 0?void 0:m.slice())||[]});c&&C.run.push(c),h&&(C.preventDefault=!0),f&&(C.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let f=t[h]||(t[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=o;for(let m in f)f[m].run.push(g=>p(g,ay))}let c=o[e]||o.key;if(c)for(let h of l)s(h,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(h,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return t}let ay=null;function ED(n,e,t,r){ay=e;let i=Z4(e),s=df(i,0),o=tm(s)==i.length&&i!=" ",l="",c=!1,h=!1,f=!1;ea&&ea.view==t&&ea.scope==r&&(l=ea.prefix+" ",GQ.indexOf(e.keyCode)<0&&(h=!0,ea=null));let p=new Set,m=C=>{if(C){for(let Q of C.run)if(!p.has(Q)&&(p.add(Q),Q(t)))return C.stopPropagation&&(f=!0),!0;C.preventDefault&&(C.stopPropagation&&(f=!0),h=!0)}return!1},g=n[r],w,k;return g&&(m(g[l+qd(i,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(De.windows&&e.ctrlKey&&e.altKey)&&!(De.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(w=ha[e.keyCode])&&w!=i?(m(g[l+qd(w,e,!0)])||e.shiftKey&&(k=Fh[e.keyCode])!=i&&k!=w&&m(g[l+qd(k,e,!1)]))&&(c=!0):o&&e.shiftKey&&m(g[l+qd(i,e,!0)])&&(c=!0),!c&&m(g._any)&&(c=!0)),h&&(c=!0),c&&f&&e.stopPropagation(),ay=null,c}function MD(){return RD}const jD=pt.line({class:"cm-activeLine"}),RD=pi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(jD.range(i.from)),e=i.from)}return pt.set(t)}},{decorations:n=>n.decorations});class no extends ua{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}no.prototype.elementClass="";no.prototype.toDOM=void 0;no.prototype.mapMode=Bn.TrackBefore;no.prototype.startSide=no.prototype.endSide=-1;no.prototype.point=!0;const up=Ye.define(),AD=Ye.define(),ND={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Pt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Ah=Ye.define();function _D(n){return[lC(),Ah.of({...ND,...n})]}const fS=Ye.define({combine:n=>n.some(e=>e)});function lC(n){return[zD]}const zD=pi.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Ah).map(e=>new pS(n,e)),this.fixed=!n.state.facet(fS);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(fS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Pt.iter(this.view.state.facet(up),this.view.viewport.from),r=[],i=this.gutters.map(s=>new LD(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==Pr.Text&&o){ly(t,r,l.from);for(let c of i)c.line(this.view,l,r);o=!1}else if(l.widget)for(let c of i)c.widget(this.view,l)}else if(s.type==Pr.Text){ly(t,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(Ah),t=n.state.facet(Ah),r=n.docChanged||n.heightChanged||n.viewportChanged||!Pt.eq(n.startState.facet(up),n.state.facet(up),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new pS(this.view,s)):(this.gutters[o].update(n),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>Ue.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==xn.LTR?{left:r,right:i}:{right:r,left:i}})});function dS(n){return Array.isArray(n)?n:[n]}function ly(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class LD{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Pt.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let l=new uC(e,o,s,r);i.elements.push(l),i.dom.appendChild(l.dom)}else i.elements[this.i].update(e,o,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];ly(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(AD)){let o=s(e,t.widget,t);o&&(i||(i=[])).push(o)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class pS{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=dS(t.markers(e)),t.initialSpacer&&(this.spacer=new uC(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=dS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Pt.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class uC{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),DD(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,c=s<t.length?t[s++]:null,h=!1;if(c){let f=c.elementClass;f&&(r+=" "+f);for(let p=o;p<this.markers.length;p++)if(this.markers[p].compare(c)){l=p,h=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(i);let p=i.nextSibling;i.remove(),i=p}}if(!c)break;c.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(c.toDOM(e),i)),h&&o++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function DD(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const ID=Ye.define(),ZD=Ye.define(),vu=Ye.define({combine(n){return rm(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],o=t[i];r[i]=s?(l,c,h)=>s(l,c,h)||o(l,c,h):o}return r}})}});class jO extends no{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function RO(n,e){return n.state.facet(vu).formatNumber(e,n.state)}const XD=Ah.compute([vu],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(ID)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new jO(RO(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(ZD)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(vu)!=e.state.facet(vu),initialSpacer(e){return new jO(RO(e,mS(e.state.doc.lines)))},updateSpacer(e,t){let r=RO(t.view,mS(t.view.state.doc.lines));return r==e.number?e:new jO(r)},domEventHandlers:n.facet(vu).domEventHandlers,side:"before"}));function VD(n={}){return[vu.of(n),lC(),XD]}function mS(n){let e=9;for(;e<n;)e=e*10+9;return e}const WD=new class extends no{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},FD=up.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(WD.range(i)))}return Pt.of(e)});function BD(){return FD}const cC=1024;let YD=0;class fi{constructor(e,t){this.from=e,this.to=t}}class ct{constructor(e={}){this.id=YD++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Cn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}ct.closedBy=new ct({deserialize:n=>n.split(" ")});ct.openedBy=new ct({deserialize:n=>n.split(" ")});ct.group=new ct({deserialize:n=>n.split(" ")});ct.isolate=new ct({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});ct.contextHash=new ct({perNode:!0});ct.lookAhead=new ct({perNode:!0});ct.mounted=new ct({perNode:!0});class Tu{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[ct.mounted.id]}}const UD=Object.create(null);class Cn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):UD,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Cn(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(ct.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(ct.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?r.name:i[s]];if(o)return o}}}}Cn.none=new Cn("",Object.create(null),0,8);class yf{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let l=o[1],c=o[0];c.combine&&c.id in i&&(l=c.combine(i[c.id],l)),i[c.id]=l}}t.push(i?new Cn(r.name,i,r.id,r.flags):r)}return new yf(t)}}const Hd=new WeakMap,gS=new WeakMap;var Zt;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(Zt||(Zt={}));class Dt{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Tu.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Ap(this.topNode,e)}cursorAt(e,t=0,r=0){let i=Hd.get(this)||this.topNode,s=new Ap(i);return s.moveTo(e,t),Hd.set(this,s._tree),s}get topNode(){return new mi(this,0,0,null)}resolve(e,t=0){let r=qh(Hd.get(this)||this.topNode,e,t,!1);return Hd.set(this,r),r}resolveInner(e,t=0){let r=qh(gS.get(this)||this.topNode,e,t,!0);return gS.set(this,r),r}resolveStack(e,t=0){return GD(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&Zt.IncludeAnonymous)>0;for(let c=this.cursor(o|Zt.IncludeAnonymous);;){let h=!1;if(c.from<=s&&c.to>=i&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&r&&(l||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Qx(Cn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Dt(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Dt(Cn.none,t,r,i)))}static build(e){return KD(e)}}Dt.empty=new Dt(Cn.none,[],[],0);class bx{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new bx(this.buffer,this.index)}}class da{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Cn.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,r,i,s){let{buffer:o}=this,l=-1;for(let c=e;c!=t&&!(hC(s,i,o[c+1],o[c+2])&&(l=c,r>0));c=o[c+3]);return l}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,c=0;l<t;){s[c++]=i[l++],s[c++]=i[l++]-r;let h=s[c++]=i[l++]-r;s[c++]=i[l++]-e,o=Math.max(o,h)}return new da(s,o,this.set)}}function hC(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function qh(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!r&&n instanceof mi&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=r?0:Zt.IgnoreOverlays;if(r)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof mi&&o.index<0&&((i=l.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class fC{cursor(e=0){return new Ap(this,e)}getChild(e,t=null,r=null){let i=OS(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return OS(this,e,t,r)}resolve(e,t=0){return qh(this,e,t,!1)}resolveInner(e,t=0){return qh(this,e,t,!0)}matchContext(e){return uy(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}let mi=class cp extends fC{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let o=this;;){for(let{children:l,positions:c}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let f=l[e],p=c[e]+o.from,m;if(!(!(s&Zt.EnterBracketed&&f instanceof Dt&&(m=Tu.get(f))&&!m.overlay&&m.bracketed&&r>=p&&r<=p+f.length)&&!hC(i,r,p,p+f.length))){if(f instanceof da){if(s&Zt.ExcludeBuffers)continue;let g=f.findChild(0,f.buffer.length,t,r-p,i);if(g>-1)return new Os(new qD(o,f,e,p),null,g)}else if(s&Zt.IncludeAnonymous||!f.type.isAnonymous||Px(f)){let g;if(!(s&Zt.IgnoreMounts)&&(g=Tu.get(f))&&!g.overlay)return new cp(g.tree,p,e,o);let w=new cp(f,p,e,o);return s&Zt.IncludeAnonymous||!w.type.isAnonymous?w:w.nextChild(t<0?f.children.length-1:0,t,r,i,s)}}}if(s&Zt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&Zt.IgnoreOverlays)&&(i=Tu.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Zt.EnterBracketed&&i.bracketed;for(let{from:l,to:c}of i.overlay)if((t>0||o?l<=s:l<s)&&(t<0||o?c>=s:c>s))return new cp(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function OS(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function uy(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class qD{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Os extends fC{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new Os(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Zt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Os(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Os(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Os(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),t.push(0)}return new Dt(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function dC(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let r=t instanceof mi&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new HD(i,t)}class HD{constructor(e,t){this.heads=e,this.node=t}get next(){return dC(this.heads)}}function GD(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof mi?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,t)),s=o}else{let o=Tu.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new mi(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(qh(l,e,t,!1))}}return i?dC(i):r}class Ap{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Zt.EnterBracketed,e instanceof mi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof mi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&Zt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Zt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Zt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&Zt.IncludeAnonymous||l instanceof da||!l.type.isAnonymous||Px(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new Os(this.buffer,t,this.stack[i]);return this.bufferNode=new Os(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return uy(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return uy(this._tree,e,i);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function Px(n){return n.children.some(e=>e instanceof da||!e.type.isAnonymous||Px(e))}function KD(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=cC,reused:s=[],minRepeatType:o=r.types.length}=n,l=Array.isArray(t)?new bx(t,t.length):t,c=r.types,h=0,f=0;function p(U,_,R,q,G,V){let{id:D,start:Z,end:ae,size:se}=l,re=f,Oe=h;if(se<0)if(l.next(),se==-1){let Y=s[D];R.push(Y),q.push(Z-U);return}else if(se==-3){h=D;return}else if(se==-4){f=D;return}else throw new RangeError(`Unrecognized record size: ${se}`);let be=c[D],he,ye,A=Z-U;if(ae-Z<=i&&(ye=C(l.pos-_,G))){let Y=new Uint16Array(ye.size-ye.skip),ue=l.pos-ye.size,z=Y.length;for(;l.pos>ue;)z=Q(ye.start,Y,z);he=new da(Y,ae-ye.start,r),A=ye.start-U}else{let Y=l.pos-se;l.next();let ue=[],z=[],Re=D>=o?D:-1,_e=0,$e=ae;for(;l.pos>Y;)Re>=0&&l.id==Re&&l.size>=0?(l.end<=$e-i&&(w(ue,z,Z,_e,l.end,$e,Re,re,Oe),_e=ue.length,$e=l.end),l.next()):V>2500?m(Z,Y,ue,z):p(Z,Y,ue,z,Re,V+1);if(Re>=0&&_e>0&&_e<ue.length&&w(ue,z,Z,_e,Z,$e,Re,re,Oe),ue.reverse(),z.reverse(),Re>-1&&_e>0){let rt=g(be,Oe);he=Qx(be,ue,z,0,ue.length,0,ae-Z,rt,rt)}else he=k(be,ue,z,ae-Z,re-ae,Oe)}R.push(he),q.push(A)}function m(U,_,R,q){let G=[],V=0,D=-1;for(;l.pos>_;){let{id:Z,start:ae,end:se,size:re}=l;if(re>4)l.next();else{if(D>-1&&ae<D)break;D<0&&(D=se-i),G.push(Z,ae,se),V++,l.next()}}if(V){let Z=new Uint16Array(V*4),ae=G[G.length-2];for(let se=G.length-3,re=0;se>=0;se-=3)Z[re++]=G[se],Z[re++]=G[se+1]-ae,Z[re++]=G[se+2]-ae,Z[re++]=re;R.push(new da(Z,G[2]-ae,r)),q.push(ae-U)}}function g(U,_){return(R,q,G)=>{let V=0,D=R.length-1,Z,ae;if(D>=0&&(Z=R[D])instanceof Dt){if(!D&&Z.type==U&&Z.length==G)return Z;(ae=Z.prop(ct.lookAhead))&&(V=q[D]+Z.length+ae)}return k(U,R,q,G,V,_)}}function w(U,_,R,q,G,V,D,Z,ae){let se=[],re=[];for(;U.length>q;)se.push(U.pop()),re.push(_.pop()+R-G);U.push(k(r.types[D],se,re,V-G,Z-V,ae)),_.push(G-R)}function k(U,_,R,q,G,V,D){if(V){let Z=[ct.contextHash,V];D=D?[Z].concat(D):[Z]}if(G>25){let Z=[ct.lookAhead,G];D=D?[Z].concat(D):[Z]}return new Dt(U,_,R,q,D)}function C(U,_){let R=l.fork(),q=0,G=0,V=0,D=R.end-i,Z={size:0,start:0,skip:0};e:for(let ae=R.pos-U;R.pos>ae;){let se=R.size;if(R.id==_&&se>=0){Z.size=q,Z.start=G,Z.skip=V,V+=4,q+=4,R.next();continue}let re=R.pos-se;if(se<0||re<ae||R.start<D)break;let Oe=R.id>=o?4:0,be=R.start;for(R.next();R.pos>re;){if(R.size<0)if(R.size==-3||R.size==-4)Oe+=4;else break e;else R.id>=o&&(Oe+=4);R.next()}G=be,q+=se,V+=Oe}return(_<0||q==U)&&(Z.size=q,Z.start=G,Z.skip=V),Z.size>4?Z:void 0}function Q(U,_,R){let{id:q,start:G,end:V,size:D}=l;if(l.next(),D>=0&&q<o){let Z=R;if(D>4){let ae=l.pos-(D-4);for(;l.pos>ae;)R=Q(U,_,R)}_[--R]=Z,_[--R]=V-U,_[--R]=G-U,_[--R]=q}else D==-3?h=q:D==-4&&(f=q);return R}let M=[],E=[];for(;l.pos>0;)p(n.start||0,n.bufferStart||0,M,E,-1,0);let I=(e=n.length)!==null&&e!==void 0?e:M.length?E[0]+M[0].length:0;return new Dt(c[n.topID],M.reverse(),E.reverse(),I)}const yS=new WeakMap;function hp(n,e){if(!n.isAnonymous||e instanceof da||e.type!=n)return 1;let t=yS.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Dt)){t=1;break}t+=hp(n,r)}yS.set(e,t)}return t}function Qx(n,e,t,r,i,s,o,l,c){let h=0;for(let w=r;w<i;w++)h+=hp(n,e[w]);let f=Math.ceil(h*1.5/8),p=[],m=[];function g(w,k,C,Q,M){for(let E=C;E<Q;){let I=E,U=k[E],_=hp(n,w[E]);for(E++;E<Q;E++){let R=hp(n,w[E]);if(_+R>=f)break;_+=R}if(E==I+1){if(_>f){let R=w[I];g(R.children,R.positions,0,R.children.length,k[I]+M);continue}p.push(w[I])}else{let R=k[E-1]+w[E-1].length-U;p.push(Qx(n,w,k,I,E,U,R,null,c))}m.push(U+M-s)}}return g(e,t,r,i,0),(l||c)(p,m,o)}class pC{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Os?this.setBuffer(e.context.buffer,e.index,t):e instanceof mi&&this.map.set(e.tree,t)}get(e){return e instanceof Os?this.getBuffer(e.context.buffer,e.index):e instanceof mi?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Gs{constructor(e,t,r,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new Gs(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,c=0,h=0;;l++){let f=l<t.length?t[l]:null,p=f?f.fromA:1e9;if(p-c>=r)for(;o&&o.from<p;){let m=o;if(c>=m.from||p<=m.to||h){let g=Math.max(m.from,c)-h,w=Math.min(m.to,p)-h;m=g>=w?null:new Gs(g,w,m.tree,m.offset+h,l>0,!!f)}if(m&&i.push(m),o.to>p)break;o=s<e.length?e[s++]:null}if(!f)break;c=f.toA,h=f.toA-f.toB}return i}}class Cx{startParse(e,t,r){return typeof e=="string"&&(e=new JD(e)),r=r?r.length?r.map(i=>new fi(i.from,i.to)):[new fi(0,0)]:[new fi(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class JD{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function mC(n){return(e,t,r,i)=>new t3(e,n,t,r,i)}class xS{constructor(e,t,r,i,s,o){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function vS(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class e3{constructor(e,t,r,i,s,o,l,c){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=l,this.prev=c,this.depth=0,this.ranges=[]}}const cy=new ct({perNode:!0});class t3{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Dt(r.type,r.children,r.positions,r.length,r.propValues.concat([[cy,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[ct.mounted.id]=new Tu(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new i3(this.fragments),t=null,r=null,i=new Ap(new mi(this.baseTree,this.ranges[0].from,0,null),Zt.IncludeAnonymous|Zt.IgnoreMounts);e:for(let s,o;;){let l=!0,c;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)l=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(f=>f.frag.from<=i.from&&f.frag.to>=i.to&&f.mount.overlay);if(h)for(let f of h.mount.overlay){let p=f.from+h.pos,m=f.to+h.pos;p>=i.from&&m<=i.to&&!t.ranges.some(g=>g.from<m&&g.to>p)&&t.ranges.push({from:p,to:m})}}l=!1}else if(r&&(o=n3(r.ranges,i.from,i.to)))l=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(r3(i),t&&t.depth++,r&&r.depth++);let h=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new e3(s.parser,s.overlay,h,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let f=SS(this.ranges,s.overlay||(i.from<i.to?[new fi(i.from,i.to)]:[]));f.length&&vS(f),(f.length||!s.overlay)&&this.inner.push(new xS(s.parser,f.length?s.parser.startParse(this.input,bS(h,f),f):s.parser.startParse(""),s.overlay?s.overlay.map(p=>new fi(p.from-i.from,p.to-i.from)):null,!!s.bracketed,i.tree,f.length?f[0].from:i.from)),s.overlay?f.length&&(r={ranges:f,depth:0,prev:r}):l=!1}}else if(t&&(c=t.predicate(i))&&(c===!0&&(c=new fi(i.from,i.to)),c.from<c.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==c.from?t.ranges[h]={from:t.ranges[h].from,to:c.to}:t.ranges.push(c)}if(l&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=SS(this.ranges,t.ranges);h.length&&(vS(h),this.inner.splice(t.index,0,new xS(t.parser,t.parser.startParse(this.input,bS(t.mounts,h),h),t.ranges.map(f=>new fi(f.from-t.start,f.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function n3(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function wS(n,e,t,r,i,s){if(e<t){let o=n.buffer[e+1];r.push(n.slice(e,t,o)),i.push(o-s)}}function r3(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),o=i.children[s],l=o.buffer,c=[s];function h(f,p,m,g,w,k){let C=t[k],Q=[],M=[];wS(o,f,C,Q,M,g);let E=l[C+1],I=l[C+2];c.push(Q.length);let U=k?h(C+4,l[C+3],o.set.types[l[C]],E,I-E,k-1):e.toTree();return Q.push(U),M.push(E-g),wS(o,l[C+3],p,Q,M,g),new Dt(m,Q,M,w)}i.children[s]=h(0,l.length,Cn.none,0,o.length,t.length-1);for(let f of c){let p=n.tree.children[f],m=n.tree.positions[f];n.yield(new mi(p,m+n.from,f,n._tree))}}class kS{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Zt.IncludeAnonymous|Zt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,Zt.IgnoreOverlays|Zt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Dt)t=t.children[0];else break}return!1}}let i3=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(cy))!==null&&t!==void 0?t:r.to,this.inner=new kS(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(cy))!==null&&e!==void 0?e:t.to,this.inner=new kS(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(ct.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&i.push({frag:c,pos:s.from-c.offset,mount:o})}}}return i}};function SS(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let o=n[i-1].to,l=n[i].from;for(;s<r.length;s++){let c=r[s];if(c.from>=l)break;c.to<=o||(t||(r=t=e.slice()),c.from<o?(t[s]=new fi(c.from,o),c.to>l&&t.splice(s+1,0,new fi(l,c.to))):c.to>l?t[s--]=new fi(l,c.to):t.splice(s--,1))}}return r}function s3(n,e,t,r){let i=0,s=0,o=!1,l=!1,c=-1e9,h=[];for(;;){let f=i==n.length?1e9:o?n[i].to:n[i].from,p=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let m=Math.max(c,t),g=Math.min(f,p,r);m<g&&h.push(new fi(m,g))}if(c=Math.min(f,p),c==1e9)break;f==c&&(o?(o=!1,i++):o=!0),p==c&&(l?(l=!1,s++):l=!0)}return h}function bS(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let o=r+(i.overlay?i.overlay[0].from:0),l=o+i.tree.length,c=Math.max(s.from,o),h=Math.min(s.to,l);if(i.overlay){let f=i.overlay.map(m=>new fi(m.from+r,m.to+r)),p=s3(e,f,c,h);for(let m=0,g=c;;m++){let w=m==p.length,k=w?h:p[m].from;if(k>g&&t.push(new Gs(g,k,i.tree,-o,s.from>=g||s.openStart,s.to<=k||s.openEnd)),w)break;g=p[m].to}}else t.push(new Gs(c,h,i.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let o3=0;class Wr{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=o3++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Wr&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Wr(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new Np(e);return r=>r.modified.indexOf(t)>-1?r:Np.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}}let a3=0;class Np{constructor(e){this.name=e,this.instances=[],this.id=a3++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(l=>l.base==e&&l3(t,l.modified));if(r)return r;let i=[],s=new Wr(e.name,i,e,t);for(let l of t)l.instances.push(s);let o=u3(t);for(let l of e.set)if(!l.modified.length)for(let c of o)i.push(Np.get(l,c));return s}}function l3(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function u3(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function jl(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],o=2,l=i;for(let p=0;;){if(l=="..."&&p>0&&p+3==i.length){o=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!m)throw new RangeError("Invalid path: "+i);if(s.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),p+=m[0].length,p==i.length)break;let g=i[p++];if(p==i.length&&g=="!"){o=0;break}if(g!="/")throw new RangeError("Invalid path: "+i);l=i.slice(p)}let c=s.length-1,h=s[c];if(!h)throw new RangeError("Invalid path: "+i);let f=new Hh(r,o,c>0?s.slice(0,c):null);e[h]=f.sort(e[h])}}return gC.add(e)}const gC=new ct({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new Hh(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class Hh{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Hh.empty=new Hh([],2,null);function OC(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let c of l.set){let h=t[c.id];if(h){o=o?o+" "+h:h;break}}return o},scope:r}}function c3(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function h3(n,e,t,r=0,i=n.length){let s=new f3(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class f3{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:o,from:l,to:c}=e;if(l>=r||c<=t)return;o.isTop&&(s=this.highlighters.filter(g=>!g.scope||g.scope(o)));let h=i,f=d3(e)||Hh.empty,p=c3(s,f.tags);if(p&&(h&&(h+=" "),h+=p,f.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(t,l),h),f.opaque)return;let m=e.tree&&e.tree.prop(ct.mounted);if(m&&m.overlay){let g=e.node.enter(m.overlay[0].from+l,1),w=this.highlighters.filter(C=>!C.scope||C.scope(m.tree.type)),k=e.firstChild();for(let C=0,Q=l;;C++){let M=C<m.overlay.length?m.overlay[C]:null,E=M?M.from+l:c,I=Math.max(t,Q),U=Math.min(r,E);if(I<U&&k)for(;e.from<U&&(this.highlightRange(e,I,U,i,s),this.startSpan(Math.min(U,e.to),h),!(e.to>=E||!e.nextSibling())););if(!M||E>r)break;Q=M.to+l,Q>t&&(this.highlightRange(g.cursor(),Math.max(t,M.from+l),Math.min(r,Q),"",w),this.startSpan(Math.min(r,Q),h))}k&&e.parent()}else if(e.firstChild()){m&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function d3(n){let e=n.type.prop(gC);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Te=Wr.define,Gd=Te(),Ko=Te(),PS=Te(Ko),QS=Te(Ko),Jo=Te(),Kd=Te(Jo),AO=Te(Jo),as=Te(),el=Te(as),ss=Te(),os=Te(),hy=Te(),gh=Te(hy),Jd=Te(),N={comment:Gd,lineComment:Te(Gd),blockComment:Te(Gd),docComment:Te(Gd),name:Ko,variableName:Te(Ko),typeName:PS,tagName:Te(PS),propertyName:QS,attributeName:Te(QS),className:Te(Ko),labelName:Te(Ko),namespace:Te(Ko),macroName:Te(Ko),literal:Jo,string:Kd,docString:Te(Kd),character:Te(Kd),attributeValue:Te(Kd),number:AO,integer:Te(AO),float:Te(AO),bool:Te(Jo),regexp:Te(Jo),escape:Te(Jo),color:Te(Jo),url:Te(Jo),keyword:ss,self:Te(ss),null:Te(ss),atom:Te(ss),unit:Te(ss),modifier:Te(ss),operatorKeyword:Te(ss),controlKeyword:Te(ss),definitionKeyword:Te(ss),moduleKeyword:Te(ss),operator:os,derefOperator:Te(os),arithmeticOperator:Te(os),logicOperator:Te(os),bitwiseOperator:Te(os),compareOperator:Te(os),updateOperator:Te(os),definitionOperator:Te(os),typeOperator:Te(os),controlOperator:Te(os),punctuation:hy,separator:Te(hy),bracket:gh,angleBracket:Te(gh),squareBracket:Te(gh),paren:Te(gh),brace:Te(gh),content:as,heading:el,heading1:Te(el),heading2:Te(el),heading3:Te(el),heading4:Te(el),heading5:Te(el),heading6:Te(el),contentSeparator:Te(as),list:Te(as),quote:Te(as),emphasis:Te(as),strong:Te(as),link:Te(as),monospace:Te(as),strikethrough:Te(as),inserted:Te(),deleted:Te(),changed:Te(),invalid:Te(),meta:Jd,documentMeta:Te(Jd),annotation:Te(Jd),processingInstruction:Te(Jd),definition:Wr.defineModifier("definition"),constant:Wr.defineModifier("constant"),function:Wr.defineModifier("function"),standard:Wr.defineModifier("standard"),local:Wr.defineModifier("local"),special:Wr.defineModifier("special")};for(let n in N){let e=N[n];e instanceof Wr&&(e.name=n)}OC([{tag:N.link,class:"tok-link"},{tag:N.heading,class:"tok-heading"},{tag:N.emphasis,class:"tok-emphasis"},{tag:N.strong,class:"tok-strong"},{tag:N.keyword,class:"tok-keyword"},{tag:N.atom,class:"tok-atom"},{tag:N.bool,class:"tok-bool"},{tag:N.url,class:"tok-url"},{tag:N.labelName,class:"tok-labelName"},{tag:N.inserted,class:"tok-inserted"},{tag:N.deleted,class:"tok-deleted"},{tag:N.literal,class:"tok-literal"},{tag:N.string,class:"tok-string"},{tag:N.number,class:"tok-number"},{tag:[N.regexp,N.escape,N.special(N.string)],class:"tok-string2"},{tag:N.variableName,class:"tok-variableName"},{tag:N.local(N.variableName),class:"tok-variableName tok-local"},{tag:N.definition(N.variableName),class:"tok-variableName tok-definition"},{tag:N.special(N.variableName),class:"tok-variableName2"},{tag:N.definition(N.propertyName),class:"tok-propertyName tok-definition"},{tag:N.typeName,class:"tok-typeName"},{tag:N.namespace,class:"tok-namespace"},{tag:N.className,class:"tok-className"},{tag:N.macroName,class:"tok-macroName"},{tag:N.propertyName,class:"tok-propertyName"},{tag:N.operator,class:"tok-operator"},{tag:N.comment,class:"tok-comment"},{tag:N.meta,class:"tok-meta"},{tag:N.invalid,class:"tok-invalid"},{tag:N.punctuation,class:"tok-punctuation"}]);var NO;const hl=new ct;function Tx(n){return Ye.define({combine:n?e=>e.concat(n):void 0})}const $x=new ct;class di{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Nt.prototype.hasOwnProperty("tree")||Object.defineProperty(Nt.prototype,"tree",{get(){return Ut(this)}}),this.parser=t,this.extension=[pa.of(this),Nt.languageData.of((s,o,l)=>{let c=CS(s,o,l),h=c.type.prop(hl);if(!h)return[];let f=s.facet(h),p=c.type.prop($x);if(p){let m=c.resolve(o-c.from,l);for(let g of p)if(g.test(m,s)){let w=s.facet(g.facet);return g.type=="replace"?w:w.concat(f)}}return f})].concat(r)}isActiveAt(e,t,r=-1){return CS(e,t,r).type.prop(hl)==this.data}findRegions(e){let t=e.facet(pa);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(hl)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(ct.mounted);if(l){if(l.tree.prop(hl)==this.data){if(l.overlay)for(let c of l.overlay)r.push({from:c.from+o,to:c.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let c=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>c)return}}for(let c=0;c<s.children.length;c++){let h=s.children[c];h instanceof Dt&&i(h,s.positions[c]+o)}};return i(Ut(e),0),r}get allowsNesting(){return!0}}di.setState=tn.define();function CS(n,e,t){let r=n.facet(pa),i=Ut(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,Zt.ExcludeBuffers|Zt.EnterBracketed))s.type.isTop&&(i=s);return i}class Pl extends di{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=Tx(e.languageData);return new Pl(t,e.parser.configure({props:[hl.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new Pl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ut(n){let e=n.field(di.state,!1);return e?e.tree:Dt.empty}class p3{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Oh=null;class Gh{constructor(e,t,r=[],i,s,o,l,c){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Gh(e,t,[],Dt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new p3(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Dt.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Gs.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Gs.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Oh;Oh=this;try{return e()}finally{Oh=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=TS(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,f,p,m)=>c.push({fromA:h,toA:f,fromB:p,toB:m})),r=Gs.applyChanges(r,c),i=Dt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);f<p&&l.push({from:f,to:p})}}}return new Gh(this.parser,t,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=TS(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Cx{createParse(t,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let c=Oh;if(c){for(let h of i)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new Dt(Cn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Oh}}function TS(n,e,t){return Gs.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Yu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Yu(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Gh.create(e.facet(pa).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Yu(r)}}di.state=ws.define({create:Yu.init,update(n,e){for(let t of e.effects)if(t.is(di.setState))return t.value;return e.startState.facet(pa)!=e.state.facet(pa)?Yu.init(e.state):n.apply(e)}});let yC=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(yC=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const _O=typeof navigator<"u"&&(!((NO=navigator.scheduling)===null||NO===void 0)&&NO.isInputPending)?()=>navigator.scheduling.isInputPending():null,m3=pi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(di.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(di.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=yC(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(di.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!_O?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,c=s.context.work(()=>_O&&_O()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:di.setState.of(new Yu(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>gs(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),pa=Ye.define({combine(n){return n.length?n[0]:null},enables:n=>[di.state,m3,Ue.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Uu{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class _p{constructor(e,t,r,i,s,o=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new _p(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let r=/\.([^.]+)$/.exec(t);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(r)for(let i of e)for(let s of i.alias){let o=t.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+s.length])))return i}return null}}const g3=Ye.define(),xf=Ye.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function zp(n){let e=n.facet(xf);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Lp(n,e){let t="",r=n.tabSize,i=n.facet(xf)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function xC(n,e){n instanceof Nt&&(n=new cm(n));for(let r of n.state.facet(g3)){let i=r(n,e);if(i!==void 0)return i}let t=Ut(n.state);return t.length>=e?O3(n,t,e):null}class cm{constructor(e,t={}){this.state=e,this.options=t,this.unit=zp(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return eo(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ic=new ct;function O3(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return vC(r,n,t)}function vC(n,e,t){for(let r=n;r;r=r.next){let i=x3(r.node);if(i)return i(Ex.create(e,t,r))}return 0}function y3(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function x3(n){let e=n.type.prop(ic);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(ct.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>wC(o,!0,1,void 0,s&&!y3(o)?i.from:void 0)}return n.parent==null?v3:null}function v3(){return 0}class Ex extends cm{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new Ex(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(w3(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return vC(this.context.next,this.base,this.pos)}}function w3(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function k3(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let h=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+h}}l=c.to}}function S3({closing:n,align:e=!0,units:t=1}){return r=>wC(r,e,t,n)}function wC(n,e,t,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==n.pos+o,c=e?k3(n):null;return c?l?n.column(c.from):n.column(c.to):n.baseIndent+(l?0:n.unit*t)}const b3=n=>n.baseIndent;function $u({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const kC=Ye.define(),Rl=new ct;function Mx(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function P3(n,e,t){let r=Ut(n);if(r.length<t)return null;let i=r.resolveStack(t,1),s=null;for(let o=i;o;o=o.next){let l=o.node;if(l.to<=t||l.from>t)continue;if(s&&l.from<e)break;let c=l.type.prop(Rl);if(c&&(l.to<r.length-50||r.length==n.doc.length||!Q3(l))){let h=c(l,n);h&&h.from<=t&&h.from>=e&&h.to>t&&(s=h)}}return s}function Q3(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function $S(n,e,t){for(let r of n.facet(kC)){let i=r(n,e,t);if(i)return i}return P3(n,e,t)}function SC(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const bC=tn.define({map:SC}),jx=tn.define({map:SC}),Dp=ws.define({create(){return pt.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,r)=>n=ES(n,t,r)),n=n.map(e.changes);for(let t of e.effects)if(t.is(bC)&&!C3(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(PC),i=r?pt.replace({widget:new E3(r(e.state,t.value))}):MS;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(jx)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=ES(n,e.selection.main.head)),n},provide:n=>Ue.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let r=n[t++],i=n[t++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(MS.range(r,i))}return pt.set(e,!0)}});function ES(n,e,t=e){let r=!1;return n.between(e,t,(i,s)=>{i<t&&s>e&&(r=!0)}),r?n.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):n}function fy(n,e,t){var r;let i=null;return(r=n.field(Dp,!1))===null||r===void 0||r.between(e,t,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function C3(n,e,t){let r=!1;return n.between(e,e,(i,s)=>{i==e&&s==t&&(r=!0)}),r}const T3={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},PC=Ye.define({combine(n){return rm(n,T3)}});function $3(n){return[Dp,R3]}function QC(n,e){let{state:t}=n,r=t.facet(PC),i=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),c=fy(n.state,l.from,l.to);c&&n.dispatch({effects:jx.of(c)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const MS=pt.replace({widget:new class extends Ml{toDOM(n){return QC(n,null)}}});class E3 extends Ml{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return QC(e,this.value)}}const M3={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class zO extends no{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function j3(n={}){let e={...M3,...n},t=new zO(e,!0),r=new zO(e,!1),i=pi.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(pa)!=o.state.facet(pa)||o.startState.field(Dp,!1)!=o.state.field(Dp,!1)||Ut(o.startState)!=Ut(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new Vu;for(let c of o.viewportLineBlocks){let h=fy(o.state,c.from,c.to)?r:$S(o.state,c.from,c.to)?t:null;h&&l.add(c.from,c.from,h)}return l.finish()}}),{domEventHandlers:s}=e;return[i,_D({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||Pt.empty},initialSpacer(){return new zO(e,!1)},domEventHandlers:{...s,click:(o,l,c)=>{if(s.click&&s.click(o,l,c))return!0;let h=fy(o.state,l.from,l.to);if(h)return o.dispatch({effects:jx.of(h)}),!0;let f=$S(o.state,l.from,l.to);return f?(o.dispatch({effects:bC.of(f)}),!0):!1}}}),$3()]}const R3=Ue.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class vf{constructor(e,t){this.specs=e;let r;function i(l){let c=ca.newName();return(r||(r=Object.create(null)))["."+c]=l,c}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof di?l=>l.prop(hl)==o.data:o?l=>l==o:void 0,this.style=OC(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new ca(r):null,this.themeType=t.themeType}static define(e,t){return new vf(e,t||{})}}const dy=Ye.define(),CC=Ye.define({combine(n){return n.length?[n[0]]:null}});function LO(n){let e=n.facet(dy);return e.length?e:n.facet(CC)}function TC(n,e){let t=[N3],r;return n instanceof vf&&(n.module&&t.push(Ue.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(CC.of(n)):r?t.push(dy.computeN([Ue.darkTheme],i=>i.facet(Ue.darkTheme)==(r=="dark")?[n]:[])):t.push(dy.of(n)),t}class A3{constructor(e){this.markCache=Object.create(null),this.tree=Ut(e.state),this.decorations=this.buildDeco(e,LO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ut(e.state),r=LO(e.state),i=r!=LO(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return pt.none;let r=new Vu;for(let{from:i,to:s}of e.visibleRanges)h3(this.tree,t,(o,l,c)=>{r.add(o,l,this.markCache[c]||(this.markCache[c]=pt.mark({class:c})))},i,s);return r.finish()}}const N3=pf.high(pi.fromClass(A3,{decorations:n=>n.decorations})),_3=vf.define([{tag:N.meta,color:"#404740"},{tag:N.link,textDecoration:"underline"},{tag:N.heading,textDecoration:"underline",fontWeight:"bold"},{tag:N.emphasis,fontStyle:"italic"},{tag:N.strong,fontWeight:"bold"},{tag:N.strikethrough,textDecoration:"line-through"},{tag:N.keyword,color:"#708"},{tag:[N.atom,N.bool,N.url,N.contentSeparator,N.labelName],color:"#219"},{tag:[N.literal,N.inserted],color:"#164"},{tag:[N.string,N.deleted],color:"#a11"},{tag:[N.regexp,N.escape,N.special(N.string)],color:"#e40"},{tag:N.definition(N.variableName),color:"#00f"},{tag:N.local(N.variableName),color:"#30a"},{tag:[N.typeName,N.namespace],color:"#085"},{tag:N.className,color:"#167"},{tag:[N.special(N.variableName),N.macroName],color:"#256"},{tag:N.definition(N.propertyName),color:"#00c"},{tag:N.comment,color:"#940"},{tag:N.invalid,color:"#f00"}]),z3=Ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),$C=1e4,EC="()[]{}",MC=Ye.define({combine(n){return rm(n,{afterCursor:!0,brackets:EC,maxScanDistance:$C,renderMatch:I3})}}),L3=pt.mark({class:"cm-matchingBracket"}),D3=pt.mark({class:"cm-nonmatchingBracket"});function I3(n){let e=[],t=n.matched?L3:D3;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}function jS(n){let e=[],t=n.facet(MC);for(let r of n.selection.ranges){if(!r.empty)continue;let i=ys(n,r.head,-1,t)||r.head>0&&ys(n,r.head-1,1,t)||t.afterCursor&&(ys(n,r.head,1,t)||r.head<n.doc.length&&ys(n,r.head+1,-1,t));i&&(e=e.concat(t.renderMatch(i,n)))}return pt.set(e,!0)}const Z3=pi.fromClass(class{constructor(n){this.paused=!1,this.decorations=jS(n.state)}update(n){(n.docChanged||n.selectionSet||this.paused)&&(n.view.composing?(this.decorations=this.decorations.map(n.changes),this.paused=!0):(this.decorations=jS(n.state),this.paused=!1))}},{decorations:n=>n.decorations}),X3=[Z3,z3];function V3(n={}){return[MC.of(n),X3]}const jC=new ct;function py(n,e,t){let r=n.prop(e<0?ct.openedBy:ct.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function my(n){let e=n.type.prop(jC);return e?e(n.node):n}function ys(n,e,t,r={}){let i=r.maxScanDistance||$C,s=r.brackets||EC,o=Ut(n),l=o.resolveInner(e,t);for(let c=l;c;c=c.parent){let h=py(c.type,t,s);if(h&&c.from<c.to){let f=my(c);if(f&&(t>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return W3(n,e,t,c,f,h,s)}}return F3(n,e,t,o,l.type,i,s)}function W3(n,e,t,r,i,s,o){let l=r.parent,c={from:i.from,to:i.to},h=0,f=l==null?void 0:l.cursor();if(f&&(t<0?f.childBefore(r.from):f.childAfter(r.to)))do if(t<0?f.to<=r.from:f.from>=r.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let p=my(f);return{start:c,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(py(f.type,t,o))h++;else if(py(f.type,-t,o)){if(h==0){let p=my(f);return{start:c,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(t<0?f.prevSibling():f.nextSibling());return{start:c,matched:!1}}function F3(n,e,t,r,i,s,o){if(t<0?!e:e==n.doc.length)return null;let l=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),c=o.indexOf(l);if(c<0||c%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},f=n.doc.iterRange(e,t>0?n.doc.length:0),p=0;for(let m=0;!f.next().done&&m<=s;){let g=f.value;t<0&&(m+=g.length);let w=e+m*t;for(let k=t>0?0:g.length-1,C=t>0?g.length:-1;k!=C;k+=t){let Q=o.indexOf(g[k]);if(!(Q<0||r.resolveInner(w+k,1).type!=i))if(Q%2==0==t>0)p++;else{if(p==1)return{start:h,end:{from:w+k,to:w+k+1},matched:Q>>1==c>>1};p--}}t>0&&(m+=g.length)}return f.done?{start:h,matched:!1}:null}const B3=Object.create(null),RS=[Cn.none],AS=[],NS=Object.create(null),Y3=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Y3[n]=U3(B3,e);function DO(n,e){AS.indexOf(n)>-1||(AS.push(n),console.warn(e))}function U3(n,e){let t=[];for(let l of e.split(" ")){let c=[];for(let h of l.split(".")){let f=n[h]||N[h];f?typeof f=="function"?c.length?c=c.map(f):DO(h,`Modifier ${h} used at start of tag`):c.length?DO(h,`Tag ${h} used as modifier`):c=Array.isArray(f)?f:[f]:DO(h,`Unknown highlighting tag ${h}`)}for(let h of c)t.push(h)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(l=>l.id),s=NS[i];if(s)return s.id;let o=NS[i]=Cn.define({id:RS.length,name:r,props:[jl({[r]:t})]});return RS.push(o),o.id}xn.RTL,xn.LTR;const q3=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=Ax(n.state,t.from);return r.line?H3(n):r.block?K3(n):!1};function Rx(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const H3=Rx(tI,0),G3=Rx(RC,0),K3=Rx((n,e)=>RC(n,e,eI(e)),0);function Ax(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const yh=50;function J3(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-yh,r),o=n.sliceDoc(i,i+yh),l=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(o)[0].length,h=s.length-l;if(s.slice(h-e.length,h)==e&&o.slice(c,c+t.length)==t)return{open:{pos:r-l,margin:l&&1},close:{pos:i+c,margin:c&&1}};let f,p;i-r<=2*yh?f=p=n.sliceDoc(r,i):(f=n.sliceDoc(r,r+yh),p=n.sliceDoc(i-yh,i));let m=/^\s*/.exec(f)[0].length,g=/\s*$/.exec(p)[0].length,w=p.length-g-t.length;return f.slice(m,m+e.length)==e&&p.slice(w,w+t.length)==t?{open:{pos:r+m+e.length,margin:/\s/.test(f.charAt(m+e.length))?1:0},close:{pos:i-g-t.length,margin:/\s/.test(p.charAt(w-1))?1:0}}:null}function eI(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function RC(n,e,t=e.selection.ranges){let r=t.map(s=>Ax(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,o)=>J3(e,r[o],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let c=r[o],{open:h,close:f}=l;s.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+c.close.length})}return{changes:s}}return null}function tI(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of t){let l=r.length,c=1e9,h;for(let f=s;f<=o;){let p=e.doc.lineAt(f);if(h==null&&(h=Ax(e,p.from).line,!h))continue e;if(p.from>i&&(s==o||o>p.from)){i=p.from;let m=/^\s*/.exec(p.text)[0].length,g=m==p.length,w=p.text.slice(m,m+h.length)==h?m:-1;m<p.text.length&&m<c&&(c=m),r.push({line:p,comment:w,token:h,indent:m,empty:g,single:!1})}f=p.to+1}if(c<1e9)for(let f=l;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=c);r.length==l+1&&(r[l].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:c,indent:h,empty:f,single:p}of r)(p||!f)&&s.push({from:l.from+h,insert:c+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:c}of r)if(l>=0){let h=o.from+l,f=h+c.length;o.text[f-o.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}function sc(n,e){return pe.create(n.ranges.map(e),n.mainIndex)}function Di(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ii({state:n,dispatch:e},t){let r=sc(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Di(n,r)),!0)}function hm(n,e){return pe.cursor(e?n.to:n.from)}function AC(n,e){return Ii(n,t=>t.empty?n.moveByChar(t,e):hm(t,e))}function Hn(n){return n.textDirectionAt(n.state.selection.main.head)==xn.LTR}const NC=n=>AC(n,!Hn(n)),_C=n=>AC(n,Hn(n));function zC(n,e){return Ii(n,t=>t.empty?n.moveByGroup(t,e):hm(t,e))}const nI=n=>zC(n,!Hn(n)),rI=n=>zC(n,Hn(n));function iI(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function fm(n,e,t){let r=Ut(n).resolveInner(e.head),i=t?ct.closedBy:ct.openedBy;for(let c=e.head;;){let h=t?r.childAfter(c):r.childBefore(c);if(!h)break;iI(n,h,i)?r=h:c=t?h.to:h.from}let s=r.type.prop(i),o,l;return s&&(o=t?ys(n,r.from,1):ys(n,r.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?r.to:r.from,pe.cursor(l,t?-1:1)}const sI=n=>Ii(n,e=>fm(n.state,e,!Hn(n))),oI=n=>Ii(n,e=>fm(n.state,e,Hn(n)));function LC(n,e){return Ii(n,t=>{if(!t.empty)return hm(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const DC=n=>LC(n,!1),IC=n=>LC(n,!0);function ZC(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(Ue.scrollMargins)){let o=s(n);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function XC(n,e){let t=ZC(n),{state:r}=n,i=sc(r.selection,o=>o.empty?n.moveVertically(o,e,t.height):hm(o,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let o=n.coordsAtPos(r.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),c=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>c&&o.bottom<h&&(s=Ue.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-c}))}return n.dispatch(Di(r,i),{effects:s}),!0}const _S=n=>XC(n,!1),gy=n=>XC(n,!0);function ya(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=pe.cursor(r.from+s))}return i}const aI=n=>Ii(n,e=>ya(n,e,!0)),lI=n=>Ii(n,e=>ya(n,e,!1)),uI=n=>Ii(n,e=>ya(n,e,!Hn(n))),cI=n=>Ii(n,e=>ya(n,e,Hn(n))),hI=n=>Ii(n,e=>pe.cursor(n.lineBlockAt(e.head).from,1)),fI=n=>Ii(n,e=>pe.cursor(n.lineBlockAt(e.head).to,-1));function dI(n,e,t){let r=!1,i=sc(n.selection,s=>{let o=ys(n,s.head,-1)||ys(n,s.head,1)||s.head>0&&ys(n,s.head-1,1)||s.head<n.doc.length&&ys(n,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return pe.cursor(l)});return r?(e(Di(n,i)),!0):!1}const pI=({state:n,dispatch:e})=>dI(n,e);function gi(n,e){let t=sc(n.state.selection,r=>{let i=e(r);return pe.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return t.eq(n.state.selection)?!1:(n.dispatch(Di(n.state,t)),!0)}function VC(n,e){return gi(n,t=>n.moveByChar(t,e))}const WC=n=>VC(n,!Hn(n)),FC=n=>VC(n,Hn(n));function BC(n,e){return gi(n,t=>n.moveByGroup(t,e))}const mI=n=>BC(n,!Hn(n)),gI=n=>BC(n,Hn(n)),OI=n=>gi(n,e=>fm(n.state,e,!Hn(n))),yI=n=>gi(n,e=>fm(n.state,e,Hn(n)));function YC(n,e){return gi(n,t=>n.moveVertically(t,e))}const UC=n=>YC(n,!1),qC=n=>YC(n,!0);function HC(n,e){return gi(n,t=>n.moveVertically(t,e,ZC(n).height))}const zS=n=>HC(n,!1),LS=n=>HC(n,!0),xI=n=>gi(n,e=>ya(n,e,!0)),vI=n=>gi(n,e=>ya(n,e,!1)),wI=n=>gi(n,e=>ya(n,e,!Hn(n))),kI=n=>gi(n,e=>ya(n,e,Hn(n))),SI=n=>gi(n,e=>pe.cursor(n.lineBlockAt(e.head).from)),bI=n=>gi(n,e=>pe.cursor(n.lineBlockAt(e.head).to)),DS=({state:n,dispatch:e})=>(e(Di(n,{anchor:0})),!0),IS=({state:n,dispatch:e})=>(e(Di(n,{anchor:n.doc.length})),!0),ZS=({state:n,dispatch:e})=>(e(Di(n,{anchor:n.selection.main.anchor,head:0})),!0),XS=({state:n,dispatch:e})=>(e(Di(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),PI=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),QI=({state:n,dispatch:e})=>{let t=dm(n).map(({from:r,to:i})=>pe.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:pe.create(t),userEvent:"select"})),!0},CI=({state:n,dispatch:e})=>{let t=sc(n.selection,r=>{let i=Ut(n),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<r.from&&l.to>=r.to||l.to>r.to&&l.from<=r.from)&&o.next)return pe.range(l.to,l.from)}return r});return t.eq(n.selection)?!1:(e(Di(n,t)),!0)};function GC(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let o=t.doc.lineAt(s.head);if(e?o.to<n.state.doc.length:o.from>0)for(let l=s;;){let c=n.moveVertically(l,e);if(c.head<o.from||c.head>o.to){i.some(h=>h.head==c.head)||i.push(c);break}else{if(c.head==l.head)break;l=c}}}return i.length==r.ranges.length?!1:(n.dispatch(Di(t,pe.create(i,i.length-1))),!0)}const TI=n=>GC(n,!1),$I=n=>GC(n,!0),EI=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=pe.create([t.main]):t.main.empty||(r=pe.create([pe.cursor(t.main.head)])),r?(e(Di(n,r)),!0):!1};function wf(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let c=e(s);c<o?(t="delete.backward",c=ep(n,c,!1)):c>o&&(t="delete.forward",c=ep(n,c,!0)),o=Math.min(o,c),l=Math.max(l,c)}else o=ep(n,o,!1),l=ep(n,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:pe.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Ue.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ep(n,e,t){if(n instanceof Ue)for(let r of n.state.facet(Ue.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const KC=(n,e,t)=>wf(n,r=>{let i=r.from,{state:s}=n,o=s.doc.lineAt(i),l,c;if(t&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,i-o.from))){if(l[l.length-1]==" ")return i-1;let h=eo(l,s.tabSize),f=h%zp(s)||zp(s);for(let p=0;p<f&&l[l.length-1-p]==" ";p++)i--;c=i}else c=Yn(o.text,i-o.from,e,e)+o.from,c==i&&o.number!=(e?s.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Yn(o.text,c-o.from,!1,!1)+o.from);return c}),Oy=n=>KC(n,!1,!0),JC=n=>KC(n,!0,!1),eT=(n,e)=>wf(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let c=Yn(s.text,r-s.from,e)+s.from,h=s.text.slice(Math.min(r,c)-s.from,Math.max(r,c)-s.from),f=o(h);if(l!=null&&f!=l)break;(h!=" "||r!=t.head)&&(l=f),r=c}return r}),tT=n=>eT(n,!1),MI=n=>eT(n,!0),jI=n=>wf(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),RI=n=>wf(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),AI=n=>wf(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),NI=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Et.of(["",""])},range:pe.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},_I=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),o=i==s.from?i-1:Yn(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:Yn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:n.doc.slice(i,l).append(n.doc.slice(o,i))},range:pe.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function dm(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function nT(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of dm(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),l=o.length+1;if(t){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let c of s.ranges)i.push(pe.range(Math.min(n.doc.length,c.anchor+l),Math.min(n.doc.length,c.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let c of s.ranges)i.push(pe.range(c.anchor-l,c.head-l))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:pe.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const zI=({state:n,dispatch:e})=>nT(n,e,!1),LI=({state:n,dispatch:e})=>nT(n,e,!0);function rT(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of dm(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const DI=({state:n,dispatch:e})=>rT(n,e,!1),II=({state:n,dispatch:e})=>rT(n,e,!0),ZI=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(dm(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=sc(e.selection,i=>{let s;if(n.lineWrapping){let o=n.lineBlockAt(i.head),l=n.coordsAtPos(i.head,i.assoc||1);l&&(s=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function XI(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=Ut(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(ct.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const VS=iT(!1),VI=iT(!0);function iT(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),c=!n&&s==o&&XI(e,s);n&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new cm(e,{simulateBreak:s,simulateDoubleBreak:!!c}),f=xC(h,s);for(f==null&&(f=eo(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;c?{from:s,to:o}=c:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let p=["",Lp(e,f)];return c&&p.push(Lp(e,h.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:Et.of(p)},range:pe.cursor(s+1+p[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Nx(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=n.doc.lineAt(o);l.number>t&&(r.empty||r.to>l.from)&&(e(l,i,r),t=l.number),o=l.to+1}let s=n.changes(i);return{changes:i,range:pe.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const WI=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new cm(n,{overrideIndentation:s=>{let o=t[s];return o??-1}}),i=Nx(n,(s,o,l)=>{let c=xC(r,s.from);if(c==null)return;/\S/.test(s.text)||(c=0);let h=/^\s*/.exec(s.text)[0],f=Lp(n,c);(h!=f||l.from<s.from+h.length)&&(t[s.from]=c,o.push({from:s.from,to:s.from+h.length,insert:f}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},sT=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Nx(n,(t,r)=>{r.push({from:t.from,insert:n.facet(xf)})}),{userEvent:"input.indent"})),!0),oT=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Nx(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=eo(i,n.tabSize),o=0,l=Lp(n,Math.max(0,s-zp(n)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:t.from+o,to:t.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),FI=n=>(n.setTabFocusMode(),!0),BI=[{key:"Ctrl-b",run:NC,shift:WC,preventDefault:!0},{key:"Ctrl-f",run:_C,shift:FC},{key:"Ctrl-p",run:DC,shift:UC},{key:"Ctrl-n",run:IC,shift:qC},{key:"Ctrl-a",run:hI,shift:SI},{key:"Ctrl-e",run:fI,shift:bI},{key:"Ctrl-d",run:JC},{key:"Ctrl-h",run:Oy},{key:"Ctrl-k",run:jI},{key:"Ctrl-Alt-h",run:tT},{key:"Ctrl-o",run:NI},{key:"Ctrl-t",run:_I},{key:"Ctrl-v",run:gy}],YI=[{key:"ArrowLeft",run:NC,shift:WC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:nI,shift:mI,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:uI,shift:wI,preventDefault:!0},{key:"ArrowRight",run:_C,shift:FC,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:rI,shift:gI,preventDefault:!0},{mac:"Cmd-ArrowRight",run:cI,shift:kI,preventDefault:!0},{key:"ArrowUp",run:DC,shift:UC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:DS,shift:ZS},{mac:"Ctrl-ArrowUp",run:_S,shift:zS},{key:"ArrowDown",run:IC,shift:qC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:IS,shift:XS},{mac:"Ctrl-ArrowDown",run:gy,shift:LS},{key:"PageUp",run:_S,shift:zS},{key:"PageDown",run:gy,shift:LS},{key:"Home",run:lI,shift:vI,preventDefault:!0},{key:"Mod-Home",run:DS,shift:ZS},{key:"End",run:aI,shift:xI,preventDefault:!0},{key:"Mod-End",run:IS,shift:XS},{key:"Enter",run:VS,shift:VS},{key:"Mod-a",run:PI},{key:"Backspace",run:Oy,shift:Oy,preventDefault:!0},{key:"Delete",run:JC,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:tT,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:MI,preventDefault:!0},{mac:"Mod-Backspace",run:RI,preventDefault:!0},{mac:"Mod-Delete",run:AI,preventDefault:!0}].concat(BI.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),UI=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:sI,shift:OI},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:oI,shift:yI},{key:"Alt-ArrowUp",run:zI},{key:"Shift-Alt-ArrowUp",run:DI},{key:"Alt-ArrowDown",run:LI},{key:"Shift-Alt-ArrowDown",run:II},{key:"Mod-Alt-ArrowUp",run:TI},{key:"Mod-Alt-ArrowDown",run:$I},{key:"Escape",run:EI},{key:"Mod-Enter",run:VI},{key:"Alt-l",mac:"Ctrl-l",run:QI},{key:"Mod-i",run:CI,preventDefault:!0},{key:"Mod-[",run:oT},{key:"Mod-]",run:sT},{key:"Mod-Alt-\\",run:WI},{key:"Shift-Mod-k",run:ZI},{key:"Shift-Mod-\\",run:pI},{key:"Mod-/",run:q3},{key:"Alt-A",run:G3},{key:"Ctrl-m",mac:"Shift-Alt-m",run:FI}].concat(YI),qI={key:"Tab",run:sT,shift:oT};var WS={};class Ip{constructor(e,t,r,i,s,o,l,c,h,f=0,p){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=c,this.curContext=h,this.lookAhead=f,this.parent=p}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new Ip(e,[],t,r,r,0,[],0,i?new FS(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-h;f>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let p=c?this.stack[c-1]:0,m=this.bufferBase+this.buffer.length-p;if(i<s.minRepeatTerm||e&131072){let g=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,g,m+4,!0)}if(e&262144)this.state=this.stack[c];else{let g=this.stack[c-3];this.state=s.getGoto(g,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==r)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let c=o;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let l=o.stateFlag(s,1);!l&&(i>r||t<=o.maxNode)&&(this.reducePos=i),this.pushState(s,l?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Ip(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new HI(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(t[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((l,c)=>c&1&&l==o)||i.push(t[s],o)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let c=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return l<<19|65536|c}}else{let l=r(o,s+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new FS(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class FS{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class HI{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class Zp{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Zp(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Zp(this.stack,this.pos,this.index)}}function Ph(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let o=n.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,l=!0),s+=c,l)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class fp{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const BS=new fp;class GI{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=BS,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=BS,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Eu{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;aT(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Eu.prototype.contextual=Eu.prototype.fallback=Eu.prototype.extend=!1;class Xp{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Ph(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(aT(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Xp.prototype.contextual=Eu.prototype.fallback=Eu.prototype.extend=!1;class Br{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function aT(n,e,t,r,i,s){let o=0,l=1<<r,{dialect:c}=t.p.parser;e:for(;(l&n[o])!=0;){let h=n[o+1];for(let g=o+3;g<h;g+=2)if((n[g+1]&l)>0){let w=n[g];if(c.allows(w)&&(e.token.value==-1||e.token.value==w||KI(w,e.token.value,i,s))){e.acceptToken(w);break}}let f=e.next,p=0,m=n[o+2];if(e.next<0&&m>p&&n[h+m*3-3]==65535){o=n[h+m*3-1];continue e}for(;p<m;){let g=p+m>>1,w=h+g+(g<<1),k=n[w],C=n[w+1]||65536;if(f<k)m=g;else if(f>=C)p=g+1;else{o=n[w+2],e.advance();continue e}}break}}function YS(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function KI(n,e,t,r){let i=YS(t,r,e);return i<0||YS(t,r,n)<i}const zr=typeof process<"u"&&WS&&/\bparse\b/.test(WS.LOG);let IO=null;function US(n,e,t){let r=n.cursor(Zt.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}let JI=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?US(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?US(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[t]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof Dt){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let c=s.prop(ct.lookAhead);if(!c||l+c<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};class eZ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new fp)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let f=s[h],p=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||p.start!=e.pos||p.mask!=o||p.context!=l)&&(this.updateCachedToken(p,f,e),p.mask=o,p.context=l),p.lookAhead>p.end+25&&(c=Math.max(p.lookAhead,c)),p.value!=0)){let m=t;if(p.extended>-1&&(t=this.addActions(e,p.extended,p.end,t)),t=this.addActions(e,p.value,p.end,t),!f.extend&&(r=p,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!r&&e.pos==this.stream.end&&(r=new fp,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new fp,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let c=0;c<2;c++)for(let h=o.stateSlot(s,c?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=Fs(l,h+2);else{i==0&&l[h+1]==2&&(i=this.putAction(Fs(l,h+2),t,r,i));break}l[h]==t&&(i=this.putAction(Fs(l,h+1),t,r,i))}return i}}class tZ{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new GI(t,i),this.tokens=new eZ(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Ip.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new JI(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let c=this.tokens.getMainToken(l);s.push(c.value,c.end)}}break}}if(!r.length){let o=i&&rZ(i);if(o)return zr&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw zr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return zr&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,c)=>c.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let c=o+1;c<r.length;c++){let h=r[c];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)r.splice(c--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,l)=>l.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,o=zr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(i);p;){let m=this.parser.nodeSet.types[p.type.id]==p.type?s.getGoto(e.state,p.type.id):-1;if(m>-1&&p.length&&(!h||(p.prop(ct.contextHash)||0)==f))return e.useNode(p,m),zr&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(p.type.id)})`),!0;if(!(p instanceof Dt)||p.children.length==0||p.positions[0]>0)break;let g=p.children[0];if(g instanceof Dt&&p.positions[0]==0)p=g;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),zr&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let f=c[h++],p=c[h++],m=c[h++],g=h==c.length||!r,w=g?e:e.split(),k=this.tokens.mainToken;if(w.apply(f,p,k?k.start:w.pos,m),zr&&console.log(o+this.stackID(w)+` (via ${(f&65536)==0?"shift":`reduce of ${s.getName(f&65535)}`} for ${s.getName(p)} @ ${i}${w==e?"":", split"})`),g)return!0;w.pos>i?t.push(w):r.push(w)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return qS(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],c=t[o<<1],h=t[(o<<1)+1],f=zr?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),zr&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let p=l.split(),m=f;for(let g=0;g<10&&p.forceReduce()&&(zr&&console.log(m+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,r));g++)zr&&(m=this.stackID(p)+" -> ");for(let g of l.recoverByInsert(c))zr&&console.log(f+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,r);this.stream.end>l.pos?(h==l.pos&&(h++,c=0),l.recoverByDelete(c,h),zr&&console.log(f+this.stackID(l)+` (via recover-delete ${this.parser.getName(c)})`),qS(l,r)):(!i||i.score<p.score)&&(i=p)}return i}stackToTree(e){return e.close(),Dt.build({buffer:Zp.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(IO||(IO=new WeakMap)).get(e);return t||IO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function qS(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class nZ{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const ZO=n=>n;class lT{constructor(e){this.start=e.start,this.shift=e.shift||ZO,this.reduce=e.reduce||ZO,this.reuse=e.reuse||ZO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ql extends Cx{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<t.length;l++)i.push([]);function s(l,c,h){i[l].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let c=l[0];typeof c=="string"&&(c=ct[c]);for(let h=1;h<l.length;){let f=l[h++];if(f>=0)s(f,c,l[h++]);else{let p=l[h+-f];for(let m=-f;m>0;m--)s(l[h++],c,p);h++}}}this.nodeSet=new yf(t.map((l,c)=>Cn.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=cC;let o=Ph(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(HS),this.states=Ph(e.states,Uint32Array),this.data=Ph(e.stateData),this.goto=Ph(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Eu(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new tZ(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],l=o&1,c=i[s++];if(l&&r)return c;for(let h=s+(o>>1);s<h;s++)if(i[s]==e)return c;if(l)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Fs(r,s+2)];else{if(r[s+1]==2)return Fs(r,s+2);break}if(o==t||o==0)return Fs(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Fs(this.data,s+2);else break;i=t(Fs(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Fs(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,o)=>o&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(Ql.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=HS(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new nZ(e,r,i)}static deserialize(e){return new Ql(e)}}function Fs(n,e){return n[e]|n[e+1]<<16}function rZ(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function HS(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const iZ=jl({String:N.string,Number:N.number,"True False":N.bool,PropertyName:N.propertyName,Null:N.null,", :":N.separator,"[ ]":N.squareBracket,"{ }":N.brace}),sZ=Ql.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[iZ],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),oZ=Pl.define({name:"json",parser:sZ.configure({props:[ic.add({Object:$u({except:/^\s*\}/}),Array:$u({except:/^\s*\]/})}),Rl.add({"Object Array":Mx})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function aZ(){return new Uu(oZ)}class lZ{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Ut(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(fZ(e));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function GS(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function uZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=GS(e)+GS(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function cZ(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:uZ(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function hZ(n,e){return t=>{for(let r=Ut(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}function fZ(n,e){var t;let{source:r}=n,i=r[r.length-1]!="$";return i?new RegExp(`(?:${r})${i?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":""):n}const dZ=El.define(),pZ=Ue.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class mZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class _x{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,Bn.TrackDel),r=e.mapPos(this.to,1,Bn.TrackDel);return t==null||r==null?null:new _x(this.field,t,r)}}class zx{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let c of this.lines){if(r.length){let h=o,f=/^\t*/.exec(c)[0].length;for(let p=0;p<f;p++)h+=e.facet(xf);i.push(t+h.length-f),c=h+c.slice(f)}r.push(c),t+=c.length+1}let l=this.fieldPositions.map(c=>new _x(c.field,i[c.line]+c.from,i[c.line]+c.to));return{text:r,ranges:l}}static parse(e){let t=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,c=s[2]||s[3]||"",h=-1,f=c.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<t.length;p++)(l!=null?t[p].seq==l:f&&t[p].name==f)&&(h=p);if(h<0){let p=0;for(;p<t.length&&(l==null||t[p].seq!=null&&t[p].seq<l);)p++;t.splice(p,0,{seq:l,name:f}),h=p;for(let m of i)m.field>=h&&m.field++}for(let p of i)if(p.line==r.length&&p.from>s.index){let m=s[2]?3+(s[1]||"").length:2;p.from-=m,p.to-=m}i.push(new mZ(h,r.length,s.index,s.index+f.length)),o=o.slice(0,s.index)+c+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,c,h)=>{for(let f of i)f.line==r.length&&f.from>h&&(f.from--,f.to--);return c}),r.push(o)}return new zx(r,i)}}let gZ=pt.widget({widget:new class extends Ml{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),OZ=pt.mark({class:"cm-snippetField"});class oc{constructor(e,t){this.ranges=e,this.active=t,this.deco=pt.set(e.map(r=>(r.from==r.to?gZ:OZ).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new oc(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const kf=tn.define({map(n,e){return n&&n.map(e)}}),yZ=tn.define(),Kh=ws.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(kf))return t.value;if(t.is(yZ)&&n)return new oc(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Ue.decorations.from(n,e=>e?e.deco:pt.none)});function Lx(n,e){return pe.create(n.filter(t=>t.field==e).map(t=>pe.range(t.from,t.to)))}function xZ(n){let e=zx.parse(n);return(t,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(t.state,i),{main:c}=t.state.selection,h={changes:{from:i,to:s==c.from?c.to:s,insert:Et.of(o)},scrollIntoView:!0,annotations:r?[dZ.of(r),Dn.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=Lx(l,0)),l.some(f=>f.field>0)){let f=new oc(l,0),p=h.effects=[kf.of(f)];t.state.field(Kh,!1)===void 0&&p.push(tn.appendConfig.of([Kh,bZ,PZ,pZ]))}t.dispatch(t.state.update(h))}}function uT(n){return({state:e,dispatch:t})=>{let r=e.field(Kh,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(o=>o.field==i+n);return t(e.update({selection:Lx(r.ranges,i),effects:kf.of(s?null:new oc(r.ranges,i)),scrollIntoView:!0})),!0}}const vZ=({state:n,dispatch:e})=>n.field(Kh,!1)?(e(n.update({effects:kf.of(null)})),!0):!1,wZ=uT(1),kZ=uT(-1),SZ=[{key:"Tab",run:wZ,shift:kZ},{key:"Escape",run:vZ}],KS=Ye.define({combine(n){return n.length?n[0]:SZ}}),bZ=pf.highest(um.compute([KS],n=>n.facet(KS)));function vr(n,e){return{...e,apply:xZ(n)}}const PZ=Ue.domEventHandlers({mousedown(n,e){let t=e.state.field(Kh,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:Lx(t.ranges,i.field),effects:kf.of(t.ranges.some(s=>s.field>i.field)?new oc(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Vp={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},fl=tn.define({map(n,e){let t=e.mapPos(n,-1,Bn.TrackAfter);return t??void 0}}),Dx=new class extends ua{};Dx.startSide=1;Dx.endSide=-1;const cT=ws.define({create(){return Pt.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(fl)&&(n=n.update({add:[Dx.range(t.value,t.value+1)]}));return n}});function QZ(){return[EZ,cT]}const XO="()[]{}<>«»»«[]{}";function CZ(n){for(let e=0;e<XO.length;e+=2)if(XO.charCodeAt(e)==n)return XO.charAt(e+1);return rQ(n<128?n:n+1)}function TZ(n,e){return n.languageDataAt("closeBrackets",e)[0]||Vp}const $Z=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),EZ=Ue.inputHandler.of((n,e,t,r)=>{if(($Z?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&tm(df(r,0))==1||e!=i.from||t!=i.to)return!1;let s=MZ(n.state,r);return s?(n.dispatch(s),!0):!1});function MZ(n,e){let t=TZ(n,n.selection.main.head),r=t.brackets||Vp.brackets;for(let i of r){let s=CZ(df(i,0));if(e==i)return s==i?AZ(n,i,r.indexOf(i+i+i)>-1,t):jZ(n,i,s,t.before||Vp.before);if(e==s&&hT(n,n.selection.main.from))return RZ(n,i,s)}return null}function hT(n,e){let t=!1;return n.field(cT).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Ix(n,e){let t=n.sliceString(e,e+2);return t.slice(0,tm(df(t,0)))}function jZ(n,e,t,r){let i=null,s=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:fl.of(o.to+e.length),range:pe.range(o.anchor+e.length,o.head+e.length)};let l=Ix(n.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:fl.of(o.head+e.length),range:pe.cursor(o.head+e.length)}:{range:i=o}});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function RZ(n,e,t){let r=null,i=n.changeByRange(s=>s.empty&&Ix(n.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:pe.cursor(s.head+t.length)}:r={range:s});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function AZ(n,e,t,r){let i=r.stringPrefixes||Vp.stringPrefixes,s=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:fl.of(l.to+e.length),range:pe.range(l.anchor+e.length,l.head+e.length)};let c=l.head,h=Ix(n.doc,c),f;if(h==e){if(JS(n,c))return{changes:{insert:e+e,from:c},effects:fl.of(c+e.length),range:pe.cursor(c+e.length)};if(hT(n,c)){let m=t&&n.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+m.length,insert:m},range:pe.cursor(c+m.length)}}}else{if(t&&n.sliceDoc(c-2*e.length,c)==e+e&&(f=eb(n,c-2*e.length,i))>-1&&JS(n,f))return{changes:{insert:e+e+e+e,from:c},effects:fl.of(c+e.length),range:pe.cursor(c+e.length)};if(n.charCategorizer(c)(h)!=Un.Word&&eb(n,c,i)>-1&&!NZ(n,c,e,i))return{changes:{insert:e+e,from:c},effects:fl.of(c+e.length),range:pe.cursor(c+e.length)}}return{range:s=l}});return s?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function JS(n,e){let t=Ut(n).resolveInner(e+1);return t.parent&&t.from==e}function NZ(n,e,t,r){let i=Ut(n).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),c=l.indexOf(t);if(!c||c>-1&&r.indexOf(l.slice(0,c))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>t.length+c;){if(n.sliceDoc(f.to-t.length,f.to)==t)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function eb(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Un.Word)return e;for(let i of t){let s=e-i.length;if(n.sliceDoc(s,e)==i&&r(n.sliceDoc(s-1,s))!=Un.Word)return s}return-1}class Wp{static create(e,t,r,i,s){let o=i+(i<<8)+e+(t<<4)|0;return new Wp(e,t,r,o,s,[],[])}constructor(e,t,r,i,s,o,l){this.type=e,this.value=t,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=l,this.hashProp=[[ct.contextHash,i]]}addChild(e,t){e.prop(ct.contextHash)!=this.hash&&(e=new Dt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new Dt(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,o)=>new Dt(Cn.none,i,s,o,this.hashProp)})}}var Ce;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(Ce||(Ce={}));class _Z{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class zZ{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Nh(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let i=t;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function tb(n,e,t){if(t.pos==t.text.length||n!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let r=(n.type==Ce.OrderedList?Vx:Xx)(t,e,!1);return r>0&&(n.type!=Ce.BulletList||Zx(t,e,!1)<0)&&t.text.charCodeAt(t.pos+r-1)==n.value}const fT={[Ce.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push($t(Ce.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(Oi(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[Ce.ListItem](n,e,t){return t.indent<t.baseIndent+n.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[Ce.OrderedList]:tb,[Ce.BulletList]:tb,[Ce.Document](){return!0}};function Oi(n){return n==32||n==9||n==10||n==13}function Nh(n,e=0){for(;e<n.length&&Oi(n.charCodeAt(e));)e++;return e}function nb(n,e,t){for(;e>t&&Oi(n.charCodeAt(e-1));)e--;return e}function dT(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;if(e<n.pos+3)return-1;if(n.next==96){for(let t=e;t<n.text.length;t++)if(n.text.charCodeAt(t)==96)return-1}return e}function pT(n){return n.next!=62?-1:n.text.charCodeAt(n.pos+1)==32?2:1}function Zx(n,e,t){if(n.next!=42&&n.next!=45&&n.next!=95)return-1;let r=1;for(let i=n.pos+1;i<n.text.length;i++){let s=n.text.charCodeAt(i);if(s==n.next)r++;else if(!Oi(s))return-1}return t&&n.next==45&&OT(n)>-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(wT.SetextHeading)>-1||r<3?-1:1}function mT(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function Xx(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||Oi(n.text.charCodeAt(n.pos+1)))&&(!t||mT(e,Ce.BulletList)||n.skipSpace(n.pos+2)<n.text.length)?1:-1}function Vx(n,e,t){let r=n.pos,i=n.next;for(;i>=48&&i<=57;){r++;if(r==n.text.length)return-1;i=n.text.charCodeAt(r)}return r==n.pos||r>n.pos+9||i!=46&&i!=41||r<n.text.length-1&&!Oi(n.text.charCodeAt(r+1))||t&&!mT(e,Ce.OrderedList)&&(n.skipSpace(r+1)==n.text.length||r>n.pos+1||n.next!=49)?-1:r+1-n.pos}function gT(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==35;)e++;if(e<n.text.length&&n.text.charCodeAt(e)!=32)return-1;let t=e-n.pos;return t>6?-1:t}function OT(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;let t=e;for(;e<n.text.length&&Oi(n.text.charCodeAt(e));)e++;return e==n.text.length?t:-1}const yy=/^[ \t]*$/,yT=/-->/,xT=/\?>/,xy=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,yT],[/^\s*<\?/,xT],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,yy],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,yy]];function vT(n,e,t){if(n.next!=60)return-1;let r=n.text.slice(n.pos);for(let i=0,s=xy.length-(t?1:0);i<s;i++)if(xy[i][0].test(r))return i;return-1}function rb(n,e){let t=n.countIndent(e,n.pos,n.indent),r=n.countIndent(n.skipSpace(e),e,t);return r>=t+5?t+1:r}function Yo(n,e,t){let r=n.length-1;r>=0&&n[r].to==e&&n[r].type==Ce.CodeText?n[r].to=t:n.push($t(Ce.CodeText,e,t))}const tp={LinkReference:void 0,IndentedCode(n,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let r=e.findColumn(t),i=n.lineStart+r,s=n.lineStart+e.text.length,o=[],l=[];for(Yo(o,i,s);n.nextLine()&&e.depth>=n.stack.length;)if(e.pos==e.text.length){Yo(l,n.lineStart-1,n.lineStart);for(let c of e.markers)l.push(c)}else{if(e.indent<t)break;{if(l.length){for(let h of l)h.type==Ce.CodeText?Yo(o,h.from,h.to):o.push(h);l=[]}Yo(o,n.lineStart-1,n.lineStart);for(let h of e.markers)o.push(h);s=n.lineStart+e.text.length;let c=n.lineStart+e.findColumn(e.baseIndent+4);c<s&&Yo(o,c,s)}}return l.length&&(l=l.filter(c=>c.type!=Ce.CodeText),l.length&&(e.markers=l.concat(e.markers))),n.addNode(n.buffer.writeElements(o,-i).finish(Ce.CodeBlock,s-i),i),!0},FencedCode(n,e){let t=dT(e);if(t<0)return!1;let r=n.lineStart+e.pos,i=e.next,s=t-e.pos,o=e.skipSpace(t),l=nb(e.text,e.text.length,o),c=[$t(Ce.CodeMark,r,r+s)];o<l&&c.push($t(Ce.CodeInfo,n.lineStart+o,n.lineStart+l));for(let h=!0,f=!0,p=!1;n.nextLine()&&e.depth>=n.stack.length;h=!1){let m=e.pos;if(e.indent-e.baseIndent<4)for(;m<e.text.length&&e.text.charCodeAt(m)==i;)m++;if(m-e.pos>=s&&e.skipSpace(m)==e.text.length){for(let g of e.markers)c.push(g);f&&p&&Yo(c,n.lineStart-1,n.lineStart),c.push($t(Ce.CodeMark,n.lineStart+e.pos,n.lineStart+m)),n.nextLine();break}else{p=!0,h||(Yo(c,n.lineStart-1,n.lineStart),f=!1);for(let k of e.markers)c.push(k);let g=n.lineStart+e.basePos,w=n.lineStart+e.text.length;g<w&&(Yo(c,g,w),f=!1)}}return n.addNode(n.buffer.writeElements(c,-r).finish(Ce.FencedCode,n.prevLineEnd()-r),r),!0},Blockquote(n,e){let t=pT(e);return t<0?!1:(n.startContext(Ce.Blockquote,e.pos),n.addNode(Ce.QuoteMark,n.lineStart+e.pos,n.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(n,e){if(Zx(e,n,!1)<0)return!1;let t=n.lineStart+e.pos;return n.nextLine(),n.addNode(Ce.HorizontalRule,t),!0},BulletList(n,e){let t=Xx(e,n,!1);if(t<0)return!1;n.block.type!=Ce.BulletList&&n.startContext(Ce.BulletList,e.basePos,e.next);let r=rb(e,e.pos+1);return n.startContext(Ce.ListItem,e.basePos,r-e.baseIndent),n.addNode(Ce.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},OrderedList(n,e){let t=Vx(e,n,!1);if(t<0)return!1;n.block.type!=Ce.OrderedList&&n.startContext(Ce.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let r=rb(e,e.pos+t);return n.startContext(Ce.ListItem,e.basePos,r-e.baseIndent),n.addNode(Ce.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},ATXHeading(n,e){let t=gT(e);if(t<0)return!1;let r=e.pos,i=n.lineStart+r,s=nb(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!Oi(e.text.charCodeAt(o-1)))&&(o=e.text.length);let l=n.buffer.write(Ce.HeaderMark,0,t).writeElements(n.parser.parseInline(e.text.slice(r+t+1,o),i+t+1),-i);o<e.text.length&&l.write(Ce.HeaderMark,o-r,s-r);let c=l.finish(Ce.ATXHeading1-1+t,e.text.length-r);return n.nextLine(),n.addNode(c,i),!0},HTMLBlock(n,e){let t=vT(e,n,!1);if(t<0)return!1;let r=n.lineStart+e.pos,i=xy[t][1],s=[],o=i!=yy;for(;!i.test(e.text)&&n.nextLine();){if(e.depth<n.stack.length){o=!1;break}for(let h of e.markers)s.push(h)}o&&n.nextLine();let l=i==yT?Ce.CommentBlock:i==xT?Ce.ProcessingInstructionBlock:Ce.HTMLBlock,c=n.prevLineEnd();return n.addNode(n.buffer.writeElements(s,-r).finish(l,c-r),r),!0},SetextHeading:void 0};class LZ{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let i=r.content+`
|
|
321
|
+
`+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Nh(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,r){return e.addLeafElement(t,$t(Ce.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(ET(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push($t(Ce.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(TT(e,Nh(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Nh(e,this.pos),r=0;if(t>this.pos){let i=$T(e,t,this.start);if(i){let s=VO(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=VO(e,this.pos)),r>0&&r<e.length?r:-1}else return VO(e,this.pos)}}}function VO(n,e){for(;e<n.length;e++){let t=n.charCodeAt(e);if(t==10)break;if(!Oi(t))return-1}return e}class DZ{nextLine(e,t,r){let i=t.depth<e.stack.length?-1:OT(t),s=t.next;if(i<0)return!1;let o=$t(Ce.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,$t(s==61?Ce.SetextHeading1:Ce.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const wT={LinkReference(n,e){return e.content.charCodeAt(0)==91?new LZ(e):null},SetextHeading(){return new DZ}},IZ=[(n,e)=>gT(e)>=0,(n,e)=>dT(e)>=0,(n,e)=>pT(e)>=0,(n,e)=>Xx(e,n,!0)>=0,(n,e)=>Vx(e,n,!0)>=0,(n,e)=>Zx(e,n,!0)>=0,(n,e)=>vT(e,n,!0)>=0],ZZ={text:"",end:0};class XZ{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.line=new zZ,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=Wp.create(Ce.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new FZ(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new _Z(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
|
|
322
|
+
`+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=MT(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=ZZ;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);t.end=s+o.length,t.text=t.text.slice(0,this.ranges[i-1].to-r)+o,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+Ce[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(this.input.lineChunks)r=t==`
|
|
323
|
+
`?"":t;else{let i=t.indexOf(`
|
|
324
|
+
`);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=Wp.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new Dt(this.parser.nodeSet.types[e],qu,qu,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(wy(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?kT(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=wy(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Ce.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?$t(this.parser.getNodeType(e),t,r,i):new PT(e,t)}get buffer(){return new bT(this.parser.nodeSet)}}function kT(n,e,t,r,i){let s=n[e].to,o=[],l=[],c=t.from+r;function h(f,p){for(;p?f>=s:f>s;){let m=n[e+1].from-s;r+=m,f+=m,e++,s=n[e].to}}for(let f=t.firstChild;f;f=f.nextSibling){h(f.from+r,!0);let p=f.from+r,m,g=i.get(f.tree);g?m=g:f.to+r>s?(m=kT(n,e,f,r,i),h(f.to+r,!1)):m=f.toTree(),o.push(m),l.push(p-c)}return h(t.to+r,!1),new Dt(t.type,o,l,t.to+r-c,t.tree?t.tree.propValues:void 0)}class pm extends Cx{constructor(e,t,r,i,s,o,l,c,h){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=c,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,t,r){let i=new XZ(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}configure(e){let t=vy(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),p=this.wrappers;if(xh(t.defineNodes)){i=Object.assign({},i);let m=r.types.slice(),g;for(let w of t.defineNodes){let{name:k,block:C,composite:Q,style:M}=typeof w=="string"?{name:w}:w;if(m.some(U=>U.name==k))continue;Q&&(i[m.length]=(U,_,R)=>Q(_,R,U.value));let E=m.length,I=Q?["Block","BlockContext"]:C?E>=Ce.ATXHeading1&&E<=Ce.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;m.push(Cn.define({id:E,name:k,props:I&&[[ct.group,I]]})),M&&(g||(g={}),Array.isArray(M)||M instanceof Wr?g[k]=M:Object.assign(g,M))}r=new yf(m),g&&(r=r.extend(jl(g)))}if(xh(t.props)&&(r=r.extend(...t.props)),xh(t.remove))for(let m of t.remove){let g=this.blockNames.indexOf(m),w=this.inlineNames.indexOf(m);g>-1&&(s[g]=o[g]=void 0),w>-1&&(c[w]=void 0)}if(xh(t.parseBlock))for(let m of t.parseBlock){let g=l.indexOf(m.name);if(g>-1)s[g]=m.parse,o[g]=m.leaf;else{let w=m.before?np(l,m.before):m.after?np(l,m.after)+1:l.length-1;s.splice(w,0,m.parse),o.splice(w,0,m.leaf),l.splice(w,0,m.name)}m.endLeaf&&f.push(m.endLeaf)}if(xh(t.parseInline))for(let m of t.parseInline){let g=h.indexOf(m.name);if(g>-1)c[g]=m.parse;else{let w=m.before?np(h,m.before):m.after?np(h,m.after)+1:h.length-1;c.splice(w,0,m.parse),h.splice(w,0,m.name)}}return t.wrap&&(p=p.concat(t.wrap)),new pm(r,s,o,l,f,i,c,h,p)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new Wx(this,e,t);e:for(let i=t;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let l=o(r,s,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function xh(n){return n!=null&&n.length>0}function vy(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=vy(n[0]);if(n.length==1)return e;let t=vy(n.slice(1));if(!t||!e)return e||t;let r=(o,l)=>(o||qu).concat(l||qu),i=e.wrap,s=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?s?(o,l,c,h)=>i(s(o,l,c,h),l,c,h):i:s}}function np(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let ST=[Cn.none];for(let n=1,e;e=Ce[n];n++)ST[n]=Cn.define({id:n,name:e,props:n>=Ce.Escape?[]:[[ct.group,n in fT?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const qu=[];class bT{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return Dt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let Jh=class{constructor(e,t,r,i=qu){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new bT(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class PT{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return qu}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function $t(n,e,t,r){return new Jh(n,e,t,r)}const QT={resolve:"Emphasis",mark:"EmphasisMark"},CT={resolve:"Emphasis",mark:"EmphasisMark"},al={},Fp={};class Zr{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const ib="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let ef=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{ef=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const WO={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i<ib.length;i++)if(ib.charCodeAt(i)==r)return n.append($t(Ce.Escape,t,t+2));return-1},Entity(n,e,t){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(n.slice(t+1,t+31));return r?n.append($t(Ce.Entity,t,t+1+r[0].length)):-1},InlineCode(n,e,t){if(e!=96||t&&n.char(t-1)==96)return-1;let r=t+1;for(;r<n.end&&n.char(r)==96;)r++;let i=r-t,s=0;for(;r<n.end;r++)if(n.char(r)==96){if(s++,s==i&&n.char(r+1)!=96)return n.append($t(Ce.InlineCode,t,r+1,[$t(Ce.CodeMark,t,t+i),$t(Ce.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(n,e,t){if(e!=60||t==n.end-1)return-1;let r=n.slice(t+1,n.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append($t(Ce.Autolink,t,t+1+i[0].length,[$t(Ce.LinkMark,t,t+1),$t(Ce.URL,t+1,t+i[0].length),$t(Ce.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return n.append($t(Ce.Comment,t,t+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return n.append($t(Ce.ProcessingInstruction,t,t+1+o[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return l?n.append($t(Ce.HTMLTag,t,t+1+l[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),s=n.slice(r,r+1),o=ef.test(i),l=ef.test(s),c=/\s|^$/.test(i),h=/\s|^$/.test(s),f=!h&&(!l||c||o),p=!c&&(!o||h||l),m=f&&(e==42||!p||o),g=p&&(e==42||!f||l);return n.append(new Zr(e==95?QT:CT,t,r,(m?1:0)|(g?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append($t(Ce.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append($t(Ce.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new Zr(al,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Zr(Fp,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof Zr&&(i.type==al||i.type==Fp)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let s=n.takeContent(r),o=n.parts[r]=VZ(n,s,i.type==al?Ce.Link:Ce.Image,i.from,t+1);if(i.type==al)for(let l=0;l<r;l++){let c=n.parts[l];c instanceof Zr&&c.type==al&&(c.side=0)}return o.to}}return-1}};function VZ(n,e,t,r,i){let{text:s}=n,o=n.char(i),l=i;if(e.unshift($t(Ce.LinkMark,r,r+(t==Ce.Image?2:1))),e.push($t(Ce.LinkMark,i-1,i)),o==40){let c=n.skipSpace(i+1),h=TT(s,c-n.offset,n.offset),f;h&&(c=n.skipSpace(h.to),c!=h.to&&(f=$T(s,c-n.offset,n.offset),f&&(c=n.skipSpace(f.to)))),n.char(c)==41&&(e.push($t(Ce.LinkMark,i,i+1)),l=c+1,h&&e.push(h),f&&e.push(f),e.push($t(Ce.LinkMark,c,l)))}else if(o==91){let c=ET(s,i-n.offset,n.offset,!1);c&&(e.push(c),l=c.to)}return $t(t,r,l,e)}function TT(n,e,t){if(n.charCodeAt(e)==60){for(let i=e+1;i<n.length;i++){let s=n.charCodeAt(i);if(s==62)return $t(Ce.URL,e+t,i+1+t);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<n.length;s++){let l=n.charCodeAt(s);if(Oi(l))break;if(o)o=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(o=!0)}return s>e?$t(Ce.URL,e+t,s+t):s==n.length?null:!1}}function $T(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<n.length;s++){let l=n.charCodeAt(s);if(o)o=!1;else{if(l==i)return $t(Ce.LinkTitle,e+t,s+1+t);l==92&&(o=!0)}}return null}function ET(n,e,t,r){for(let i=!1,s=e+1,o=Math.min(n.length,s+999);s<o;s++){let l=n.charCodeAt(s);if(i)i=!1;else{if(l==93)return r?!1:$t(Ce.LinkLabel,e+t,s+1+t);if(r&&!Oi(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class Wx{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,s){return this.append(new Zr(e,t,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Zr&&(t.type==al||t.type==Fp))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Zr&&i.type.resolve&&i.side&2))continue;let s=i.type==QT||i.type==CT,o=i.to-i.from,l,c=r-1;for(;c>=e;c--){let k=this.parts[c];if(k instanceof Zr&&k.side&1&&k.type==i.type&&!(s&&(i.side&1||k.side&2)&&(k.to-k.from+o)%3==0&&((k.to-k.from)%3||o%3))){l=k;break}}if(!l)continue;let h=i.type.resolve,f=[],p=l.from,m=i.to;if(s){let k=Math.min(2,l.to-l.from,o);p=l.to-k,m=i.from+k,h=k==1?"Emphasis":"StrongEmphasis"}l.type.mark&&f.push(this.elt(l.type.mark,p,l.to));for(let k=c+1;k<r;k++)this.parts[k]instanceof Jh&&f.push(this.parts[k]),this.parts[k]=null;i.type.mark&&f.push(this.elt(i.type.mark,i.from,m));let g=this.elt(h,p,m,f);this.parts[c]=s&&l.from!=p?new Zr(l.type,l.from,p,l.side):null,(this.parts[r]=s&&i.to!=m?new Zr(i.type,m,i.to,i.side):null)?this.parts.splice(r,0,g):this.parts[r]=g}let t=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof Jh&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Zr&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Zr?t:null}skipSpace(e){return Nh(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?$t(this.parser.getNodeType(e),t,r,i):new PT(e,t)}}Wx.linkStart=al;Wx.imageStart=Fp;function wy(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r<t.length&&t[r].to<i.to;)r++;if(r<t.length&&t[r].from<i.from){let s=t[r];s instanceof Jh&&(t[r]=new Jh(s.type,s.from,s.to,wy(s.children,[i])))}else t.splice(r++,0,i)}return t}const WZ=[Ce.CodeBlock,Ce.ListItem,Ce.OrderedList,Ce.BulletList];class FZ{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
|
|
325
|
+
`;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ct.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,c=o,h=l;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let f=MT(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,f);else{let p=new Dt(e.parser.nodeSet.types[Ce.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,f)}if(t.type.is("Block")&&(WZ.indexOf(t.type.id)<0?(o=t.to-r,l=e.block.children.length):(o=c,l=h),c=t.to-r,h=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}}function MT(n,e){let t=n;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<n&&(t-=s-i)}return t}const BZ=jl({"Blockquote/...":N.quote,HorizontalRule:N.contentSeparator,"ATXHeading1/... SetextHeading1/...":N.heading1,"ATXHeading2/... SetextHeading2/...":N.heading2,"ATXHeading3/...":N.heading3,"ATXHeading4/...":N.heading4,"ATXHeading5/...":N.heading5,"ATXHeading6/...":N.heading6,"Comment CommentBlock":N.comment,Escape:N.escape,Entity:N.character,"Emphasis/...":N.emphasis,"StrongEmphasis/...":N.strong,"Link/... Image/...":N.link,"OrderedList/... BulletList/...":N.list,"BlockQuote/...":N.quote,"InlineCode CodeText":N.monospace,"URL Autolink":N.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":N.processingInstruction,"CodeInfo LinkLabel":N.labelName,LinkTitle:N.string,Paragraph:N.content}),YZ=new pm(new yf(ST).extend(BZ),Object.keys(tp).map(n=>tp[n]),Object.keys(tp).map(n=>wT[n]),Object.keys(tp),IZ,fT,Object.keys(WO).map(n=>WO[n]),Object.keys(WO),[]);function UZ(n,e,t){let r=[];for(let i=n.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:t;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function qZ(n){let{codeParser:e,htmlParser:t}=n;return{wrap:mC((i,s)=>{let o=i.type.id;if(e&&(o==Ce.CodeBlock||o==Ce.FencedCode)){let l="";if(o==Ce.FencedCode){let h=i.node.getChild(Ce.CodeInfo);h&&(l=s.read(h.from,h.to))}let c=e(l);if(c)return{parser:c,overlay:h=>h.type.id==Ce.CodeText,bracketed:o==Ce.FencedCode}}else if(t&&(o==Ce.HTMLBlock||o==Ce.HTMLTag||o==Ce.CommentBlock))return{parser:t,overlay:UZ(i.node,i.from,i.to)};return null})}}const HZ={resolve:"Strikethrough",mark:"StrikethroughMark"},GZ={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":N.strikethrough}},{name:"StrikethroughMark",style:N.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),l=ef.test(r),c=ef.test(i);return n.addDelimiter(HZ,t,t+2,!o&&(!c||s||l),!s&&(!l||o||c))},after:"Emphasis"}]};function _h(n,e,t=0,r,i=0){let s=0,o=!0,l=-1,c=-1,h=!1,f=()=>{r.push(n.elt("TableCell",i+l,i+c,n.parser.parseInline(e.slice(l,c),i+l)))};for(let p=t;p<e.length;p++){let m=e.charCodeAt(p);m==124&&!h?((!o||l>-1)&&s++,o=!1,r&&(l>-1&&f(),r.push(n.elt("TableDelimiter",p+i,p+i+1))),l=c=-1):(h||m!=32&&m!=9)&&(l<0&&(l=p),c=p+1),h=!h&&m==92}return l>-1&&(s++,r&&f()),s}function sb(n,e){for(let t=e;t<n.length;t++){let r=n.charCodeAt(t);if(r==124)return!0;r==92&&t++}return!1}const jT=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class ob{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&jT.test(i=t.text.slice(t.pos))){let s=[];_h(e,r.content,0,s,r.start)==_h(e,i,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];_h(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const KZ={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":N.heading}},"TableRow",{name:"TableCell",style:N.content},{name:"TableDelimiter",style:N.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return sb(e.content,0)?new ob:null},endLeaf(n,e,t){if(t.parsers.some(i=>i instanceof ob)||!sb(e.text,e.basePos))return!1;let r=n.peekLine();return jT.test(r)&&_h(n,e.text,e.basePos)==_h(n,r,e.basePos)},before:"SetextHeading"}]};class JZ{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const eX={defineNodes:[{name:"Task",block:!0,style:N.list},{name:"TaskMarker",style:N.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new JZ:null},after:"SetextHeading"}]},ab=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,lb=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,tX=/[\w-]+\.[\w-]+($|\/)/,ub=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,cb=/\/[a-zA-Z\d@.]+/gy;function hb(n,e,t,r){let i=0;for(let s=e;s<t;s++)n[s]==r&&i++;return i}function nX(n,e){lb.lastIndex=e;let t=lb.exec(n);if(!t||tX.exec(t[0])[0].indexOf("_")>-1)return-1;let r=e+t[0].length;for(;;){let i=n[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&hb(n,e,r,")")>hb(n,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+s.index;else break}return r}function fb(n,e){ub.lastIndex=e;let t=ub.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const rX={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;if(r&&/\w/.test(n.text[r-1]))return-1;ab.lastIndex=r;let i=ab.exec(n.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=nX(n.text,r+i[0].length),s>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(r,s));s=r+o[0].length}}else i[3]?s=fb(n.text,r):(s=fb(n.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(cb.lastIndex=s,i=cb.exec(n.text),i&&(s=i.index+i[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},iX=[KZ,eX,GZ,rX];function RT(n,e,t){return(r,i,s)=>{if(i!=n||r.char(s+1)==n)return-1;let o=[r.elt(t,s,s+1)];for(let l=s+1;l<r.end;l++){let c=r.char(l);if(c==n)return r.addElement(r.elt(e,s,l+1,o.concat(r.elt(t,l,l+1))));if(c==92&&o.push(r.elt("Escape",l,l+++2)),Oi(c))break}return-1}}const sX={defineNodes:[{name:"Superscript",style:N.special(N.content)},{name:"SuperscriptMark",style:N.processingInstruction}],parseInline:[{name:"Superscript",parse:RT(94,"Superscript","SuperscriptMark")}]},oX={defineNodes:[{name:"Subscript",style:N.special(N.content)},{name:"SubscriptMark",style:N.processingInstruction}],parseInline:[{name:"Subscript",parse:RT(126,"Subscript","SubscriptMark")}]},aX={defineNodes:[{name:"Emoji",style:N.character}],parseInline:[{name:"Emoji",parse(n,e,t){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(n.slice(t+1,n.end)))?-1:n.addElement(n.elt("Emoji",t,t+1+r[0].length))}}]},lX=55,uX=1,cX=56,hX=2,fX=57,dX=3,db=4,pX=5,Fx=6,AT=7,NT=8,_T=9,zT=10,mX=11,gX=12,OX=13,FO=58,yX=14,xX=15,pb=59,LT=21,vX=23,DT=24,wX=25,ky=27,IT=28,kX=29,SX=32,bX=35,PX=37,QX=38,CX=0,TX=1,$X={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},EX={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},mb={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function MX(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let gb=null,Ob=null,yb=0;function Sy(n,e){let t=n.pos+e;if(yb==t&&Ob==n)return gb;let r=n.peek(e),i="";for(;MX(r);)i+=String.fromCharCode(r),r=n.peek(++e);return Ob=n,yb=t,gb=i?i.toLowerCase():r==jX||r==RX?void 0:null}const ZT=60,Bp=62,Bx=47,jX=63,RX=33,AX=45;function xb(n,e){this.name=n,this.parent=e}const NX=[Fx,zT,AT,NT,_T],_X=new lT({start:null,shift(n,e,t,r){return NX.indexOf(e)>-1?new xb(Sy(r,1)||"",n):n},reduce(n,e){return e==LT&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==Fx||i==PX?new xb(Sy(r,1)||"",n):n},strict:!1}),zX=new Br((n,e)=>{if(n.next!=ZT){n.next<0&&e.context&&n.acceptToken(FO);return}n.advance();let t=n.next==Bx;t&&n.advance();let r=Sy(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?xX:yX);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(mX);if(i&&EX[i])return n.acceptToken(FO,-2);if(e.dialectEnabled(CX))return n.acceptToken(gX);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(OX)}else{if(r=="script")return n.acceptToken(AT);if(r=="style")return n.acceptToken(NT);if(r=="textarea")return n.acceptToken(_T);if($X.hasOwnProperty(r))return n.acceptToken(zT);i&&mb[i]&&mb[i][r]?n.acceptToken(FO,-1):n.acceptToken(Fx)}},{contextual:!0}),LX=new Br(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(pb);break}if(n.next==AX)e++;else if(n.next==Bp&&e>=2){t>=3&&n.acceptToken(pb,-2);break}else e=0;n.advance()}});function DX(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const IX=new Br((n,e)=>{if(n.next==Bx&&n.peek(1)==Bp){let t=e.dialectEnabled(TX)||DX(e.context);n.acceptToken(t?pX:db,2)}else n.next==Bp&&n.acceptToken(db,1)});function Yx(n,e,t){let r=2+n.length;return new Br(i=>{for(let s=0,o=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==ZT||s==1&&i.next==Bx||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==Bp){l>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const ZX=Yx("script",lX,uX),XX=Yx("style",cX,hX),VX=Yx("textarea",fX,dX),WX=jl({"Text RawText IncompleteTag IncompleteCloseTag":N.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":N.angleBracket,TagName:N.tagName,"MismatchedCloseTag/TagName":[N.tagName,N.invalid],AttributeName:N.attributeName,"AttributeValue UnquotedAttributeValue":N.attributeValue,Is:N.definitionOperator,"EntityReference CharacterReference":N.character,Comment:N.blockComment,ProcessingInst:N.processingInstruction,DoctypeDecl:N.documentMeta}),FX=Ql.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!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^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:_X,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[WX],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=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6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[ZX,XX,VX,IX,zX,LX,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function XT(n,e){let t=Object.create(null);for(let r of n.getChildren(DT)){let i=r.getChild(wX),s=r.getChild(ky)||r.getChild(IT);i&&(t[e.read(i.from,i.to)]=s?s.type.id==ky?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function vb(n,e){let t=n.getChild(vX);return t?e.read(t.from,t.to):" "}function BO(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=XT(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function VT(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let l of n)(l.tag=="script"?t:l.tag=="style"?r:l.tag=="textarea"?i:s).push(l);let o=e.length?Object.create(null):null;for(let l of e)(o[l.name]||(o[l.name]=[])).push(l);return mC((l,c)=>{let h=l.type.id;if(h==kX)return BO(l,c,t);if(h==SX)return BO(l,c,r);if(h==bX)return BO(l,c,i);if(h==LT&&s.length){let f=l.node,p=f.firstChild,m=p&&vb(p,c),g;if(m){for(let w of s)if(w.tag==m&&(!w.attrs||w.attrs(g||(g=XT(p,c))))){let k=f.lastChild,C=k.type.id==QX?k.from:f.to;if(C>p.to)return{parser:w.parser,overlay:[{from:p.to,to:C}]}}}}if(o&&h==DT){let f=l.node,p;if(p=f.firstChild){let m=o[c.read(p.from,p.to)];if(m)for(let g of m){if(g.tagName&&g.tagName!=vb(f.parent,c))continue;let w=f.lastChild;if(w.type.id==ky){let k=w.from+1,C=w.lastChild,Q=w.to-(C&&C.isError?0:1);if(Q>k)return{parser:g.parser,overlay:[{from:k,to:Q}],bracketed:!0}}else if(w.type.id==IT)return{parser:g.parser,overlay:[{from:w.from,to:w.to}]}}}}return null})}const BX=135,wb=1,YX=136,UX=137,WT=2,qX=138,HX=3,GX=4,FT=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],KX=58,JX=40,BT=95,e6=91,dp=45,t6=46,n6=35,r6=37,i6=38,s6=92,o6=10,a6=42;function tf(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function Ux(n){return n>=48&&n<=57}function kb(n){return Ux(n)||n>=97&&n<=102||n>=65&&n<=70}const YT=(n,e,t)=>(r,i)=>{for(let s=!1,o=0,l=0;;l++){let{next:c}=r;if(tf(c)||c==dp||c==BT||s&&Ux(c))!s&&(c!=dp||l>0)&&(s=!0),o===l&&c==dp&&o++,r.advance();else if(c==s6&&r.peek(1)!=o6){if(r.advance(),kb(r.next)){do r.advance();while(kb(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(WT)?e:c==JX?t:n);break}}},l6=new Br(YT(YX,WT,UX),{contextual:!0}),u6=new Br(YT(qX,HX,GX),{contextual:!0}),c6=new Br(n=>{if(FT.includes(n.peek(-1))){let{next:e}=n;(tf(e)||e==BT||e==n6||e==t6||e==a6||e==e6||e==KX&&tf(n.peek(1))||e==dp||e==i6)&&n.acceptToken(BX)}}),h6=new Br(n=>{if(!FT.includes(n.peek(-1))){let{next:e}=n;if(e==r6&&(n.advance(),n.acceptToken(wb)),tf(e)){do n.advance();while(tf(n.next)||Ux(n.next));n.acceptToken(wb)}}}),f6=jl({"AtKeyword import charset namespace keyframes media supports font-feature-values":N.definitionKeyword,"from to selector scope MatchFlag":N.keyword,NamespaceName:N.namespace,KeyframeName:N.labelName,KeyframeRangeName:N.operatorKeyword,TagName:N.tagName,ClassName:N.className,PseudoClassName:N.constant(N.className),IdName:N.labelName,"FeatureName PropertyName":N.propertyName,AttributeName:N.attributeName,NumberLiteral:N.number,KeywordQuery:N.keyword,UnaryQueryOp:N.operatorKeyword,"CallTag ValueName FontName":N.atom,VariableName:N.variableName,Callee:N.operatorKeyword,Unit:N.unit,"UniversalSelector NestingSelector":N.definitionOperator,"MatchOp CompareOp":N.compareOperator,"ChildOp SiblingOp, LogicOp":N.logicOperator,BinOp:N.arithmeticOperator,Important:N.modifier,Comment:N.blockComment,ColorLiteral:N.color,"ParenthesizedContent StringLiteral":N.string,":":N.punctuation,"PseudoOp #":N.derefOperator,"; , |":N.separator,"( )":N.paren,"[ ]":N.squareBracket,"{ }":N.brace}),d6={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},p6={__proto__:null,or:104,and:104,not:112,only:112,layer:186},m6={__proto__:null,selector:118,layer:182},g6={__proto__:null,"@import":178,"@media":190,"@charset":194,"@namespace":198,"@keyframes":204,"@supports":216,"@scope":220,"@font-feature-values":226},O6={__proto__:null,to:223},y6=Ql.deserialize({version:14,states:"IpQYQdOOO#}QdOO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versalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:159,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[f6],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$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jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!e`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[c6,h6,l6,u6,1,2,3,4,new Xp("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~",28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:n=>d6[n]||-1},{term:138,get:n=>p6[n]||-1},{term:4,get:n=>m6[n]||-1},{term:28,get:n=>g6[n]||-1},{term:136,get:n=>O6[n]||-1}],tokenPrec:2256});let YO=null;function UO(){if(!YO&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));YO=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return YO||[]}const Sb=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),bb=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),x6=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),v6=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),Vs=/^(\w[\w-]*|-\w[\w-]*|)$/,w6=/^-(-[\w-]*)?$/;function k6(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const Pb=new pC,S6=["Declaration"];function b6(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function UT(n,e,t){if(e.to-e.from>4096){let r=Pb.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Zt.IncludeAnonymous);if(o.firstChild())do for(let l of UT(n,o.node,t))s.has(l.label)||(s.add(l.label),i.push(l));while(o.nextSibling());return Pb.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(S6)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=n.sliceString(s.from,s.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const P6=n=>e=>{let{state:t,pos:r}=e,i=Ut(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:UO(),validFor:Vs};if(i.name=="ValueName")return{from:i.from,options:bb,validFor:Vs};if(i.name=="PseudoClassName")return{from:i.from,options:Sb,validFor:Vs};if(n(i)||(e.explicit||s)&&k6(i,t.doc))return{from:n(i)||s?i.from:r,options:UT(t.doc,b6(i),n),validFor:w6};if(i.name=="TagName"){for(let{parent:c}=i;c;c=c.parent)if(c.name=="Block")return{from:i.from,options:UO(),validFor:Vs};return{from:i.from,options:x6,validFor:Vs}}if(i.name=="AtKeyword")return{from:i.from,options:v6,validFor:Vs};if(!e.explicit)return null;let o=i.resolve(r),l=o.childBefore(r);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:Sb,validFor:Vs}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:bb,validFor:Vs}:o.name=="Block"||o.name=="Styles"?{from:r,options:UO(),validFor:Vs}:null},Q6=P6(n=>n.name=="VariableName"),Yp=Pl.define({name:"css",parser:y6.configure({props:[ic.add({Declaration:$u()}),Rl.add({"Block KeyframeList":Mx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function C6(){return new Uu(Yp,Yp.data.of({autocomplete:Q6}))}const T6=316,$6=317,Qb=1,E6=2,M6=3,j6=4,R6=318,A6=320,N6=321,_6=5,z6=6,L6=0,by=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],qT=125,D6=59,Py=47,I6=42,Z6=43,X6=45,V6=60,W6=44,F6=63,B6=46,Y6=91,U6=new lT({start:!1,shift(n,e){return e==_6||e==z6||e==A6?n:e==N6},strict:!1}),q6=new Br((n,e)=>{let{next:t}=n;(t==qT||t==-1||e.context)&&n.acceptToken(R6)},{contextual:!0,fallback:!0}),H6=new Br((n,e)=>{let{next:t}=n,r;by.indexOf(t)>-1||t==Py&&((r=n.peek(1))==Py||r==I6)||t!=qT&&t!=D6&&t!=-1&&!e.context&&n.acceptToken(T6)},{contextual:!0}),G6=new Br((n,e)=>{n.next==Y6&&!e.context&&n.acceptToken($6)},{contextual:!0}),K6=new Br((n,e)=>{let{next:t}=n;if(t==Z6||t==X6){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(Qb);n.acceptToken(r?Qb:E6)}}else t==F6&&n.peek(1)==B6&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(M6))},{contextual:!0});function qO(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const J6=new Br((n,e)=>{if(n.next!=V6||!e.dialectEnabled(L6)||(n.advance(),n.next==Py))return;let t=0;for(;by.indexOf(n.next)>-1;)n.advance(),t++;if(qO(n.next,!0)){for(n.advance(),t++;qO(n.next,!1);)n.advance(),t++;for(;by.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==W6)return;for(let r=0;;r++){if(r==7){if(!qO(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(j6,-t)}),eV=jl({"get set async static":N.modifier,"for while do if else switch try catch finally return throw break continue default case defer":N.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":N.operatorKeyword,"let var const using function class extends":N.definitionKeyword,"import export from":N.moduleKeyword,"with debugger new":N.keyword,TemplateString:N.special(N.string),super:N.atom,BooleanLiteral:N.bool,this:N.self,null:N.null,Star:N.modifier,VariableName:N.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":N.function(N.variableName),VariableDefinition:N.definition(N.variableName),Label:N.labelName,PropertyName:N.propertyName,PrivatePropertyName:N.special(N.propertyName),"CallExpression/MemberExpression/PropertyName":N.function(N.propertyName),"FunctionDeclaration/VariableDefinition":N.function(N.definition(N.variableName)),"ClassDeclaration/VariableDefinition":N.definition(N.className),"NewExpression/VariableName":N.className,PropertyDefinition:N.definition(N.propertyName),PrivatePropertyDefinition:N.definition(N.special(N.propertyName)),UpdateOp:N.updateOperator,"LineComment Hashbang":N.lineComment,BlockComment:N.blockComment,Number:N.number,String:N.string,Escape:N.escape,ArithOp:N.arithmeticOperator,LogicOp:N.logicOperator,BitOp:N.bitwiseOperator,CompareOp:N.compareOperator,RegExp:N.regexp,Equals:N.definitionOperator,Arrow:N.function(N.punctuation),": Spread":N.punctuation,"( )":N.paren,"[ ]":N.squareBracket,"{ }":N.brace,"InterpolationStart InterpolationEnd":N.special(N.brace),".":N.derefOperator,", ;":N.separator,"@":N.meta,TypeName:N.typeName,TypeDefinition:N.definition(N.typeName),"type enum interface implements namespace module declare":N.definitionKeyword,"abstract global Privacy readonly override":N.modifier,"is keyof unique infer asserts":N.operatorKeyword,JSXAttributeValue:N.attributeValue,JSXText:N.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":N.angleBracket,"JSXIdentifier JSXNameSpacedName":N.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":N.attributeName,"JSXBuiltin/JSXIdentifier":N.standard(N.tagName)}),tV={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},nV={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},rV={__proto__:null,"<":193},iV=Ql.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:d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Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:U6,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,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!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Xp("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:n=>tV[n]||-1},{term:343,get:n=>nV[n]||-1},{term:95,get:n=>rV[n]||-1}],tokenPrec:15201}),HT=[vr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),vr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),vr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),vr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),vr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),vr(`try {
|
|
326
|
+
\${}
|
|
327
|
+
} catch (\${error}) {
|
|
328
|
+
\${}
|
|
329
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),vr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),vr(`if (\${}) {
|
|
330
|
+
\${}
|
|
331
|
+
} else {
|
|
332
|
+
\${}
|
|
333
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),vr(`class \${name} {
|
|
334
|
+
constructor(\${params}) {
|
|
335
|
+
\${}
|
|
336
|
+
}
|
|
337
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),vr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),vr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],sV=HT.concat([vr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),vr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),vr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Cb=new pC,GT=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function vh(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const oV=["FunctionDeclaration"],aV={FunctionDeclaration:vh("function"),ClassDeclaration:vh("class"),ClassExpression:()=>!0,EnumDeclaration:vh("constant"),TypeAliasDeclaration:vh("type"),NamespaceDeclaration:vh("namespace"),VariableDefinition(n,e){n.matchContext(oV)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function KT(n,e){let t=Cb.get(e);if(t)return t;let r=[],i=!0;function s(o,l){let c=n.sliceString(o.from,o.to);r.push({label:c,type:l})}return e.cursor(Zt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let l=aV[o.name];if(l&&l(o,s)||GT.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of KT(n,o.node))r.push(l);return!1}}),Cb.set(e,r),r}const Tb=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,JT=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function lV(n){let e=Ut(n.state).resolveInner(n.pos,-1);if(JT.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Tb.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)GT.has(i.name)&&(r=r.concat(KT(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:Tb}}const xs=Pl.define({name:"javascript",parser:iV.configure({props:[ic.add({IfStatement:$u({except:/^\s*({|else\b)/}),TryStatement:$u({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:b3,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:S3({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":$u({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Rl.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Mx,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,r=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:r.type.isError?n.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),e$={test:n=>/^JSX/.test(n.name),facet:Tx({commentTokens:{block:{open:"{/*",close:"*/}"}}})},t$=xs.configure({dialect:"ts"},"typescript"),n$=xs.configure({dialect:"jsx",props:[$x.add(n=>n.isTop?[e$]:void 0)]}),r$=xs.configure({dialect:"jsx ts",props:[$x.add(n=>n.isTop?[e$]:void 0)]},"typescript");let i$=n=>({label:n,type:"keyword"});const s$="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(i$),uV=s$.concat(["declare","implements","private","protected","public"].map(i$));function cV(n={}){let e=n.jsx?n.typescript?r$:n$:n.typescript?t$:xs,t=n.typescript?sV.concat(uV):HT.concat(s$);return new Uu(e,[xs.data.of({autocomplete:hZ(JT,cZ(t))}),xs.data.of({autocomplete:lV}),n.jsx?dV:[]])}function hV(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function $b(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const fV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),dV=Ue.inputHandler.of((n,e,t,r,i)=>{if((fV?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!xs.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(c=>{var h;let{head:f}=c,p=Ut(o).resolveInner(f-1,-1),m;if(p.name=="JSXStartTag"&&(p=p.parent),!(o.doc.sliceString(f-1,f)!=r||p.name=="JSXAttributeValue"&&p.to>f)){if(r==">"&&p.name=="JSXFragmentTag")return{range:c,changes:{from:f,insert:"</>"}};if(r=="/"&&p.name=="JSXStartCloseTag"){let g=p.parent,w=g.parent;if(w&&g.from==f-2&&((m=$b(o.doc,w.firstChild,f))||((h=w.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let k=`${m}>`;return{range:pe.cursor(f+k.length,-1),changes:{from:f,insert:k}}}}else if(r==">"){let g=hV(p);if(g&&g.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(f,f+2))&&(m=$b(o.doc,g,f)))return{range:c,changes:{from:f,insert:`</${m}>`}}}}return{range:c}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),wh=["_blank","_self","_top","_parent"],HO=["ascii","utf-8","utf-16","latin1","latin1"],GO=["get","post","put","delete"],KO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Lr=["true","false"],Be={},pV={a:{attrs:{href:null,ping:null,type:null,media:null,target:wh,hreflang:null}},abbr:Be,address:Be,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Be,aside:Be,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Be,base:{attrs:{href:null,target:wh}},bdi:Be,bdo:Be,blockquote:{attrs:{cite:null}},body:Be,br:Be,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:KO,formmethod:GO,formnovalidate:["novalidate"],formtarget:wh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Be,center:Be,cite:Be,code:Be,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Be,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Be,div:Be,dl:Be,dt:Be,em:Be,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Be,figure:Be,footer:Be,form:{attrs:{action:null,name:null,"accept-charset":HO,autocomplete:["on","off"],enctype:KO,method:GO,novalidate:["novalidate"],target:wh}},h1:Be,h2:Be,h3:Be,h4:Be,h5:Be,h6:Be,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Be,hgroup:Be,hr:Be,html:{attrs:{manifest:null}},i:Be,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:KO,formmethod:GO,formnovalidate:["novalidate"],formtarget:wh,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Be,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Be,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Be,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:HO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Be,noscript:Be,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Be,param:{attrs:{name:null,value:null}},pre:Be,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Be,rt:Be,ruby:Be,samp:Be,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:HO}},section:Be,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Be,source:{attrs:{src:null,type:null,media:null}},span:Be,strong:Be,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Be,summary:Be,sup:Be,table:Be,tbody:Be,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Be,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Be,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Be,time:{attrs:{datetime:null}},title:Be,tr:Be,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Be,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Be},o$={accesskey:null,class:null,contenteditable:Lr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Lr,autocorrect:Lr,autocapitalize:Lr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Lr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Lr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Lr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Lr,"aria-hidden":Lr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Lr,"aria-multiselectable":Lr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Lr,"aria-relevant":null,"aria-required":Lr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},a$="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of a$)o$[n]=null;class nf{constructor(e,t){this.tags={...pV,...e},this.globalAttrs={...o$,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}nf.default=new nf;function Hu(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Gu(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function l$(n,e,t){let r=t.tags[Hu(n,Gu(e))];return(r==null?void 0:r.children)||t.allTags}function qx(n,e){let t=[];for(let r=Gu(e);r&&!r.type.isTop;r=Gu(r.parent)){let i=Hu(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const u$=/^[:\-\.\w\u00b7-\uffff]*$/;function Eb(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",o=Gu(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:l$(n.doc,o,e).map(l=>({label:l,type:"type"})).concat(qx(n.doc,t).map((l,c)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Mb(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:qx(n.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:u$}}function mV(n,e,t,r){let i=[],s=0;for(let o of l$(n.doc,t,e))i.push({label:"<"+o,type:"type"});for(let o of qx(n.doc,t))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function gV(n,e,t,r,i){let s=Gu(t),o=s?e.tags[Hu(n.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],c=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:c.map(h=>({label:h,type:"property"})),validFor:u$}}function OV(n,e,t,r,i){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],c;if(o){let h=n.sliceDoc(o.from,o.to),f=e.globalAttrs[h];if(!f){let p=Gu(t),m=p?e.tags[Hu(n.doc,p)]:null;f=(m==null?void 0:m.attrs)&&m.attrs[h]}if(f){let p=n.sliceDoc(r,i).toLowerCase(),m='"',g='"';/^['"]/.test(p)?(c=p[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",g=n.sliceDoc(i,i+1)==p[0]?"":p[0],p=p.slice(1),r++):c=/^[^\s<>='"]*$/;for(let w of f)l.push({label:w,apply:m+w+g,type:"constant"})}}return{from:r,to:i,options:l,validFor:c}}function c$(n,e){let{state:t,pos:r}=e,i=Ut(t).resolveInner(r,-1),s=i.resolve(r);for(let o=r,l;s==i&&(l=i.childBefore(o));){let c=l.lastChild;if(!c||!c.type.isError||c.from<c.to)break;s=i=l,o=c.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?Mb(t,i,i.from,r):Eb(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?Eb(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?Mb(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?gV(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?OV(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?mV(t,n,i,r):null}function yV(n){return c$(nf.default,n)}function xV(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new nf(e,t):nf.default;return i=>c$(r,i)}const vV=xs.parser.configure({top:"SingleExpression"}),h$=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:t$.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:n$.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:r$.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:vV},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:xs.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:Yp.parser}],f$=[{name:"style",parser:Yp.parser.configure({top:"Styles"})}].concat(a$.map(n=>({name:n,parser:xs.parser}))),d$=Pl.define({name:"html",parser:FX.configure({props:[ic.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Rl.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),jC.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),pp=d$.configure({wrap:VT(h$,f$)});function wV(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=VT((n.nestedLanguages||[]).concat(h$),(n.nestedAttributes||[]).concat(f$)));let r=t?d$.configure({wrap:t,dialect:e}):e?pp.configure({dialect:e}):pp;return new Uu(r,[pp.data.of({autocomplete:xV(n)}),n.autoCloseTags!==!1?kV:[],cV().support,C6().support])}const jb=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),kV=Ue.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!pp.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(c=>{var h,f,p;let m=o.doc.sliceString(c.from-1,c.to)==r,{head:g}=c,w=Ut(o).resolveInner(g,-1),k;if(m&&r==">"&&w.name=="EndTag"){let C=w.parent;if(((f=(h=C.parent)===null||h===void 0?void 0:h.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(k=Hu(o.doc,C.parent,g))&&!jb.has(k)){let Q=g+(o.doc.sliceString(g,g+1)===">"?1:0),M=`</${k}>`;return{range:c,changes:{from:g,to:Q,insert:M}}}}else if(m&&r=="/"&&w.name=="IncompleteCloseTag"){let C=w.parent;if(w.from==g-2&&((p=C.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(k=Hu(o.doc,C,g))&&!jb.has(k)){let Q=g+(o.doc.sliceString(g,g+1)===">"?1:0),M=`${k}>`;return{range:pe.cursor(g+M.length,-1),changes:{from:g,to:Q,insert:M}}}}return{range:c}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),p$=Tx({commentTokens:{block:{open:"<!--",close:"-->"}}}),m$=new ct,g$=YZ.configure({props:[Rl.add(n=>!n.is("Block")||n.is("Document")||Qy(n)!=null||SV(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),m$.add(Qy),ic.add({Document:()=>null}),hl.add({Document:p$})]});function Qy(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function SV(n){return n.name=="OrderedList"||n.name=="BulletList"}function bV(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=Qy(r.type))!=null&&i<=e)break;t=r}return t.to}const PV=kC.of((n,e,t)=>{for(let r=Ut(n).resolveInner(t,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(m$);if(i==null)continue;let s=bV(r,i);if(s>t)return{from:t,to:s}}return null});function Hx(n){return new di(p$,n,[],"markdown")}const QV=Hx(g$),CV=g$.configure([iX,oX,sX,aX,{props:[Rl.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),Up=Hx(CV);function TV(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=_p.matchLanguageName(n,t,!0),r instanceof _p)return r.support?r.support.language.parser:Gh.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class JO{constructor(e,t,r,i,s,o,l){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=l}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+y$(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function O$(n,e){let t=[],r=[];for(let i=n;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],o,l=e.lineAt(s.from),c=s.from-l.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(c))))r.push(new JO(s,c,c+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let h=o[3],f=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),r.push(new JO(s.parent,c,c+f,o[1],h,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let h=o[4],f=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let p=o[2];o[3]&&(p+=o[3].replace(/[xX]/," ")),r.push(new JO(s.parent,c,c+f,o[1],h,p,s))}}return r}function y$(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function e0(n,e,t,r=0){for(let i=-1,s=n;;){if(s.name=="ListItem"){let l=y$(s,e),c=+l[2];if(i>=0){if(c!=i+1)return;t.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(i+2+r)})}i=c}let o=s.nextSibling;if(!o)break;s=o}}function Gx(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(xf)!=" ")return n;let r=eo(n,4,t),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+n.slice(t)}const $V=(n={})=>({state:e,dispatch:t})=>{let r=Ut(e),{doc:i}=e,s=null,o=e.changeByRange(l=>{if(!l.empty||!Up.isActiveAt(e,l.from,-1)&&!Up.isActiveAt(e,l.from,1))return s={range:l};let c=l.from,h=i.lineAt(c),f=O$(r.resolveInner(c,-1),i);for(;f.length&&f[f.length-1].from>c-h.from;)f.pop();if(!f.length)return s={range:l};let p=f[f.length-1];if(p.to-p.spaceAfter.length>c-h.from)return s={range:l};let m=c>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&m){let Q=p.node.firstChild,M=p.node.getChild("ListItem","ListItem");if(Q.to>=c||M&&M.to<c||h.from>0&&!/[^\s>]/.test(i.lineAt(h.from-1).text)||n.nonTightLists===!1){let E=f.length>1?f[f.length-2]:null,I,U="";E&&E.item?(I=h.from+E.from,U=E.marker(i,1)):I=h.from+(E?E.to:0);let _=[{from:I,to:c,insert:U}];return p.node.name=="OrderedList"&&e0(p.item,i,_,-2),E&&E.node.name=="OrderedList"&&e0(E.item,i,_),{range:pe.cursor(I+U.length),changes:_}}else{let E=Ab(f,e,h);return{range:pe.cursor(c+E.length+1),changes:{from:h.from,insert:E+e.lineBreak}}}}if(p.node.name=="Blockquote"&&m&&h.from){let Q=i.lineAt(h.from-1),M=/>\s*$/.exec(Q.text);if(M&&M.index==p.from){let E=e.changes([{from:Q.from+M.index,to:Q.to},{from:h.from+p.from,to:h.to}]);return{range:l.map(E),changes:E}}}let g=[];p.node.name=="OrderedList"&&e0(p.item,i,g);let w=p.item&&p.item.from<h.from,k="";if(!w||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let Q=0,M=f.length-1;Q<=M;Q++)k+=Q==M&&!w?f[Q].marker(i,1):f[Q].blank(Q<M?eo(h.text,4,f[Q+1].from)-k.length:null);let C=c;for(;C>h.from&&/\s/.test(h.text.charAt(C-h.from-1));)C--;return k=Gx(k,e),MV(p.node,e.doc)&&(k=Ab(f,e,h)+e.lineBreak+k),g.push({from:C,to:c,insert:e.lineBreak+k}),{range:pe.cursor(C+k.length+1),changes:g}});return s?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},EV=$V();function Rb(n){return n.name=="QuoteMark"||n.name=="ListMark"}function MV(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,r=n.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(t.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function Ab(n,e,t){let r="";for(let i=0,s=n.length-2;i<=s;i++)r+=n[i].blank(i<s?eo(t.text,4,n[i+1].from)-r.length:null,i<s);return Gx(r,e)}function jV(n,e){let t=n.resolveInner(e,-1),r=e;Rb(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if(Rb(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const RV=({state:n,dispatch:e})=>{let t=Ut(n),r=null,i=n.changeByRange(s=>{let o=s.from,{doc:l}=n;if(s.empty&&Up.isActiveAt(n,s.from)){let c=l.lineAt(o),h=O$(jV(t,o),l);if(h.length){let f=h[h.length-1],p=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(o-c.from>p&&!/\S/.test(c.text.slice(p,o-c.from)))return{range:pe.cursor(c.from+p),changes:{from:c.from+p,to:o}};if(o-c.from==p&&(!f.item||c.from<=f.item.from||!/\S/.test(c.text.slice(0,f.to)))){let m=c.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(c.text.slice(f.from,f.to))){let g=f.blank(eo(c.text,4,f.to)-eo(c.text,4,f.from));return m==c.from&&(g=Gx(g,n)),{range:pe.cursor(m+g.length),changes:{from:m,to:c.from+f.to,insert:g}}}if(m<o)return{range:pe.cursor(m),changes:{from:m,to:o}}}}}return r={range:s}});return r?!1:(e(n.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},AV=[{key:"Enter",run:EV},{key:"Backspace",run:RV}],x$=wV({matchClosingTags:!1});function NV(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:r=!0,base:{parser:i}=QV,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:l=x$}=n;if(!(i instanceof pm))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=n.extensions?[n.extensions]:[],h=[l.support,PV],f;o&&h.push(DV),t instanceof Uu?(h.push(t.support),f=t.language):t&&(f=t);let p=e||f?TV(e,f):void 0;c.push(qZ({codeParser:p,htmlParser:l.language.parser})),r&&h.push(pf.high(um.of(AV)));let m=Hx(i.configure(c));return s&&h.push(m.data.of({autocomplete:_V})),new Uu(m,h)}function _V(n){let{state:e,pos:t}=n,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!r)return null;let i=Ut(e).resolveInner(t,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:t-r[0].length,to:t,options:zV(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let t0=null;function zV(){if(t0)return t0;let n=yV(new lZ(Nt.create({extensions:x$}),0,!0));return t0=n?n.options:[]}const LV=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,DV=Ue.domEventHandlers({paste:(n,e)=>{var t;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Up.isActiveAt(e.state,r.from,1)))return!1;let s=Ut(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||LV.test(l.name))&&(o=!0)},leave:l=>{l.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),IV="#e5c07b",Nb="#e06c75",ZV="#56b6c2",XV="#ffffff",mp="#abb2bf",Cy="#7d8799",VV="#61afef",WV="#98c379",_b="#d19a66",FV="#c678dd",BV="#21252b",zb="#2c313a",Lb="#282c34",n0="#353a42",YV="#3E4451",Db="#528bff",UV=Ue.theme({"&":{color:mp,backgroundColor:Lb},".cm-content":{caretColor:Db},".cm-cursor, .cm-dropCursor":{borderLeftColor:Db},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:YV},".cm-panels":{backgroundColor:BV,color:mp},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Lb,color:Cy,border:"none"},".cm-activeLineGutter":{backgroundColor:zb},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:n0},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:n0,borderBottomColor:n0},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:zb,color:mp}}},{dark:!0}),qV=vf.define([{tag:N.keyword,color:FV},{tag:[N.name,N.deleted,N.character,N.propertyName,N.macroName],color:Nb},{tag:[N.function(N.variableName),N.labelName],color:VV},{tag:[N.color,N.constant(N.name),N.standard(N.name)],color:_b},{tag:[N.definition(N.name),N.separator],color:mp},{tag:[N.typeName,N.className,N.number,N.changed,N.annotation,N.modifier,N.self,N.namespace],color:IV},{tag:[N.operator,N.operatorKeyword,N.url,N.escape,N.regexp,N.link,N.special(N.string)],color:ZV},{tag:[N.meta,N.comment],color:Cy},{tag:N.strong,fontWeight:"bold"},{tag:N.emphasis,fontStyle:"italic"},{tag:N.strikethrough,textDecoration:"line-through"},{tag:N.link,color:Cy,textDecoration:"underline"},{tag:N.heading,fontWeight:"bold",color:Nb},{tag:[N.atom,N.bool,N.special(N.variableName)],color:_b},{tag:[N.processingInstruction,N.string,N.inserted],color:WV},{tag:N.invalid,color:XV}]),HV=[UV,TC(qV)],Ib=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class v${constructor(e,t,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(Ib(l)):Ib,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return df(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=rQ(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=tm(e);let i=this.normalize(t);if(i.length)for(let s=0,o=r;;s++){let l=i.charCodeAt(s),c=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(c)return this.value=c,this;break}o==r&&s<t.length&&t.charCodeAt(s)==l&&o++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(v$.prototype[Symbol.iterator]=function(){return this});const GV={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},KV=Ye.define({combine(n){return rm(n,GV,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function JV(n){return[iW,rW]}const eW=pt.mark({class:"cm-selectionMatch"}),tW=pt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Zb(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Un.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Un.Word)}function nW(n,e,t,r){return n(e.sliceDoc(t,t+1))==Un.Word&&n(e.sliceDoc(r-1,r))==Un.Word}const rW=pi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(KV),{state:t}=n,r=t.selection;if(r.ranges.length>1)return pt.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return pt.none;let c=t.wordAt(i.head);if(!c)return pt.none;o=t.charCategorizer(i.head),s=t.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<e.minSelectionLength||c>200)return pt.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(Zb(o,t,i.from,i.to)&&nW(o,t,i.from,i.to)))return pt.none}else if(s=t.sliceDoc(i.from,i.to),!s)return pt.none}let l=[];for(let c of n.visibleRanges){let h=new v$(t.doc,s,c.from,c.to);for(;!h.next().done;){let{from:f,to:p}=h.value;if((!o||Zb(o,t,f,p))&&(i.empty&&f<=i.from&&p>=i.to?l.push(tW.range(f,p)):(f>=i.to||p<=i.from)&&l.push(eW.range(f,p)),l.length>e.maxMatches))return pt.none}}return pt.set(l)}},{decorations:n=>n.decorations}),iW=Ue.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});function sW(n){switch(n){case"json":return aZ();case"markdown":return NV();default:return[]}}function oW({value:n,language:e,onChange:t,readOnly:r=!1}){const i=F.useRef(null),s=F.useRef();return F.useEffect(()=>{if(!i.current)return;const o=[VD(),MD(),BD(),V3(),QZ(),j3(),JV(),TC(_3,{fallback:!0}),um.of([...UI,qI]),sW(e),Ue.lineWrapping,HV,Ue.theme({"&":{height:"100%",fontSize:"13px"},".cm-scroller":{overflow:"auto",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace'},".cm-gutters":{backgroundColor:"#0f0f17",borderRight:"1px solid rgba(255,255,255,0.06)"},".cm-content":{padding:"8px 0"}})];r&&o.push(Nt.readOnly.of(!0)),t&&o.push(Ue.updateListener.of(h=>{h.docChanged&&t(h.state.doc.toString())}));const l=Nt.create({doc:n,extensions:o}),c=new Ue({state:l,parent:i.current});return s.current=c,()=>{c.destroy()}},[e,r]),F.useEffect(()=>{const o=s.current;if(!o)return;const l=o.state.doc.toString();l!==n&&o.dispatch({changes:{from:0,to:l.length,insert:n}})},[n]),v.jsx("div",{ref:i,className:"h-full w-full"})}function aW(n,e){return e.startsWith("connections")?{icon:fu,color:"text-emerald-500/60"}:e.startsWith("skills")?{icon:fu,color:"text-amber-500/60"}:e.startsWith("knowledge")?{icon:fu,color:"text-blue-500/60"}:e.startsWith("automations")?{icon:fu,color:"text-purple-500/60"}:n==="config.json"?{icon:fu,color:"text-indigo-500/60"}:{icon:fu,color:"text-gray-400"}}function lW(n){switch(n){case"connections":return"text-emerald-500/60";case"skills":return"text-amber-500/60";case"knowledge":return"text-blue-500/60";case"automations":return"text-purple-500/60";case"agents":return"text-cyan-500/60";case"stores":return"text-orange-500/60";case"tools":return"text-rose-500/60";case".amodal":return"text-indigo-500/60";default:return"text-gray-400"}}function w$({entry:n,depth:e,selectedPath:t,onSelect:r}){const[i,s]=F.useState(e<2);if(n.type==="file"){const{icon:c,color:h}=aW(n.name,n.path),f=t===n.path;return v.jsxs("button",{onClick:()=>r(n.path),className:Sr("flex items-center gap-2 w-full px-2 py-[5px] rounded text-[12px] text-left transition-colors",f?"bg-indigo-500/10 text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),style:{paddingLeft:`${e*16+8}px`},children:[v.jsx(c,{className:Sr("h-3.5 w-3.5 shrink-0",f?"text-indigo-400":h)}),v.jsx("span",{className:"truncate font-mono",children:n.name})]})}const o=lW(n.name),l=i?Uj:qj;return v.jsxs("div",{children:[v.jsxs("button",{onClick:()=>s(!i),className:"flex items-center gap-1.5 w-full px-2 py-[5px] rounded text-[12px] text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.03] transition-colors",style:{paddingLeft:`${e*16+8}px`},children:[v.jsx(Zy,{className:Sr("h-3 w-3 shrink-0 transition-transform",i&&"rotate-90")}),v.jsx(l,{className:Sr("h-3.5 w-3.5 shrink-0",o)}),v.jsx("span",{className:"truncate font-medium",children:n.name}),n.children&&v.jsx("span",{className:"text-[10px] text-gray-400 dark:text-white/20 ml-auto",children:String(n.children.length)})]}),i&&n.children&&v.jsx("div",{children:n.children.map(c=>v.jsx(w$,{entry:c,depth:e+1,selectedPath:t,onSelect:r},c.path))})]})}function uW(){const[n,e]=F.useState([]),[t,r]=F.useState(null),[i,s]=F.useState(null),[o,l]=F.useState(null),[c,h]=F.useState(!0),[f,p]=F.useState(!1),[m,g]=F.useState("idle");F.useEffect(()=>{fetch("/api/files").then(Q=>Q.json()).then(Q=>{e(Q.tree)}).catch(()=>{}).finally(()=>{h(!1)})},[]);const w=F.useCallback(Q=>{r(Q),l(null),g("idle"),fetch(`/api/files/${Q}`).then(M=>{if(!M.ok)throw new Error("Failed to load");return M.json()}).then(M=>{s(M)}).catch(()=>{s(null)})},[]),k=F.useCallback(async()=>{if(!(!t||o===null)){p(!0),g("idle");try{(await fetch(`/api/files/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o})})).ok?(g("saved"),s(M=>M&&{...M,content:o}),l(null),setTimeout(()=>g("idle"),2e3)):g("error")}catch{g("error")}p(!1)}},[t,o]);F.useEffect(()=>{const Q=M=>{(M.metaKey||M.ctrlKey)&&M.key==="s"&&(M.preventDefault(),k())};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[k]);const C=o!==null&&i!==null&&o!==i.content;return c?v.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."}):v.jsxs("div",{className:"h-full flex",children:[v.jsxs("div",{className:"w-[240px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0c0c14] flex flex-col shrink-0 overflow-hidden",children:[v.jsx("div",{className:"px-3 py-3 border-b border-gray-200 dark:border-white/[0.06]",children:v.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:"Agent Files"})}),v.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-thin py-1",children:[n.map(Q=>v.jsx(w$,{entry:Q,depth:0,selectedPath:t,onSelect:w},Q.path)),n.length===0&&v.jsx("div",{className:"px-3 py-4 text-xs text-gray-400 dark:text-zinc-600",children:"No files found"})]})]}),v.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t&&i?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"h-10 border-b border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex items-center justify-between px-4 shrink-0",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[12px] text-gray-500 dark:text-white/40 font-mono",children:t}),C&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-500 font-medium",children:"modified"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[m==="saved"&&v.jsx("span",{className:"text-[11px] text-emerald-500",children:"Saved"}),m==="error"&&v.jsx("span",{className:"text-[11px] text-red-500",children:"Save failed"}),v.jsxs("button",{onClick:()=>{k()},disabled:!C||f,className:Sr("flex items-center gap-1.5 px-3 py-1 rounded text-[12px] font-medium transition-colors",C?"bg-indigo-600 text-white hover:bg-indigo-500":"bg-gray-200 dark:bg-white/[0.06] text-gray-400 dark:text-white/20 cursor-not-allowed"),children:[f?v.jsx(wl,{className:"h-3 w-3 animate-spin"}):v.jsx(Gj,{className:"h-3 w-3"}),"Save"]})]})]}),v.jsx("div",{className:"flex-1 overflow-hidden",children:v.jsx(oW,{value:i.content,language:i.language,onChange:l})})]}):v.jsx("div",{className:"flex-1 flex items-center justify-center",children:v.jsxs("div",{className:"text-center",children:[v.jsx(Hj,{className:"h-8 w-8 text-gray-300 dark:text-white/10 mx-auto mb-3"}),v.jsx("p",{className:"text-sm text-gray-400 dark:text-zinc-600",children:"Select a file to view or edit"}),v.jsx("p",{className:"text-xs text-gray-300 dark:text-zinc-700 mt-1",children:"Changes are saved directly to your repo"})]})})})]})}const cW=DM([{path:"/",element:v.jsx(XR,{}),children:[{index:!0,element:v.jsx(hz,{})},{path:"sessions",element:v.jsx(pz,{})},{path:"sessions/:sessionId",element:v.jsx(mz,{})},{path:"entities/:storeName",element:v.jsx(wz,{})},{path:"entities/:storeName/:key",element:v.jsx(Rz,{})},{path:"automations",element:v.jsx(Gz,{})},{path:"automations/:automationName",element:v.jsx(e4,{})},{path:"inspect/:kind/:name",element:v.jsx(l4,{})},{path:"pages/:pageName",element:v.jsx(t4,{})}]},{path:"/config",element:v.jsx(h4,{}),children:[{index:!0,element:v.jsx(f4,{})},{path:"models",element:v.jsx(d4,{})},{path:"prompt",element:v.jsx(p4,{})},{path:"secrets",element:v.jsx(m4,{})},{path:"system",element:v.jsx(O4,{})},{path:"files",element:v.jsx(uW,{})}]}]),Xb=window.location.origin,hW="local",fW=new $j({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1}}});function dW(){return v.jsx(Mj,{client:fW,children:v.jsx(Nj,{runtimeUrl:Xb,tenantId:hW,children:v.jsx(Ij,{runtimeUrl:Xb,children:v.jsx(YM,{router:cW})})})})}window.React=Jb;window.ReactDOM=nP;window.__AMODAL_PAGES__={};const k$=document.getElementById("app");if(!k$)throw new Error("Missing #app element");gE.createRoot(k$).render(v.jsx(F.StrictMode,{children:v.jsx(dW,{})}));
|