From 802eecf505adfae55095bfdd424415ad041ef5da Mon Sep 17 00:00:00 2001 From: nmerget Date: Tue, 29 Oct 2024 09:30:29 +0000 Subject: [PATCH] deploy: 349f514d13160560a39e6a3404f429421de687aa --- main/404.html | 2 +- .../{index-C_QIW7j6.js => index-DgW36Xj6.js} | 1126 +++++++++++------ main/customization.html | 2 +- main/demo.html | 2 +- main/index.html | 2 +- main/playground.html | 2 +- 6 files changed, 753 insertions(+), 383 deletions(-) rename main/assets/{index-C_QIW7j6.js => index-DgW36Xj6.js} (65%) diff --git a/main/404.html b/main/404.html index 674b8625..062e1e06 100644 --- a/main/404.html +++ b/main/404.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/assets/index-C_QIW7j6.js b/main/assets/index-DgW36Xj6.js similarity index 65% rename from main/assets/index-C_QIW7j6.js rename to main/assets/index-DgW36Xj6.js index 53f243fa..e22b58c9 100644 --- a/main/assets/index-C_QIW7j6.js +++ b/main/assets/index-DgW36Xj6.js @@ -1,4 +1,4 @@ -var nW=Object.defineProperty;var iW=(e,t,r)=>t in e?nW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qo=(e,t,r)=>iW(e,typeof t!="symbol"?t+"":t,r);function RA(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var H_={},lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof H_<"u"?H_:typeof self<"u"?self:{};function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sW(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var tR={exports:{}},G0={},rR={exports:{}},jt={};/** +var sW=Object.defineProperty;var oW=(e,t,r)=>t in e?sW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jo=(e,t,r)=>oW(e,typeof t!="symbol"?t+"":t,r);function BT(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var U_={},hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof U_<"u"?U_:typeof self<"u"?self:{};function Ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aW(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var nR={exports:{}},V0={},iR={exports:{}},Ut={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var nW=Object.defineProperty;var iW=(e,t,r)=>t in e?nW(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Rg=Symbol.for("react.element"),oW=Symbol.for("react.portal"),aW=Symbol.for("react.fragment"),lW=Symbol.for("react.strict_mode"),uW=Symbol.for("react.profiler"),cW=Symbol.for("react.provider"),hW=Symbol.for("react.context"),dW=Symbol.for("react.forward_ref"),fW=Symbol.for("react.suspense"),pW=Symbol.for("react.memo"),gW=Symbol.for("react.lazy"),U_=Symbol.iterator;function mW(e){return e===null||typeof e!="object"?null:(e=U_&&e[U_]||e["@@iterator"],typeof e=="function"?e:null)}var nR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iR=Object.assign,sR={};function Ad(e,t,r){this.props=e,this.context=t,this.refs=sR,this.updater=r||nR}Ad.prototype.isReactComponent={};Ad.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ad.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function oR(){}oR.prototype=Ad.prototype;function BA(e,t,r){this.props=e,this.context=t,this.refs=sR,this.updater=r||nR}var jA=BA.prototype=new oR;jA.constructor=BA;iR(jA,Ad.prototype);jA.isPureReactComponent=!0;var W_=Array.isArray,aR=Object.prototype.hasOwnProperty,zA={current:null},lR={key:!0,ref:!0,__self:!0,__source:!0};function uR(e,t,r){var n,i={},s=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)aR.call(t,n)&&!lR.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1t in e?nW(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var SW=z,DW=Symbol.for("react.element"),EW=Symbol.for("react.fragment"),CW=Object.prototype.hasOwnProperty,AW=SW.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TW={key:!0,ref:!0,__self:!0,__source:!0};function hR(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)CW.call(t,n)&&!TW.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:DW,type:e,key:s,ref:o,props:i,_owner:AW.current}}G0.Fragment=EW;G0.jsx=hR;G0.jsxs=hR;tR.exports=G0;var j=tR.exports,$D={},dR={exports:{}},ss={},fR={exports:{}},pR={};/** + */var EW=z,CW=Symbol.for("react.element"),TW=Symbol.for("react.fragment"),AW=Object.prototype.hasOwnProperty,kW=EW.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_W={key:!0,ref:!0,__self:!0,__source:!0};function fR(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)AW.call(t,n)&&!_W.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:CW,type:e,key:s,ref:o,props:i,_owner:kW.current}}V0.Fragment=TW;V0.jsx=fR;V0.jsxs=fR;nR.exports=V0;var j=nR.exports,_D={},pR={exports:{}},us={},gR={exports:{}},mR={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var nW=Object.defineProperty;var iW=(e,t,r)=>t in e?nW(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(B,U){var V=B.length;B.push(U);e:for(;0>>1,J=B[K];if(0>>1;Ki(Q,V))Xi(le,Q)?(B[K]=le,B[X]=V,K=X):(B[K]=Q,B[Y]=V,K=Y);else if(Xi(le,V))B[K]=le,B[X]=V,K=X;else break e}}return U}function i(B,U){var V=B.sortIndex-U.sortIndex;return V!==0?V:B.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,h=null,d=3,f=!1,p=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=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(B){for(var U=r(u);U!==null;){if(U.callback===null)n(u);else if(U.startTime<=B)n(u),U.sortIndex=U.expirationTime,t(l,U);else break;U=r(u)}}function D(B){if(m=!1,E(B),!p)if(r(l)!==null)p=!0,M(C);else{var U=r(u);U!==null&&R(D,U.startTime-B)}}function C(B,U){p=!1,m&&(m=!1,b($),$=-1),f=!0;var V=d;try{for(E(U),h=r(l);h!==null&&(!(h.expirationTime>U)||B&&!N());){var K=h.callback;if(typeof K=="function"){h.callback=null,d=h.priorityLevel;var J=K(h.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?h.callback=J:h===r(l)&&n(l),E(U)}else n(l);h=r(l)}if(h!==null)var G=!0;else{var Y=r(u);Y!==null&&R(D,Y.startTime-U),G=!1}return G}finally{h=null,d=V,f=!1}}var w=!1,A=null,$=-1,O=5,P=-1;function N(){return!(e.unstable_now()-PB||125K?(B.sortIndex=V,t(u,B),r(l)===null&&B===r(u)&&(m?(b($),$=-1):m=!0,R(D,V-K))):(B.sortIndex=J,t(l,B),p||f||(p=!0,M(C))),B},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(B){var U=d;return function(){var V=d;d=U;try{return B.apply(this,arguments)}finally{d=V}}}})(pR);fR.exports=pR;var kW=fR.exports;/** + */(function(e){function t(B,U){var V=B.length;B.push(U);e:for(;0>>1,J=B[K];if(0>>1;Ki(Q,V))Xi(le,Q)?(B[K]=le,B[X]=V,K=X):(B[K]=Q,B[Y]=V,K=Y);else if(Xi(le,V))B[K]=le,B[X]=V,K=X;else break e}}return U}function i(B,U){var V=B.sortIndex-U.sortIndex;return V!==0?V:B.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,h=null,d=3,f=!1,p=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=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(B){for(var U=r(u);U!==null;){if(U.callback===null)n(u);else if(U.startTime<=B)n(u),U.sortIndex=U.expirationTime,t(l,U);else break;U=r(u)}}function D(B){if(m=!1,E(B),!p)if(r(l)!==null)p=!0,M(C);else{var U=r(u);U!==null&&R(D,U.startTime-B)}}function C(B,U){p=!1,m&&(m=!1,b(k),k=-1),f=!0;var V=d;try{for(E(U),h=r(l);h!==null&&(!(h.expirationTime>U)||B&&!I());){var K=h.callback;if(typeof K=="function"){h.callback=null,d=h.priorityLevel;var J=K(h.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?h.callback=J:h===r(l)&&n(l),E(U)}else n(l);h=r(l)}if(h!==null)var G=!0;else{var Y=r(u);Y!==null&&R(D,Y.startTime-U),G=!1}return G}finally{h=null,d=V,f=!1}}var w=!1,T=null,k=-1,O=5,P=-1;function I(){return!(e.unstable_now()-PB||125K?(B.sortIndex=V,t(u,B),r(l)===null&&B===r(u)&&(m?(b(k),k=-1):m=!0,R(D,V-K))):(B.sortIndex=J,t(l,B),p||f||(p=!0,M(C))),B},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(B){var U=d;return function(){var V=d;d=U;try{return B.apply(this,arguments)}finally{d=V}}}})(mR);gR.exports=mR;var $W=gR.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var nW=Object.defineProperty;var iW=(e,t,r)=>t in e?nW(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _W=z,rs=kW;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),LD=Object.prototype.hasOwnProperty,$W=/^[: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]*$/,G_={},q_={};function LW(e){return LD.call(q_,e)?!0:LD.call(G_,e)?!1:$W.test(e)?q_[e]=!0:(G_[e]=!0,!1)}function PW(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function FW(e,t,r,n){if(t===null||typeof t>"u"||PW(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ei(e,t,r,n,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var In={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){In[e]=new Ei(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];In[t]=new Ei(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){In[e]=new Ei(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){In[e]=new Ei(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){In[e]=new Ei(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){In[e]=new Ei(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){In[e]=new Ei(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){In[e]=new Ei(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){In[e]=new Ei(e,5,!1,e.toLowerCase(),null,!1,!1)});var UA=/[\-:]([a-z])/g;function WA(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(UA,WA);In[t]=new Ei(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(UA,WA);In[t]=new Ei(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(UA,WA);In[t]=new Ei(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){In[e]=new Ei(e,1,!1,e.toLowerCase(),null,!1,!1)});In.xlinkHref=new Ei("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){In[e]=new Ei(e,1,!1,e.toLowerCase(),null,!0,!0)});function VA(e,t,r,n){var i=In.hasOwnProperty(t)?In[t]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$D=Object.prototype.hasOwnProperty,PW=/^[: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]*$/,q_={},K_={};function FW(e){return $D.call(K_,e)?!0:$D.call(q_,e)?!1:PW.test(e)?K_[e]=!0:(q_[e]=!0,!1)}function OW(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function IW(e,t,r,n){if(t===null||typeof t>"u"||OW(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ai(e,t,r,n,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jn[e]=new Ai(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jn[t]=new Ai(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jn[e]=new Ai(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jn[e]=new Ai(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){jn[e]=new Ai(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jn[e]=new Ai(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jn[e]=new Ai(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jn[e]=new Ai(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jn[e]=new Ai(e,5,!1,e.toLowerCase(),null,!1,!1)});var WT=/[\-:]([a-z])/g;function VT(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(WT,VT);jn[t]=new Ai(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(WT,VT);jn[t]=new Ai(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(WT,VT);jn[t]=new Ai(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jn[e]=new Ai(e,1,!1,e.toLowerCase(),null,!1,!1)});jn.xlinkHref=new Ai("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jn[e]=new Ai(e,1,!1,e.toLowerCase(),null,!0,!0)});function GT(e,t,r,n){var i=jn.hasOwnProperty(t)?jn[t]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{cx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Yf(e):""}function OW(e){switch(e.tag){case 5:return Yf(e.type);case 16:return Yf("Lazy");case 13:return Yf("Suspense");case 19:return Yf("SuspenseList");case 0:case 2:case 15:return e=hx(e.type,!1),e;case 11:return e=hx(e.type.render,!1),e;case 1:return e=hx(e.type,!0),e;default:return""}}function ND(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wh:return"Fragment";case xh:return"Portal";case PD:return"Profiler";case GA:return"StrictMode";case FD:return"Suspense";case OD:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yR:return(e.displayName||"Context")+".Consumer";case mR:return(e._context.displayName||"Context")+".Provider";case qA:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case KA:return t=e.displayName||null,t!==null?t:ND(e.type)||"Memo";case Qa:t=e._payload,e=e._init;try{return ND(e(t))}catch{}}return null}function NW(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ND(t);case 8:return t===GA?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MW(e){var t=bR(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xm(e){e._valueTracker||(e._valueTracker=MW(e))}function xR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=bR(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function uv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function MD(e,t){var r=t.checked;return Hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function J_(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=kl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wR(e,t){t=t.checked,t!=null&&VA(e,"checked",t,!1)}function ID(e,t){wR(e,t);var r=kl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?RD(e,t.type,r):t.hasOwnProperty("defaultValue")&&RD(e,t.type,kl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function X_(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function RD(e,t,r){(t!=="number"||uv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Qf=Array.isArray;function jh(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=wm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gp(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var dp={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},IW=["Webkit","ms","Moz","O"];Object.keys(dp).forEach(function(e){IW.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dp[t]=dp[e]})});function CR(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||dp.hasOwnProperty(e)&&dp[e]?(""+t).trim():t+"px"}function AR(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=CR(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var RW=Hr({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 zD(e,t){if(t){if(RW[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function HD(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var UD=null;function JA(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var WD=null,zh=null,Hh=null;function Z_(e){if(e=zg(e)){if(typeof WD!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=Y0(t),WD(e.stateNode,e.type,t))}}function TR(e){zh?Hh?Hh.push(e):Hh=[e]:zh=e}function kR(){if(zh){var e=zh,t=Hh;if(Hh=zh=null,Z_(e),t)for(e=0;e>>=0,e===0?32:31-(JW(e)/XW|0)|0}var Sm=64,Dm=4194304;function Zf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=Zf(a):(s&=o,s!==0&&(n=Zf(s)))}else o=r&~i,o!==0?n=Zf(o):s!==0&&(n=Zf(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Bg(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-eo(t),e[t]=r}function eV(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=pp),l$=" ",u$=!1;function KR(e,t){switch(e){case"keyup":return kV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function JR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sh=!1;function $V(e,t){switch(e){case"compositionend":return JR(t);case"keypress":return t.which!==32?null:(u$=!0,l$);case"textInput":return e=t.data,e===l$&&u$?null:e;default:return null}}function LV(e,t){if(Sh)return e==="compositionend"||!nT&&KR(e,t)?(e=GR(),Fy=eT=ol=null,Sh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=f$(r)}}function ZR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ZR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eB(){for(var e=window,t=uv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=uv(e.document)}return t}function iT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jV(e){var t=eB(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&ZR(r.ownerDocument.documentElement,r)){if(n!==null&&iT(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=p$(r,s);var o=p$(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Dh=null,XD=null,mp=null,YD=!1;function g$(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;YD||Dh==null||Dh!==uv(n)||(n=Dh,"selectionStart"in n&&iT(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),mp&&Qp(mp,n)||(mp=n,n=mv(XD,"onSelect"),0Ah||(e.current=nE[Ah],nE[Ah]=null,Ah--)}function Sr(e,t){Ah++,nE[Ah]=e.current,e.current=t}var _l={},ei=Wl(_l),Ii=Wl(!1),Ku=_l;function Zh(e,t){var r=e.type.contextTypes;if(!r)return _l;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ri(e){return e=e.childContextTypes,e!=null}function vv(){$r(Ii),$r(ei)}function S$(e,t,r){if(ei.current!==_l)throw Error(Me(168));Sr(ei,t),Sr(Ii,r)}function uB(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Me(108,NW(e)||"Unknown",i));return Hr({},r,n)}function bv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_l,Ku=ei.current,Sr(ei,e),Sr(Ii,Ii.current),!0}function D$(e,t,r){var n=e.stateNode;if(!n)throw Error(Me(169));r?(e=uB(e,t,Ku),n.__reactInternalMemoizedMergedChildContext=e,$r(Ii),$r(ei),Sr(ei,e)):$r(Ii),Sr(Ii,r)}var na=null,Q0=!1,Cx=!1;function cB(e){na===null?na=[e]:na.push(e)}function QV(e){Q0=!0,cB(e)}function Vl(){if(!Cx&&na!==null){Cx=!0;var e=0,t=dr;try{var r=na;for(dr=1;e>=o,i-=o,aa=1<<32-eo(t)+i|r<$?(O=A,A=null):O=A.sibling;var P=d(b,A,E[$],D);if(P===null){A===null&&(A=O);break}e&&A&&P.alternate===null&&t(b,A),v=s(P,v,$),w===null?C=P:w.sibling=P,w=P,A=O}if($===E.length)return r(b,A),Nr&&fu(b,$),C;if(A===null){for(;$$?(O=A,A=null):O=A.sibling;var N=d(b,A,P.value,D);if(N===null){A===null&&(A=O);break}e&&A&&N.alternate===null&&t(b,A),v=s(N,v,$),w===null?C=N:w.sibling=N,w=N,A=O}if(P.done)return r(b,A),Nr&&fu(b,$),C;if(A===null){for(;!P.done;$++,P=E.next())P=h(b,P.value,D),P!==null&&(v=s(P,v,$),w===null?C=P:w.sibling=P,w=P);return Nr&&fu(b,$),C}for(A=n(b,A);!P.done;$++,P=E.next())P=f(A,b,$,P.value,D),P!==null&&(e&&P.alternate!==null&&A.delete(P.key===null?$:P.key),v=s(P,v,$),w===null?C=P:w.sibling=P,w=P);return e&&A.forEach(function(F){return t(b,F)}),Nr&&fu(b,$),C}function y(b,v,E,D){if(typeof E=="object"&&E!==null&&E.type===wh&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case bm:e:{for(var C=E.key,w=v;w!==null;){if(w.key===C){if(C=E.type,C===wh){if(w.tag===7){r(b,w.sibling),v=i(w,E.props.children),v.return=b,b=v;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Qa&&A$(C)===w.type){r(b,w.sibling),v=i(w,E.props),v.ref=Ef(b,w,E),v.return=b,b=v;break e}r(b,w);break}else t(b,w);w=w.sibling}E.type===wh?(v=Mu(E.props.children,b.mode,D,E.key),v.return=b,b=v):(D=zy(E.type,E.key,E.props,null,b.mode,D),D.ref=Ef(b,v,E),D.return=b,b=D)}return o(b);case xh:e:{for(w=E.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===E.containerInfo&&v.stateNode.implementation===E.implementation){r(b,v.sibling),v=i(v,E.children||[]),v.return=b,b=v;break e}else{r(b,v);break}else t(b,v);v=v.sibling}v=Fx(E,b.mode,D),v.return=b,b=v}return o(b);case Qa:return w=E._init,y(b,v,w(E._payload),D)}if(Qf(E))return p(b,v,E,D);if(bf(E))return m(b,v,E,D);$m(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,v!==null&&v.tag===6?(r(b,v.sibling),v=i(v,E),v.return=b,b=v):(r(b,v),v=Px(E,b.mode,D),v.return=b,b=v),o(b)):r(b,v)}return y}var td=pB(!0),gB=pB(!1),Sv=Wl(null),Dv=null,_h=null,lT=null;function uT(){lT=_h=Dv=null}function cT(e){var t=Sv.current;$r(Sv),e._currentValue=t}function oE(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Wh(e,t){Dv=e,lT=_h=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ni=!0),e.firstContext=null)}function Ss(e){var t=e._currentValue;if(lT!==e)if(e={context:e,memoizedValue:t,next:null},_h===null){if(Dv===null)throw Error(Me(308));_h=e,Dv.dependencies={lanes:0,firstContext:e}}else _h=_h.next=e;return t}var Tu=null;function hT(e){Tu===null?Tu=[e]:Tu.push(e)}function mB(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,hT(t)):(r.next=i.next,i.next=r),t.interleaved=r,va(e,n)}function va(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Za=!1;function dT(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yB(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ca(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,er&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,va(e,r)}return i=n.interleaved,i===null?(t.next=t,hT(n)):(t.next=i.next,i.next=t),n.interleaved=t,va(e,r)}function Ny(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,YA(e,r)}}function T$(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ev(e,t,r,n){var i=e.updateQueue;Za=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var h=i.baseState;o=0,c=u=l=null,a=s;do{var d=a.lane,f=a.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(d=t,f=r,m.tag){case 1:if(p=m.payload,typeof p=="function"){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(f,h,d):p,d==null)break e;h=Hr({},h,d);break e;case 2:Za=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=f,l=h):c=c.next=f,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Yu|=o,e.lanes=o,e.memoizedState=h}}function k$(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Tx.transition;Tx.transition={};try{e(!1),t()}finally{dr=r,Tx.transition=n}}function OB(){return Ds().memoizedState}function rG(e,t,r){var n=wl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},NB(e))MB(t,r);else if(r=mB(e,t,r,n),r!==null){var i=mi();to(r,e,n,i),IB(r,t,n)}}function nG(e,t,r){var n=wl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(NB(e))MB(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,so(a,o)){var l=t.interleaved;l===null?(i.next=i,hT(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=mB(e,t,i,n),r!==null&&(i=mi(),to(r,e,n,i),IB(r,t,n))}}function NB(e){var t=e.alternate;return e===jr||t!==null&&t===jr}function MB(e,t){yp=Av=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function IB(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,YA(e,r)}}var Tv={readContext:Ss,useCallback:Vn,useContext:Vn,useEffect:Vn,useImperativeHandle:Vn,useInsertionEffect:Vn,useLayoutEffect:Vn,useMemo:Vn,useReducer:Vn,useRef:Vn,useState:Vn,useDebugValue:Vn,useDeferredValue:Vn,useTransition:Vn,useMutableSource:Vn,useSyncExternalStore:Vn,useId:Vn,unstable_isNewReconciler:!1},iG={readContext:Ss,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Ss,useEffect:$$,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Iy(4194308,4,_B.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Iy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Iy(4,2,e,t)},useMemo:function(e,t){var r=So();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=So();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=rG.bind(null,jr,e),[n.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:_$,useDebugValue:xT,useDeferredValue:function(e){return So().memoizedState=e},useTransition:function(){var e=_$(!1),t=e[0];return e=tG.bind(null,e[1]),So().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=jr,i=So();if(Nr){if(r===void 0)throw Error(Me(407));r=r()}else{if(r=t(),Sn===null)throw Error(Me(349));Xu&30||wB(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,$$(DB.bind(null,n,s,e),[e]),n.flags|=2048,og(9,SB.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=So(),t=Sn.identifierPrefix;if(Nr){var r=la,n=aa;r=(n&~(1<<32-eo(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ig++,0")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{lx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Zf(e):""}function MW(e){switch(e.tag){case 5:return Zf(e.type);case 16:return Zf("Lazy");case 13:return Zf("Suspense");case 19:return Zf("SuspenseList");case 0:case 2:case 15:return e=ux(e.type,!1),e;case 11:return e=ux(e.type.render,!1),e;case 1:return e=ux(e.type,!0),e;default:return""}}function OD(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dh:return"Fragment";case Sh:return"Portal";case LD:return"Profiler";case qT:return"StrictMode";case PD:return"Suspense";case FD:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bR:return(e.displayName||"Context")+".Consumer";case vR:return(e._context.displayName||"Context")+".Provider";case KT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case JT:return t=e.displayName||null,t!==null?t:OD(e.type)||"Memo";case el:t=e._payload,e=e._init;try{return OD(e(t))}catch{}}return null}function NW(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return OD(t);case 8:return t===qT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $l(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RW(e){var t=wR(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xm(e){e._valueTracker||(e._valueTracker=RW(e))}function SR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=wR(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function lv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ID(e,t){var r=t.checked;return Wr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function X_(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=$l(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function DR(e,t){t=t.checked,t!=null&>(e,"checked",t,!1)}function MD(e,t){DR(e,t);var r=$l(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ND(e,t.type,r):t.hasOwnProperty("defaultValue")&&ND(e,t.type,$l(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Y_(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ND(e,t,r){(t!=="number"||lv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ep=Array.isArray;function Hh(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=wm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gp(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var pp={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},BW=["Webkit","ms","Moz","O"];Object.keys(pp).forEach(function(e){BW.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pp[t]=pp[e]})});function AR(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||pp.hasOwnProperty(e)&&pp[e]?(""+t).trim():t+"px"}function kR(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=AR(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var jW=Wr({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 jD(e,t){if(t){if(jW[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function zD(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var HD=null;function XT(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var UD=null,Uh=null,Wh=null;function e$(e){if(e=zg(e)){if(typeof UD!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=X0(t),UD(e.stateNode,e.type,t))}}function _R(e){Uh?Wh?Wh.push(e):Wh=[e]:Uh=e}function $R(){if(Uh){var e=Uh,t=Wh;if(Wh=Uh=null,e$(e),t)for(e=0;e>>=0,e===0?32:31-(YW(e)/QW|0)|0}var Sm=64,Dm=4194304;function tp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=tp(a):(s&=o,s!==0&&(n=tp(s)))}else o=r&~i,o!==0?n=tp(o):s!==0&&(n=tp(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Bg(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-no(t),e[t]=r}function rV(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=mp),u$=" ",c$=!1;function XR(e,t){switch(e){case"keyup":return $V.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eh=!1;function PV(e,t){switch(e){case"compositionend":return YR(t);case"keypress":return t.which!==32?null:(c$=!0,u$);case"textInput":return e=t.data,e===u$&&c$?null:e;default:return null}}function FV(e,t){if(Eh)return e==="compositionend"||!iA&&XR(e,t)?(e=KR(),Fy=tA=ll=null,Eh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=p$(r)}}function tB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rB(){for(var e=window,t=lv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=lv(e.document)}return t}function sA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function HV(e){var t=rB(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&tB(r.ownerDocument.documentElement,r)){if(n!==null&&sA(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=g$(r,s);var o=g$(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Ch=null,JD=null,vp=null,XD=!1;function m$(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;XD||Ch==null||Ch!==lv(n)||(n=Ch,"selectionStart"in n&&sA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),vp&&Qp(vp,n)||(vp=n,n=gv(JD,"onSelect"),0kh||(e.current=rE[kh],rE[kh]=null,kh--)}function Cr(e,t){kh++,rE[kh]=e.current,e.current=t}var Ll={},ni=Gl(Ll),ji=Gl(!1),Xu=Ll;function td(e,t){var r=e.type.contextTypes;if(!r)return Ll;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zi(e){return e=e.childContextTypes,e!=null}function yv(){Fr(ji),Fr(ni)}function D$(e,t,r){if(ni.current!==Ll)throw Error(Me(168));Cr(ni,t),Cr(ji,r)}function hB(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Me(108,NW(e)||"Unknown",i));return Wr({},r,n)}function vv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ll,Xu=ni.current,Cr(ni,e),Cr(ji,ji.current),!0}function E$(e,t,r){var n=e.stateNode;if(!n)throw Error(Me(169));r?(e=hB(e,t,Xu),n.__reactInternalMemoizedMergedChildContext=e,Fr(ji),Fr(ni),Cr(ni,e)):Fr(ji),Cr(ji,r)}var sa=null,Y0=!1,Dx=!1;function dB(e){sa===null?sa=[e]:sa.push(e)}function eG(e){Y0=!0,dB(e)}function ql(){if(!Dx&&sa!==null){Dx=!0;var e=0,t=gr;try{var r=sa;for(gr=1;e>=o,i-=o,ua=1<<32-no(t)+i|r<k?(O=T,T=null):O=T.sibling;var P=d(b,T,E[k],D);if(P===null){T===null&&(T=O);break}e&&T&&P.alternate===null&&t(b,T),v=s(P,v,k),w===null?C=P:w.sibling=P,w=P,T=O}if(k===E.length)return r(b,T),Rr&&gu(b,k),C;if(T===null){for(;kk?(O=T,T=null):O=T.sibling;var I=d(b,T,P.value,D);if(I===null){T===null&&(T=O);break}e&&T&&I.alternate===null&&t(b,T),v=s(I,v,k),w===null?C=I:w.sibling=I,w=I,T=O}if(P.done)return r(b,T),Rr&&gu(b,k),C;if(T===null){for(;!P.done;k++,P=E.next())P=h(b,P.value,D),P!==null&&(v=s(P,v,k),w===null?C=P:w.sibling=P,w=P);return Rr&&gu(b,k),C}for(T=n(b,T);!P.done;k++,P=E.next())P=f(T,b,k,P.value,D),P!==null&&(e&&P.alternate!==null&&T.delete(P.key===null?k:P.key),v=s(P,v,k),w===null?C=P:w.sibling=P,w=P);return e&&T.forEach(function(F){return t(b,F)}),Rr&&gu(b,k),C}function y(b,v,E,D){if(typeof E=="object"&&E!==null&&E.type===Dh&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case bm:e:{for(var C=E.key,w=v;w!==null;){if(w.key===C){if(C=E.type,C===Dh){if(w.tag===7){r(b,w.sibling),v=i(w,E.props.children),v.return=b,b=v;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===el&&A$(C)===w.type){r(b,w.sibling),v=i(w,E.props),v.ref=Tf(b,w,E),v.return=b,b=v;break e}r(b,w);break}else t(b,w);w=w.sibling}E.type===Dh?(v=Ru(E.props.children,b.mode,D,E.key),v.return=b,b=v):(D=zy(E.type,E.key,E.props,null,b.mode,D),D.ref=Tf(b,v,E),D.return=b,b=D)}return o(b);case Sh:e:{for(w=E.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===E.containerInfo&&v.stateNode.implementation===E.implementation){r(b,v.sibling),v=i(v,E.children||[]),v.return=b,b=v;break e}else{r(b,v);break}else t(b,v);v=v.sibling}v=Lx(E,b.mode,D),v.return=b,b=v}return o(b);case el:return w=E._init,y(b,v,w(E._payload),D)}if(ep(E))return p(b,v,E,D);if(wf(E))return m(b,v,E,D);$m(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,v!==null&&v.tag===6?(r(b,v.sibling),v=i(v,E),v.return=b,b=v):(r(b,v),v=$x(E,b.mode,D),v.return=b,b=v),o(b)):r(b,v)}return y}var nd=mB(!0),yB=mB(!1),wv=Gl(null),Sv=null,Lh=null,uA=null;function cA(){uA=Lh=Sv=null}function hA(e){var t=wv.current;Fr(wv),e._currentValue=t}function sE(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Gh(e,t){Sv=e,uA=Lh=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ri=!0),e.firstContext=null)}function Cs(e){var t=e._currentValue;if(uA!==e)if(e={context:e,memoizedValue:t,next:null},Lh===null){if(Sv===null)throw Error(Me(308));Lh=e,Sv.dependencies={lanes:0,firstContext:e}}else Lh=Lh.next=e;return t}var _u=null;function dA(e){_u===null?_u=[e]:_u.push(e)}function vB(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,dA(t)):(r.next=i.next,i.next=r),t.interleaved=r,xa(e,n)}function xa(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var tl=!1;function fA(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bB(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function da(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,nr&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,xa(e,r)}return i=n.interleaved,i===null?(t.next=t,dA(n)):(t.next=i.next,i.next=t),n.interleaved=t,xa(e,r)}function Iy(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,QT(e,r)}}function k$(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Dv(e,t,r,n){var i=e.updateQueue;tl=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var h=i.baseState;o=0,c=u=l=null,a=s;do{var d=a.lane,f=a.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(d=t,f=r,m.tag){case 1:if(p=m.payload,typeof p=="function"){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(f,h,d):p,d==null)break e;h=Wr({},h,d);break e;case 2:tl=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=f,l=h):c=c.next=f,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Zu|=o,e.lanes=o,e.memoizedState=h}}function _$(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Cx.transition;Cx.transition={};try{e(!1),t()}finally{gr=r,Cx.transition=n}}function MB(){return Ts().memoizedState}function iG(e,t,r){var n=Dl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},NB(e))RB(t,r);else if(r=vB(e,t,r,n),r!==null){var i=bi();io(r,e,n,i),BB(r,t,n)}}function sG(e,t,r){var n=Dl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(NB(e))RB(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,lo(a,o)){var l=t.interleaved;l===null?(i.next=i,dA(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=vB(e,t,i,n),r!==null&&(i=bi(),io(r,e,n,i),BB(r,t,n))}}function NB(e){var t=e.alternate;return e===Hr||t!==null&&t===Hr}function RB(e,t){bp=Cv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function BB(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,QT(e,r)}}var Tv={readContext:Cs,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},oG={readContext:Cs,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:Cs,useEffect:L$,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ny(4194308,4,LB.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ny(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ny(4,2,e,t)},useMemo:function(e,t){var r=Co();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Co();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=iG.bind(null,Hr,e),[n.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:$$,useDebugValue:wA,useDeferredValue:function(e){return Co().memoizedState=e},useTransition:function(){var e=$$(!1),t=e[0];return e=nG.bind(null,e[1]),Co().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Hr,i=Co();if(Rr){if(r===void 0)throw Error(Me(407));r=r()}else{if(r=t(),Cn===null)throw Error(Me(349));Qu&30||DB(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,L$(CB.bind(null,n,s,e),[e]),n.flags|=2048,og(9,EB.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Co(),t=Cn.identifierPrefix;if(Rr){var r=ca,n=ua;r=(n&~(1<<32-no(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ig++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Eo]=t,e[tg]=n,qB(e,t,!1,!1),t.stateNode=e;e:{switch(o=HD(r,n),r){case"dialog":Cr("cancel",e),Cr("close",e),i=n;break;case"iframe":case"object":case"embed":Cr("load",e),i=n;break;case"video":case"audio":for(i=0;iid&&(t.flags|=128,n=!0,Cf(s,!1),t.lanes=4194304)}else{if(!n)if(e=Cv(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Cf(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Nr)return Gn(t),null}else 2*Xr()-s.renderingStartTime>id&&r!==1073741824&&(t.flags|=128,n=!0,Cf(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(r=s.last,r!==null?r.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Xr(),t.sibling=null,r=Br.current,Sr(Br,n?r&1|2:r&1),t):(Gn(t),null);case 22:case 23:return AT(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?qi&1073741824&&(Gn(t),t.subtreeFlags&6&&(t.flags|=8192)):Gn(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function dG(e,t){switch(oT(t),t.tag){case 1:return Ri(t.type)&&vv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rd(),$r(Ii),$r(ei),gT(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pT(t),null;case 13:if($r(Br),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));ed()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $r(Br),null;case 4:return rd(),null;case 10:return cT(t.type._context),null;case 22:case 23:return AT(),null;case 24:return null;default:return null}}var Pm=!1,Xn=!1,fG=typeof WeakSet=="function"?WeakSet:Set,et=null;function $h(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Vr(e,t,n)}else r.current=null}function gE(e,t,r){try{r()}catch(n){Vr(e,t,n)}}var z$=!1;function pG(e,t){if(QD=pv,e=eB(),iT(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,h=e,d=null;t:for(;;){for(var f;h!==r||i!==0&&h.nodeType!==3||(a=o+i),h!==s||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)d=h,h=f;for(;;){if(h===e)break t;if(d===r&&++u===i&&(a=o),d===s&&++c===n&&(l=o),(f=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ZD={focusedElem:e,selectionRange:r},pv=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){t=et;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,y=p.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:Us(t.type,m),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(D){Vr(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}return p=z$,z$=!1,p}function vp(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&gE(t,r,s)}i=i.next}while(i!==n)}}function tb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function mE(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function XB(e){var t=e.alternate;t!==null&&(e.alternate=null,XB(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Eo],delete t[tg],delete t[rE],delete t[XV],delete t[YV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YB(e){return e.tag===5||e.tag===3||e.tag===4}function H$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YB(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=yv));else if(n!==4&&(e=e.child,e!==null))for(yE(e,t,r),e=e.sibling;e!==null;)yE(e,t,r),e=e.sibling}function vE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(vE(e,t,r),e=e.sibling;e!==null;)vE(e,t,r),e=e.sibling}var _n=null,Ws=!1;function Ua(e,t,r){for(r=r.child;r!==null;)QB(e,t,r),r=r.sibling}function QB(e,t,r){if(ko&&typeof ko.onCommitFiberUnmount=="function")try{ko.onCommitFiberUnmount(q0,r)}catch{}switch(r.tag){case 5:Xn||$h(r,t);case 6:var n=_n,i=Ws;_n=null,Ua(e,t,r),_n=n,Ws=i,_n!==null&&(Ws?(e=_n,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):_n.removeChild(r.stateNode));break;case 18:_n!==null&&(Ws?(e=_n,r=r.stateNode,e.nodeType===8?Ex(e.parentNode,r):e.nodeType===1&&Ex(e,r),Xp(e)):Ex(_n,r.stateNode));break;case 4:n=_n,i=Ws,_n=r.stateNode.containerInfo,Ws=!0,Ua(e,t,r),_n=n,Ws=i;break;case 0:case 11:case 14:case 15:if(!Xn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&gE(r,t,o),i=i.next}while(i!==n)}Ua(e,t,r);break;case 1:if(!Xn&&($h(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Vr(r,t,a)}Ua(e,t,r);break;case 21:Ua(e,t,r);break;case 22:r.mode&1?(Xn=(n=Xn)||r.memoizedState!==null,Ua(e,t,r),Xn=n):Ua(e,t,r);break;default:Ua(e,t,r)}}function U$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new fG),t.forEach(function(n){var i=DG.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Rs(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Xr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*mG(n/1960))-n,10e?16:e,al===null)var n=!1;else{if(e=al,al=null,$v=0,er&6)throw Error(Me(331));var i=er;for(er|=4,et=e.current;et!==null;){var s=et,o=s.child;if(et.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lXr()-ET?Nu(e,0):DT|=r),Bi(e,t)}function o5(e,t){t===0&&(e.mode&1?(t=Dm,Dm<<=1,!(Dm&130023424)&&(Dm=4194304)):t=1);var r=mi();e=va(e,t),e!==null&&(Bg(e,t,r),Bi(e,r))}function SG(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),o5(e,r)}function DG(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Me(314))}n!==null&&n.delete(t),o5(e,r)}var a5;a5=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ii.current)Ni=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ni=!1,cG(e,t,r);Ni=!!(e.flags&131072)}else Ni=!1,Nr&&t.flags&1048576&&hB(t,wv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ry(e,t),e=t.pendingProps;var i=Zh(t,ei.current);Wh(t,r),i=yT(null,t,n,e,i,r);var s=vT();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(n)?(s=!0,bv(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,dT(t),i.updater=eb,t.stateNode=i,i._reactInternals=t,lE(t,n,e,r),t=hE(null,t,n,!0,s,r)):(t.tag=0,Nr&&s&&sT(t),di(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ry(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=CG(n),e=Us(n,e),i){case 0:t=cE(null,t,n,e,r);break e;case 1:t=R$(null,t,n,e,r);break e;case 11:t=M$(null,t,n,e,r);break e;case 14:t=I$(null,t,n,Us(n.type,e),r);break e}throw Error(Me(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Us(n,i),cE(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Us(n,i),R$(e,t,n,i,r);case 3:e:{if(WB(t),e===null)throw Error(Me(387));n=t.pendingProps,s=t.memoizedState,i=s.element,yB(e,t),Ev(t,n,null,r);var o=t.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=nd(Error(Me(423)),t),t=B$(e,t,n,r,i);break e}else if(n!==i){i=nd(Error(Me(424)),t),t=B$(e,t,n,r,i);break e}else for(Yi=vl(t.stateNode.containerInfo.firstChild),Qi=t,Nr=!0,qs=null,r=gB(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ed(),n===i){t=ba(e,t,r);break e}di(e,t,n,r)}t=t.child}return t;case 5:return vB(t),e===null&&sE(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,eE(n,i)?o=null:s!==null&&eE(n,s)&&(t.flags|=32),UB(e,t),di(e,t,o,r),t.child;case 6:return e===null&&sE(t),null;case 13:return VB(e,t,r);case 4:return fT(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=td(t,null,n,r):di(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Us(n,i),M$(e,t,n,i,r);case 7:return di(e,t,t.pendingProps,r),t.child;case 8:return di(e,t,t.pendingProps.children,r),t.child;case 12:return di(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Sr(Sv,n._currentValue),n._currentValue=o,s!==null)if(so(s.value,o)){if(s.children===i.children&&!Ii.current){t=ba(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=ca(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),oE(s.return,r,t),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Me(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),oE(o,r,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}di(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Wh(t,r),i=Ss(i),n=n(i),t.flags|=1,di(e,t,n,r),t.child;case 14:return n=t.type,i=Us(n,t.pendingProps),i=Us(n.type,i),I$(e,t,n,i,r);case 15:return zB(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Us(n,i),Ry(e,t),t.tag=1,Ri(n)?(e=!0,bv(t)):e=!1,Wh(t,r),RB(t,n,i),lE(t,n,i,r),hE(null,t,n,!0,e,r);case 19:return GB(e,t,r);case 22:return HB(e,t,r)}throw Error(Me(156,t.tag))};function l5(e,t){return NR(e,t)}function EG(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vs(e,t,r,n){return new EG(e,t,r,n)}function kT(e){return e=e.prototype,!(!e||!e.isReactComponent)}function CG(e){if(typeof e=="function")return kT(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qA)return 11;if(e===KA)return 14}return 2}function Sl(e,t){var r=e.alternate;return r===null?(r=vs(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function zy(e,t,r,n,i,s){var o=2;if(n=e,typeof e=="function")kT(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case wh:return Mu(r.children,i,s,t);case GA:o=8,i|=8;break;case PD:return e=vs(12,r,t,i|2),e.elementType=PD,e.lanes=s,e;case FD:return e=vs(13,r,t,i),e.elementType=FD,e.lanes=s,e;case OD:return e=vs(19,r,t,i),e.elementType=OD,e.lanes=s,e;case vR:return nb(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mR:o=10;break e;case yR:o=9;break e;case qA:o=11;break e;case KA:o=14;break e;case Qa:o=16,n=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=vs(o,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function Mu(e,t,r,n){return e=vs(7,e,n,t),e.lanes=r,e}function nb(e,t,r,n){return e=vs(22,e,n,t),e.elementType=vR,e.lanes=r,e.stateNode={isHidden:!1},e}function Px(e,t,r){return e=vs(6,e,null,t),e.lanes=r,e}function Fx(e,t,r){return t=vs(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AG(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fx(0),this.expirationTimes=fx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _T(e,t,r,n,i,s,o,a,l){return e=new AG(e,t,r,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=vs(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dT(s),e}function TG(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d5)}catch(e){console.error(e)}}d5(),dR.exports=ss;var FT=dR.exports;const OT=jo(FT),PG=RA({__proto__:null,default:OT},[FT]);var Y$=FT;$D.createRoot=Y$.createRoot,$D.hydrateRoot=Y$.hydrateRoot;/** +`+s.stack}return{value:e,source:t,stack:i,digest:null}}function kx(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function lE(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var uG=typeof WeakMap=="function"?WeakMap:Map;function zB(e,t,r){r=da(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){kv||(kv=!0,vE=n),lE(e,t)},r}function HB(e,t,r){r=da(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){lE(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){lE(e,t),typeof n!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function O$(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new uG;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=DG.bind(null,e,t,r),t.then(e,e))}function I$(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function M$(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=da(-1,1),t.tag=2,wl(r,t,1))),r.lanes|=1),e)}var cG=$a.ReactCurrentOwner,Ri=!1;function gi(e,t,r,n){t.child=e===null?yB(t,null,r,n):nd(t,e.child,r,n)}function N$(e,t,r,n,i){r=r.render;var s=t.ref;return Gh(t,i),n=vA(e,t,r,n,s,i),r=bA(),e!==null&&!Ri?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,wa(e,t,i)):(Rr&&r&&oA(t),t.flags|=1,gi(e,t,n,i),t.child)}function R$(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!_A(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,UB(e,t,s,n,i)):(e=zy(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:Qp,r(o,n)&&e.ref===t.ref)return wa(e,t,i)}return t.flags|=1,e=El(s,n),e.ref=t.ref,e.return=t,t.child=e}function UB(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Qp(s,n)&&e.ref===t.ref)if(Ri=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(Ri=!0);else return t.lanes=e.lanes,wa(e,t,i)}return uE(e,t,r,n,i)}function WB(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Cr(Fh,Xi),Xi|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Cr(Fh,Xi),Xi|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Cr(Fh,Xi),Xi|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,Cr(Fh,Xi),Xi|=n;return gi(e,t,i,r),t.child}function VB(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function uE(e,t,r,n,i){var s=zi(r)?Xu:ni.current;return s=td(t,s),Gh(t,i),r=vA(e,t,r,n,s,i),n=bA(),e!==null&&!Ri?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,wa(e,t,i)):(Rr&&n&&oA(t),t.flags|=1,gi(e,t,r,i),t.child)}function B$(e,t,r,n,i){if(zi(r)){var s=!0;vv(t)}else s=!1;if(Gh(t,i),t.stateNode===null)Ry(e,t),jB(t,r,n),aE(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Cs(u):(u=zi(r)?Xu:ni.current,u=td(t,u));var c=r.getDerivedStateFromProps,h=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&F$(t,o,n,u),tl=!1;var d=t.memoizedState;o.state=d,Dv(t,n,o,i),l=t.memoizedState,a!==n||d!==l||ji.current||tl?(typeof c=="function"&&(oE(t,r,c,n),l=t.memoizedState),(a=tl||P$(t,r,a,n,d,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,bB(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Gs(t.type,a),o.props=u,h=t.pendingProps,d=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Cs(l):(l=zi(r)?Xu:ni.current,l=td(t,l));var f=r.getDerivedStateFromProps;(c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||d!==l)&&F$(t,o,n,l),tl=!1,d=t.memoizedState,o.state=d,Dv(t,n,o,i);var p=t.memoizedState;a!==h||d!==p||ji.current||tl?(typeof f=="function"&&(oE(t,r,f,n),p=t.memoizedState),(u=tl||P$(t,r,u,n,d,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),o.props=n,o.state=p,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return cE(e,t,r,n,s,i)}function cE(e,t,r,n,i,s){VB(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&E$(t,r,!1),wa(e,t,s);n=t.stateNode,cG.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=nd(t,e.child,null,s),t.child=nd(t,null,a,s)):gi(e,t,a,s),t.memoizedState=n.state,i&&E$(t,r,!0),t.child}function GB(e){var t=e.stateNode;t.pendingContext?D$(e,t.pendingContext,t.pendingContext!==t.context):t.context&&D$(e,t.context,!1),pA(e,t.containerInfo)}function j$(e,t,r,n,i){return rd(),lA(i),t.flags|=256,gi(e,t,r,n),t.child}var hE={dehydrated:null,treeContext:null,retryLane:0};function dE(e){return{baseLanes:e,cachePool:null,transitions:null}}function qB(e,t,r){var n=t.pendingProps,i=zr.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Cr(zr,i&1),e===null)return iE(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,s?(n=t.mode,s=t.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=rb(o,n,0,null),e=Ru(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=dE(r),t.memoizedState=hE,e):SA(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return hG(e,t,o,n,a,i,r);if(s){s=n.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=El(i,l),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=El(a,s):(s=Ru(s,o,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,o=e.child.memoizedState,o=o===null?dE(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~r,t.memoizedState=hE,n}return s=e.child,e=s.sibling,n=El(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function SA(e,t){return t=rb({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lm(e,t,r,n){return n!==null&&lA(n),nd(t,e.child,null,r),e=SA(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hG(e,t,r,n,i,s,o){if(r)return t.flags&256?(t.flags&=-257,n=kx(Error(Me(422))),Lm(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=rb({mode:"visible",children:n.children},i,0,null),s=Ru(s,i,o,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&nd(t,e.child,null,o),t.child.memoizedState=dE(o),t.memoizedState=hE,s);if(!(t.mode&1))return Lm(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(Me(419)),n=kx(s,n,void 0),Lm(e,t,o,n)}if(a=(o&e.childLanes)!==0,Ri||a){if(n=Cn,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,xa(e,i),io(n,e,i,-1))}return kA(),n=kx(Error(Me(421))),Lm(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=EG.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,es=xl(i.nextSibling),ts=t,Rr=!0,Xs=null,e!==null&&(gs[ms++]=ua,gs[ms++]=ca,gs[ms++]=Yu,ua=e.id,ca=e.overflow,Yu=t),t=SA(t,n.children),t.flags|=4096,t)}function z$(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),sE(e.return,t,r)}function _x(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function KB(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(gi(e,t,n.children,r),n=zr.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&z$(e,r,t);else if(e.tag===19)z$(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Cr(zr,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Ev(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),_x(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ev(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}_x(t,!0,r,null,s);break;case"together":_x(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ry(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wa(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Zu|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Me(153));if(t.child!==null){for(e=t.child,r=El(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=El(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function dG(e,t,r){switch(t.tag){case 3:GB(t),rd();break;case 5:xB(t);break;case 1:zi(t.type)&&vv(t);break;case 4:pA(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Cr(wv,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Cr(zr,zr.current&1),t.flags|=128,null):r&t.child.childLanes?qB(e,t,r):(Cr(zr,zr.current&1),e=wa(e,t,r),e!==null?e.sibling:null);Cr(zr,zr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return KB(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Cr(zr,zr.current),n)break;return null;case 22:case 23:return t.lanes=0,WB(e,t,r)}return wa(e,t,r)}var JB,fE,XB,YB;JB=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};fE=function(){};XB=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,$u(Po.current);var s=null;switch(r){case"input":i=ID(e,i),n=ID(e,n),s=[];break;case"select":i=Wr({},i,{value:void 0}),n=Wr({},n,{value:void 0}),s=[];break;case"textarea":i=RD(e,i),n=RD(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=mv)}jD(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Vp.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in n){var l=n[u];if(a=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Vp.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&kr("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}r&&(s=s||[]).push("style",r);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};YB=function(e,t,r,n){r!==n&&(t.flags|=4)};function Af(e,t){if(!Rr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Jn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function fG(e,t,r){var n=t.pendingProps;switch(aA(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jn(t),null;case 1:return zi(t.type)&&yv(),Jn(t),null;case 3:return n=t.stateNode,id(),Fr(ji),Fr(ni),mA(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(_m(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xs!==null&&(wE(Xs),Xs=null))),fE(e,t),Jn(t),null;case 5:gA(t);var i=$u(ng.current);if(r=t.type,e!==null&&t.stateNode!=null)XB(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Me(166));return Jn(t),null}if(e=$u(Po.current),_m(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Ao]=t,n[tg]=s,e=(t.mode&1)!==0,r){case"dialog":kr("cancel",n),kr("close",n);break;case"iframe":case"object":case"embed":kr("load",n);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Ao]=t,e[tg]=n,JB(e,t,!1,!1),t.stateNode=e;e:{switch(o=zD(r,n),r){case"dialog":kr("cancel",e),kr("close",e),i=n;break;case"iframe":case"object":case"embed":kr("load",e),i=n;break;case"video":case"audio":for(i=0;iod&&(t.flags|=128,n=!0,Af(s,!1),t.lanes=4194304)}else{if(!n)if(e=Ev(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Af(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Rr)return Jn(t),null}else 2*Qr()-s.renderingStartTime>od&&r!==1073741824&&(t.flags|=128,n=!0,Af(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(r=s.last,r!==null?r.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Qr(),t.sibling=null,r=zr.current,Cr(zr,n?r&1|2:r&1),t):(Jn(t),null);case 22:case 23:return AA(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Xi&1073741824&&(Jn(t),t.subtreeFlags&6&&(t.flags|=8192)):Jn(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function pG(e,t){switch(aA(t),t.tag){case 1:return zi(t.type)&&yv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return id(),Fr(ji),Fr(ni),mA(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gA(t),null;case 13:if(Fr(zr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));rd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fr(zr),null;case 4:return id(),null;case 10:return hA(t.type._context),null;case 22:case 23:return AA(),null;case 24:return null;default:return null}}var Pm=!1,Zn=!1,gG=typeof WeakSet=="function"?WeakSet:Set,et=null;function Ph(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){qr(e,t,n)}else r.current=null}function pE(e,t,r){try{r()}catch(n){qr(e,t,n)}}var H$=!1;function mG(e,t){if(YD=fv,e=rB(),sA(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,h=e,d=null;t:for(;;){for(var f;h!==r||i!==0&&h.nodeType!==3||(a=o+i),h!==s||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)d=h,h=f;for(;;){if(h===e)break t;if(d===r&&++u===i&&(a=o),d===s&&++c===n&&(l=o),(f=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(QD={focusedElem:e,selectionRange:r},fv=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){t=et;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,y=p.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:Gs(t.type,m),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(D){qr(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}return p=H$,H$=!1,p}function xp(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&pE(t,r,s)}i=i.next}while(i!==n)}}function eb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function gE(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function QB(e){var t=e.alternate;t!==null&&(e.alternate=null,QB(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ao],delete t[tg],delete t[tE],delete t[QV],delete t[ZV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ZB(e){return e.tag===5||e.tag===3||e.tag===4}function U$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZB(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=mv));else if(n!==4&&(e=e.child,e!==null))for(mE(e,t,r),e=e.sibling;e!==null;)mE(e,t,r),e=e.sibling}function yE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(yE(e,t,r),e=e.sibling;e!==null;)yE(e,t,r),e=e.sibling}var Pn=null,qs=!1;function Va(e,t,r){for(r=r.child;r!==null;)e5(e,t,r),r=r.sibling}function e5(e,t,r){if(Lo&&typeof Lo.onCommitFiberUnmount=="function")try{Lo.onCommitFiberUnmount(G0,r)}catch{}switch(r.tag){case 5:Zn||Ph(r,t);case 6:var n=Pn,i=qs;Pn=null,Va(e,t,r),Pn=n,qs=i,Pn!==null&&(qs?(e=Pn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pn.removeChild(r.stateNode));break;case 18:Pn!==null&&(qs?(e=Pn,r=r.stateNode,e.nodeType===8?Sx(e.parentNode,r):e.nodeType===1&&Sx(e,r),Xp(e)):Sx(Pn,r.stateNode));break;case 4:n=Pn,i=qs,Pn=r.stateNode.containerInfo,qs=!0,Va(e,t,r),Pn=n,qs=i;break;case 0:case 11:case 14:case 15:if(!Zn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&pE(r,t,o),i=i.next}while(i!==n)}Va(e,t,r);break;case 1:if(!Zn&&(Ph(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){qr(r,t,a)}Va(e,t,r);break;case 21:Va(e,t,r);break;case 22:r.mode&1?(Zn=(n=Zn)||r.memoizedState!==null,Va(e,t,r),Zn=n):Va(e,t,r);break;default:Va(e,t,r)}}function W$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new gG),t.forEach(function(n){var i=CG.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function zs(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Qr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vG(n/1960))-n,10e?16:e,ul===null)var n=!1;else{if(e=ul,ul=null,_v=0,nr&6)throw Error(Me(331));var i=nr;for(nr|=4,et=e.current;et!==null;){var s=et,o=s.child;if(et.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lQr()-CA?Nu(e,0):EA|=r),Hi(e,t)}function l5(e,t){t===0&&(e.mode&1?(t=Dm,Dm<<=1,!(Dm&130023424)&&(Dm=4194304)):t=1);var r=bi();e=xa(e,t),e!==null&&(Bg(e,t,r),Hi(e,r))}function EG(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),l5(e,r)}function CG(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Me(314))}n!==null&&n.delete(t),l5(e,r)}var u5;u5=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ji.current)Ri=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ri=!1,dG(e,t,r);Ri=!!(e.flags&131072)}else Ri=!1,Rr&&t.flags&1048576&&fB(t,xv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ry(e,t),e=t.pendingProps;var i=td(t,ni.current);Gh(t,r),i=vA(null,t,n,e,i,r);var s=bA();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zi(n)?(s=!0,vv(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,fA(t),i.updater=Z0,t.stateNode=i,i._reactInternals=t,aE(t,n,e,r),t=cE(null,t,n,!0,s,r)):(t.tag=0,Rr&&s&&oA(t),gi(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ry(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=AG(n),e=Gs(n,e),i){case 0:t=uE(null,t,n,e,r);break e;case 1:t=B$(null,t,n,e,r);break e;case 11:t=N$(null,t,n,e,r);break e;case 14:t=R$(null,t,n,Gs(n.type,e),r);break e}throw Error(Me(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gs(n,i),uE(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gs(n,i),B$(e,t,n,i,r);case 3:e:{if(GB(t),e===null)throw Error(Me(387));n=t.pendingProps,s=t.memoizedState,i=s.element,bB(e,t),Dv(t,n,null,r);var o=t.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=sd(Error(Me(423)),t),t=j$(e,t,n,r,i);break e}else if(n!==i){i=sd(Error(Me(424)),t),t=j$(e,t,n,r,i);break e}else for(es=xl(t.stateNode.containerInfo.firstChild),ts=t,Rr=!0,Xs=null,r=yB(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(rd(),n===i){t=wa(e,t,r);break e}gi(e,t,n,r)}t=t.child}return t;case 5:return xB(t),e===null&&iE(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,ZD(n,i)?o=null:s!==null&&ZD(n,s)&&(t.flags|=32),VB(e,t),gi(e,t,o,r),t.child;case 6:return e===null&&iE(t),null;case 13:return qB(e,t,r);case 4:return pA(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=nd(t,null,n,r):gi(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gs(n,i),N$(e,t,n,i,r);case 7:return gi(e,t,t.pendingProps,r),t.child;case 8:return gi(e,t,t.pendingProps.children,r),t.child;case 12:return gi(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Cr(wv,n._currentValue),n._currentValue=o,s!==null)if(lo(s.value,o)){if(s.children===i.children&&!ji.current){t=wa(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=da(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),sE(s.return,r,t),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Me(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),sE(o,r,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}gi(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Gh(t,r),i=Cs(i),n=n(i),t.flags|=1,gi(e,t,n,r),t.child;case 14:return n=t.type,i=Gs(n,t.pendingProps),i=Gs(n.type,i),R$(e,t,n,i,r);case 15:return UB(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gs(n,i),Ry(e,t),t.tag=1,zi(n)?(e=!0,vv(t)):e=!1,Gh(t,r),jB(t,n,i),aE(t,n,i,r),cE(null,t,n,!0,e,r);case 19:return KB(e,t,r);case 22:return WB(e,t,r)}throw Error(Me(156,t.tag))};function c5(e,t){return NR(e,t)}function TG(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ws(e,t,r,n){return new TG(e,t,r,n)}function _A(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AG(e){if(typeof e=="function")return _A(e)?1:0;if(e!=null){if(e=e.$$typeof,e===KT)return 11;if(e===JT)return 14}return 2}function El(e,t){var r=e.alternate;return r===null?(r=ws(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function zy(e,t,r,n,i,s){var o=2;if(n=e,typeof e=="function")_A(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Dh:return Ru(r.children,i,s,t);case qT:o=8,i|=8;break;case LD:return e=ws(12,r,t,i|2),e.elementType=LD,e.lanes=s,e;case PD:return e=ws(13,r,t,i),e.elementType=PD,e.lanes=s,e;case FD:return e=ws(19,r,t,i),e.elementType=FD,e.lanes=s,e;case xR:return rb(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vR:o=10;break e;case bR:o=9;break e;case KT:o=11;break e;case JT:o=14;break e;case el:o=16,n=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=ws(o,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function Ru(e,t,r,n){return e=ws(7,e,n,t),e.lanes=r,e}function rb(e,t,r,n){return e=ws(22,e,n,t),e.elementType=xR,e.lanes=r,e.stateNode={isHidden:!1},e}function $x(e,t,r){return e=ws(6,e,null,t),e.lanes=r,e}function Lx(e,t,r){return t=ws(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kG(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hx(0),this.expirationTimes=hx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $A(e,t,r,n,i,s,o,a,l){return e=new kG(e,t,r,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ws(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},fA(s),e}function _G(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p5)}catch(e){console.error(e)}}p5(),pR.exports=us;var OA=pR.exports;const IA=Ho(OA),OG=BT({__proto__:null,default:IA},[OA]);var Q$=OA;_D.createRoot=Q$.createRoot,_D.hydrateRoot=Q$.hydrateRoot;/** * @remix-run/router v1.20.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function sd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function OG(){return Math.random().toString(36).substr(2,8)}function Z$(e,t){return{usr:e.state,key:e.key,idx:t}}function lg(e,t,r,n){return r===void 0&&(r=null),Or({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gl(t):t,{state:r,key:t&&t.key||n||OG()})}function Zu(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Gl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function NG(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=tn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Or({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){a=tn.Pop;let y=c(),b=y==null?null:y-u;u=y,l&&l({action:a,location:m.location,delta:b})}function d(y,b){a=tn.Push;let v=lg(m.location,y,b);u=c()+1;let E=Z$(v,u),D=m.createHref(v);try{o.pushState(E,"",D)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(D)}s&&l&&l({action:a,location:m.location,delta:1})}function f(y,b){a=tn.Replace;let v=lg(m.location,y,b);u=c();let E=Z$(v,u),D=m.createHref(v);o.replaceState(E,"",D),s&&l&&l({action:a,location:m.location,delta:0})}function p(y){let b=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof y=="string"?y:Zu(y);return v=v.replace(/ $/,"%20"),Nt(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let m={get action(){return a},get location(){return e(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Q$,h),l=y,()=>{i.removeEventListener(Q$,h),l=null}},createHref(y){return t(i,y)},createURL:p,encodeLocation(y){let b=p(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:f,go(y){return o.go(y)}};return m}var mr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mr||(mr={}));const MG=new Set(["lazy","caseSensitive","path","id","index","children"]);function IG(e){return e.index===!0}function Fv(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,s)=>{let o=[...r,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(Nt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Nt(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),IG(i)){let l=Or({},i,t(i),{id:a});return n[a]=l,l}else{let l=Or({},i,t(i),{id:a,children:void 0});return n[a]=l,i.children&&(l.children=Fv(i.children,t,o,n)),l}})}function xu(e,t,r){return r===void 0&&(r="/"),Hy(e,t,r,!1)}function Hy(e,t,r,n){let i=typeof t=="string"?Gl(t):t,s=_d(i.pathname||"/",r);if(s==null)return null;let o=f5(e);BG(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Nt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=ha([n,l.relativePath]),c=r.concat(l);s.children&&s.children.length>0&&(Nt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),f5(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:GG(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of p5(s.path))i(s,o,l)}),t}function p5(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=p5(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function BG(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:qG(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jG=/^:[\w-]+$/,zG=3,HG=2,UG=1,WG=10,VG=-2,e3=e=>e==="*";function GG(e,t){let r=e.split("/"),n=r.length;return r.some(e3)&&(n+=VG),t&&(n+=HG),r.filter(i=>!e3(i)).reduce((i,s)=>i+(jG.test(s)?zG:s===""?UG:WG),n)}function qG(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function KG(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,i={},s="/",o=[];for(let a=0;a{let{paramName:d,isOptional:f}=c;if(d==="*"){let m=a[h]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[h];return f&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function JG(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),sd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function XG(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _d(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function YG(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Gl(e):e;return{pathname:r?r.startsWith("/")?r:QG(r,t):t,search:eq(n),hash:tq(i)}}function QG(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ox(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function g5(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function NT(e,t){let r=g5(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function MT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Gl(e):(i=Or({},e),Nt(!i.pathname||!i.pathname.includes("?"),Ox("?","pathname","search",i)),Nt(!i.pathname||!i.pathname.includes("#"),Ox("#","pathname","hash",i)),Nt(!i.search||!i.search.includes("#"),Ox("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}a=h>=0?t[h]:"/"}let l=YG(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const ha=e=>e.join("/").replace(/\/\/+/g,"/"),ZG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),eq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,tq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ov{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function lb(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const m5=["post","put","patch","delete"],rq=new Set(m5),nq=["get",...m5],iq=new Set(nq),sq=new Set([301,302,303,307,308]),oq=new Set([307,308]),Nx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},aq={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tf={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},IT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lq=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),y5="remix-router-transitions";function uq(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Nt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let se=e.detectErrorBoundary;i=de=>({hasErrorBoundary:se(de)})}else i=lq;let s={},o=Fv(e.routes,i,void 0,s),a,l=e.basename||"/",u=e.dataStrategy||fq,c=e.patchRoutesOnNavigation,h=Or({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),d=null,f=new Set,p=null,m=null,y=null,b=e.hydrationData!=null,v=xu(o,e.history.location,l),E=null;if(v==null&&!c){let se=Li(404,{pathname:e.history.location.pathname}),{matches:de,route:ge}=d3(o);v=de,E={[ge.id]:se}}v&&!e.hydrationData&&ki(v,o,e.history.location.pathname).active&&(v=null);let D;if(v)if(v.some(se=>se.route.lazy))D=!1;else if(!v.some(se=>se.route.loader))D=!0;else if(h.v7_partialHydration){let se=e.hydrationData?e.hydrationData.loaderData:null,de=e.hydrationData?e.hydrationData.errors:null;if(de){let ge=v.findIndex(we=>de[we.route.id]!==void 0);D=v.slice(0,ge+1).every(we=>!EE(we.route,se,de))}else D=v.every(ge=>!EE(ge.route,se,de))}else D=e.hydrationData!=null;else if(D=!1,v=[],h.v7_partialHydration){let se=ki(null,o,e.history.location.pathname);se.active&&se.matches&&(v=se.matches)}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:D,navigation:Nx,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||E,fetchers:new Map,blockers:new Map},A=tn.Pop,$=!1,O,P=!1,N=new Map,F=null,L=!1,k=!1,T=[],M=new Set,R=new Map,B=0,U=-1,V=new Map,K=new Set,J=new Map,G=new Map,Y=new Set,Q=new Map,X=new Map,le;function be(){if(d=e.history.listen(se=>{let{action:de,location:ge,delta:we}=se;if(le){le(),le=void 0;return}sd(X.size===0||we!=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 Ve=Ai({currentLocation:w.location,nextLocation:ge,historyAction:de});if(Ve&&we!=null){let rt=new Promise(ct=>{le=ct});e.history.go(we*-1),sn(Ve,{state:"blocked",location:ge,proceed(){sn(Ve,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),rt.then(()=>e.history.go(we))},reset(){let ct=new Map(w.blockers);ct.set(Ve,Tf),ke({blockers:ct})}});return}return W(de,ge)}),r){Tq(t,N);let se=()=>kq(t,N);t.addEventListener("pagehide",se),F=()=>t.removeEventListener("pagehide",se)}return w.initialized||W(tn.Pop,w.location,{initialHydration:!0}),C}function ce(){d&&d(),F&&F(),f.clear(),O&&O.abort(),w.fetchers.forEach((se,de)=>at(de)),w.blockers.forEach((se,de)=>rr(de))}function xe(se){return f.add(se),()=>f.delete(se)}function ke(se,de){de===void 0&&(de={}),w=Or({},w,se);let ge=[],we=[];h.v7_fetcherPersist&&w.fetchers.forEach((Ve,rt)=>{Ve.state==="idle"&&(Y.has(rt)?we.push(rt):ge.push(rt))}),[...f].forEach(Ve=>Ve(w,{deletedFetchers:we,viewTransitionOpts:de.viewTransitionOpts,flushSync:de.flushSync===!0})),h.v7_fetcherPersist&&(ge.forEach(Ve=>w.fetchers.delete(Ve)),we.forEach(Ve=>at(Ve)))}function Re(se,de,ge){var we,Ve;let{flushSync:rt}=ge===void 0?{}:ge,ct=w.actionData!=null&&w.navigation.formMethod!=null&&Vs(w.navigation.formMethod)&&w.navigation.state==="loading"&&((we=se.state)==null?void 0:we._isRedirect)!==!0,He;de.actionData?Object.keys(de.actionData).length>0?He=de.actionData:He=null:ct?He=w.actionData:He=null;let Ge=de.loaderData?c3(w.loaderData,de.loaderData,de.matches||[],de.errors):w.loaderData,Ue=w.blockers;Ue.size>0&&(Ue=new Map(Ue),Ue.forEach((St,Gt)=>Ue.set(Gt,Tf)));let it=$===!0||w.navigation.formMethod!=null&&Vs(w.navigation.formMethod)&&((Ve=se.state)==null?void 0:Ve._isRedirect)!==!0;a&&(o=a,a=void 0),L||A===tn.Pop||(A===tn.Push?e.history.push(se,se.state):A===tn.Replace&&e.history.replace(se,se.state));let xt;if(A===tn.Pop){let St=N.get(w.location.pathname);St&&St.has(se.pathname)?xt={currentLocation:w.location,nextLocation:se}:N.has(se.pathname)&&(xt={currentLocation:se,nextLocation:w.location})}else if(P){let St=N.get(w.location.pathname);St?St.add(se.pathname):(St=new Set([se.pathname]),N.set(w.location.pathname,St)),xt={currentLocation:w.location,nextLocation:se}}ke(Or({},de,{actionData:He,loaderData:Ge,historyAction:A,location:se,initialized:!0,navigation:Nx,revalidation:"idle",restoreScrollPosition:Ti(se,de.matches||w.matches),preventScrollReset:it,blockers:Ue}),{viewTransitionOpts:xt,flushSync:rt===!0}),A=tn.Pop,$=!1,P=!1,L=!1,k=!1,T=[]}async function $t(se,de){if(typeof se=="number"){e.history.go(se);return}let ge=DE(w.location,w.matches,l,h.v7_prependBasename,se,h.v7_relativeSplatPath,de==null?void 0:de.fromRouteId,de==null?void 0:de.relative),{path:we,submission:Ve,error:rt}=r3(h.v7_normalizeFormMethod,!1,ge,de),ct=w.location,He=lg(w.location,we,de&&de.state);He=Or({},He,e.history.encodeLocation(He));let Ge=de&&de.replace!=null?de.replace:void 0,Ue=tn.Push;Ge===!0?Ue=tn.Replace:Ge===!1||Ve!=null&&Vs(Ve.formMethod)&&Ve.formAction===w.location.pathname+w.location.search&&(Ue=tn.Replace);let it=de&&"preventScrollReset"in de?de.preventScrollReset===!0:void 0,xt=(de&&de.flushSync)===!0,St=Ai({currentLocation:ct,nextLocation:He,historyAction:Ue});if(St){sn(St,{state:"blocked",location:He,proceed(){sn(St,{state:"proceeding",proceed:void 0,reset:void 0,location:He}),$t(se,de)},reset(){let Gt=new Map(w.blockers);Gt.set(St,Tf),ke({blockers:Gt})}});return}return await W(Ue,He,{submission:Ve,pendingError:rt,preventScrollReset:it,replace:de&&de.replace,enableViewTransition:de&&de.viewTransition,flushSync:xt})}function mt(){if(ae(),ke({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){W(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}W(A||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:P===!0})}}async function W(se,de,ge){O&&O.abort(),O=null,A=se,L=(ge&&ge.startUninterruptedRevalidation)===!0,oi(w.location,w.matches),$=(ge&&ge.preventScrollReset)===!0,P=(ge&&ge.enableViewTransition)===!0;let we=a||o,Ve=ge&&ge.overrideNavigation,rt=xu(we,de,l),ct=(ge&&ge.flushSync)===!0,He=ki(rt,we,de.pathname);if(He.active&&He.matches&&(rt=He.matches),!rt){let{error:Ut,notFoundMatches:Ne,route:oe}=Tn(de.pathname);Re(de,{matches:Ne,loaderData:{},errors:{[oe.id]:Ut}},{flushSync:ct});return}if(w.initialized&&!k&&bq(w.location,de)&&!(ge&&ge.submission&&Vs(ge.submission.formMethod))){Re(de,{matches:rt},{flushSync:ct});return}O=new AbortController;let Ge=Zc(e.history,de,O.signal,ge&&ge.submission),Ue;if(ge&&ge.pendingError)Ue=[wu(rt).route.id,{type:mr.error,error:ge.pendingError}];else if(ge&&ge.submission&&Vs(ge.submission.formMethod)){let Ut=await ye(Ge,de,ge.submission,rt,He.active,{replace:ge.replace,flushSync:ct});if(Ut.shortCircuited)return;if(Ut.pendingActionResult){let[Ne,oe]=Ut.pendingActionResult;if(Ki(oe)&&lb(oe.error)&&oe.error.status===404){O=null,Re(de,{matches:Ut.matches,loaderData:{},errors:{[Ne]:oe.error}});return}}rt=Ut.matches||rt,Ue=Ut.pendingActionResult,Ve=Mx(de,ge.submission),ct=!1,He.active=!1,Ge=Zc(e.history,Ge.url,Ge.signal)}let{shortCircuited:it,matches:xt,loaderData:St,errors:Gt}=await pe(Ge,de,rt,He.active,Ve,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,ct,Ue);it||(O=null,Re(de,Or({matches:xt||rt},h3(Ue),{loaderData:St,errors:Gt})))}async function ye(se,de,ge,we,Ve,rt){rt===void 0&&(rt={}),ae();let ct=Cq(de,ge);if(ke({navigation:ct},{flushSync:rt.flushSync===!0}),Ve){let Ue=await Vi(we,de.pathname,se.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){let it=wu(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,pendingActionResult:[it,{type:mr.error,error:Ue.error}]}}else if(Ue.matches)we=Ue.matches;else{let{notFoundMatches:it,error:xt,route:St}=Tn(de.pathname);return{matches:it,pendingActionResult:[St.id,{type:mr.error,error:xt}]}}}let He,Ge=tp(we,de);if(!Ge.route.action&&!Ge.route.lazy)He={type:mr.error,error:Li(405,{method:se.method,pathname:de.pathname,routeId:Ge.route.id})};else if(He=(await Ee("action",w,se,[Ge],we,null))[Ge.route.id],se.signal.aborted)return{shortCircuited:!0};if(_u(He)){let Ue;return rt&&rt.replace!=null?Ue=rt.replace:Ue=a3(He.response.headers.get("Location"),new URL(se.url),l)===w.location.pathname+w.location.search,await fe(se,He,!0,{submission:ge,replace:Ue}),{shortCircuited:!0}}if(ll(He))throw Li(400,{type:"defer-action"});if(Ki(He)){let Ue=wu(we,Ge.route.id);return(rt&&rt.replace)!==!0&&(A=tn.Push),{matches:we,pendingActionResult:[Ue.route.id,He]}}return{matches:we,pendingActionResult:[Ge.route.id,He]}}async function pe(se,de,ge,we,Ve,rt,ct,He,Ge,Ue,it){let xt=Ve||Mx(de,rt),St=rt||ct||p3(xt),Gt=!L&&(!h.v7_partialHydration||!Ge);if(we){if(Gt){let Qt=re(it);ke(Or({navigation:xt},Qt!==void 0?{actionData:Qt}:{}),{flushSync:Ue})}let Lt=await Vi(ge,de.pathname,se.signal);if(Lt.type==="aborted")return{shortCircuited:!0};if(Lt.type==="error"){let Qt=wu(Lt.partialMatches).route.id;return{matches:Lt.partialMatches,loaderData:{},errors:{[Qt]:Lt.error}}}else if(Lt.matches)ge=Lt.matches;else{let{error:Qt,notFoundMatches:kn,route:Wn}=Tn(de.pathname);return{matches:kn,loaderData:{},errors:{[Wn.id]:Qt}}}}let Ut=a||o,[Ne,oe]=i3(e.history,w,ge,St,de,h.v7_partialHydration&&Ge===!0,h.v7_skipActionErrorRevalidation,k,T,M,Y,J,K,Ut,l,it);if(us(Lt=>!(ge&&ge.some(Qt=>Qt.route.id===Lt))||Ne&&Ne.some(Qt=>Qt.route.id===Lt)),U=++B,Ne.length===0&&oe.length===0){let Lt=nt();return Re(de,Or({matches:ge,loaderData:{},errors:it&&Ki(it[1])?{[it[0]]:it[1].error}:null},h3(it),Lt?{fetchers:new Map(w.fetchers)}:{}),{flushSync:Ue}),{shortCircuited:!0}}if(Gt){let Lt={};if(!we){Lt.navigation=xt;let Qt=re(it);Qt!==void 0&&(Lt.actionData=Qt)}oe.length>0&&(Lt.fetchers=ee(oe)),ke(Lt,{flushSync:Ue})}oe.forEach(Lt=>{ft(Lt.key),Lt.controller&&R.set(Lt.key,Lt.controller)});let Pe=()=>oe.forEach(Lt=>ft(Lt.key));O&&O.signal.addEventListener("abort",Pe);let{loaderResults:Ke,fetcherResults:yt}=await je(w,ge,Ne,oe,se);if(se.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Pe),oe.forEach(Lt=>R.delete(Lt.key));let qt=Nm(Ke);if(qt)return await fe(se,qt.result,!0,{replace:He}),{shortCircuited:!0};if(qt=Nm(yt),qt)return K.add(qt.key),await fe(se,qt.result,!0,{replace:He}),{shortCircuited:!0};let{loaderData:xr,errors:Lr}=u3(w,ge,Ke,it,oe,yt,Q);Q.forEach((Lt,Qt)=>{Lt.subscribe(kn=>{(kn||Lt.done)&&Q.delete(Qt)})}),h.v7_partialHydration&&Ge&&w.errors&&(Lr=Or({},w.errors,Lr));let Ur=nt(),Un=ht(U),pr=Ur||Un||oe.length>0;return Or({matches:ge,loaderData:xr,errors:Lr},pr?{fetchers:new Map(w.fetchers)}:{})}function re(se){if(se&&!Ki(se[1]))return{[se[0]]:se[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function ee(se){return se.forEach(de=>{let ge=w.fetchers.get(de.key),we=kf(void 0,ge?ge.data:void 0);w.fetchers.set(de.key,we)}),new Map(w.fetchers)}function ue(se,de,ge,we){if(n)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.");ft(se);let Ve=(we&&we.flushSync)===!0,rt=a||o,ct=DE(w.location,w.matches,l,h.v7_prependBasename,ge,h.v7_relativeSplatPath,de,we==null?void 0:we.relative),He=xu(rt,ct,l),Ge=ki(He,rt,ct);if(Ge.active&&Ge.matches&&(He=Ge.matches),!He){Ae(se,de,Li(404,{pathname:ct}),{flushSync:Ve});return}let{path:Ue,submission:it,error:xt}=r3(h.v7_normalizeFormMethod,!0,ct,we);if(xt){Ae(se,de,xt,{flushSync:Ve});return}let St=tp(He,Ue),Gt=(we&&we.preventScrollReset)===!0;if(it&&Vs(it.formMethod)){De(se,de,Ue,St,He,Ge.active,Ve,Gt,it);return}J.set(se,{routeId:de,path:Ue}),Ce(se,de,Ue,St,He,Ge.active,Ve,Gt,it)}async function De(se,de,ge,we,Ve,rt,ct,He,Ge){ae(),J.delete(se);function Ue(Pr){if(!Pr.route.action&&!Pr.route.lazy){let yo=Li(405,{method:Ge.formMethod,pathname:ge,routeId:de});return Ae(se,de,yo,{flushSync:ct}),!0}return!1}if(!rt&&Ue(we))return;let it=w.fetchers.get(se);ve(se,Aq(Ge,it),{flushSync:ct});let xt=new AbortController,St=Zc(e.history,ge,xt.signal,Ge);if(rt){let Pr=await Vi(Ve,ge,St.signal);if(Pr.type==="aborted")return;if(Pr.type==="error"){Ae(se,de,Pr.error,{flushSync:ct});return}else if(Pr.matches){if(Ve=Pr.matches,we=tp(Ve,ge),Ue(we))return}else{Ae(se,de,Li(404,{pathname:ge}),{flushSync:ct});return}}R.set(se,xt);let Gt=B,Ne=(await Ee("action",w,St,[we],Ve,se))[we.route.id];if(St.signal.aborted){R.get(se)===xt&&R.delete(se);return}if(h.v7_fetcherPersist&&Y.has(se)){if(_u(Ne)||Ki(Ne)){ve(se,Ja(void 0));return}}else{if(_u(Ne))if(R.delete(se),U>Gt){ve(se,Ja(void 0));return}else return K.add(se),ve(se,kf(Ge)),fe(St,Ne,!1,{fetcherSubmission:Ge,preventScrollReset:He});if(Ki(Ne)){Ae(se,de,Ne.error);return}}if(ll(Ne))throw Li(400,{type:"defer-action"});let oe=w.navigation.location||w.location,Pe=Zc(e.history,oe,xt.signal),Ke=a||o,yt=w.navigation.state!=="idle"?xu(Ke,w.navigation.location,l):w.matches;Nt(yt,"Didn't find any matches after fetcher action");let qt=++B;V.set(se,qt);let xr=kf(Ge,Ne.data);w.fetchers.set(se,xr);let[Lr,Ur]=i3(e.history,w,yt,Ge,oe,!1,h.v7_skipActionErrorRevalidation,k,T,M,Y,J,K,Ke,l,[we.route.id,Ne]);Ur.filter(Pr=>Pr.key!==se).forEach(Pr=>{let yo=Pr.key,Vc=w.fetchers.get(yo),Ba=kf(void 0,Vc?Vc.data:void 0);w.fetchers.set(yo,Ba),ft(yo),Pr.controller&&R.set(yo,Pr.controller)}),ke({fetchers:new Map(w.fetchers)});let Un=()=>Ur.forEach(Pr=>ft(Pr.key));xt.signal.addEventListener("abort",Un);let{loaderResults:pr,fetcherResults:Lt}=await je(w,yt,Lr,Ur,Pe);if(xt.signal.aborted)return;xt.signal.removeEventListener("abort",Un),V.delete(se),R.delete(se),Ur.forEach(Pr=>R.delete(Pr.key));let Qt=Nm(pr);if(Qt)return fe(Pe,Qt.result,!1,{preventScrollReset:He});if(Qt=Nm(Lt),Qt)return K.add(Qt.key),fe(Pe,Qt.result,!1,{preventScrollReset:He});let{loaderData:kn,errors:Wn}=u3(w,yt,pr,void 0,Ur,Lt,Q);if(w.fetchers.has(se)){let Pr=Ja(Ne.data);w.fetchers.set(se,Pr)}ht(qt),w.navigation.state==="loading"&&qt>U?(Nt(A,"Expected pending action"),O&&O.abort(),Re(w.navigation.location,{matches:yt,loaderData:kn,errors:Wn,fetchers:new Map(w.fetchers)})):(ke({errors:Wn,loaderData:c3(w.loaderData,kn,yt,Wn),fetchers:new Map(w.fetchers)}),k=!1)}async function Ce(se,de,ge,we,Ve,rt,ct,He,Ge){let Ue=w.fetchers.get(se);ve(se,kf(Ge,Ue?Ue.data:void 0),{flushSync:ct});let it=new AbortController,xt=Zc(e.history,ge,it.signal);if(rt){let Ne=await Vi(Ve,ge,xt.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){Ae(se,de,Ne.error,{flushSync:ct});return}else if(Ne.matches)Ve=Ne.matches,we=tp(Ve,ge);else{Ae(se,de,Li(404,{pathname:ge}),{flushSync:ct});return}}R.set(se,it);let St=B,Ut=(await Ee("loader",w,xt,[we],Ve,se))[we.route.id];if(ll(Ut)&&(Ut=await RT(Ut,xt.signal,!0)||Ut),R.get(se)===it&&R.delete(se),!xt.signal.aborted){if(Y.has(se)){ve(se,Ja(void 0));return}if(_u(Ut))if(U>St){ve(se,Ja(void 0));return}else{K.add(se),await fe(xt,Ut,!1,{preventScrollReset:He});return}if(Ki(Ut)){Ae(se,de,Ut.error);return}Nt(!ll(Ut),"Unhandled fetcher deferred data"),ve(se,Ja(Ut.data))}}async function fe(se,de,ge,we){let{submission:Ve,fetcherSubmission:rt,preventScrollReset:ct,replace:He}=we===void 0?{}:we;de.response.headers.has("X-Remix-Revalidate")&&(k=!0);let Ge=de.response.headers.get("Location");Nt(Ge,"Expected a Location header on the redirect Response"),Ge=a3(Ge,new URL(se.url),l);let Ue=lg(w.location,Ge,{_isRedirect:!0});if(r){let Ne=!1;if(de.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(IT.test(Ge)){const oe=e.history.createURL(Ge);Ne=oe.origin!==t.location.origin||_d(oe.pathname,l)==null}if(Ne){He?t.location.replace(Ge):t.location.assign(Ge);return}}O=null;let it=He===!0||de.response.headers.has("X-Remix-Replace")?tn.Replace:tn.Push,{formMethod:xt,formAction:St,formEncType:Gt}=w.navigation;!Ve&&!rt&&xt&&St&&Gt&&(Ve=p3(w.navigation));let Ut=Ve||rt;if(oq.has(de.response.status)&&Ut&&Vs(Ut.formMethod))await W(it,Ue,{submission:Or({},Ut,{formAction:Ge}),preventScrollReset:ct||$,enableViewTransition:ge?P:void 0});else{let Ne=Mx(Ue,Ve);await W(it,Ue,{overrideNavigation:Ne,fetcherSubmission:rt,preventScrollReset:ct||$,enableViewTransition:ge?P:void 0})}}async function Ee(se,de,ge,we,Ve,rt){let ct,He={};try{ct=await pq(u,se,de,ge,we,Ve,rt,s,i)}catch(Ge){return we.forEach(Ue=>{He[Ue.route.id]={type:mr.error,error:Ge}}),He}for(let[Ge,Ue]of Object.entries(ct))if(xq(Ue)){let it=Ue.result;He[Ge]={type:mr.redirect,response:yq(it,ge,Ge,Ve,l,h.v7_relativeSplatPath)}}else He[Ge]=await mq(Ue);return He}async function je(se,de,ge,we,Ve){let rt=se.matches,ct=Ee("loader",se,Ve,ge,de,null),He=Promise.all(we.map(async it=>{if(it.matches&&it.match&&it.controller){let St=(await Ee("loader",se,Zc(e.history,it.path,it.controller.signal),[it.match],it.matches,it.key))[it.match.route.id];return{[it.key]:St}}else return Promise.resolve({[it.key]:{type:mr.error,error:Li(404,{pathname:it.path})}})})),Ge=await ct,Ue=(await He).reduce((it,xt)=>Object.assign(it,xt),{});return await Promise.all([Dq(de,Ge,Ve.signal,rt,se.loaderData),Eq(de,Ue,we)]),{loaderResults:Ge,fetcherResults:Ue}}function ae(){k=!0,T.push(...us()),J.forEach((se,de)=>{R.has(de)&&M.add(de),ft(de)})}function ve(se,de,ge){ge===void 0&&(ge={}),w.fetchers.set(se,de),ke({fetchers:new Map(w.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function Ae(se,de,ge,we){we===void 0&&(we={});let Ve=wu(w.matches,de);at(se),ke({errors:{[Ve.route.id]:ge},fetchers:new Map(w.fetchers)},{flushSync:(we&&we.flushSync)===!0})}function ze(se){return h.v7_fetcherPersist&&(G.set(se,(G.get(se)||0)+1),Y.has(se)&&Y.delete(se)),w.fetchers.get(se)||aq}function at(se){let de=w.fetchers.get(se);R.has(se)&&!(de&&de.state==="loading"&&V.has(se))&&ft(se),J.delete(se),V.delete(se),K.delete(se),Y.delete(se),M.delete(se),w.fetchers.delete(se)}function bt(se){if(h.v7_fetcherPersist){let de=(G.get(se)||0)-1;de<=0?(G.delete(se),Y.add(se)):G.set(se,de)}else at(se);ke({fetchers:new Map(w.fetchers)})}function ft(se){let de=R.get(se);de&&(de.abort(),R.delete(se))}function At(se){for(let de of se){let ge=ze(de),we=Ja(ge.data);w.fetchers.set(de,we)}}function nt(){let se=[],de=!1;for(let ge of K){let we=w.fetchers.get(ge);Nt(we,"Expected fetcher: "+ge),we.state==="loading"&&(K.delete(ge),se.push(ge),de=!0)}return At(se),de}function ht(se){let de=[];for(let[ge,we]of V)if(we0}function Ft(se,de){let ge=w.blockers.get(se)||Tf;return X.get(se)!==de&&X.set(se,de),ge}function rr(se){w.blockers.delete(se),X.delete(se)}function sn(se,de){let ge=w.blockers.get(se)||Tf;Nt(ge.state==="unblocked"&&de.state==="blocked"||ge.state==="blocked"&&de.state==="blocked"||ge.state==="blocked"&&de.state==="proceeding"||ge.state==="blocked"&&de.state==="unblocked"||ge.state==="proceeding"&&de.state==="unblocked","Invalid blocker state transition: "+ge.state+" -> "+de.state);let we=new Map(w.blockers);we.set(se,de),ke({blockers:we})}function Ai(se){let{currentLocation:de,nextLocation:ge,historyAction:we}=se;if(X.size===0)return;X.size>1&&sd(!1,"A router only supports one blocker at a time");let Ve=Array.from(X.entries()),[rt,ct]=Ve[Ve.length-1],He=w.blockers.get(rt);if(!(He&&He.state==="proceeding")&&ct({currentLocation:de,nextLocation:ge,historyAction:we}))return rt}function Tn(se){let de=Li(404,{pathname:se}),ge=a||o,{matches:we,route:Ve}=d3(ge);return us(),{notFoundMatches:we,route:Ve,error:de}}function us(se){let de=[];return Q.forEach((ge,we)=>{(!se||se(we))&&(ge.cancel(),de.push(we),Q.delete(we))}),de}function fr(se,de,ge){if(p=se,y=de,m=ge||null,!b&&w.navigation===Nx){b=!0;let we=Ti(w.location,w.matches);we!=null&&ke({restoreScrollPosition:we})}return()=>{p=null,y=null,m=null}}function Yr(se,de){return m&&m(se,de.map(we=>RG(we,w.loaderData)))||se.key}function oi(se,de){if(p&&y){let ge=Yr(se,de);p[ge]=y()}}function Ti(se,de){if(p){let ge=Yr(se,de),we=p[ge];if(typeof we=="number")return we}return null}function ki(se,de,ge){if(c)if(se){if(Object.keys(se[0].params).length>0)return{active:!0,matches:Hy(de,ge,l,!0)}}else return{active:!0,matches:Hy(de,ge,l,!0)||[]};return{active:!1,matches:null}}async function Vi(se,de,ge){if(!c)return{type:"success",matches:se};let we=se;for(;;){let Ve=a==null,rt=a||o,ct=s;try{await c({path:de,matches:we,patch:(Ue,it)=>{ge.aborted||o3(Ue,it,rt,ct,i)}})}catch(Ue){return{type:"error",error:Ue,partialMatches:we}}finally{Ve&&!ge.aborted&&(o=[...o])}if(ge.aborted)return{type:"aborted"};let He=xu(rt,de,l);if(He)return{type:"success",matches:He};let Ge=Hy(rt,de,l,!0);if(!Ge||we.length===Ge.length&&we.every((Ue,it)=>Ue.route.id===Ge[it].route.id))return{type:"success",matches:null};we=Ge}}function mo(se){s={},a=Fv(se,i,void 0,s)}function Fs(se,de){let ge=a==null;o3(se,de,a||o,s,i),ge&&(o=[...o],ke({}))}return C={get basename(){return l},get future(){return h},get state(){return w},get routes(){return o},get window(){return t},initialize:be,subscribe:xe,enableScrollRestoration:fr,navigate:$t,fetch:ue,revalidate:mt,createHref:se=>e.history.createHref(se),encodeLocation:se=>e.history.encodeLocation(se),getFetcher:ze,deleteFetcher:bt,dispose:ce,getBlocker:Ft,deleteBlocker:rr,patchRoutes:Fs,_internalFetchControllers:R,_internalActiveDeferreds:Q,_internalSetRoutes:mo},C}function cq(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function DE(e,t,r,n,i,s,o,a){let l,u;if(o){l=[];for(let h of t)if(l.push(h),h.route.id===o){u=h;break}}else l=t,u=t[t.length-1];let c=MT(i||".",NT(l,s),_d(e.pathname,r)||e.pathname,a==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&u){let h=BT(c.search);if(u.route.index&&!h)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&h){let d=new URLSearchParams(c.search),f=d.getAll("index");d.delete("index"),f.filter(m=>m).forEach(m=>d.append("index",m));let p=d.toString();c.search=p?"?"+p:""}}return n&&r!=="/"&&(c.pathname=c.pathname==="/"?r:ha([r,c.pathname])),Zu(c)}function r3(e,t,r,n){if(!n||!cq(n))return{path:r};if(n.formMethod&&!Sq(n.formMethod))return{path:r,error:Li(405,{method:n.formMethod})};let i=()=>({path:r,error:Li(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),a=x5(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Vs(o))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[m,y]=p;return""+f+m+"="+y+` -`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Vs(o))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}Nt(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=CE(n.formData),u=n.formData;else if(n.body instanceof FormData)l=CE(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=l3(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=l3(l)}catch{return i()}let c={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Vs(c.formMethod))return{path:r,submission:c};let h=Gl(r);return t&&h.search&&BT(h.search)&&l.append("index",""),h.search="?"+l,{path:Zu(h),submission:c}}function n3(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(i=>i.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function i3(e,t,r,n,i,s,o,a,l,u,c,h,d,f,p,m){let y=m?Ki(m[1])?m[1].error:m[1].data:void 0,b=e.createURL(t.location),v=e.createURL(i),E=r;s&&t.errors?E=n3(r,Object.keys(t.errors)[0],!0):m&&Ki(m[1])&&(E=n3(r,m[0]));let D=m?m[1].statusCode:void 0,C=o&&D&&D>=400,w=E.filter(($,O)=>{let{route:P}=$;if(P.lazy)return!0;if(P.loader==null)return!1;if(s)return EE(P,t.loaderData,t.errors);if(hq(t.loaderData,t.matches[O],$)||l.some(L=>L===$.route.id))return!0;let N=t.matches[O],F=$;return s3($,Or({currentUrl:b,currentParams:N.params,nextUrl:v,nextParams:F.params},n,{actionResult:y,actionStatus:D,defaultShouldRevalidate:C?!1:a||b.pathname+b.search===v.pathname+v.search||b.search!==v.search||v5(N,F)}))}),A=[];return h.forEach(($,O)=>{if(s||!r.some(k=>k.route.id===$.routeId)||c.has(O))return;let P=xu(f,$.path,p);if(!P){A.push({key:O,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),F=tp(P,$.path),L=!1;d.has(O)?L=!1:u.has(O)?(u.delete(O),L=!0):N&&N.state!=="idle"&&N.data===void 0?L=a:L=s3(F,Or({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:y,actionStatus:D,defaultShouldRevalidate:C?!1:a})),L&&A.push({key:O,routeId:$.routeId,path:$.path,matches:P,match:F,controller:new AbortController})}),[w,A]}function EE(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,i=r!=null&&r[e.id]!==void 0;return!n&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!i}function hq(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function v5(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function s3(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function o3(e,t,r,n,i){var s;let o;if(e){let u=n[e];Nt(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),o=u.children}else o=r;let a=t.filter(u=>!o.some(c=>b5(u,c))),l=Fv(a,i,[e||"_","patch",String(((s=o)==null?void 0:s.length)||"0")],n);o.push(...l)}function b5(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var i;return(i=t.children)==null?void 0:i.some(s=>b5(r,s))}):!1}async function dq(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];Nt(i,"No route found in manifest");let s={};for(let o in n){let l=i[o]!==void 0&&o!=="hasErrorBoundary";sd(!l,'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.')),!l&&!MG.has(o)&&(s[o]=n[o])}Object.assign(i,s),Object.assign(i,Or({},t(i),{lazy:void 0}))}async function fq(e){let{matches:t}=e,r=t.filter(i=>i.shouldLoad);return(await Promise.all(r.map(i=>i.resolve()))).reduce((i,s,o)=>Object.assign(i,{[r[o].route.id]:s}),{})}async function pq(e,t,r,n,i,s,o,a,l,u){let c=s.map(f=>f.route.lazy?dq(f.route,l,a):void 0),h=s.map((f,p)=>{let m=c[p],y=i.some(v=>v.route.id===f.route.id);return Or({},f,{shouldLoad:y,resolve:async v=>(v&&n.method==="GET"&&(f.route.lazy||f.route.loader)&&(y=!0),y?gq(t,n,f,m,v,u):Promise.resolve({type:mr.data,result:void 0}))})}),d=await e({matches:h,request:n,params:s[0].params,fetcherKey:o,context:u});try{await Promise.all(c)}catch{}return d}async function gq(e,t,r,n,i,s){let o,a,l=u=>{let c,h=new Promise((p,m)=>c=m);a=()=>c(),t.signal.addEventListener("abort",a);let d=p=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:s},...p!==void 0?[p]:[]),f=(async()=>{try{return{type:"data",result:await(i?i(m=>d(m)):d())}}catch(p){return{type:"error",result:p}}})();return Promise.race([f,h])};try{let u=r.route[e];if(n)if(u){let c,[h]=await Promise.all([l(u).catch(d=>{c=d}),n]);if(c!==void 0)throw c;o=h}else if(await n,u=r.route[e],u)o=await l(u);else if(e==="action"){let c=new URL(t.url),h=c.pathname+c.search;throw Li(405,{method:t.method,pathname:h,routeId:r.route.id})}else return{type:mr.data,result:void 0};else if(u)o=await l(u);else{let c=new URL(t.url),h=c.pathname+c.search;throw Li(404,{pathname:h})}Nt(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:mr.error,result:u}}finally{a&&t.signal.removeEventListener("abort",a)}return o}async function mq(e){let{result:t,type:r}=e;if(w5(t)){let u;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(c){return{type:mr.error,error:c}}return r===mr.error?{type:mr.error,error:new Ov(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:mr.data,data:u,statusCode:t.status,headers:t.headers}}if(r===mr.error){if(f3(t)){var n;if(t.data instanceof Error){var i;return{type:mr.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new Ov(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:mr.error,error:t,statusCode:lb(t)?t.status:void 0}}if(wq(t)){var s,o;return{type:mr.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(f3(t)){var a,l;return{type:mr.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:mr.data,data:t}}function yq(e,t,r,n,i,s){let o=e.headers.get("Location");if(Nt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!IT.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=DE(new URL(t.url),a,i,!0,o,s),e.headers.set("Location",o)}return e}function a3(e,t,r){if(IT.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=_d(i.pathname,r)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function Zc(e,t,r,n){let i=e.createURL(x5(t)).toString(),s={signal:r};if(n&&Vs(n.formMethod)){let{formMethod:o,formEncType:a}=n;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(n.json)):a==="text/plain"?s.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?s.body=CE(n.formData):s.body=n.formData}return new Request(i,s)}function CE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function l3(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function vq(e,t,r,n,i){let s={},o=null,a,l=!1,u={},c=r&&Ki(r[1])?r[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let d=h.route.id,f=t[d];if(Nt(!_u(f),"Cannot handle redirect results in processLoaderData"),Ki(f)){let p=f.error;c!==void 0&&(p=c,c=void 0),o=o||{};{let m=wu(e,d);o[m.route.id]==null&&(o[m.route.id]=p)}s[d]=void 0,l||(l=!0,a=lb(f.error)?f.error.status:500),f.headers&&(u[d]=f.headers)}else ll(f)?(n.set(d,f.deferredData),s[d]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!l&&(a=f.statusCode),f.headers&&(u[d]=f.headers)):(s[d]=f.data,f.statusCode&&f.statusCode!==200&&!l&&(a=f.statusCode),f.headers&&(u[d]=f.headers))}),c!==void 0&&r&&(o={[r[0]]:c},s[r[0]]=void 0),{loaderData:s,errors:o,statusCode:a||200,loaderHeaders:u}}function u3(e,t,r,n,i,s,o){let{loaderData:a,errors:l}=vq(t,r,n,o);return i.forEach(u=>{let{key:c,match:h,controller:d}=u,f=s[c];if(Nt(f,"Did not find corresponding fetcher result"),!(d&&d.signal.aborted))if(Ki(f)){let p=wu(e.matches,h==null?void 0:h.route.id);l&&l[p.route.id]||(l=Or({},l,{[p.route.id]:f.error})),e.fetchers.delete(c)}else if(_u(f))Nt(!1,"Unhandled fetcher revalidation redirect");else if(ll(f))Nt(!1,"Unhandled fetcher deferred data");else{let p=Ja(f.data);e.fetchers.set(c,p)}}),{loaderData:a,errors:l}}function c3(e,t,r,n){let i=Or({},t);for(let s of r){let o=s.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(i[o]=t[o]):e[o]!==void 0&&s.route.loader&&(i[o]=e[o]),n&&n.hasOwnProperty(o))break}return i}function h3(e){return e?Ki(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wu(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function d3(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Li(e,t){let{pathname:r,routeId:n,method:i,type:s,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Ov(e||500,a,new Error(l),!0)}function Nm(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,i]=t[r];if(_u(i))return{key:n,result:i}}}function x5(e){let t=typeof e=="string"?Gl(e):e;return Zu(Or({},t,{hash:""}))}function bq(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function xq(e){return w5(e.result)&&sq.has(e.result.status)}function ll(e){return e.type===mr.deferred}function Ki(e){return e.type===mr.error}function _u(e){return(e&&e.type)===mr.redirect}function f3(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function wq(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function w5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Sq(e){return iq.has(e.toLowerCase())}function Vs(e){return rq.has(e.toLowerCase())}async function Dq(e,t,r,n,i){let s=Object.entries(t);for(let o=0;o(d==null?void 0:d.route.id)===a);if(!u)continue;let c=n.find(d=>d.route.id===u.route.id),h=c!=null&&!v5(c,u)&&(i&&i[u.route.id])!==void 0;ll(l)&&h&&await RT(l,r,!1).then(d=>{d&&(t[a]=d)})}}async function Eq(e,t,r){for(let n=0;n(u==null?void 0:u.route.id)===s)&&ll(a)&&(Nt(o,"Expected an AbortController for revalidating fetcher deferred result"),await RT(a,o.signal,!0).then(u=>{u&&(t[i]=u)}))}}async function RT(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:mr.data,data:e.deferredData.unwrappedData}}catch(i){return{type:mr.error,error:i}}return{type:mr.data,data:e.deferredData.data}}}function BT(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function tp(e,t){let r=typeof t=="string"?Gl(t).search:t.search;if(e[e.length-1].route.index&&BT(r||""))return e[e.length-1];let n=g5(e);return n[n.length-1]}function p3(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:s,json:o}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Mx(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Cq(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function kf(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Aq(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ja(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Tq(e,t){try{let r=e.sessionStorage.getItem(y5);if(r){let n=JSON.parse(r);for(let[i,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function kq(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(y5,JSON.stringify(r))}catch(n){sd(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + */function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ad(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MG(){return Math.random().toString(36).substr(2,8)}function e3(e,t){return{usr:e.state,key:e.key,idx:t}}function lg(e,t,r,n){return r===void 0&&(r=null),Nr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Kl(t):t,{state:r,key:t&&t.key||n||MG()})}function tc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Kl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function NG(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=nn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Nr({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){a=nn.Pop;let y=c(),b=y==null?null:y-u;u=y,l&&l({action:a,location:m.location,delta:b})}function d(y,b){a=nn.Push;let v=lg(m.location,y,b);u=c()+1;let E=e3(v,u),D=m.createHref(v);try{o.pushState(E,"",D)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(D)}s&&l&&l({action:a,location:m.location,delta:1})}function f(y,b){a=nn.Replace;let v=lg(m.location,y,b);u=c();let E=e3(v,u),D=m.createHref(v);o.replaceState(E,"",D),s&&l&&l({action:a,location:m.location,delta:0})}function p(y){let b=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof y=="string"?y:tc(y);return v=v.replace(/ $/,"%20"),Nt(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let m={get action(){return a},get location(){return e(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Z$,h),l=y,()=>{i.removeEventListener(Z$,h),l=null}},createHref(y){return t(i,y)},createURL:p,encodeLocation(y){let b=p(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:f,go(y){return o.go(y)}};return m}var br;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(br||(br={}));const RG=new Set(["lazy","caseSensitive","path","id","index","children"]);function BG(e){return e.index===!0}function Pv(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,s)=>{let o=[...r,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(Nt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Nt(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),BG(i)){let l=Nr({},i,t(i),{id:a});return n[a]=l,l}else{let l=Nr({},i,t(i),{id:a,children:void 0});return n[a]=l,i.children&&(l.children=Pv(i.children,t,o,n)),l}})}function Su(e,t,r){return r===void 0&&(r="/"),Hy(e,t,r,!1)}function Hy(e,t,r,n){let i=typeof t=="string"?Kl(t):t,s=Ld(i.pathname||"/",r);if(s==null)return null;let o=g5(e);zG(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Nt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=fa([n,l.relativePath]),c=r.concat(l);s.children&&s.children.length>0&&(Nt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),g5(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:KG(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of m5(s.path))i(s,o,l)}),t}function m5(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=m5(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function zG(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:JG(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const HG=/^:[\w-]+$/,UG=3,WG=2,VG=1,GG=10,qG=-2,t3=e=>e==="*";function KG(e,t){let r=e.split("/"),n=r.length;return r.some(t3)&&(n+=qG),t&&(n+=WG),r.filter(i=>!t3(i)).reduce((i,s)=>i+(HG.test(s)?UG:s===""?VG:GG),n)}function JG(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function XG(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,i={},s="/",o=[];for(let a=0;a{let{paramName:d,isOptional:f}=c;if(d==="*"){let m=a[h]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[h];return f&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function YG(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ad(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function QG(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ad(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ld(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function ZG(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Kl(e):e;return{pathname:r?r.startsWith("/")?r:eq(r,t):t,search:rq(n),hash:nq(i)}}function eq(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Px(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function y5(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function MA(e,t){let r=y5(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function NA(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Kl(e):(i=Nr({},e),Nt(!i.pathname||!i.pathname.includes("?"),Px("?","pathname","search",i)),Nt(!i.pathname||!i.pathname.includes("#"),Px("#","pathname","hash",i)),Nt(!i.search||!i.search.includes("#"),Px("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}a=h>=0?t[h]:"/"}let l=ZG(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const fa=e=>e.join("/").replace(/\/\/+/g,"/"),tq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Fv{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function ab(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const v5=["post","put","patch","delete"],iq=new Set(v5),sq=["get",...v5],oq=new Set(sq),aq=new Set([301,302,303,307,308]),lq=new Set([307,308]),Fx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uq={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_f={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},RA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cq=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),b5="remix-router-transitions";function hq(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Nt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let se=e.detectErrorBoundary;i=de=>({hasErrorBoundary:se(de)})}else i=cq;let s={},o=Pv(e.routes,i,void 0,s),a,l=e.basename||"/",u=e.dataStrategy||gq,c=e.patchRoutesOnNavigation,h=Nr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),d=null,f=new Set,p=null,m=null,y=null,b=e.hydrationData!=null,v=Su(o,e.history.location,l),E=null;if(v==null&&!c){let se=Oi(404,{pathname:e.history.location.pathname}),{matches:de,route:ge}=f3(o);v=de,E={[ge.id]:se}}v&&!e.hydrationData&&Li(v,o,e.history.location.pathname).active&&(v=null);let D;if(v)if(v.some(se=>se.route.lazy))D=!1;else if(!v.some(se=>se.route.loader))D=!0;else if(h.v7_partialHydration){let se=e.hydrationData?e.hydrationData.loaderData:null,de=e.hydrationData?e.hydrationData.errors:null;if(de){let ge=v.findIndex(we=>de[we.route.id]!==void 0);D=v.slice(0,ge+1).every(we=>!DE(we.route,se,de))}else D=v.every(ge=>!DE(ge.route,se,de))}else D=e.hydrationData!=null;else if(D=!1,v=[],h.v7_partialHydration){let se=Li(null,o,e.history.location.pathname);se.active&&se.matches&&(v=se.matches)}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:D,navigation:Fx,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||E,fetchers:new Map,blockers:new Map},T=nn.Pop,k=!1,O,P=!1,I=new Map,F=null,L=!1,_=!1,A=[],M=new Set,R=new Map,B=0,U=-1,V=new Map,K=new Set,J=new Map,G=new Map,Y=new Set,Q=new Map,X=new Map,le;function be(){if(d=e.history.listen(se=>{let{action:de,location:ge,delta:we}=se;if(le){le(),le=void 0;return}ad(X.size===0||we!=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 Ve=_i({currentLocation:w.location,nextLocation:ge,historyAction:de});if(Ve&&we!=null){let rt=new Promise(ct=>{le=ct});e.history.go(we*-1),ln(Ve,{state:"blocked",location:ge,proceed(){ln(Ve,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),rt.then(()=>e.history.go(we))},reset(){let ct=new Map(w.blockers);ct.set(Ve,_f),ke({blockers:ct})}});return}return W(de,ge)}),r){_q(t,I);let se=()=>$q(t,I);t.addEventListener("pagehide",se),F=()=>t.removeEventListener("pagehide",se)}return w.initialized||W(nn.Pop,w.location,{initialHydration:!0}),C}function ce(){d&&d(),F&&F(),f.clear(),O&&O.abort(),w.fetchers.forEach((se,de)=>at(de)),w.blockers.forEach((se,de)=>sr(de))}function xe(se){return f.add(se),()=>f.delete(se)}function ke(se,de){de===void 0&&(de={}),w=Nr({},w,se);let ge=[],we=[];h.v7_fetcherPersist&&w.fetchers.forEach((Ve,rt)=>{Ve.state==="idle"&&(Y.has(rt)?we.push(rt):ge.push(rt))}),[...f].forEach(Ve=>Ve(w,{deletedFetchers:we,viewTransitionOpts:de.viewTransitionOpts,flushSync:de.flushSync===!0})),h.v7_fetcherPersist&&(ge.forEach(Ve=>w.fetchers.delete(Ve)),we.forEach(Ve=>at(Ve)))}function Re(se,de,ge){var we,Ve;let{flushSync:rt}=ge===void 0?{}:ge,ct=w.actionData!=null&&w.navigation.formMethod!=null&&Ks(w.navigation.formMethod)&&w.navigation.state==="loading"&&((we=se.state)==null?void 0:we._isRedirect)!==!0,He;de.actionData?Object.keys(de.actionData).length>0?He=de.actionData:He=null:ct?He=w.actionData:He=null;let Ge=de.loaderData?h3(w.loaderData,de.loaderData,de.matches||[],de.errors):w.loaderData,Ue=w.blockers;Ue.size>0&&(Ue=new Map(Ue),Ue.forEach((Et,Jt)=>Ue.set(Jt,_f)));let it=k===!0||w.navigation.formMethod!=null&&Ks(w.navigation.formMethod)&&((Ve=se.state)==null?void 0:Ve._isRedirect)!==!0;a&&(o=a,a=void 0),L||T===nn.Pop||(T===nn.Push?e.history.push(se,se.state):T===nn.Replace&&e.history.replace(se,se.state));let wt;if(T===nn.Pop){let Et=I.get(w.location.pathname);Et&&Et.has(se.pathname)?wt={currentLocation:w.location,nextLocation:se}:I.has(se.pathname)&&(wt={currentLocation:se,nextLocation:w.location})}else if(P){let Et=I.get(w.location.pathname);Et?Et.add(se.pathname):(Et=new Set([se.pathname]),I.set(w.location.pathname,Et)),wt={currentLocation:w.location,nextLocation:se}}ke(Nr({},de,{actionData:He,loaderData:Ge,historyAction:T,location:se,initialized:!0,navigation:Fx,revalidation:"idle",restoreScrollPosition:$i(se,de.matches||w.matches),preventScrollReset:it,blockers:Ue}),{viewTransitionOpts:wt,flushSync:rt===!0}),T=nn.Pop,k=!1,P=!1,L=!1,_=!1,A=[]}async function Pt(se,de){if(typeof se=="number"){e.history.go(se);return}let ge=SE(w.location,w.matches,l,h.v7_prependBasename,se,h.v7_relativeSplatPath,de==null?void 0:de.fromRouteId,de==null?void 0:de.relative),{path:we,submission:Ve,error:rt}=n3(h.v7_normalizeFormMethod,!1,ge,de),ct=w.location,He=lg(w.location,we,de&&de.state);He=Nr({},He,e.history.encodeLocation(He));let Ge=de&&de.replace!=null?de.replace:void 0,Ue=nn.Push;Ge===!0?Ue=nn.Replace:Ge===!1||Ve!=null&&Ks(Ve.formMethod)&&Ve.formAction===w.location.pathname+w.location.search&&(Ue=nn.Replace);let it=de&&"preventScrollReset"in de?de.preventScrollReset===!0:void 0,wt=(de&&de.flushSync)===!0,Et=_i({currentLocation:ct,nextLocation:He,historyAction:Ue});if(Et){ln(Et,{state:"blocked",location:He,proceed(){ln(Et,{state:"proceeding",proceed:void 0,reset:void 0,location:He}),Pt(se,de)},reset(){let Jt=new Map(w.blockers);Jt.set(Et,_f),ke({blockers:Jt})}});return}return await W(Ue,He,{submission:Ve,pendingError:rt,preventScrollReset:it,replace:de&&de.replace,enableViewTransition:de&&de.viewTransition,flushSync:wt})}function yt(){if(ae(),ke({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){W(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}W(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:P===!0})}}async function W(se,de,ge){O&&O.abort(),O=null,T=se,L=(ge&&ge.startUninterruptedRevalidation)===!0,ui(w.location,w.matches),k=(ge&&ge.preventScrollReset)===!0,P=(ge&&ge.enableViewTransition)===!0;let we=a||o,Ve=ge&&ge.overrideNavigation,rt=Su(we,de,l),ct=(ge&&ge.flushSync)===!0,He=Li(rt,we,de.pathname);if(He.active&&He.matches&&(rt=He.matches),!rt){let{error:Gt,notFoundMatches:Ie,route:oe}=$n(de.pathname);Re(de,{matches:Ie,loaderData:{},errors:{[oe.id]:Gt}},{flushSync:ct});return}if(w.initialized&&!_&&wq(w.location,de)&&!(ge&&ge.submission&&Ks(ge.submission.formMethod))){Re(de,{matches:rt},{flushSync:ct});return}O=new AbortController;let Ge=th(e.history,de,O.signal,ge&&ge.submission),Ue;if(ge&&ge.pendingError)Ue=[Du(rt).route.id,{type:br.error,error:ge.pendingError}];else if(ge&&ge.submission&&Ks(ge.submission.formMethod)){let Gt=await ye(Ge,de,ge.submission,rt,He.active,{replace:ge.replace,flushSync:ct});if(Gt.shortCircuited)return;if(Gt.pendingActionResult){let[Ie,oe]=Gt.pendingActionResult;if(Yi(oe)&&ab(oe.error)&&oe.error.status===404){O=null,Re(de,{matches:Gt.matches,loaderData:{},errors:{[Ie]:oe.error}});return}}rt=Gt.matches||rt,Ue=Gt.pendingActionResult,Ve=Ox(de,ge.submission),ct=!1,He.active=!1,Ge=th(e.history,Ge.url,Ge.signal)}let{shortCircuited:it,matches:wt,loaderData:Et,errors:Jt}=await pe(Ge,de,rt,He.active,Ve,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,ct,Ue);it||(O=null,Re(de,Nr({matches:wt||rt},d3(Ue),{loaderData:Et,errors:Jt})))}async function ye(se,de,ge,we,Ve,rt){rt===void 0&&(rt={}),ae();let ct=Aq(de,ge);if(ke({navigation:ct},{flushSync:rt.flushSync===!0}),Ve){let Ue=await Ki(we,de.pathname,se.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){let it=Du(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,pendingActionResult:[it,{type:br.error,error:Ue.error}]}}else if(Ue.matches)we=Ue.matches;else{let{notFoundMatches:it,error:wt,route:Et}=$n(de.pathname);return{matches:it,pendingActionResult:[Et.id,{type:br.error,error:wt}]}}}let He,Ge=np(we,de);if(!Ge.route.action&&!Ge.route.lazy)He={type:br.error,error:Oi(405,{method:se.method,pathname:de.pathname,routeId:Ge.route.id})};else if(He=(await Ee("action",w,se,[Ge],we,null))[Ge.route.id],se.signal.aborted)return{shortCircuited:!0};if(Lu(He)){let Ue;return rt&&rt.replace!=null?Ue=rt.replace:Ue=l3(He.response.headers.get("Location"),new URL(se.url),l)===w.location.pathname+w.location.search,await fe(se,He,!0,{submission:ge,replace:Ue}),{shortCircuited:!0}}if(cl(He))throw Oi(400,{type:"defer-action"});if(Yi(He)){let Ue=Du(we,Ge.route.id);return(rt&&rt.replace)!==!0&&(T=nn.Push),{matches:we,pendingActionResult:[Ue.route.id,He]}}return{matches:we,pendingActionResult:[Ge.route.id,He]}}async function pe(se,de,ge,we,Ve,rt,ct,He,Ge,Ue,it){let wt=Ve||Ox(de,rt),Et=rt||ct||g3(wt),Jt=!L&&(!h.v7_partialHydration||!Ge);if(we){if(Jt){let tr=re(it);ke(Nr({navigation:wt},tr!==void 0?{actionData:tr}:{}),{flushSync:Ue})}let Ft=await Ki(ge,de.pathname,se.signal);if(Ft.type==="aborted")return{shortCircuited:!0};if(Ft.type==="error"){let tr=Du(Ft.partialMatches).route.id;return{matches:Ft.partialMatches,loaderData:{},errors:{[tr]:Ft.error}}}else if(Ft.matches)ge=Ft.matches;else{let{error:tr,notFoundMatches:Ln,route:qn}=$n(de.pathname);return{matches:Ln,loaderData:{},errors:{[qn.id]:tr}}}}let Gt=a||o,[Ie,oe]=s3(e.history,w,ge,Et,de,h.v7_partialHydration&&Ge===!0,h.v7_skipActionErrorRevalidation,_,A,M,Y,J,K,Gt,l,it);if(ds(Ft=>!(ge&&ge.some(tr=>tr.route.id===Ft))||Ie&&Ie.some(tr=>tr.route.id===Ft)),U=++B,Ie.length===0&&oe.length===0){let Ft=nt();return Re(de,Nr({matches:ge,loaderData:{},errors:it&&Yi(it[1])?{[it[0]]:it[1].error}:null},d3(it),Ft?{fetchers:new Map(w.fetchers)}:{}),{flushSync:Ue}),{shortCircuited:!0}}if(Jt){let Ft={};if(!we){Ft.navigation=wt;let tr=re(it);tr!==void 0&&(Ft.actionData=tr)}oe.length>0&&(Ft.fetchers=ee(oe)),ke(Ft,{flushSync:Ue})}oe.forEach(Ft=>{pt(Ft.key),Ft.controller&&R.set(Ft.key,Ft.controller)});let Pe=()=>oe.forEach(Ft=>pt(Ft.key));O&&O.signal.addEventListener("abort",Pe);let{loaderResults:Ke,fetcherResults:vt}=await je(w,ge,Ie,oe,se);if(se.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Pe),oe.forEach(Ft=>R.delete(Ft.key));let Xt=Im(Ke);if(Xt)return await fe(se,Xt.result,!0,{replace:He}),{shortCircuited:!0};if(Xt=Im(vt),Xt)return K.add(Xt.key),await fe(se,Xt.result,!0,{replace:He}),{shortCircuited:!0};let{loaderData:Dr,errors:Or}=c3(w,ge,Ke,it,oe,vt,Q);Q.forEach((Ft,tr)=>{Ft.subscribe(Ln=>{(Ln||Ft.done)&&Q.delete(tr)})}),h.v7_partialHydration&&Ge&&w.errors&&(Or=Nr({},w.errors,Or));let Vr=nt(),Gn=ht(U),yr=Vr||Gn||oe.length>0;return Nr({matches:ge,loaderData:Dr,errors:Or},yr?{fetchers:new Map(w.fetchers)}:{})}function re(se){if(se&&!Yi(se[1]))return{[se[0]]:se[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function ee(se){return se.forEach(de=>{let ge=w.fetchers.get(de.key),we=$f(void 0,ge?ge.data:void 0);w.fetchers.set(de.key,we)}),new Map(w.fetchers)}function ue(se,de,ge,we){if(n)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.");pt(se);let Ve=(we&&we.flushSync)===!0,rt=a||o,ct=SE(w.location,w.matches,l,h.v7_prependBasename,ge,h.v7_relativeSplatPath,de,we==null?void 0:we.relative),He=Su(rt,ct,l),Ge=Li(He,rt,ct);if(Ge.active&&Ge.matches&&(He=Ge.matches),!He){Te(se,de,Oi(404,{pathname:ct}),{flushSync:Ve});return}let{path:Ue,submission:it,error:wt}=n3(h.v7_normalizeFormMethod,!0,ct,we);if(wt){Te(se,de,wt,{flushSync:Ve});return}let Et=np(He,Ue),Jt=(we&&we.preventScrollReset)===!0;if(it&&Ks(it.formMethod)){De(se,de,Ue,Et,He,Ge.active,Ve,Jt,it);return}J.set(se,{routeId:de,path:Ue}),Ce(se,de,Ue,Et,He,Ge.active,Ve,Jt,it)}async function De(se,de,ge,we,Ve,rt,ct,He,Ge){ae(),J.delete(se);function Ue(Ir){if(!Ir.route.action&&!Ir.route.lazy){let xo=Oi(405,{method:Ge.formMethod,pathname:ge,routeId:de});return Te(se,de,xo,{flushSync:ct}),!0}return!1}if(!rt&&Ue(we))return;let it=w.fetchers.get(se);ve(se,kq(Ge,it),{flushSync:ct});let wt=new AbortController,Et=th(e.history,ge,wt.signal,Ge);if(rt){let Ir=await Ki(Ve,ge,Et.signal);if(Ir.type==="aborted")return;if(Ir.type==="error"){Te(se,de,Ir.error,{flushSync:ct});return}else if(Ir.matches){if(Ve=Ir.matches,we=np(Ve,ge),Ue(we))return}else{Te(se,de,Oi(404,{pathname:ge}),{flushSync:ct});return}}R.set(se,wt);let Jt=B,Ie=(await Ee("action",w,Et,[we],Ve,se))[we.route.id];if(Et.signal.aborted){R.get(se)===wt&&R.delete(se);return}if(h.v7_fetcherPersist&&Y.has(se)){if(Lu(Ie)||Yi(Ie)){ve(se,Ya(void 0));return}}else{if(Lu(Ie))if(R.delete(se),U>Jt){ve(se,Ya(void 0));return}else return K.add(se),ve(se,$f(Ge)),fe(Et,Ie,!1,{fetcherSubmission:Ge,preventScrollReset:He});if(Yi(Ie)){Te(se,de,Ie.error);return}}if(cl(Ie))throw Oi(400,{type:"defer-action"});let oe=w.navigation.location||w.location,Pe=th(e.history,oe,wt.signal),Ke=a||o,vt=w.navigation.state!=="idle"?Su(Ke,w.navigation.location,l):w.matches;Nt(vt,"Didn't find any matches after fetcher action");let Xt=++B;V.set(se,Xt);let Dr=$f(Ge,Ie.data);w.fetchers.set(se,Dr);let[Or,Vr]=s3(e.history,w,vt,Ge,oe,!1,h.v7_skipActionErrorRevalidation,_,A,M,Y,J,K,Ke,l,[we.route.id,Ie]);Vr.filter(Ir=>Ir.key!==se).forEach(Ir=>{let xo=Ir.key,qc=w.fetchers.get(xo),za=$f(void 0,qc?qc.data:void 0);w.fetchers.set(xo,za),pt(xo),Ir.controller&&R.set(xo,Ir.controller)}),ke({fetchers:new Map(w.fetchers)});let Gn=()=>Vr.forEach(Ir=>pt(Ir.key));wt.signal.addEventListener("abort",Gn);let{loaderResults:yr,fetcherResults:Ft}=await je(w,vt,Or,Vr,Pe);if(wt.signal.aborted)return;wt.signal.removeEventListener("abort",Gn),V.delete(se),R.delete(se),Vr.forEach(Ir=>R.delete(Ir.key));let tr=Im(yr);if(tr)return fe(Pe,tr.result,!1,{preventScrollReset:He});if(tr=Im(Ft),tr)return K.add(tr.key),fe(Pe,tr.result,!1,{preventScrollReset:He});let{loaderData:Ln,errors:qn}=c3(w,vt,yr,void 0,Vr,Ft,Q);if(w.fetchers.has(se)){let Ir=Ya(Ie.data);w.fetchers.set(se,Ir)}ht(Xt),w.navigation.state==="loading"&&Xt>U?(Nt(T,"Expected pending action"),O&&O.abort(),Re(w.navigation.location,{matches:vt,loaderData:Ln,errors:qn,fetchers:new Map(w.fetchers)})):(ke({errors:qn,loaderData:h3(w.loaderData,Ln,vt,qn),fetchers:new Map(w.fetchers)}),_=!1)}async function Ce(se,de,ge,we,Ve,rt,ct,He,Ge){let Ue=w.fetchers.get(se);ve(se,$f(Ge,Ue?Ue.data:void 0),{flushSync:ct});let it=new AbortController,wt=th(e.history,ge,it.signal);if(rt){let Ie=await Ki(Ve,ge,wt.signal);if(Ie.type==="aborted")return;if(Ie.type==="error"){Te(se,de,Ie.error,{flushSync:ct});return}else if(Ie.matches)Ve=Ie.matches,we=np(Ve,ge);else{Te(se,de,Oi(404,{pathname:ge}),{flushSync:ct});return}}R.set(se,it);let Et=B,Gt=(await Ee("loader",w,wt,[we],Ve,se))[we.route.id];if(cl(Gt)&&(Gt=await BA(Gt,wt.signal,!0)||Gt),R.get(se)===it&&R.delete(se),!wt.signal.aborted){if(Y.has(se)){ve(se,Ya(void 0));return}if(Lu(Gt))if(U>Et){ve(se,Ya(void 0));return}else{K.add(se),await fe(wt,Gt,!1,{preventScrollReset:He});return}if(Yi(Gt)){Te(se,de,Gt.error);return}Nt(!cl(Gt),"Unhandled fetcher deferred data"),ve(se,Ya(Gt.data))}}async function fe(se,de,ge,we){let{submission:Ve,fetcherSubmission:rt,preventScrollReset:ct,replace:He}=we===void 0?{}:we;de.response.headers.has("X-Remix-Revalidate")&&(_=!0);let Ge=de.response.headers.get("Location");Nt(Ge,"Expected a Location header on the redirect Response"),Ge=l3(Ge,new URL(se.url),l);let Ue=lg(w.location,Ge,{_isRedirect:!0});if(r){let Ie=!1;if(de.response.headers.has("X-Remix-Reload-Document"))Ie=!0;else if(RA.test(Ge)){const oe=e.history.createURL(Ge);Ie=oe.origin!==t.location.origin||Ld(oe.pathname,l)==null}if(Ie){He?t.location.replace(Ge):t.location.assign(Ge);return}}O=null;let it=He===!0||de.response.headers.has("X-Remix-Replace")?nn.Replace:nn.Push,{formMethod:wt,formAction:Et,formEncType:Jt}=w.navigation;!Ve&&!rt&&wt&&Et&&Jt&&(Ve=g3(w.navigation));let Gt=Ve||rt;if(lq.has(de.response.status)&&Gt&&Ks(Gt.formMethod))await W(it,Ue,{submission:Nr({},Gt,{formAction:Ge}),preventScrollReset:ct||k,enableViewTransition:ge?P:void 0});else{let Ie=Ox(Ue,Ve);await W(it,Ue,{overrideNavigation:Ie,fetcherSubmission:rt,preventScrollReset:ct||k,enableViewTransition:ge?P:void 0})}}async function Ee(se,de,ge,we,Ve,rt){let ct,He={};try{ct=await mq(u,se,de,ge,we,Ve,rt,s,i)}catch(Ge){return we.forEach(Ue=>{He[Ue.route.id]={type:br.error,error:Ge}}),He}for(let[Ge,Ue]of Object.entries(ct))if(Sq(Ue)){let it=Ue.result;He[Ge]={type:br.redirect,response:bq(it,ge,Ge,Ve,l,h.v7_relativeSplatPath)}}else He[Ge]=await vq(Ue);return He}async function je(se,de,ge,we,Ve){let rt=se.matches,ct=Ee("loader",se,Ve,ge,de,null),He=Promise.all(we.map(async it=>{if(it.matches&&it.match&&it.controller){let Et=(await Ee("loader",se,th(e.history,it.path,it.controller.signal),[it.match],it.matches,it.key))[it.match.route.id];return{[it.key]:Et}}else return Promise.resolve({[it.key]:{type:br.error,error:Oi(404,{pathname:it.path})}})})),Ge=await ct,Ue=(await He).reduce((it,wt)=>Object.assign(it,wt),{});return await Promise.all([Cq(de,Ge,Ve.signal,rt,se.loaderData),Tq(de,Ue,we)]),{loaderResults:Ge,fetcherResults:Ue}}function ae(){_=!0,A.push(...ds()),J.forEach((se,de)=>{R.has(de)&&M.add(de),pt(de)})}function ve(se,de,ge){ge===void 0&&(ge={}),w.fetchers.set(se,de),ke({fetchers:new Map(w.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function Te(se,de,ge,we){we===void 0&&(we={});let Ve=Du(w.matches,de);at(se),ke({errors:{[Ve.route.id]:ge},fetchers:new Map(w.fetchers)},{flushSync:(we&&we.flushSync)===!0})}function ze(se){return h.v7_fetcherPersist&&(G.set(se,(G.get(se)||0)+1),Y.has(se)&&Y.delete(se)),w.fetchers.get(se)||uq}function at(se){let de=w.fetchers.get(se);R.has(se)&&!(de&&de.state==="loading"&&V.has(se))&&pt(se),J.delete(se),V.delete(se),K.delete(se),Y.delete(se),M.delete(se),w.fetchers.delete(se)}function xt(se){if(h.v7_fetcherPersist){let de=(G.get(se)||0)-1;de<=0?(G.delete(se),Y.add(se)):G.set(se,de)}else at(se);ke({fetchers:new Map(w.fetchers)})}function pt(se){let de=R.get(se);de&&(de.abort(),R.delete(se))}function kt(se){for(let de of se){let ge=ze(de),we=Ya(ge.data);w.fetchers.set(de,we)}}function nt(){let se=[],de=!1;for(let ge of K){let we=w.fetchers.get(ge);Nt(we,"Expected fetcher: "+ge),we.state==="loading"&&(K.delete(ge),se.push(ge),de=!0)}return kt(se),de}function ht(se){let de=[];for(let[ge,we]of V)if(we0}function It(se,de){let ge=w.blockers.get(se)||_f;return X.get(se)!==de&&X.set(se,de),ge}function sr(se){w.blockers.delete(se),X.delete(se)}function ln(se,de){let ge=w.blockers.get(se)||_f;Nt(ge.state==="unblocked"&&de.state==="blocked"||ge.state==="blocked"&&de.state==="blocked"||ge.state==="blocked"&&de.state==="proceeding"||ge.state==="blocked"&&de.state==="unblocked"||ge.state==="proceeding"&&de.state==="unblocked","Invalid blocker state transition: "+ge.state+" -> "+de.state);let we=new Map(w.blockers);we.set(se,de),ke({blockers:we})}function _i(se){let{currentLocation:de,nextLocation:ge,historyAction:we}=se;if(X.size===0)return;X.size>1&&ad(!1,"A router only supports one blocker at a time");let Ve=Array.from(X.entries()),[rt,ct]=Ve[Ve.length-1],He=w.blockers.get(rt);if(!(He&&He.state==="proceeding")&&ct({currentLocation:de,nextLocation:ge,historyAction:we}))return rt}function $n(se){let de=Oi(404,{pathname:se}),ge=a||o,{matches:we,route:Ve}=f3(ge);return ds(),{notFoundMatches:we,route:Ve,error:de}}function ds(se){let de=[];return Q.forEach((ge,we)=>{(!se||se(we))&&(ge.cancel(),de.push(we),Q.delete(we))}),de}function mr(se,de,ge){if(p=se,y=de,m=ge||null,!b&&w.navigation===Fx){b=!0;let we=$i(w.location,w.matches);we!=null&&ke({restoreScrollPosition:we})}return()=>{p=null,y=null,m=null}}function Zr(se,de){return m&&m(se,de.map(we=>jG(we,w.loaderData)))||se.key}function ui(se,de){if(p&&y){let ge=Zr(se,de);p[ge]=y()}}function $i(se,de){if(p){let ge=Zr(se,de),we=p[ge];if(typeof we=="number")return we}return null}function Li(se,de,ge){if(c)if(se){if(Object.keys(se[0].params).length>0)return{active:!0,matches:Hy(de,ge,l,!0)}}else return{active:!0,matches:Hy(de,ge,l,!0)||[]};return{active:!1,matches:null}}async function Ki(se,de,ge){if(!c)return{type:"success",matches:se};let we=se;for(;;){let Ve=a==null,rt=a||o,ct=s;try{await c({path:de,matches:we,patch:(Ue,it)=>{ge.aborted||a3(Ue,it,rt,ct,i)}})}catch(Ue){return{type:"error",error:Ue,partialMatches:we}}finally{Ve&&!ge.aborted&&(o=[...o])}if(ge.aborted)return{type:"aborted"};let He=Su(rt,de,l);if(He)return{type:"success",matches:He};let Ge=Hy(rt,de,l,!0);if(!Ge||we.length===Ge.length&&we.every((Ue,it)=>Ue.route.id===Ge[it].route.id))return{type:"success",matches:null};we=Ge}}function bo(se){s={},a=Pv(se,i,void 0,s)}function Ms(se,de){let ge=a==null;a3(se,de,a||o,s,i),ge&&(o=[...o],ke({}))}return C={get basename(){return l},get future(){return h},get state(){return w},get routes(){return o},get window(){return t},initialize:be,subscribe:xe,enableScrollRestoration:mr,navigate:Pt,fetch:ue,revalidate:yt,createHref:se=>e.history.createHref(se),encodeLocation:se=>e.history.encodeLocation(se),getFetcher:ze,deleteFetcher:xt,dispose:ce,getBlocker:It,deleteBlocker:sr,patchRoutes:Ms,_internalFetchControllers:R,_internalActiveDeferreds:Q,_internalSetRoutes:bo},C}function dq(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function SE(e,t,r,n,i,s,o,a){let l,u;if(o){l=[];for(let h of t)if(l.push(h),h.route.id===o){u=h;break}}else l=t,u=t[t.length-1];let c=NA(i||".",MA(l,s),Ld(e.pathname,r)||e.pathname,a==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&u){let h=jA(c.search);if(u.route.index&&!h)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&h){let d=new URLSearchParams(c.search),f=d.getAll("index");d.delete("index"),f.filter(m=>m).forEach(m=>d.append("index",m));let p=d.toString();c.search=p?"?"+p:""}}return n&&r!=="/"&&(c.pathname=c.pathname==="/"?r:fa([r,c.pathname])),tc(c)}function n3(e,t,r,n){if(!n||!dq(n))return{path:r};if(n.formMethod&&!Eq(n.formMethod))return{path:r,error:Oi(405,{method:n.formMethod})};let i=()=>({path:r,error:Oi(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),a=S5(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ks(o))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[m,y]=p;return""+f+m+"="+y+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Ks(o))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}Nt(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=EE(n.formData),u=n.formData;else if(n.body instanceof FormData)l=EE(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=u3(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=u3(l)}catch{return i()}let c={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ks(c.formMethod))return{path:r,submission:c};let h=Kl(r);return t&&h.search&&jA(h.search)&&l.append("index",""),h.search="?"+l,{path:tc(h),submission:c}}function i3(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(i=>i.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function s3(e,t,r,n,i,s,o,a,l,u,c,h,d,f,p,m){let y=m?Yi(m[1])?m[1].error:m[1].data:void 0,b=e.createURL(t.location),v=e.createURL(i),E=r;s&&t.errors?E=i3(r,Object.keys(t.errors)[0],!0):m&&Yi(m[1])&&(E=i3(r,m[0]));let D=m?m[1].statusCode:void 0,C=o&&D&&D>=400,w=E.filter((k,O)=>{let{route:P}=k;if(P.lazy)return!0;if(P.loader==null)return!1;if(s)return DE(P,t.loaderData,t.errors);if(fq(t.loaderData,t.matches[O],k)||l.some(L=>L===k.route.id))return!0;let I=t.matches[O],F=k;return o3(k,Nr({currentUrl:b,currentParams:I.params,nextUrl:v,nextParams:F.params},n,{actionResult:y,actionStatus:D,defaultShouldRevalidate:C?!1:a||b.pathname+b.search===v.pathname+v.search||b.search!==v.search||x5(I,F)}))}),T=[];return h.forEach((k,O)=>{if(s||!r.some(_=>_.route.id===k.routeId)||c.has(O))return;let P=Su(f,k.path,p);if(!P){T.push({key:O,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(O),F=np(P,k.path),L=!1;d.has(O)?L=!1:u.has(O)?(u.delete(O),L=!0):I&&I.state!=="idle"&&I.data===void 0?L=a:L=o3(F,Nr({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:y,actionStatus:D,defaultShouldRevalidate:C?!1:a})),L&&T.push({key:O,routeId:k.routeId,path:k.path,matches:P,match:F,controller:new AbortController})}),[w,T]}function DE(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,i=r!=null&&r[e.id]!==void 0;return!n&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!i}function fq(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function x5(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function o3(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function a3(e,t,r,n,i){var s;let o;if(e){let u=n[e];Nt(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),o=u.children}else o=r;let a=t.filter(u=>!o.some(c=>w5(u,c))),l=Pv(a,i,[e||"_","patch",String(((s=o)==null?void 0:s.length)||"0")],n);o.push(...l)}function w5(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var i;return(i=t.children)==null?void 0:i.some(s=>w5(r,s))}):!1}async function pq(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];Nt(i,"No route found in manifest");let s={};for(let o in n){let l=i[o]!==void 0&&o!=="hasErrorBoundary";ad(!l,'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.')),!l&&!RG.has(o)&&(s[o]=n[o])}Object.assign(i,s),Object.assign(i,Nr({},t(i),{lazy:void 0}))}async function gq(e){let{matches:t}=e,r=t.filter(i=>i.shouldLoad);return(await Promise.all(r.map(i=>i.resolve()))).reduce((i,s,o)=>Object.assign(i,{[r[o].route.id]:s}),{})}async function mq(e,t,r,n,i,s,o,a,l,u){let c=s.map(f=>f.route.lazy?pq(f.route,l,a):void 0),h=s.map((f,p)=>{let m=c[p],y=i.some(v=>v.route.id===f.route.id);return Nr({},f,{shouldLoad:y,resolve:async v=>(v&&n.method==="GET"&&(f.route.lazy||f.route.loader)&&(y=!0),y?yq(t,n,f,m,v,u):Promise.resolve({type:br.data,result:void 0}))})}),d=await e({matches:h,request:n,params:s[0].params,fetcherKey:o,context:u});try{await Promise.all(c)}catch{}return d}async function yq(e,t,r,n,i,s){let o,a,l=u=>{let c,h=new Promise((p,m)=>c=m);a=()=>c(),t.signal.addEventListener("abort",a);let d=p=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:s},...p!==void 0?[p]:[]),f=(async()=>{try{return{type:"data",result:await(i?i(m=>d(m)):d())}}catch(p){return{type:"error",result:p}}})();return Promise.race([f,h])};try{let u=r.route[e];if(n)if(u){let c,[h]=await Promise.all([l(u).catch(d=>{c=d}),n]);if(c!==void 0)throw c;o=h}else if(await n,u=r.route[e],u)o=await l(u);else if(e==="action"){let c=new URL(t.url),h=c.pathname+c.search;throw Oi(405,{method:t.method,pathname:h,routeId:r.route.id})}else return{type:br.data,result:void 0};else if(u)o=await l(u);else{let c=new URL(t.url),h=c.pathname+c.search;throw Oi(404,{pathname:h})}Nt(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:br.error,result:u}}finally{a&&t.signal.removeEventListener("abort",a)}return o}async function vq(e){let{result:t,type:r}=e;if(D5(t)){let u;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(c){return{type:br.error,error:c}}return r===br.error?{type:br.error,error:new Fv(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:br.data,data:u,statusCode:t.status,headers:t.headers}}if(r===br.error){if(p3(t)){var n;if(t.data instanceof Error){var i;return{type:br.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new Fv(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:br.error,error:t,statusCode:ab(t)?t.status:void 0}}if(Dq(t)){var s,o;return{type:br.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(p3(t)){var a,l;return{type:br.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:br.data,data:t}}function bq(e,t,r,n,i,s){let o=e.headers.get("Location");if(Nt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!RA.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=SE(new URL(t.url),a,i,!0,o,s),e.headers.set("Location",o)}return e}function l3(e,t,r){if(RA.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=Ld(i.pathname,r)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function th(e,t,r,n){let i=e.createURL(S5(t)).toString(),s={signal:r};if(n&&Ks(n.formMethod)){let{formMethod:o,formEncType:a}=n;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(n.json)):a==="text/plain"?s.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?s.body=EE(n.formData):s.body=n.formData}return new Request(i,s)}function EE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function u3(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function xq(e,t,r,n,i){let s={},o=null,a,l=!1,u={},c=r&&Yi(r[1])?r[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let d=h.route.id,f=t[d];if(Nt(!Lu(f),"Cannot handle redirect results in processLoaderData"),Yi(f)){let p=f.error;c!==void 0&&(p=c,c=void 0),o=o||{};{let m=Du(e,d);o[m.route.id]==null&&(o[m.route.id]=p)}s[d]=void 0,l||(l=!0,a=ab(f.error)?f.error.status:500),f.headers&&(u[d]=f.headers)}else cl(f)?(n.set(d,f.deferredData),s[d]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!l&&(a=f.statusCode),f.headers&&(u[d]=f.headers)):(s[d]=f.data,f.statusCode&&f.statusCode!==200&&!l&&(a=f.statusCode),f.headers&&(u[d]=f.headers))}),c!==void 0&&r&&(o={[r[0]]:c},s[r[0]]=void 0),{loaderData:s,errors:o,statusCode:a||200,loaderHeaders:u}}function c3(e,t,r,n,i,s,o){let{loaderData:a,errors:l}=xq(t,r,n,o);return i.forEach(u=>{let{key:c,match:h,controller:d}=u,f=s[c];if(Nt(f,"Did not find corresponding fetcher result"),!(d&&d.signal.aborted))if(Yi(f)){let p=Du(e.matches,h==null?void 0:h.route.id);l&&l[p.route.id]||(l=Nr({},l,{[p.route.id]:f.error})),e.fetchers.delete(c)}else if(Lu(f))Nt(!1,"Unhandled fetcher revalidation redirect");else if(cl(f))Nt(!1,"Unhandled fetcher deferred data");else{let p=Ya(f.data);e.fetchers.set(c,p)}}),{loaderData:a,errors:l}}function h3(e,t,r,n){let i=Nr({},t);for(let s of r){let o=s.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(i[o]=t[o]):e[o]!==void 0&&s.route.loader&&(i[o]=e[o]),n&&n.hasOwnProperty(o))break}return i}function d3(e){return e?Yi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Du(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function f3(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Oi(e,t){let{pathname:r,routeId:n,method:i,type:s,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Fv(e||500,a,new Error(l),!0)}function Im(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,i]=t[r];if(Lu(i))return{key:n,result:i}}}function S5(e){let t=typeof e=="string"?Kl(e):e;return tc(Nr({},t,{hash:""}))}function wq(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Sq(e){return D5(e.result)&&aq.has(e.result.status)}function cl(e){return e.type===br.deferred}function Yi(e){return e.type===br.error}function Lu(e){return(e&&e.type)===br.redirect}function p3(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Dq(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function D5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Eq(e){return oq.has(e.toLowerCase())}function Ks(e){return iq.has(e.toLowerCase())}async function Cq(e,t,r,n,i){let s=Object.entries(t);for(let o=0;o(d==null?void 0:d.route.id)===a);if(!u)continue;let c=n.find(d=>d.route.id===u.route.id),h=c!=null&&!x5(c,u)&&(i&&i[u.route.id])!==void 0;cl(l)&&h&&await BA(l,r,!1).then(d=>{d&&(t[a]=d)})}}async function Tq(e,t,r){for(let n=0;n(u==null?void 0:u.route.id)===s)&&cl(a)&&(Nt(o,"Expected an AbortController for revalidating fetcher deferred result"),await BA(a,o.signal,!0).then(u=>{u&&(t[i]=u)}))}}async function BA(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:br.data,data:e.deferredData.unwrappedData}}catch(i){return{type:br.error,error:i}}return{type:br.data,data:e.deferredData.data}}}function jA(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function np(e,t){let r=typeof t=="string"?Kl(t).search:t.search;if(e[e.length-1].route.index&&jA(r||""))return e[e.length-1];let n=y5(e);return n[n.length-1]}function g3(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:s,json:o}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Ox(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Aq(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function $f(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function kq(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ya(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function _q(e,t){try{let r=e.sessionStorage.getItem(b5);if(r){let n=JSON.parse(r);for(let[i,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function $q(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(b5,JSON.stringify(r))}catch(n){ad(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.27.0 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),z.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let h=MT(u,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ha([t,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[t,n,o,s,e])}const Lq=z.createContext(null);function Pq(e){let t=z.useContext(ql).outlet;return t&&z.createElement(Lq.Provider,{value:e},t)}function A5(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=z.useContext(vc),{matches:i}=z.useContext(ql),{pathname:s}=cb(),o=JSON.stringify(NT(i,n.v7_relativeSplatPath));return z.useMemo(()=>MT(e,JSON.parse(o),s,r==="path"),[e,o,s,r])}function Fq(e,t,r,n){Ug()||Nt(!1);let{navigator:i}=z.useContext(vc),{matches:s}=z.useContext(ql),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=cb(),c;c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let f=xu(e,{pathname:d});return Rq(f&&f.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:ha([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:ha([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),s,r,n)}function Oq(){let e=Hq(),t=lb(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),r?z.createElement("pre",{style:i},r):null,null)}const Nq=z.createElement(Oq,null);class Mq extends z.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?z.createElement(ql.Provider,{value:this.props.routeContext},z.createElement(D5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Iq(e){let{routeContext:t,match:r,children:n}=e,i=z.useContext(ub);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),z.createElement(ql.Provider,{value:t},n)}function Rq(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(i=r)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);c>=0||Nt(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,d)=>{let f,p=!1,m=null,y=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||Nq,l&&(u<0&&d===0?(p=!0,y=null):u===d&&(p=!0,y=h.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,d+1)),v=()=>{let E;return f?E=m:p?E=y:h.route.Component?E=z.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=c,z.createElement(Iq,{match:h,routeContext:{outlet:c,matches:b,isDataRoute:r!=null},children:E})};return r&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?z.createElement(Mq,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var T5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(T5||{}),Mv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Mv||{});function Bq(e){let t=z.useContext(ub);return t||Nt(!1),t}function jq(e){let t=z.useContext(S5);return t||Nt(!1),t}function zq(e){let t=z.useContext(ql);return t||Nt(!1),t}function k5(e){let t=zq(),r=t.matches[t.matches.length-1];return r.route.id||Nt(!1),r.route.id}function Hq(){var e;let t=z.useContext(D5),r=jq(Mv.UseRouteError),n=k5(Mv.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Uq(){let{router:e}=Bq(T5.UseNavigateStable),t=k5(Mv.UseNavigateStable),r=z.useRef(!1);return E5(()=>{r.current=!0}),z.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Nv({fromRouteId:t},s)))},[e,t])}function Wq(e){return Pq(e.context)}function AE(e){Nt(!1)}function Vq(e){let{basename:t="/",children:r=null,location:n,navigationType:i=tn.Pop,navigator:s,static:o=!1,future:a}=e;Ug()&&Nt(!1);let l=t.replace(/^\/*/,"/"),u=z.useMemo(()=>({basename:l,navigator:s,static:o,future:Nv({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=Gl(n));let{pathname:c="/",search:h="",hash:d="",state:f=null,key:p="default"}=n,m=z.useMemo(()=>{let y=_d(c,l);return y==null?null:{location:{pathname:y,search:h,hash:d,state:f,key:p},navigationType:i}},[l,c,h,d,f,p,i]);return m==null?null:z.createElement(vc.Provider,{value:u},z.createElement(jT.Provider,{children:r,value:m}))}new Promise(()=>{});function TE(e,t){t===void 0&&(t=[]);let r=[];return z.Children.forEach(e,(n,i)=>{if(!z.isValidElement(n))return;let s=[...t,i];if(n.type===z.Fragment){r.push.apply(r,TE(n.props.children,s));return}n.type!==AE&&Nt(!1),!n.props.index||!n.props.children||Nt(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=TE(n.props.children,s)),r.push(o)}),r}function Gq(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:z.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:z.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:z.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),z.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let h=NA(u,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:fa([t,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[t,n,o,s,e])}const Fq=z.createContext(null);function Oq(e){let t=z.useContext(Jl).outlet;return t&&z.createElement(Fq.Provider,{value:e},t)}function k5(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=z.useContext(xc),{matches:i}=z.useContext(Jl),{pathname:s}=ub(),o=JSON.stringify(MA(i,n.v7_relativeSplatPath));return z.useMemo(()=>NA(e,JSON.parse(o),s,r==="path"),[e,o,s,r])}function Iq(e,t,r,n){Ug()||Nt(!1);let{navigator:i}=z.useContext(xc),{matches:s}=z.useContext(Jl),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ub(),c;c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let f=Su(e,{pathname:d});return jq(f&&f.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:fa([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:fa([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),s,r,n)}function Mq(){let e=Wq(),t=ab(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),r?z.createElement("pre",{style:i},r):null,null)}const Nq=z.createElement(Mq,null);class Rq extends z.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?z.createElement(Jl.Provider,{value:this.props.routeContext},z.createElement(C5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Bq(e){let{routeContext:t,match:r,children:n}=e,i=z.useContext(lb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),z.createElement(Jl.Provider,{value:t},n)}function jq(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(i=r)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);c>=0||Nt(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,d)=>{let f,p=!1,m=null,y=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||Nq,l&&(u<0&&d===0?(p=!0,y=null):u===d&&(p=!0,y=h.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,d+1)),v=()=>{let E;return f?E=m:p?E=y:h.route.Component?E=z.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=c,z.createElement(Bq,{match:h,routeContext:{outlet:c,matches:b,isDataRoute:r!=null},children:E})};return r&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?z.createElement(Rq,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var _5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_5||{}),Iv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Iv||{});function zq(e){let t=z.useContext(lb);return t||Nt(!1),t}function Hq(e){let t=z.useContext(E5);return t||Nt(!1),t}function Uq(e){let t=z.useContext(Jl);return t||Nt(!1),t}function $5(e){let t=Uq(),r=t.matches[t.matches.length-1];return r.route.id||Nt(!1),r.route.id}function Wq(){var e;let t=z.useContext(C5),r=Hq(Iv.UseRouteError),n=$5(Iv.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Vq(){let{router:e}=zq(_5.UseNavigateStable),t=$5(Iv.UseNavigateStable),r=z.useRef(!1);return T5(()=>{r.current=!0}),z.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ov({fromRouteId:t},s)))},[e,t])}function Gq(e){return Oq(e.context)}function CE(e){Nt(!1)}function qq(e){let{basename:t="/",children:r=null,location:n,navigationType:i=nn.Pop,navigator:s,static:o=!1,future:a}=e;Ug()&&Nt(!1);let l=t.replace(/^\/*/,"/"),u=z.useMemo(()=>({basename:l,navigator:s,static:o,future:Ov({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=Kl(n));let{pathname:c="/",search:h="",hash:d="",state:f=null,key:p="default"}=n,m=z.useMemo(()=>{let y=Ld(c,l);return y==null?null:{location:{pathname:y,search:h,hash:d,state:f,key:p},navigationType:i}},[l,c,h,d,f,p,i]);return m==null?null:z.createElement(xc.Provider,{value:u},z.createElement(zA.Provider,{children:r,value:m}))}new Promise(()=>{});function TE(e,t){t===void 0&&(t=[]);let r=[];return z.Children.forEach(e,(n,i)=>{if(!z.isValidElement(n))return;let s=[...t,i];if(n.type===z.Fragment){r.push.apply(r,TE(n.props.children,s));return}n.type!==CE&&Nt(!1),!n.props.index||!n.props.children||Nt(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=TE(n.props.children,s)),r.push(o)}),r}function Kq(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:z.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:z.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:z.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.27.0 * * Copyright (c) Remix Software Inc. @@ -65,14 +65,14 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ug(){return ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function Kq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jq(e,t){return e.button===0&&(!t||t==="_self")&&!Kq(e)}const Xq=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Yq="6";try{window.__reactRouterVersion=Yq}catch{}function Qq(e,t){return uq({basename:t==null?void 0:t.basename,future:ug({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:FG({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Zq(),routes:e,mapRouteProperties:Gq,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Zq(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ug({},t,{errors:eK(t.errors)})),t}function eK(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new Ov(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="",r[n]=o}catch{}}if(r[n]==null){let s=new Error(i.message);s.stack="",r[n]=s}}else r[n]=i;return r}const tK=z.createContext({isTransitioning:!1}),rK=z.createContext(new Map),nK="startTransition",g3=wW[nK],iK="flushSync",m3=PG[iK];function sK(e){g3?g3(e):e()}function _f(e){m3?m3(e):e()}class oK{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function aK(e){let{fallbackElement:t,router:r,future:n}=e,[i,s]=z.useState(r.state),[o,a]=z.useState(),[l,u]=z.useState({isTransitioning:!1}),[c,h]=z.useState(),[d,f]=z.useState(),[p,m]=z.useState(),y=z.useRef(new Map),{v7_startTransition:b}=n||{},v=z.useCallback($=>{b?sK($):$()},[b]),E=z.useCallback(($,O)=>{let{deletedFetchers:P,flushSync:N,viewTransitionOpts:F}=O;P.forEach(k=>y.current.delete(k)),$.fetchers.forEach((k,T)=>{k.data!==void 0&&y.current.set(T,k.data)});let L=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!F||L){N?_f(()=>s($)):v(()=>s($));return}if(N){_f(()=>{d&&(c&&c.resolve(),d.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let k=r.window.document.startViewTransition(()=>{_f(()=>s($))});k.finished.finally(()=>{_f(()=>{h(void 0),f(void 0),a(void 0),u({isTransitioning:!1})})}),_f(()=>f(k));return}d?(c&&c.resolve(),d.skipTransition(),m({state:$,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(a($),u({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[r.window,d,c,y,v]);z.useLayoutEffect(()=>r.subscribe(E),[r,E]),z.useEffect(()=>{l.isTransitioning&&!l.flushSync&&h(new oK)},[l]),z.useEffect(()=>{if(c&&o&&r.window){let $=o,O=c.promise,P=r.window.document.startViewTransition(async()=>{v(()=>s($)),await O});P.finished.finally(()=>{h(void 0),f(void 0),a(void 0),u({isTransitioning:!1})}),f(P)}},[v,o,c,r.window]),z.useEffect(()=>{c&&o&&i.location.key===o.location.key&&c.resolve()},[c,d,i.location,o]),z.useEffect(()=>{!l.isTransitioning&&p&&(a(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),m(void 0))},[l.isTransitioning,p]),z.useEffect(()=>{},[]);let D=z.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:$=>r.navigate($),push:($,O,P)=>r.navigate($,{state:O,preventScrollReset:P==null?void 0:P.preventScrollReset}),replace:($,O,P)=>r.navigate($,{replace:!0,state:O,preventScrollReset:P==null?void 0:P.preventScrollReset})}),[r]),C=r.basename||"/",w=z.useMemo(()=>({router:r,navigator:D,static:!1,basename:C}),[r,D,C]),A=z.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return z.createElement(z.Fragment,null,z.createElement(ub.Provider,{value:w},z.createElement(S5.Provider,{value:i},z.createElement(rK.Provider,{value:y.current},z.createElement(tK.Provider,{value:l},z.createElement(Vq,{basename:C,location:i.location,navigationType:i.historyAction,navigator:D,future:A},i.initialized||r.future.v7_partialHydration?z.createElement(lK,{routes:r.routes,future:r.future,state:i}):t))))),null)}const lK=z.memo(uK);function uK(e){let{routes:t,future:r,state:n}=e;return Fq(t,void 0,n,r)}const cK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hK=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hb=z.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:h}=t,d=qq(t,Xq),{basename:f}=z.useContext(vc),p,m=!1;if(typeof u=="string"&&hK.test(u)&&(p=u,cK))try{let E=new URL(window.location.href),D=u.startsWith("//")?new URL(E.protocol+u):new URL(u),C=_d(D.pathname,f);D.origin===E.origin&&C!=null?u=C+D.search+D.hash:m=!0}catch{}let y=_q(u,{relative:i}),b=dK(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:h});function v(E){n&&n(E),E.defaultPrevented||b(E)}return z.createElement("a",ug({},d,{href:p||y,onClick:m||s?n:v,ref:r,target:l}))});var y3;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(y3||(y3={}));var v3;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(v3||(v3={}));function dK(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=C5(),u=cb(),c=A5(e,{relative:o});return z.useCallback(h=>{if(Jq(h,r)){h.preventDefault();let d=n!==void 0?n:Zu(u)===Zu(c);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,n,i,r,e,s,o,a])}const b3=e=>{let t;const r=new Set,n=(u,c)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const d=t;t=c??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(f=>f(t,d))}},i=()=>t,a={setState:n,getState:i,getInitialState:()=>l,subscribe:u=>(r.add(u),()=>r.delete(u))},l=t=e(n,i,a);return a},fK=e=>e?b3(e):b3,pK=e=>e;function gK(e,t=pK){const r=pt.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return pt.useDebugValue(r),r}const mK=e=>{const t=fK(e),r=n=>gK(t,n);return Object.assign(r,t),r},_5=e=>mK,x3={BASE_URL:"/theme-builder/main",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_FEATURE_BRANCH:"/main"},kE=new Map,Mm=e=>{const t=kE.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},yK=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=kE.get(r.name);if(n)return{type:"tracked",store:e,...n};const i={connection:t.connect(r),stores:{}};return kE.set(r.name,i),{type:"tracked",store:e,...i}},vK=(e,t={})=>(r,n,i)=>{const{enabled:s,anonymousActionType:o,store:a,...l}=t;let u;try{u=(s??(x3?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(r,n,i);const{connection:c,...h}=yK(a,u,l);let d=!0;i.setState=(m,y,b)=>{const v=r(m,y);if(!d)return v;const E=b===void 0?{type:o||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(c==null||c.send(E,n()),v):(c==null||c.send({...E,type:`${a}/${E.type}`},{...Mm(l.name),[a]:i.getState()}),v)};const f=(...m)=>{const y=d;d=!1,r(...m),d=y},p=e(i.setState,n,i);if(h.type==="untracked"?c==null||c.init(p):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([m,y])=>[m,m===h.store?p:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const y=i.dispatch;i.dispatch=(...b)=>{(x3?"production":void 0)!=="production"&&b[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),y(...b)}}return c.subscribe(m=>{var y;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ix(m.payload,b=>{if(b.type==="__setState"){if(a===void 0){f(b.state);return}Object.keys(b.state).length!==1&&console.error(` + */function ug(){return ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function Xq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yq(e,t){return e.button===0&&(!t||t==="_self")&&!Xq(e)}const Qq=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Zq="6";try{window.__reactRouterVersion=Zq}catch{}function eK(e,t){return hq({basename:t==null?void 0:t.basename,future:ug({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:IG({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||tK(),routes:e,mapRouteProperties:Kq,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function tK(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ug({},t,{errors:rK(t.errors)})),t}function rK(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new Fv(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="",r[n]=o}catch{}}if(r[n]==null){let s=new Error(i.message);s.stack="",r[n]=s}}else r[n]=i;return r}const nK=z.createContext({isTransitioning:!1}),iK=z.createContext(new Map),sK="startTransition",m3=DW[sK],oK="flushSync",y3=OG[oK];function aK(e){m3?m3(e):e()}function Lf(e){y3?y3(e):e()}class lK{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function uK(e){let{fallbackElement:t,router:r,future:n}=e,[i,s]=z.useState(r.state),[o,a]=z.useState(),[l,u]=z.useState({isTransitioning:!1}),[c,h]=z.useState(),[d,f]=z.useState(),[p,m]=z.useState(),y=z.useRef(new Map),{v7_startTransition:b}=n||{},v=z.useCallback(k=>{b?aK(k):k()},[b]),E=z.useCallback((k,O)=>{let{deletedFetchers:P,flushSync:I,viewTransitionOpts:F}=O;P.forEach(_=>y.current.delete(_)),k.fetchers.forEach((_,A)=>{_.data!==void 0&&y.current.set(A,_.data)});let L=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!F||L){I?Lf(()=>s(k)):v(()=>s(k));return}if(I){Lf(()=>{d&&(c&&c.resolve(),d.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let _=r.window.document.startViewTransition(()=>{Lf(()=>s(k))});_.finished.finally(()=>{Lf(()=>{h(void 0),f(void 0),a(void 0),u({isTransitioning:!1})})}),Lf(()=>f(_));return}d?(c&&c.resolve(),d.skipTransition(),m({state:k,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(a(k),u({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[r.window,d,c,y,v]);z.useLayoutEffect(()=>r.subscribe(E),[r,E]),z.useEffect(()=>{l.isTransitioning&&!l.flushSync&&h(new lK)},[l]),z.useEffect(()=>{if(c&&o&&r.window){let k=o,O=c.promise,P=r.window.document.startViewTransition(async()=>{v(()=>s(k)),await O});P.finished.finally(()=>{h(void 0),f(void 0),a(void 0),u({isTransitioning:!1})}),f(P)}},[v,o,c,r.window]),z.useEffect(()=>{c&&o&&i.location.key===o.location.key&&c.resolve()},[c,d,i.location,o]),z.useEffect(()=>{!l.isTransitioning&&p&&(a(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),m(void 0))},[l.isTransitioning,p]),z.useEffect(()=>{},[]);let D=z.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:k=>r.navigate(k),push:(k,O,P)=>r.navigate(k,{state:O,preventScrollReset:P==null?void 0:P.preventScrollReset}),replace:(k,O,P)=>r.navigate(k,{replace:!0,state:O,preventScrollReset:P==null?void 0:P.preventScrollReset})}),[r]),C=r.basename||"/",w=z.useMemo(()=>({router:r,navigator:D,static:!1,basename:C}),[r,D,C]),T=z.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return z.createElement(z.Fragment,null,z.createElement(lb.Provider,{value:w},z.createElement(E5.Provider,{value:i},z.createElement(iK.Provider,{value:y.current},z.createElement(nK.Provider,{value:l},z.createElement(qq,{basename:C,location:i.location,navigationType:i.historyAction,navigator:D,future:T},i.initialized||r.future.v7_partialHydration?z.createElement(cK,{routes:r.routes,future:r.future,state:i}):t))))),null)}const cK=z.memo(hK);function hK(e){let{routes:t,future:r,state:n}=e;return Iq(t,void 0,n,r)}const dK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fK=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cb=z.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:h}=t,d=Jq(t,Qq),{basename:f}=z.useContext(xc),p,m=!1;if(typeof u=="string"&&fK.test(u)&&(p=u,dK))try{let E=new URL(window.location.href),D=u.startsWith("//")?new URL(E.protocol+u):new URL(u),C=Ld(D.pathname,f);D.origin===E.origin&&C!=null?u=C+D.search+D.hash:m=!0}catch{}let y=Lq(u,{relative:i}),b=pK(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:h});function v(E){n&&n(E),E.defaultPrevented||b(E)}return z.createElement("a",ug({},d,{href:p||y,onClick:m||s?n:v,ref:r,target:l}))});var v3;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(v3||(v3={}));var b3;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(b3||(b3={}));function pK(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=A5(),u=ub(),c=k5(e,{relative:o});return z.useCallback(h=>{if(Yq(h,r)){h.preventDefault();let d=n!==void 0?n:tc(u)===tc(c);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,n,i,r,e,s,o,a])}const x3=e=>{let t;const r=new Set,n=(u,c)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const d=t;t=c??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(f=>f(t,d))}},i=()=>t,a={setState:n,getState:i,getInitialState:()=>l,subscribe:u=>(r.add(u),()=>r.delete(u))},l=t=e(n,i,a);return a},gK=e=>e?x3(e):x3,mK=e=>e;function yK(e,t=mK){const r=gt.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return gt.useDebugValue(r),r}const vK=e=>{const t=gK(e),r=n=>yK(t,n);return Object.assign(r,t),r},L5=e=>vK,w3={BASE_URL:"/theme-builder/main",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_FEATURE_BRANCH:"/main"},AE=new Map,Mm=e=>{const t=AE.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},bK=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=AE.get(r.name);if(n)return{type:"tracked",store:e,...n};const i={connection:t.connect(r),stores:{}};return AE.set(r.name,i),{type:"tracked",store:e,...i}},xK=(e,t={})=>(r,n,i)=>{const{enabled:s,anonymousActionType:o,store:a,...l}=t;let u;try{u=(s??(w3?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(r,n,i);const{connection:c,...h}=bK(a,u,l);let d=!0;i.setState=(m,y,b)=>{const v=r(m,y);if(!d)return v;const E=b===void 0?{type:o||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(c==null||c.send(E,n()),v):(c==null||c.send({...E,type:`${a}/${E.type}`},{...Mm(l.name),[a]:i.getState()}),v)};const f=(...m)=>{const y=d;d=!1,r(...m),d=y},p=e(i.setState,n,i);if(h.type==="untracked"?c==null||c.init(p):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([m,y])=>[m,m===h.store?p:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const y=i.dispatch;i.dispatch=(...b)=>{(w3?"production":void 0)!=="production"&&b[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),y(...b)}}return c.subscribe(m=>{var y;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ix(m.payload,b=>{if(b.type==="__setState"){if(a===void 0){f(b.state);return}Object.keys(b.state).length!==1&&console.error(` [zustand devtools middleware] Unsupported __setState action format. When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } - `);const v=b.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&f(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(b)});case"DISPATCH":switch(m.payload.type){case"RESET":return f(p),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Mm(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Mm(l.name));case"ROLLBACK":return Ix(m.state,b=>{if(a===void 0){f(b),c==null||c.init(i.getState());return}f(b[a]),c==null||c.init(Mm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ix(m.state,b=>{if(a===void 0){f(b);return}JSON.stringify(i.getState())!==JSON.stringify(b[a])&&f(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=m.payload,v=(y=b.computedStates.slice(-1)[0])==null?void 0:y.state;if(!v)return;f(a===void 0?v:v[a]),c==null||c.send(null,b);return}case"PAUSE_RECORDING":return d=!d}return}}),p},$5=vK,Ix=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function bK(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var s;const o=l=>l===null?null:JSON.parse(l,void 0),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>r.removeItem(i)}}const _E=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return _E(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return _E(n)(r)}}}},xK=(e,t)=>(r,n,i)=>{let s={storage:bK(()=>localStorage),partialize:m=>m,version:0,merge:(m,y)=>({...y,...m}),...t},o=!1;const a=new Set,l=new Set;let u=s.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...m)},n,i);const c=()=>{const m=s.partialize({...n()});return u.setItem(s.name,{state:m,version:s.version})},h=i.setState;i.setState=(m,y)=>{h(m,y),c()};const d=e((...m)=>{r(...m),c()},n,i);i.getInitialState=()=>d;let f;const p=()=>{var m,y;if(!u)return;o=!1,a.forEach(v=>{var E;return v((E=n())!=null?E:d)});const b=((y=s.onRehydrateStorage)==null?void 0:y.call(s,(m=n())!=null?m:d))||void 0;return _E(u.getItem.bind(u))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return[!0,s.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var E;const[D,C]=v;if(f=s.merge(C,(E=n())!=null?E:d),r(f,!0),D)return c()}).then(()=>{b==null||b(f,void 0),f=n(),o=!0,l.forEach(v=>v(f))}).catch(v=>{b==null||b(void 0,v)})};return i.persist={setOptions:m=>{s={...s,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u==null||u.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},s.skipHydration||p(),f||d},L5=xK,wK="theme-builder-state",SK="playground-state",Iv=[2,4,6,10,20,30,40,50,60,70,80,90,94,96,98],$E=[{name:"bg-basic-level-1-default",dark:3,light:14},{name:"bg-basic-level-1-hovered",dark:4,light:13},{name:"bg-basic-level-1-pressed",dark:5,light:12},{name:"bg-basic-level-2-default",dark:2,light:13},{name:"bg-basic-level-2-hovered",dark:3,light:12},{name:"bg-basic-level-2-pressed",dark:4,light:11},{name:"bg-basic-level-3-default",dark:1,light:12},{name:"bg-basic-level-3-hovered",dark:2,light:11},{name:"bg-basic-level-3-pressed",dark:3,light:10},{name:"bg-basic-transparent-full-default",dark:9,transparencyDark:100,light:6,transparencyLight:100},{name:"bg-basic-transparent-semi-default",dark:9,transparencyDark:84,light:6,transparencyLight:92},{name:"bg-basic-transparent-hovered",dark:9,transparencyDark:76,light:6,transparencyLight:84},{name:"bg-basic-transparent-pressed",dark:9,transparencyDark:68,light:6,transparencyLight:76},{name:"on-bg-basic-emphasis-100-default",dark:12,light:3},{name:"on-bg-basic-emphasis-100-hovered",dark:11,light:4},{name:"on-bg-basic-emphasis-100-pressed",dark:10,light:5},{name:"on-bg-basic-emphasis-90-default",dark:10,light:5},{name:"on-bg-basic-emphasis-90-hovered",dark:9,light:6},{name:"on-bg-basic-emphasis-90-pressed",dark:8,light:7},{name:"on-bg-basic-emphasis-80-default",dark:9,light:6},{name:"on-bg-basic-emphasis-80-hovered",dark:8,light:5},{name:"on-bg-basic-emphasis-80-pressed",dark:7,light:4},{name:"on-bg-basic-emphasis-70-default",dark:8,light:7},{name:"on-bg-basic-emphasis-70-hovered",dark:7,light:6},{name:"on-bg-basic-emphasis-70-pressed",dark:6,light:5},{name:"on-bg-basic-emphasis-60-default",dark:6,light:10},{name:"on-bg-basic-emphasis-60-hovered",dark:5,light:9},{name:"on-bg-basic-emphasis-60-pressed",dark:4,light:8},{name:"on-bg-basic-emphasis-50-default",dark:5,light:9},{name:"on-bg-basic-emphasis-50-hovered",dark:4,light:8},{name:"on-bg-basic-emphasis-50-pressed",dark:3,light:7},{name:"bg-inverted-contrast-max-default",dark:12,light:3},{name:"bg-inverted-contrast-max-hovered",dark:11,light:4},{name:"bg-inverted-contrast-max-pressed",dark:10,light:5},{name:"bg-inverted-contrast-high-default",dark:9,light:6},{name:"bg-inverted-bg-inverted-contrast-high-hovered",dark:8,light:5},{name:"bg-inverted-bg-inverted-contrast-high-pressed",dark:7,light:4},{name:"bg-inverted-contrast-low-default",dark:8,light:7},{name:"bg-inverted-bg-inverted-contrast-low-hovered",dark:7,light:6},{name:"bg-inverted-bg-inverted-contrast-low-pressed",dark:6,light:5},{name:"on-bg-inverted-default",dark:3,light:14},{name:"on-bg-inverted-hovered",dark:4,light:13},{name:"on-bg-inverted-pressed",dark:5,light:12}],DK={name:"Whitelabel",image:{light:"peace-in-a-box.svg",dark:"peace-in-a-box-white.svg"}},EK={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},CK={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},AK={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},TK={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},kK={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},_K={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},$K={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},LK={neutral:{origin:"#646973",originBgLight:"#edeef0",originBgDark:"#070709",originLight:"#646973",originLightAlternative:"#646973",originLightAccessible:!0,originLightHovered:"#4d5159",originLightPressed:"#373a40",originDark:"#646973",originDarkAlternative:"#646973",originDarkAccessible:!0,originDarkHovered:"#7c828e",originDarkPressed:"#969ca9",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},brand:{origin:"#242629",originBgLight:"#edeef0",originBgDark:"#070708",originLight:"#242629",originLightAlternative:"#242629",originLightAccessible:!0,originLightHovered:"#393c40",originLightPressed:"#4f5358",originDark:"#242629",originDarkAlternative:"#5a5f65",originDarkAccessible:!1,originDarkHovered:"#393c40",originDarkPressed:"#4f5358",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},informational:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},warning:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},successful:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"},critical:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"}},PK={yellow:{origin:"#FFD800",originBgLight:"#ffedbc",originBgDark:"#0a0700",originLight:"#FFD800",originLightAlternative:"#8c7600",originLightAccessible:!1,originLightHovered:"#dfbc00",originLightPressed:"#bfa200",originDark:"#FFD800",originDarkAlternative:"#FFD800",originDarkAccessible:!0,originDarkHovered:"#dfbc00",originDarkPressed:"#bfa200",onOriginLight:"#0a0700",onOriginLightHovered:"#261f00",onOriginLightPressed:"#3f3400",onOriginLightAccessible:!0,onOriginLightAlternative:"#0a0700",onOriginDark:"#0a0700",onOriginDarkHovered:"#261f00",onOriginDarkPressed:"#3f3400",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#0a0700"},orange:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},red:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},pink:{origin:"#E93E8F",originBgLight:"#fce9ef",originBgDark:"#160209",originLight:"#E93E8F",originLightAlternative:"#E93E8F",originLightAccessible:!0,originLightHovered:"#be3174",originLightPressed:"#95245a",originDark:"#E93E8F",originDarkAlternative:"#E93E8F",originDarkAccessible:!0,originDarkHovered:"#ef75a6",originDarkPressed:"#f3a0be",onOriginLight:"#260413",onOriginLightHovered:"#490e29",onOriginLightPressed:"#6e1941",onOriginLightAccessible:!0,onOriginLightAlternative:"#260413",onOriginDark:"#260413",onOriginDarkHovered:"#490e29",onOriginDarkPressed:"#6e1941",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#260413"},violet:{origin:"#814997",originBgLight:"#f3ebf7",originBgDark:"#0d0412",originLight:"#814997",originLightAlternative:"#814997",originLightAccessible:!0,originLightHovered:"#623673",originLightPressed:"#452452",originDark:"#814997",originDarkAlternative:"#814997",originDarkAccessible:!0,originDarkHovered:"#a15dbc",originDarkPressed:"#b67cce",onOriginLight:"#fbf8fc",onOriginLightHovered:"#e9d7ee",onOriginLightPressed:"#d7b5e1",onOriginLightAccessible:!0,onOriginLightAlternative:"#fbf8fc",onOriginDark:"#fbf8fc",onOriginDarkHovered:"#e9d7ee",onOriginDarkPressed:"#d7b5e1",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#fbf8fc"},blue:{origin:"#1455C0",originBgLight:"#eaedfe",originBgDark:"#00061b",originLight:"#1455C0",originLightAlternative:"#1455C0",originLightAccessible:!0,originLightHovered:"#0c3f92",originLightPressed:"#062a67",originDark:"#1455C0",originDarkAlternative:"#1558c6",originDarkAccessible:!1,originDarkHovered:"#1c6cf0",originDarkPressed:"#5c87fa",onOriginLight:"#f8f9ff",onOriginLightHovered:"#d5dbff",onOriginLightPressed:"#b0beff",onOriginLightAccessible:!0,onOriginLightAlternative:"#f8f9ff",onOriginDark:"#f8f9ff",onOriginDarkHovered:"#d5dbff",onOriginDarkPressed:"#b0beff",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f8f9ff"},cyan:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},turquoise:{origin:"#00A099",originBgLight:"#9bfff8",originBgDark:"#000908",originLight:"#00A099",originLightAlternative:"#00857f",originLightAccessible:!1,originLightHovered:"#00847e",originLightPressed:"#006864",originDark:"#00A099",originDarkAlternative:"#00A099",originDarkAccessible:!0,originDarkHovered:"#00bdb5",originDarkPressed:"#00dcd2",onOriginLight:"#000908",onOriginLightHovered:"#002422",onOriginLightPressed:"#003c38",onOriginLightAccessible:!0,onOriginLightAlternative:"#000908",onOriginDark:"#000908",onOriginDarkHovered:"#002422",onOriginDarkPressed:"#003c38",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#000908"},green:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"}},zT={branding:DK,spacing:EK,sizing:CK,typography:AK,border:TK,elevation:kK,transition:_K,font:$K,colors:LK,additionalColors:PK},w3=zT,tr=_5()($5(L5(e=>({darkMode:!1,editorMarkup:"",theme:w3,speakingNames:$E,luminanceSteps:Iv,developerMode:!1,resetDefaults:()=>{e(()=>({theme:w3,luminanceSteps:Iv,speakingNames:$E}))},setColors:t=>{e(({theme:r})=>({theme:{...r,colors:t}}))},setAdditionalColors:t=>{e(({theme:r})=>({theme:{...r,additionalColors:t}}))},setCustomColors:t=>{e(({theme:r})=>({theme:{...r,customColors:t}}))}}),{name:wK}))),ji=_5()($5(L5(()=>({nodeTrees:{page:{name:"Page",serializedJson:"",isPage:!0}},currentId:"page",showBorders:!1,showSpacings:!1}),{name:SK}))),gn=()=>{var e,t;if(typeof window<"u"){if(!((e=window.crypto)===null||e===void 0)&&e.randomUUID)return window.crypto.randomUUID();if(!((t=window.crypto)===null||t===void 0)&&t.getRandomValues)return window.crypto.getRandomValues(new Uint32Array(3)).join("-")}return Math.random().toString().substring(2)},P5=(e,t)=>{const r=e.children;Object.values(r).forEach(n=>{n.setAttribute(t.key,t.value),n.children.length>0&&P5(n,t)})},cr=(...e)=>{let t="";return e.forEach((r,n)=>{if(r)if(typeof r=="string")t+=`${r} `;else for(let i in r)r[i]&&(t+=`${i} `)}),t.trim()},FK=["suppressHydrationWarning","suppressContentEditableWarning","translate","title","tabIndex","style","spellCheck","nonce","lang","hidden","draggable","dir","contextMenu","contentEditable","autoFocus","accessKey","is","inputMode","unselectable","security","results","vocab","typeof","rev","resource","rel","property","inlist","datatype","content","about","role","radioGroup","color"],hr=(e,t)=>Object.keys(e).filter(r=>(r.startsWith("data-")||r.startsWith("aria-")||r.startsWith("default")||r.startsWith("auto")||r.startsWith("item")||r.startsWith("on")||FK.includes(r))&&!t.includes(r)).reduce((r,n)=>(r[n]=e[n],r),{}),OK=e=>{var t;const{top:r,bottom:n,left:i,right:s,height:o,width:a}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:u}=window;let c=r<0,h=n>l,d=i<0,f=s>u;const p=e.hasAttribute("data-outside-vy"),m=e.hasAttribute("data-outside-vx"),y=(t=e==null?void 0:e.parentElement)===null||t===void 0?void 0:t.getBoundingClientRect();return y&&(p&&(e.getAttribute("data-outside-vy")==="top"?c=y.top-(n-y.bottom)<0:h=y.bottom+(y.top-r)>l),m&&(e.getAttribute("data-outside-vx")==="left"?d=y.left-(s-y.right)<0:f=y.right+(y.left-i)>u)),{outTop:c,outBottom:h,outLeft:d,outRight:f}},HT=e=>{const{outTop:t,outBottom:r,outLeft:n,outRight:i}=OK(e);let s={};return t||r?(s={vy:t?"top":"bottom"},e.setAttribute("data-outside-vy",s.vy)):e.removeAttribute("data-outside-vy"),n||i?(s=Object.assign(Object.assign({},s),{vx:i?"right":"left"}),e.setAttribute("data-outside-vx",s.vx)):e.removeAttribute("data-outside-vx"),s},NK=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),MK=["Mac","iPhone","iPad","iPod"],$l=()=>typeof window<"u"&&MK.some(e=>window.navigator.userAgent.includes(e)),xa=(e,t)=>new Promise(()=>setTimeout(e,t));function IK(e,t){const r=t||z.useRef(t);function n(i){e.onClick&&e.onClick(i)}return z.createElement("button",Object.assign({ref:r},hr(e,[]),{id:e.id,className:cr("db-button",e.className),type:e.type||"button",disabled:e.disabled,"aria-label":e.label,"data-icon":e.icon,"data-size":e.size,"data-state":e.state,"data-width":e.width,"data-variant":e.variant,"data-no-text":e.noText,name:e.name,value:e.value,"aria-describedby":e.describedbyid,"aria-expanded":e.ariaexpanded,"aria-pressed":e.ariapressed,onClick:i=>n(i)}),e.children)}const wt=z.forwardRef(IK),bc="OVERWRITE_DEFAULT_ID",db="LABEL SHOULD BE SET",F5=" ",Ll="-message",Pl="-valid-message",Fl="-invalid-message",S3="-placeholder",D3="-datalist",Ol="TODO: Add a validMessage",Nl="TODO: Add an invalidMessage",RK="Back",BK="BurgerMenu",jK="db",zK="4",O5="Close Button";var LE;(function(e){e.FUNCTIONAL="functional",e.REGULAR="regular",e.EXPRESSIVE="expressive"})(LE||(LE={}));Object.entries(LE).map(([,e])=>e);var PE;(function(e){e.PRIMARY="primary"})(PE||(PE={}));var FE;(function(e){e.NEUTRAL_BG_LEVEL_1="neutral-bg-basic-level-1",e.NEUTRAL_BG_LEVEL_2="neutral-bg-basic-level-2",e.NEUTRAL_BG_LEVEL_3="neutral-bg-basic-level-3",e.NEUTRAL_BG_TRANSPARENT_SEMI="neutral-bg-basic-transparent-semi",e.NEUTRAL_BG_TRANSPARENT_FULL="neutral-bg-basic-transparent-full",e.BRAND_BG_LEVEL_1="brand-bg-basic-level-1",e.BRAND_BG_LEVEL_2="brand-bg-basic-level-2",e.BRAND_BG_LEVEL_3="brand-bg-basic-level-3",e.BRAND_BG_TRANSPARENT_SEMI="brand-bg-basic-transparent-semi",e.BRAND_BG_TRANSPARENT_FULL="brand-bg-basic-transparent-full",e.SUCCESSFUL_BG_LEVEL_1="successful-bg-basic-level-1",e.SUCCESSFUL_BG_LEVEL_2="successful-bg-basic-level-2",e.SUCCESSFUL_BG_LEVEL_3="successful-bg-basic-level-3",e.SUCCESSFUL_BG_TRANSPARENT_SEMI="successful-bg-basic-transparent-semi",e.SUCCESSFUL_BG_TRANSPARENT_FULL="successful-bg-basic-transparent-full",e.CRITICAL_BG_LEVEL_1="critical-bg-basic-level-1",e.CRITICAL_BG_LEVEL_2="critical-bg-basic-level-2",e.CRITICAL_BG_LEVEL_3="critical-bg-basic-level-3",e.CRITICAL_BG_TRANSPARENT_SEMI="critical-bg-basic-transparent-semi",e.CRITICAL_BG_TRANSPARENT_Full="critical-bg-basic-transparent-full",e.WARNING_BG_LEVEL_1="warning-bg-basic-level-1",e.WARNING_BG_LEVEL_2="warning-bg-basic-level-2",e.WARNING_BG_LEVEL_3="warning-bg-basic-level-3",e.WARNING_BG_TRANSPARENT_SEMI="warning-bg-basic-transparent-semi",e.WARNING_BG_TRANSPARENT_FULL="warning-bg-basic-transparent-full",e.INFORMATIONAL_BG_LEVEL_1="informational-bg-basic-level-1",e.INFORMATIONAL_BG_LEVEL_2="informational-bg-basic-level-2",e.INFORMATIONAL_BG_LEVEL_3="informational-bg-basic-level-3",e.INFORMATIONAL_BG_TRANSPARENT_SEMI="informational-bg-basic-transparent-semi",e.INFORMATIONAL_BG_TRANSPARENT_FULL="informational-bg-basic-transparent-full"})(FE||(FE={}));const HK=Object.entries(FE).map(([,e])=>e);Object.entries(PE).map(([,e])=>e);var OE;(function(e){e.CRITICAL="critical",e.INFORMATIONAL="informational",e.WARNING="warning",e.SUCCESSFUL="successful"})(OE||(OE={}));Object.entries(OE).map(([,e])=>e);const UK={width:390,height:884},WK={width:1920,height:1280};Object.assign({name:"desktop"},WK),Object.assign({name:"mobile"},UK);function VK(e,t){var r;const n=t||z.useRef(t);function i(s){e.onClose&&e.onClose()}return z.createElement("article",Object.assign({ref:n},hr(e,[]),{id:e.id,className:cr("db-notification",e.className),"aria-live":e.ariaLive,"data-semantic":e.semantic,"data-variant":e.variant,"data-icon":e.icon,"data-link-variant":e.linkVariant}),z.createElement(z.Fragment,null,e.image),e.headline?z.createElement("header",null,e.headline):null,z.createElement("p",null,e.children),e.timestamp?z.createElement("span",null,e.timestamp):null,z.createElement(z.Fragment,null,e.link),e.behaviour!=="permanent"?z.createElement(wt,{icon:"cross",variant:"ghost",size:"small",id:e.closeButtonId,noText:!0,onClick:s=>i()},(r=e.closeButtonText)!==null&&r!==void 0?r:O5):null)}const Rv=z.forwardRef(VK);function GK(e,t){var r,n;const i=t||z.useRef(t),[s,o]=z.useState(()=>!1);return z.useEffect(()=>{o(!0)},[]),z.useEffect(()=>{var a;if(i.current&&s&&!((a=e.placement)===null||a===void 0)&&a.startsWith("corner")){let l=i.current.parentElement;l&&l.localName.includes("badge")&&(l=l.parentElement),l&&l.setAttribute("data-has-badge","true")}},[i.current,s]),z.createElement("span",Object.assign({ref:i},hr(e,[]),{id:e.id,className:cr("db-badge",e.className),"data-semantic":e.semantic,"data-size":e.size,"data-emphasis":e.emphasis,"data-placement":e.placement,"data-label":((r=e.placement)===null||r===void 0?void 0:r.startsWith("corner"))&&((n=e.label)!==null&&n!==void 0?n:db)}),e.children)}const NE=z.forwardRef(GK);function qK(e,t){var r;const n=t||z.useRef(t);return z.createElement("div",Object.assign({ref:n},hr(e,[]),{"data-icon":e.hideLogo?"none":(r=e.icon)!==null&&r!==void 0?r:jK,id:e.id,className:cr("db-brand",e.className)}),e.children)}const KK=z.forwardRef(qK);function JK(e,t){const r=t||z.useRef(t);function n(i){e.onClick&&e.onClick(i)}return z.createElement("div",Object.assign({ref:r},hr(e,[]),{id:e.id,"data-behaviour":e.behaviour,"data-elevation-level":e.elevationLevel,"data-spacing":e.spacing,role:e.behaviour==="interactive"?"button":void 0,tabIndex:e.behaviour==="interactive"?0:void 0,onClick:i=>n(i),className:cr("db-card",e.className)}),e.children)}const Mi=z.forwardRef(JK);function XK(e,t){const r=t||z.useRef(t);return z.createElement("span",Object.assign({ref:r},hr(e,[]),{id:e.id,className:cr("db-infotext",e.className),"data-icon":e.icon,"data-semantic":e.semantic,"data-size":e.size}),e.children)}const ur=z.forwardRef(XK);function YK(e,t){var r,n,i,s;const o=t||z.useRef(t),[a,l]=z.useState(()=>!1),[u,c]=z.useState(()=>"checkbox-"+gn()),[h,d]=z.useState(()=>u+Ll),[f,p]=z.useState(()=>u+Pl),[m,y]=z.useState(()=>u+Fl),[b,v]=z.useState(()=>""),[E,D]=z.useState(()=>"");function C($){var O,P,N,F,L,k;e.onChange&&e.onChange($),e.change&&e.change($),!(!((O=o.current)===null||O===void 0)&&O.validity.valid)||e.customValidity==="invalid"?(v(m),$l()&&(D((F=(P=e.invalidMessage)!==null&&P!==void 0?P:(N=o.current)===null||N===void 0?void 0:N.validationMessage)!==null&&F!==void 0?F:Nl),xa(()=>D(""),1e3))):e.customValidity==="valid"||!((L=o.current)===null||L===void 0)&&L.validity.valid&&e.required?(v(f),$l()&&(D((k=e.validMessage)!==null&&k!==void 0?k:Ol),xa(()=>D(""),1e3))):e.message?v(h):v("")}function w($){e.onBlur&&e.onBlur($),e.blur&&e.blur($)}function A($){e.onFocus&&e.onFocus($),e.focus&&e.focus($)}return z.useEffect(()=>{l(!0),c(e.id||u)},[]),z.useEffect(()=>{if(u){const $=u+Ll,O=u+Pl,P=u+Fl;d($),p(O),y(P),e.message&&v($)}},[u]),z.useEffect(()=>{if(a&&document&&u){const $=document==null?void 0:document.getElementById(u);$&&(e.checked!=null&&($.checked=e.checked),e.indeterminate!==void 0&&($.indeterminate=e.indeterminate),l(!1))}},[a,e.indeterminate,e.checked]),z.createElement("div",{"data-size":e.size,"data-variant":e.variant,className:cr("db-checkbox",e.className)},z.createElement("label",{htmlFor:u},z.createElement("input",Object.assign({type:"checkbox","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:o},hr(e,[]),{id:u,name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,required:e.required,onChange:$=>C($),onBlur:$=>w($),onFocus:$=>A($),"aria-describedby":b})),e.label?z.createElement("span",null,e.label):null,e.children),e.message?z.createElement(ur,{size:"small",icon:e.messageIcon,id:h},e.message):null,z.createElement(ur,{size:"small",semantic:"successful",id:f},(r=e.validMessage)!==null&&r!==void 0?r:Ol),z.createElement(ur,{size:"small",semantic:"critical",id:m},(s=(n=e.invalidMessage)!==null&&n!==void 0?n:(i=o.current)===null||i===void 0?void 0:i.validationMessage)!==null&&s!==void 0?s:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},E))}const ME=z.forwardRef(YK);function QK(e,t){const r=t||z.useRef(t);return z.createElement("div",Object.assign({ref:r},hr(e,[]),{id:e.id,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,"data-width":e.width,className:cr("db-divider",e.className)}))}const oo=z.forwardRef(QK);function ZK(e,t){var r;const n=t||z.useRef(t),i=z.useRef(null);function s(a){a.key==="Escape"&&a.preventDefault(),(a==="close"||a.key==="Escape"||a.target.nodeName==="DIALOG"&&a.type==="click"&&e.backdrop!=="none")&&e.onClose&&e.onClose(a)}function o(){n!=null&&n.current&&(e.open&&!n.current.open&&(i.current&&(i.current.hidden=!1),e.backdrop==="none"?n.current.show():n.current.showModal()),!e.open&&n.current.open&&(i.current&&(i.current.hidden=!0),xa(()=>{var a;i.current&&(i.current.hidden=!1),(a=n.current)===null||a===void 0||a.close()},401)))}return z.useEffect(()=>{o()},[]),z.useEffect(()=>{o()},[e.open]),z.createElement("dialog",Object.assign({className:"db-drawer",id:e.id,ref:n},hr(e,["onClose"]),{onClick:a=>{s(a)},onKeyDown:a=>s(a),"data-backdrop":e.backdrop}),z.createElement("article",{ref:i,className:cr("db-drawer-container",e.className),"data-spacing":e.spacing,"data-width":e.width,"data-direction":e.direction,"data-rounded":e.rounded},z.createElement("header",{className:"db-drawer-header"},z.createElement("div",{className:"db-drawer-header-text"},z.createElement(z.Fragment,null,e.drawerHeader)),z.createElement(wt,{icon:"cross",variant:"ghost",className:"button-close-drawer",id:e.closeButtonId,noText:!0,onClick:a=>s("close")},(r=e.closeButtonText)!==null&&r!==void 0?r:O5)),z.createElement("div",{className:"db-drawer-content"},e.children)))}const $d=z.forwardRef(ZK),eJ=e=>{var t,r;const{target:n}=e;return!!(!(!((t=n==null?void 0:n.classList)===null||t===void 0)&&t.contains("db-navigation-item-expand-button"))&&(!((r=n==null?void 0:n.parentElement)===null||r===void 0)&&r.classList.contains("db-navigation-item")))};class tJ{constructor(t,r){this.initialized=!1,this.mouseX=0,this.mouseY=0,this.element=t,this.subNavigation=r,this.parentSubNavigation=this.element.closest(".db-sub-navigation"),this.parentSubNavigation&&!this.element.closest(".db-drawer")&&this.init()}init(){var t,r;const n=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.element.style.setProperty("--db-navigation-item-inline-size",`${n}px`),this.initialized=!0}enableFollow(){var t,r;if(!this.initialized||this.triangleData)return;const n=HT(this.subNavigation),i=this.element.getBoundingClientRect(),s=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.triangleData={itemRect:i,parentElementWidth:s,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(s-i.width)/2,outsideVX:n.vx,outsideVY:n.vy}}disableFollow(){this.triangleData=void 0}getTriangleTipX(){return this.triangleData?this.triangleData.outsideVX==="right"?this.triangleData.itemRect.width-this.mouseX:Math.min(this.mouseX,this.triangleData.itemRect.width*.75):0}getTriangleTipY(){if(!this.triangleData)return 0;const t=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;return this.triangleData.outsideVY==="bottom"?t+(this.triangleData.subNavigationHeight-this.triangleData.padding*2-this.triangleData.itemRect.height):t}hasMouseEnteredSubNavigation(){if(!this.triangleData)return!1;const t=this.triangleData.outsideVX==="right";return!!(t&&this.mouseX<-1*this.triangleData.padding||!t&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding)}getTriangleCoordinates(t){if(!this.triangleData)return;if(t==="fill-gap"){const o=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`,a=`${this.triangleData.parentElementWidth-this.triangleData.padding}px`;return{lb:`${a} ${o}`,lt:`${a} 0`,rt:"100% 0",rb:`100% ${o}`}}const r=this.getTriangleTipX(),n=this.getTriangleTipY(),i=`${r}px ${n+this.triangleData.padding}px`,s=`${r}px ${n-this.triangleData.padding}px`;return{lb:i,lt:s,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(t){if(!this.initialized||!this.triangleData)return;this.mouseX=t.clientX-this.triangleData.itemRect.left,this.mouseY=t.clientY-this.triangleData.itemRect.top;const r=this.hasMouseEnteredSubNavigation(),n=this.getTriangleCoordinates(r?"fill-gap":"safe-triangle");n&&(this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${n.lb}, ${n.lt}, ${n.rt}, ${n.rb})`),r&&(this.triangleData=void 0))}}function rJ(e,t){var r;const n=t||z.useRef(t),[i,s]=z.useState(()=>bc),[o,a]=z.useState(()=>!1),[l,u]=z.useState(()=>!1);function c(){e.onToggle&&e.onToggle(!e.drawerOpen)}function h(d){eJ(d)&&c()}return z.useEffect(()=>{a(!0),s(e.id||"header-"+gn())},[]),z.useEffect(()=>{if(o&&document&&i&&e.forceMobile){const d=document.getElementById(i);d&&P5(d,{key:"data-force-mobile",value:"true"}),u(!0)}},[o]),z.createElement("header",Object.assign({ref:n},hr(e,[]),{className:cr("db-header",e.className),id:i,"data-width":e.width,"data-on-forcing-mobile":e.forceMobile&&!l}),z.createElement($d,{spacing:"small",className:"db-header-drawer",rounded:!0,open:e.drawerOpen,onClose:()=>c()},z.createElement("div",{className:"db-header-drawer-navigation"},z.createElement("div",{className:"db-header-navigation",onClick:d=>h(d)},e.children),z.createElement("div",{className:"db-header-meta-navigation"},z.createElement(z.Fragment,null,e.metaNavigation))),z.createElement("div",{className:"db-header-secondary-action"},z.createElement(z.Fragment,null,e.secondaryAction))),z.createElement("div",{className:"db-header-meta-navigation"},z.createElement(z.Fragment,null,e.metaNavigation)),z.createElement("div",{className:"db-header-navigation-bar"},z.createElement("div",{className:"db-header-brand-container"},z.createElement(z.Fragment,null,e.brand)),z.createElement("div",{className:"db-header-navigation-container"},z.createElement("div",{className:"db-header-navigation"},e.children),z.createElement("div",{className:"db-header-primary-action"},z.createElement(z.Fragment,null,e.primaryAction))),z.createElement("div",{className:"db-header-action-container"},z.createElement("div",{className:"db-header-burger-menu-container"},z.createElement(wt,{icon:"menu",variant:"ghost",id:i+"-burger-menu",noText:!0,onClick:()=>c()},(r=e.burgerMenuLabel)!==null&&r!==void 0?r:BK)),z.createElement("div",{className:"db-header-secondary-action"},z.createElement(z.Fragment,null,e.secondaryAction)))))}const N5=z.forwardRef(rJ);function nJ(e,t){const r=t||z.useRef(t);return z.createElement("span",Object.assign({"aria-hidden":"true",ref:r},hr(e,[]),{id:e.id,className:cr("db-icon",e.className),"data-icon":e.icon,"data-icon-weight":e.weight,"data-icon-variant":e.variant}),e.children)}const Ld=z.forwardRef(nJ);function iJ(e,t){var r,n,i,s,o,a,l;const u=t||z.useRef(t),[c,h]=z.useState(()=>"input-"+gn()),[d,f]=z.useState(()=>c+Ll),[p,m]=z.useState(()=>c+Pl),[y,b]=z.useState(()=>c+Fl),[v,E]=z.useState(()=>c+D3),[D,C]=z.useState(()=>""),[w,A]=z.useState(()=>""),[$,O]=z.useState(()=>"");function P(T){e.onInput&&e.onInput(T),e.input&&e.input(T)}function N(T){var M,R,B,U,V,K;e.onChange&&e.onChange(T),e.change&&e.change(T),!(!((M=u.current)===null||M===void 0)&&M.validity.valid)||e.customValidity==="invalid"?(C(y),$l()&&(O((U=(R=e.invalidMessage)!==null&&R!==void 0?R:(B=u.current)===null||B===void 0?void 0:B.validationMessage)!==null&&U!==void 0?U:Nl),xa(()=>O(""),1e3))):e.customValidity==="valid"||!((V=u.current)===null||V===void 0)&&V.validity.valid&&(e.required||e.minLength||e.maxLength||e.pattern)?(C(p),$l()&&(O((K=e.validMessage)!==null&&K!==void 0?K:Ol),xa(()=>O(""),1e3))):e.message?C(d):C("")}function F(T){e.onBlur&&e.onBlur(T),e.blur&&e.blur(T)}function L(T){e.onFocus&&e.onFocus(T),e.focus&&e.focus(T)}function k(T){return Array.from((NK(T)?T.map(M=>({value:M,label:void 0})):T)||[])}return z.useEffect(()=>{var T;h((T=e.id)!==null&&T!==void 0?T:c)},[]),z.useEffect(()=>{var T;if(c){const M=c+Ll,R=c+Pl,B=c+Fl;f(M),m(R),b(B),E((T=e.dataListId)!==null&&T!==void 0?T:c+D3),e.message&&C(M)}},[c]),z.useEffect(()=>{A(e.value)},[e.value]),z.createElement("div",{className:cr("db-input",e.className),"data-variant":e.variant,"data-icon":e.icon,"data-icon-after":e.iconAfter},z.createElement("label",{htmlFor:c},(r=e.label)!==null&&r!==void 0?r:db),z.createElement("input",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:u},hr(e,[]),{id:c,name:e.name,type:e.type||"text",placeholder:(n=e.placeholder)!==null&&n!==void 0?n:F5,disabled:e.disabled,required:e.required,step:e.step,value:e.value,maxLength:e.maxLength,minLength:e.minLength,max:e.max,min:e.min,readOnly:e.readOnly,form:e.form,pattern:e.pattern,autoComplete:e.autocomplete,onInput:T=>P(T),onChange:T=>N(T),onBlur:T=>F(T),onFocus:T=>L(T),list:e.dataList&&v,"aria-describedby":D})),e.dataList?z.createElement("datalist",{id:v},(i=k(e.dataList))===null||i===void 0?void 0:i.map(T=>z.createElement("option",{key:v+"-option-"+T.value,value:T.value},T.label))):null,e.children,e.message?z.createElement(ur,{size:"small",icon:e.messageIcon,id:d},e.message):null,z.createElement(ur,{size:"small",semantic:"successful",id:p},(s=e.validMessage)!==null&&s!==void 0?s:Ol),z.createElement(ur,{size:"small",semantic:"critical",id:y},(l=(o=e.invalidMessage)!==null&&o!==void 0?o:(a=u.current)===null||a===void 0?void 0:a.validationMessage)!==null&&l!==void 0?l:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},$))}const Gr=z.forwardRef(iJ);function sJ(e,t){const r=t||z.useRef(t);z.useState(()=>bc);function n(i){e.onClick&&e.onClick(i)}return z.createElement("a",Object.assign({ref:r},hr(e,[]),{id:e.id,className:cr("db-link",e.className),href:e.href,target:e.target,rel:e.rel,role:e.role,hrefLang:e.hreflang,"aria-disabled":e.disabled,tabIndex:e.disabled?-1:0,"aria-selected":e.selected,"aria-label":e.label,"aria-current":e.current,"data-size":e.size,"data-variant":e.variant,"data-content":e.content||"internal",onClick:i=>n(i)}),e.text?z.createElement("span",null,e.text):null,e.children)}const Ph=z.forwardRef(sJ);function oJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),s=z.useRef(!1);return s.current||(typeof window<"u"&&document&&(e.documentOverflow==="hidden"||e.variant==="fixed"&&e.documentOverflow!=="auto")&&document.documentElement.classList.add("db-page-document"),s.current=!0),z.useEffect(()=>{i(!e.fadeIn),document&&e.fadeIn?document.fonts.ready.then(()=>{i(!0)}):i(!0)},[]),z.useEffect(()=>()=>{typeof window<"u"&&document.documentElement.classList.contains("db-page-document")&&document.documentElement.classList.remove("db-page-document")},[]),z.createElement("div",Object.assign({ref:r},hr(e,[]),{id:e.id,className:cr("db-page",e.className),"data-variant":e.variant,"data-fade-in":e.fadeIn,"data-fonts-loaded":n}),z.createElement(z.Fragment,null,e.header),z.createElement("main",{className:"db-main"},e.children),z.createElement(z.Fragment,null,e.footer))}const M5=z.forwardRef(oJ);function aJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),[s,o]=z.useState(()=>"radio-"+gn());function a(c){e.onChange&&e.onChange(c),e.change&&e.change(c)}function l(c){e.onBlur&&e.onBlur(c),e.blur&&e.blur(c)}function u(c){e.onFocus&&e.onFocus(c),e.focus&&e.focus(c)}return z.useEffect(()=>{var c;i(!0),o((c=e.id)!==null&&c!==void 0?c:s)},[]),z.useEffect(()=>{if(e.checked&&n&&document&&s){const c=document==null?void 0:document.getElementById(s);c&&e.checked!=null&&(c.checked=!0)}},[n,e.checked]),z.createElement("label",{"data-size":e.size,"data-variant":e.variant,className:cr("db-radio",e.className),htmlFor:s},z.createElement("input",Object.assign({type:"radio","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:r},hr(e,[]),{id:s,name:e.name,checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,value:e.value,required:e.required,onChange:c=>a(c),onBlur:c=>l(c),onFocus:c=>u(c)})),e.label?z.createElement("span",null,e.label):null,e.children)}const IE=z.forwardRef(aJ);function lJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>bc);return z.useEffect(()=>{i(e.id||"section-"+gn())},[]),z.createElement("section",Object.assign({ref:r},hr(e,[]),{id:n,"data-spacing":e.spacing||"medium",className:cr("db-section",e.className)}),z.createElement("div",{"data-width":e.width},e.children))}const Wg=z.forwardRef(lJ);function uJ(e,t){var r,n,i,s,o,a,l;const u=t||z.useRef(t),[c,h]=z.useState(()=>"select-"+gn()),[d,f]=z.useState(()=>c+Ll),[p,m]=z.useState(()=>c+Pl),[y,b]=z.useState(()=>c+Fl),[v,E]=z.useState(()=>c+S3),[D,C]=z.useState(()=>""),[w,A]=z.useState(()=>""),[$,O]=z.useState(()=>!1),[P,N]=z.useState(()=>"");function F(B){e.onClick&&e.onClick(B)}function L(B){e.onInput&&e.onInput(B),e.input&&e.input(B)}function k(B){var U,V,K,J,G,Y;e.onChange&&e.onChange(B),e.change&&e.change(B),!(!((U=u.current)===null||U===void 0)&&U.validity.valid)||e.customValidity==="invalid"?(C(y),$l()&&(N((J=(V=e.invalidMessage)!==null&&V!==void 0?V:(K=u.current)===null||K===void 0?void 0:K.validationMessage)!==null&&J!==void 0?J:Nl),xa(()=>N(""),1e3))):e.customValidity==="valid"||!((G=u.current)===null||G===void 0)&&G.validity.valid&&e.required?(C(p),$l()&&(N((Y=e.validMessage)!==null&&Y!==void 0?Y:Ol),xa(()=>N(""),1e3))):e.message?C(d):C(v)}function T(B){e.onBlur&&e.onBlur(B),e.blur&&e.blur(B)}function M(B){e.onFocus&&e.onFocus(B),e.focus&&e.focus(B)}function R(B){var U;return(U=B.label)!==null&&U!==void 0?U:B.value.toString()}return z.useEffect(()=>{h(e.id||c),O(!0)},[]),z.useEffect(()=>{if(c&&$){const B=c+Ll,U=c+Pl,V=c+Fl,K=c+S3;f(B),m(U),b(V),E(K),e.message?C(B):C(K),O(!1)}},[c,$]),z.useEffect(()=>{A(e.value)},[e.value]),z.createElement("div",{className:cr("db-select",e.className),"data-variant":e.variant,"data-icon":e.icon},z.createElement("label",{htmlFor:c},(r=e.label)!==null&&r!==void 0?r:db),z.createElement("select",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:u},hr(e,[]),{required:e.required,disabled:e.disabled,id:c,name:e.name,value:e.value,autoComplete:e.autocomplete,onInput:B=>L(B),onClick:B=>F(B),onChange:B=>k(B),onBlur:B=>T(B),onFocus:B=>M(B),"aria-describedby":D}),z.createElement("option",{hidden:!0}),e.options?z.createElement(z.Fragment,{key:gn()},(n=e.options)===null||n===void 0?void 0:n.map(B=>{var U;return z.createElement(z.Fragment,{key:gn()},B.options?z.createElement("optgroup",{label:R(B)},(U=B.options)===null||U===void 0?void 0:U.map(V=>z.createElement("option",{key:V.value.toString(),value:V.value,disabled:V.disabled},R(V)))):null,B.options?null:z.createElement("option",{value:B.value,disabled:B.disabled},R(B)))})):null,e.children),z.createElement("span",{id:v},(i=e.placeholder)!==null&&i!==void 0?i:e.label),e.message?z.createElement(ur,{size:"small",icon:e.messageIcon,id:d},e.message):null,z.createElement(ur,{size:"small",semantic:"successful",id:p},(s=e.validMessage)!==null&&s!==void 0?s:Ol),z.createElement(ur,{size:"small",semantic:"critical",id:y},(l=(o=e.invalidMessage)!==null&&o!==void 0?o:(a=u.current)===null||a===void 0?void 0:a.validationMessage)!==null&&l!==void 0?l:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},P))}const Iu=z.forwardRef(uJ);function cJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>"switch-"+gn()),[s,o]=z.useState(()=>!1);z.useState(()=>!1);function a(c){var h;e.onChange&&e.onChange(c),e.change&&e.change(c),o((h=c.target)===null||h===void 0?void 0:h.checked)}function l(c){e.onBlur&&e.onBlur(c),e.blur&&e.blur(c)}function u(c){e.onFocus&&e.onFocus(c),e.focus&&e.focus(c)}return z.useEffect(()=>{i(e.id||n)},[]),z.createElement("label",{"data-visual-aid":e.visualAid,"data-size":e.size,"data-variant":e.variant,"data-emphasis":e.emphasis,htmlFor:n,className:cr("db-switch",e.className)},z.createElement("input",Object.assign({type:"checkbox",role:"switch",id:n,"aria-checked":s,ref:r},hr(e,[]),{checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,name:e.name,required:e.required,"data-aid-icon":e.icon,"data-aid-icon-after":e.iconAfter,onChange:c=>a(c),onBlur:c=>l(c),onFocus:c=>u(c)})),e.children)}const hJ=z.forwardRef(cJ);function dJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),[s,o]=z.useState(()=>!1);function a(l){var u;e.onChange&&e.onChange(l),e.change&&e.change(l),o((u=l.target)===null||u===void 0?void 0:u.checked)}return z.useEffect(()=>{i(!0)},[]),z.useEffect(()=>{e.active&&n&&r.current&&(r.current.click(),i(!1))},[r.current,n]),z.createElement("li",{role:"none",className:cr("db-tab-item",e.className)},z.createElement("label",{htmlFor:e.id,"data-icon":e.icon,"data-icon-after":e.iconAfter,"data-no-text":e.noText},z.createElement("input",Object.assign({type:"radio",role:"tab",disabled:e.disabled,"aria-selected":s,"aria-controls":e.controls,checked:e.checked,ref:r},hr(e,[]),{id:e.id,onChange:l=>a(l)})),e.label?z.createElement(z.Fragment,null,e.label):null,e.children))}const Bv=z.forwardRef(dJ);function fJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1);function s(){e.onRemove&&e.onRemove()}function o(){return e.removeButton?e.removeButton:"Remove tag"}const a=z.useRef(!1);return a.current||(i(!0),a.current=!0),z.useEffect(()=>{var l,u;if(n&&r.current&&e.disabled!==void 0){const c=(l=r.current)===null||l===void 0?void 0:l.querySelector("button:not(.db-tab-remove-button)"),h=(u=r.current)===null||u===void 0?void 0:u.querySelector("input");for(const d of[c,h])d&&(d.disabled=e.disabled)}},[n,e.disabled,r.current]),z.createElement("div",Object.assign({ref:r},hr(e,[]),{id:e.id,className:cr("db-tag",e.className),"data-disabled":e.disabled,"data-semantic":e.semantic,"data-emphasis":e.emphasis,"data-icon":e.icon,"data-no-text":e.noText,"data-overflow":e.overflow}),e.children,e.text?z.createElement(z.Fragment,null,e.text):null,e.behaviour==="removable"?z.createElement("button",{"data-icon":"cross","data-size":"small","data-no-text":"true","data-variant":"ghost",className:"db-button db-tab-remove-button",onClick:l=>s(),title:o()},o()):null)}const jv=z.forwardRef(fJ);function pJ(e,t){var r,n,i,s,o,a,l;const u=t||z.useRef(t),[c,h]=z.useState(()=>"textarea-"+gn()),[d,f]=z.useState(()=>c+Ll),[p,m]=z.useState(()=>c+Pl),[y,b]=z.useState(()=>c+Fl),[v,E]=z.useState(()=>""),[D,C]=z.useState(()=>""),[w,A]=z.useState(()=>"");function $(F){e.onInput&&e.onInput(F),e.input&&e.input(F)}function O(F){var L,k,T,M,R,B;e.onChange&&e.onChange(F),e.change&&e.change(F),!(!((L=u.current)===null||L===void 0)&&L.validity.valid)||e.customValidity==="invalid"?(E(y),$l()&&(A((M=(k=e.invalidMessage)!==null&&k!==void 0?k:(T=u.current)===null||T===void 0?void 0:T.validationMessage)!==null&&M!==void 0?M:Nl),xa(()=>A(""),1e3))):e.customValidity==="valid"||!((R=u.current)===null||R===void 0)&&R.validity.valid&&(e.required||e.minLength||e.maxLength)?(E(p),$l()&&(A((B=e.validMessage)!==null&&B!==void 0?B:Ol),xa(()=>A(""),1e3))):e.message?E(d):E("")}function P(F){e.onBlur&&e.onBlur(F),e.blur&&e.blur(F)}function N(F){e.onFocus&&e.onFocus(F),e.focus&&e.focus(F)}return z.useEffect(()=>{h(e.id||c)},[]),z.useEffect(()=>{if(c){const F=c+Ll,L=c+Pl,k=c+Fl;f(F),m(L),b(k),e.message&&E(F)}},[c]),z.useEffect(()=>{C(e.value)},[e.value]),z.createElement("div",{className:cr("db-textarea",e.className),"data-variant":e.variant},z.createElement("label",{htmlFor:c},(r=e.label)!==null&&r!==void 0?r:db),z.createElement("textarea",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:u},hr(e,[]),{id:c,"data-resize":e.resize,disabled:e.disabled,required:e.required,readOnly:e.readOnly,form:e.form,maxLength:e.maxLength,minLength:e.minLength,name:e.name,wrap:e.wrap,spellCheck:e.spellCheck,autoComplete:e.autocomplete,onInput:F=>$(F),onChange:F=>O(F),onBlur:F=>P(F),onFocus:F=>N(F),value:e.value,"aria-describedby":v,placeholder:(n=e.placeholder)!==null&&n!==void 0?n:F5,rows:(i=e.rows)!==null&&i!==void 0?i:zK,cols:e.cols})),e.message?z.createElement(ur,{size:"small",icon:e.messageIcon,id:d},e.message):null,z.createElement(ur,{size:"small",semantic:"successful",id:p},(s=e.validMessage)!==null&&s!==void 0?s:Ol),z.createElement(ur,{size:"small",semantic:"critical",id:y},(l=(o=e.invalidMessage)!==null&&o!==void 0?o:(a=u.current)===null||a===void 0?void 0:a.validationMessage)!==null&&l!==void 0?l:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},w))}const wp=z.forwardRef(pJ);function gJ(e,t){var r;const n=t||z.useRef(t),[i,s]=z.useState(()=>!1),[o,a]=z.useState(()=>!1),[l,u]=z.useState(()=>!0),[c,h]=z.useState(()=>!1),[d,f]=z.useState(()=>"sub-navigation-"+gn()),[p,m]=z.useState(()=>{});function y(E){e.onClick&&e.onClick(E),o&&h(!0)}function b(E){E.stopPropagation(),h(!1)}function v(){var E;if(i&&document&&d){const D=document==null?void 0:document.getElementById(d);D&&(((E=D.children)===null||E===void 0?void 0:E.length)>0?(a(!0),p||m(new tJ(n.current,D))):u(!1))}}return z.useEffect(()=>{s(!0)},[]),z.useEffect(()=>{e.subNavigationExpanded!==void 0&&h(!!e.subNavigationExpanded)},[e.subNavigationExpanded]),z.useEffect(()=>{v()},[i]),z.createElement("li",Object.assign({ref:n},hr(e,[]),{id:e.id,onMouseOver:E=>p==null?void 0:p.enableFollow(),onMouseLeave:E=>p==null?void 0:p.disableFollow(),onMouseMove:E=>p==null?void 0:p.followByMouseEvent(E),className:cr("db-navigation-item",e.className),"data-width":e.width,"data-icon":e.icon,"data-active":e.active,"aria-disabled":e.disabled}),l?null:z.createElement(z.Fragment,null,e.children),l?z.createElement(z.Fragment,null,z.createElement("button",{className:"db-navigation-item-expand-button","aria-haspopup":o,"aria-expanded":c,disabled:e.disabled,onClick:E=>y(E)},e.children),z.createElement("menu",{className:"db-sub-navigation",id:d},o?z.createElement("div",{className:"db-mobile-navigation-back"},z.createElement(wt,{icon:"arrow_left",variant:"ghost",id:e.backButtonId,onClick:E=>b(E)},(r=e.backButtonText)!==null&&r!==void 0?r:RK)):null,z.createElement(z.Fragment,null,e.subNavigation))):null)}const RE=z.forwardRef(gJ);function mJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>bc),[s,o]=z.useState(()=>!1);function a(l){l==null||l.preventDefault();const u=!s;e.onToggle&&e.onToggle(u),o(u)}return z.useEffect(()=>{i(e.id||"accordion-item-"+gn()),e.defaultOpen&&o(e.defaultOpen)},[]),z.createElement("details",Object.assign({ref:r},hr(e,[]),{id:n,className:cr("db-accordion-item",e.className),"aria-disabled":e.disabled,open:s,name:e.name}),z.createElement("summary",{onClick:l=>a(l)},e.headlinePlain?z.createElement(z.Fragment,null,e.headlinePlain):null,e.headlinePlain?null:z.createElement(z.Fragment,null,e.headline)),z.createElement("div",null,e.content?z.createElement(z.Fragment,null,e.content):null,e.content?null:z.createElement(z.Fragment,null,e.children)))}const I5=z.forwardRef(mJ);function yJ(e,t){var r;const n=t||z.useRef(t),[i,s]=z.useState(()=>[]),[o,a]=z.useState(()=>""),[l,u]=z.useState(()=>!1);function c(d){try{return typeof d=="string"?JSON.parse(d):d}catch(f){console.error(f)}return[]}function h(d){i.includes(d)?e.behaviour==="single"?s([]):s(i.filter(f=>f!==d)):e.behaviour==="single"?s([d]):s([...i,d]),e.onChange&&e.onChange(i)}return z.useEffect(()=>{u(!0)},[]),z.useEffect(()=>{if(n.current&&l){const d=n.current.getElementsByTagName("details");if(d){let f=[];Array.from(d).forEach((p,m)=>{var y;const b=p.id;(p.open||!((y=e.initOpenIndex)===null||y===void 0)&&y.includes(m))&&f.push(b);const v=p.getElementsByTagName("summary");(v==null?void 0:v.length)>0&&v[0].addEventListener("click",()=>{a(b)})}),e.behaviour==="single"&&f.length>1&&(f=[f[0]]),s(f),u(!1)}}},[n.current,l]),z.useEffect(()=>{(o==null?void 0:o.length)>0&&(h(o),a(""))},[o]),z.useEffect(()=>{if(n!=null&&n.current){const d=n.current.getElementsByTagName("details");d&&Array.from(d).forEach(f=>{f.open=i.includes(f.id)})}},[i]),z.createElement("div",Object.assign({ref:n},hr(e,[]),{id:e.id,className:cr("db-accordion",e.className),"data-variant":e.variant}),e.items?null:z.createElement(z.Fragment,null,e.children),e.items?z.createElement(z.Fragment,null,(r=c(e.items))===null||r===void 0?void 0:r.map((d,f)=>z.createElement(I5,{key:`accordion-item-${f}`,headlinePlain:d.headlinePlain,disabled:d.disabled,content:d.content}))):null)}const vJ=z.forwardRef(yJ);function bJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>bc);return z.useEffect(()=>{i(e.id||"navigation-"+gn())},[]),z.createElement("nav",Object.assign({ref:r},hr(e,[]),{id:n,"aria-labelledby":e.labelledBy,className:cr("db-navigation",e.className)}),z.createElement("menu",null,e.children))}const R5=z.forwardRef(bJ);function xJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),[s,o]=z.useState(()=>!1);function a(){if(o(!0),!r.current)return;const c=r.current.querySelector("article");c&&HT(c)}function l(c){const h=c.target;(!h.parentNode||h.parentNode.querySelector(":focus")!==h&&h.parentNode.querySelector(":focus-within")!==h&&h.parentNode.querySelector(":hover")!==h)&&o(!1)}function u(){var c;if(r!=null&&r.current){const h=Array.from(r.current.children);if(h.length>=2){const d=h[0];return d.tagName.includes("-")?((c=d.children)===null||c===void 0?void 0:c.length)>0?d.children[0]:null:d}}return null}return z.useEffect(()=>{i(!0)},[]),z.useEffect(()=>{if(r.current&&n){const c=u();c&&(c.ariaHasPopup="true"),i(!1)}},[r.current,n]),z.useEffect(()=>{if(r.current){const c=u();c&&(c.ariaExpanded=(!!s).toString())}},[r.current,s]),z.createElement("div",Object.assign({ref:r},hr(e,[]),{id:e.id,className:cr("db-popover",e.className),onFocus:c=>a(),onBlur:c=>l(c),onMouseEnter:c=>a(),onMouseLeave:c=>l(c)}),z.createElement(z.Fragment,null,e.trigger),z.createElement("article",{className:"db-popover-content","data-spacing":e.spacing,"data-gap":e.gap,"data-animation":e.animation,"data-open":e.open,"data-delay":e.delay,"data-width":e.width,"data-placement":e.placement},e.children))}const wJ=z.forwardRef(xJ);function SJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>bc),[s,o]=z.useState(()=>!1);function a(u){u.stopPropagation()}function l(){r!=null&&r.current&&HT(r.current)}return z.useEffect(()=>{i(e.id||"tooltip-"+gn()),o(!0)},[]),z.useEffect(()=>{if(r.current&&s){let u=r.current.parentElement;u&&u.localName.includes("tooltip")&&(u=u.parentElement),u&&(["mouseenter","focus"].forEach(c=>{u.addEventListener(c,()=>l())}),u.setAttribute("data-has-tooltip","true"),u.setAttribute("aria-describedby",n)),o(!1)}},[r.current,s]),z.createElement("i",Object.assign({role:"tooltip","aria-hidden":"true","data-gap":"true",ref:r},hr(e,[]),{id:n,"data-emphasis":e.emphasis,"data-animation":e.animation,"data-delay":e.delay,"data-width":e.width,"data-variant":e.variant,"data-placement":e.placement,onClick:u=>a(u),className:cr("db-tooltip",e.className)}),e.children)}const gs=z.forwardRef(SJ);function DJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>bc);return z.useEffect(()=>{i(e.id||"tab-list-"+gn())},[]),z.createElement("div",Object.assign({ref:r},hr(e,[]),{id:n,className:cr("db-tab-list",e.className)}),z.createElement("ul",{role:"tablist"},e.children))}const UT=z.forwardRef(DJ);function EJ(e,t){const r=t||z.useRef(t);return z.useEffect(()=>{},[]),z.createElement("section",Object.assign({role:"tabpanel",ref:r},hr(e,[]),{className:cr("db-tab-panel",e.className),id:e.id,"aria-labelledby":e.labelledBy}),e.content?z.createElement(z.Fragment,null,e.content):null,e.children)}const zv=z.forwardRef(EJ);function CJ(e,t){var r,n,i,s;const o=t||z.useRef(t),[a,l]=z.useState(()=>"tabs-"+gn()),[u,c]=z.useState(()=>""),[h,d]=z.useState(()=>!1),[f,p]=z.useState(()=>!1),[m,y]=z.useState(()=>!1),[b,v]=z.useState(()=>null);function E($){try{return typeof $=="string"?JSON.parse($):$}catch(O){console.error(O)}return[]}function D($){const O=$.scrollWidth>$.clientWidth;p(O&&$.scrollLeft>1),y(O&&$.scrollLeft<$.scrollWidth-$.clientWidth)}function C($){let O=e.arrowScrollDistance||100;$&&(O*=-1),b==null||b.scrollBy({top:0,left:O,behavior:"smooth"})}function w(){if(o!=null&&o.current){const $=o.current.querySelector(".db-tab-list");if($){const O=$.querySelector('[role="tablist"]');O.setAttribute("aria-orientation",e.orientation||"horizontal"),e.behaviour==="arrows"&&(v(O),D(O),O.addEventListener("scroll",()=>{D(O)}))}}}function A($){if(o.current){const O=Array.from(o.current.getElementsByClassName("db-tab-item"));for(const N of O){const F=O.indexOf(N),L=N.querySelector("label"),k=N.querySelector("input");if(k&&L){if(!k.id){const T=`${u}-tab-${F}`;L.setAttribute("for",T),k.setAttribute("aria-controls",`${u}-tab-panel-${F}`),k.id=T,k.setAttribute("name",u)}if($){const T=!e.initialSelectedMode||e.initialSelectedMode==="auto",M=e.initialSelectedIndex==null&&F===0||e.initialSelectedIndex===F;T&&M&&k.click()}}}const P=Array.from(o.current.querySelectorAll("& > .db-tab-panel"));for(const N of P){if(N.id)continue;const F=P.indexOf(N);N.id=`${u}-tab-panel-${F}`,N.setAttribute("aria-labelledby",`${u}-tab-${F}`)}}}return z.useEffect(()=>{l(e.id||a),c(e.name||gn()),d(!0)},[]),z.useEffect(()=>{if(o.current&&h){w(),A(!0);const $=o.current.querySelector(".db-tab-list");$&&new MutationObserver(P=>{P.forEach(N=>{(N.removedNodes.length||N.addedNodes.length)&&(w(),A())})}).observe($,{childList:!0,subtree:!0}),d(!1)}},[o.current,h]),z.createElement("div",Object.assign({ref:o},hr(e,[]),{id:a,className:cr("db-tabs",e.className),"data-orientation":e.orientation,"data-scroll-behaviour":e.behaviour,"data-alignment":(r=e.alignment)!==null&&r!==void 0?r:"start","data-width":(n=e.width)!==null&&n!==void 0?n:"auto"}),f?z.createElement(wt,{variant:"ghost",icon:"chevron_left",className:"tabs-scroll-left",noText:!0,onClick:$=>C(!0)},"Scroll left"):null,e.tabs?z.createElement(z.Fragment,null,z.createElement(UT,null,(i=E(e.tabs))===null||i===void 0?void 0:i.map(($,O)=>z.createElement(Bv,{key:e.name+"tab-item"+O,active:$.active,label:$.label,iconAfter:$.iconAfter,icon:$.icon,noText:$.noText}))),(s=E(e.tabs))===null||s===void 0?void 0:s.map(($,O)=>z.createElement(zv,{key:e.name+"tab-panel"+O,content:$.content},$.children))):null,m?z.createElement(wt,{variant:"ghost",icon:"chevron_right",className:"tabs-scroll-right",noText:!0,onClick:$=>C()},"Scroll right"):null,e.children)}const B5=z.forwardRef(CJ),AJ=["ear","ear_disabled","person_with_blind_cane","person_with_rollator","person_with_wheelchair","support_dog","arrow_down","arrow_left","arrow_right","arrow_up","arrow_up_right","arrows_horizontal","arrows_vertical","chevron_down","chevron_left","chevron_right","chevron_up","circular_arrows","sort_down","sort_up","undo","fast_backward_10","fast_backward","fast_backward_30","fast_backward_empty","fast_forward_10","fast_forward","fast_forward_30","fast_forward_empty","microphone","pause","play","skip_backward","skip_forward","stop","subtitles","volume_disabled","volume_down","volume_silent","volume_up","house","market","train_station","cash","credit_card","discount","generic_card","gift","paragraph_mark","sepa","shopping_bag","shopping_basket","shopping_basket_disabled","shopping_cart","shopping_cart_disabled","ticket","tickets","voucher","chat","envelope","paper_plane","speech_bubble","speech_bubble_exclamation_mark","speech_bubble_question_mark","speech_bubbles","translation","alarm_clock","alarm_clock_plus","calendar","clock","camera","fax_machine","mobile_phone","mobile_phone_disabled","printer","telephone","bin","block","check","copy","cross","dots_drag_and_drop","minus","pen","pin","plus","save","cloud","globe","leaf","moon","snow_flake","sun","water_drop","cloud_download","cloud_upload","document","document_check","download","folder","folder_open","image","link_chain","notebook","paper_clip","upload","beverage","breakfast","cup","knife_and_fork","cigarette_disabled","clothes_hanger","hand_washing","person","persons","restricted_mobility_toilet","shower","shower_men","shower_women","stroller","toilet_men","toilet_women","toilets","toys","wc_sign","fullscreen","fullscreen_exit","grid","list","resize","resize_handle_corner","sliders_horizontal","zoom_in","zoom_out","db","s_bahn","subway","compass","location_arrow","location_arrow_north","location_crosshairs","location_pin","map","map_pin","navigation_straight","navigation_to_left","navigation_to_right","navigation_u_turn","parking","road_sign","station","mask","medical_cross","gear_wheel","log_in","log_out","magnifying_glass","menu","more_horizontal","more_vertical","bell","bell_disabled","check_circle","cross_circle","exclamation_mark_circle","exclamation_mark_triangle","information_circle","question_mark_circle","eye","eye_disabled","fingerprint","key","lock_closed","lock_open","shield_check","crown","face_delighted","face_disappointed","face_neutral","face_sad","face_smiling","heart","share","star","thumbs_down","thumbs_up","artificial_intelligence","augmented_reality","bug","database","light_bulb","power_socket","qr_code","qr_code_scan","speedometer","wifi","wifi_disabled","wrench","airplane","bike","bike_trailer","boat","bus","car","electric_car","electric_scooter","handcart","pedestrian","scooter","ship","taxi","train","train_and_car"],TJ=()=>{const{notification:e}=tr(s=>s),[t,r]=z.useState(),[n,i]=z.useState(!1);return z.useEffect(()=>{e&&(r(e),setTimeout(()=>tr.setState({notification:void 0}),1500))},[e]),z.useEffect(()=>{(async()=>{setTimeout(()=>i(!0),2e3)})()},[]),j.jsx(Rv,{className:`notification${n?" opacity-100":" opacity-0"}${e?" show":""}`,semantic:"informational",variant:"overlay",children:t})};var j5=Function.prototype.toString,Fh=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,BE,Uy;if(typeof Fh=="function"&&typeof Object.defineProperty=="function")try{BE=Object.defineProperty({},"length",{get:function(){throw Uy}}),Uy={},Fh(function(){throw 42},null,BE)}catch(e){e!==Uy&&(Fh=null)}else Fh=null;var kJ=/^\s*class\b/,jE=function(t){try{var r=j5.call(t);return kJ.test(r)}catch{return!1}},Rx=function(t){try{return jE(t)?!1:(j5.call(t),!0)}catch{return!1}},Wy=Object.prototype.toString,_J="[object Object]",$J="[object Function]",LJ="[object GeneratorFunction]",PJ="[object HTMLAllCollection]",FJ="[object HTML document.all class]",OJ="[object HTMLCollection]",NJ=typeof Symbol=="function"&&!!Symbol.toStringTag,MJ=!(0 in[,]),zE=function(){return!1};if(typeof document=="object"){var IJ=document.all;Wy.call(IJ)===Wy.call(document.all)&&(zE=function(t){if((MJ||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=Wy.call(t);return(r===PJ||r===FJ||r===OJ||r===_J)&&t("")==null}catch{}return!1})}var WT=Fh?function(t){if(zE(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Fh(t,null,BE)}catch(r){if(r!==Uy)return!1}return!jE(t)&&Rx(t)}:function(t){if(zE(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(NJ)return Rx(t);if(jE(t))return!1;var r=Wy.call(t);return r!==$J&&r!==LJ&&!/^\[object HTML/.test(r)?!1:Rx(t)},RJ=WT,BJ=Object.prototype.toString,z5=Object.prototype.hasOwnProperty,jJ=function(t,r,n){for(var i=0,s=t.length;i=3&&(i=n),BJ.call(t)==="[object Array]"?jJ(t,r,i):typeof t=="string"?zJ(t,r,i):HJ(t,r,i)},VT=UJ,H5=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],WJ={},Bx=H5,VJ=typeof globalThis>"u"?WJ:globalThis,Vg=function(){for(var t=[],r=0;r"u"||!mn?zt:mn(Uint8Array),Bu={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?zt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?zt:ArrayBuffer,"%ArrayIteratorPrototype%":eh&&mn?mn([][Symbol.iterator]()):zt,"%AsyncFromSyncIteratorPrototype%":zt,"%AsyncFunction%":ph,"%AsyncGenerator%":ph,"%AsyncGeneratorFunction%":ph,"%AsyncIteratorPrototype%":ph,"%Atomics%":typeof Atomics>"u"?zt:Atomics,"%BigInt%":typeof BigInt>"u"?zt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?zt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?zt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?zt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":uX,"%eval%":eval,"%EvalError%":cX,"%Float32Array%":typeof Float32Array>"u"?zt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?zt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?zt:FinalizationRegistry,"%Function%":V5,"%GeneratorFunction%":ph,"%Int8Array%":typeof Int8Array>"u"?zt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?zt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?zt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":eh&&mn?mn(mn([][Symbol.iterator]())):zt,"%JSON%":typeof JSON=="object"?JSON:zt,"%Map%":typeof Map>"u"?zt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!eh||!mn?zt:mn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?zt:Promise,"%Proxy%":typeof Proxy>"u"?zt:Proxy,"%RangeError%":hX,"%ReferenceError%":dX,"%Reflect%":typeof Reflect>"u"?zt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?zt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!eh||!mn?zt:mn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?zt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":eh&&mn?mn(""[Symbol.iterator]()):zt,"%Symbol%":eh?Symbol:zt,"%SyntaxError%":od,"%ThrowTypeError%":pX,"%TypedArray%":mX,"%TypeError%":Gh,"%Uint8Array%":typeof Uint8Array>"u"?zt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?zt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?zt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?zt:Uint32Array,"%URIError%":fX,"%WeakMap%":typeof WeakMap>"u"?zt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?zt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?zt:WeakSet};if(mn)try{null.error}catch(e){var yX=mn(mn(e));Bu["%Error.prototype%"]=yX}var vX=function e(t){var r;if(t==="%AsyncFunction%")r=zx("async function () {}");else if(t==="%GeneratorFunction%")r=zx("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=zx("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&mn&&(r=mn(i.prototype))}return Bu[t]=r,r},A3={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Gg=GT,Hv=xc,bX=Gg.call(Function.call,Array.prototype.concat),xX=Gg.call(Function.apply,Array.prototype.splice),T3=Gg.call(Function.call,String.prototype.replace),Uv=Gg.call(Function.call,String.prototype.slice),wX=Gg.call(Function.call,RegExp.prototype.exec),SX=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DX=/\\(\\)?/g,EX=function(t){var r=Uv(t,0,1),n=Uv(t,-1);if(r==="%"&&n!=="%")throw new od("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new od("invalid intrinsic syntax, expected opening `%`");var i=[];return T3(t,SX,function(s,o,a,l){i[i.length]=a?T3(l,DX,"$1"):o||s}),i},CX=function(t,r){var n=t,i;if(Hv(A3,n)&&(i=A3[n],n="%"+i[0]+"%"),Hv(Bu,n)){var s=Bu[n];if(s===ph&&(s=vX(n)),typeof s>"u"&&!r)throw new Gh("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new od("intrinsic "+t+" does not exist!")},Vt=function(t,r){if(typeof t!="string"||t.length===0)throw new Gh("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Gh('"allowMissing" argument must be a boolean');if(wX(/^%?[^%]*%?$/,t)===null)throw new od("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=EX(t),i=n.length>0?n[0]:"",s=CX("%"+i+"%",r),o=s.name,a=s.value,l=!1,u=s.alias;u&&(i=u[0],xX(n,bX([0,1],u)));for(var c=1,h=!0;c=n.length){var m=Ru(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=Hv(a,d),a=a[d];h&&!l&&(Bu[o]=a)}}return a},AX=Vt,Vy=AX("%Object.defineProperty%",!0)||!1;if(Vy)try{Vy({},"a",{value:1})}catch{Vy=!1}var pb=Vy,TX=Vt,Gy=TX("%Object.getOwnPropertyDescriptor%",!0);if(Gy)try{Gy([],"length")}catch{Gy=null}var Pd=Gy,k3=pb,kX=po,th=Pt,_3=Pd,G5=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new th("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new th("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new th("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new th("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new th("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new th("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!_3&&_3(t,r);if(k3)k3(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:s===null&&l?l.writable:!s});else if(a||!i&&!s&&!o)t[r]=n;else throw new kX("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},HE=pb,q5=function(){return!!HE};q5.hasArrayLengthDefineBug=function(){if(!HE)return null;try{return HE([],"length",{value:1}).length!==1}catch{return!0}};var JT=q5,_X=Vt,$3=G5,$X=JT(),L3=Pd,P3=Pt,LX=_X("%Math.floor%"),PX=function(t,r){if(typeof t!="function")throw new P3("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||LX(r)!==r)throw new P3("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&L3){var o=L3(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&($X?$3(t,"length",r,!0,!0):$3(t,"length",r)),t};(function(e){var t=GT,r=Vt,n=PX,i=Pt,s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(o,s),l=pb,u=r("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var f=a(t,o,arguments);return n(f,1+u(0,d.length-(arguments.length-1)),!0)};var c=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c})(U5);var Kl=U5.exports,K5=Vt,J5=Kl,FX=J5(K5("String.prototype.indexOf")),Hn=function(t,r){var n=K5(t,!!r);return typeof n=="function"&&FX(t,".prototype.")>-1?J5(n):n},Ux,F3;function XT(){if(F3)return Ux;F3=1;var e=KT;return Ux=function(){return e()&&!!Symbol.toStringTag},Ux}var OX={},Wv=VT,NX=Vg,O3=Kl,YT=Hn,qy=Pd,MX=YT("Object.prototype.toString"),X5=XT()(),N3=typeof globalThis>"u"?OX:globalThis,UE=NX(),QT=YT("String.prototype.slice"),Wx=Object.getPrototypeOf,IX=YT("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:BX(t)}return qy?RX(t):null},M3=Object.prototype.toString,Y5=function(t){var r=M3.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&M3.call(t.callee)==="[object Function]"),n},Vx,I3;function jX(){if(I3)return Vx;I3=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Y5,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var f=d.constructor;return f&&f.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),h=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(f){var p=f!==null&&typeof f=="object",m=r.call(f)==="[object Function]",y=n(f),b=p&&r.call(f)==="[object String]",v=[];if(!p&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&m;if(b&&f.length>0&&!t.call(f,0))for(var D=0;D0)for(var C=0;C2?arguments[2]:{},n=UX(t);WX&&(n=GX.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i-1e3&&e<1e3||e4.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-G3(-e):G3(e);if(n!==e){var i=String(n),s=rk.call(t,i.length+1);return ul.call(i,r,"$&_")+"."+ul.call(ul.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ul.call(t,r,"$&_")}var GE=YX,J3=GE.custom,X3=n4(J3)?J3:null,lY=function e(t,r,n,i){var s=r||{};if(el(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(el(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=el(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(el(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(el(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return s4(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?K3(t,l):l}if(typeof t=="bigint"){var u=String(t)+"n";return a?K3(t,u):u}var c=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return qE(t)?"[Array]":"[Object]";var h=AY(s,n);if(typeof i>"u")i=[];else if(i4(i,t)>=0)return"[Circular]";function d(L,k,T){if(k&&(i=aY.call(i),i.push(k)),T){var M={depth:s.depth};return el(s,"quoteStyle")&&(M.quoteStyle=s.quoteStyle),e(L,M,n+1,i)}return e(L,s,n+1,i)}if(typeof t=="function"&&!Y3(t)){var f=yY(t),p=Im(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+Do.call(p,", ")+" }":"")}if(n4(t)){var m=ad?ul.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):VE.call(t);return typeof t=="object"&&!ad?$f(m):m}if(DY(t)){for(var y="<"+W3.call(String(t.nodeName)),b=t.attributes||[],v=0;v",y}if(qE(t)){if(t.length===0)return"[]";var E=Im(t,d);return h&&!CY(E)?"["+KE(E,h)+"]":"[ "+Do.call(E,", ")+" ]"}if(hY(t)){var D=Im(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!t4.call(t,"cause")?"{ ["+String(t)+"] "+Do.call(V3.call("[cause]: "+d(t.cause),D),", ")+" }":D.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Do.call(D,", ")+" }"}if(typeof t=="object"&&o){if(X3&&typeof t[X3]=="function"&&GE)return GE(t,{depth:c-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(vY(t)){var C=[];return z3&&z3.call(t,function(L,k){C.push(d(k,t,!0)+" => "+d(L,t))}),Q3("Map",Gv.call(t),C,h)}if(wY(t)){var w=[];return H3&&H3.call(t,function(L){w.push(d(L,t))}),Q3("Set",qv.call(t),w,h)}if(bY(t))return Jx("WeakMap");if(SY(t))return Jx("WeakSet");if(xY(t))return Jx("WeakRef");if(fY(t))return $f(d(Number(t)));if(gY(t))return $f(d(WE.call(t)));if(pY(t))return $f(rY.call(t));if(dY(t))return $f(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===QX)return"{ [object globalThis] }";if(!cY(t)&&!Y3(t)){var A=Im(t,d),$=q3?q3(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",P=!$&&ti&&Object(t)===t&&ti in t?rk.call(Jl(t),8,-1):O?"Object":"",N=$||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=N+(P||O?"["+Do.call(V3.call([],P||[],O||[]),": ")+"] ":"");return A.length===0?F+"{}":h?F+"{"+KE(A,h)+"}":F+"{ "+Do.call(A,", ")+" }"}return String(t)};function r4(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function uY(e){return ul.call(String(e),/"/g,""")}function qE(e){return Jl(e)==="[object Array]"&&(!ti||!(typeof e=="object"&&ti in e))}function cY(e){return Jl(e)==="[object Date]"&&(!ti||!(typeof e=="object"&&ti in e))}function Y3(e){return Jl(e)==="[object RegExp]"&&(!ti||!(typeof e=="object"&&ti in e))}function hY(e){return Jl(e)==="[object Error]"&&(!ti||!(typeof e=="object"&&ti in e))}function dY(e){return Jl(e)==="[object String]"&&(!ti||!(typeof e=="object"&&ti in e))}function fY(e){return Jl(e)==="[object Number]"&&(!ti||!(typeof e=="object"&&ti in e))}function pY(e){return Jl(e)==="[object Boolean]"&&(!ti||!(typeof e=="object"&&ti in e))}function n4(e){if(ad)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!VE)return!1;try{return VE.call(e),!0}catch{}return!1}function gY(e){if(!e||typeof e!="object"||!WE)return!1;try{return WE.call(e),!0}catch{}return!1}var mY=Object.prototype.hasOwnProperty||function(e){return e in this};function el(e,t){return mY.call(e,t)}function Jl(e){return nY.call(e)}function yY(e){if(e.name)return e.name;var t=sY.call(iY.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function i4(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return s4(rk.call(e,0,t.maxStringLength),t)+n}var i=ul.call(ul.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,EY);return r4(i,"single",t)}function EY(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+oY.call(t.toString(16))}function $f(e){return"Object("+e+")"}function Jx(e){return e+" { ? }"}function Q3(e,t,r,n){var i=n?KE(r,n):Do.call(r,", ");return e+" ("+t+") {"+i+"}"}function CY(e){for(var t=0;t=0)return!1;return!0}function AY(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Do.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Do.call(Array(t+1),r)}}function KE(e,t){if(e.length===0)return"";var r=` -`+t.prev+t.base;return r+Do.call(e,","+r)+` -`+t.prev}function Im(e,t){var r=qE(e),n=[];if(r){n.length=e.length;for(var i=0;i"u")return"Undefined";if(typeof t=="function"||typeof t=="object")return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},kY=TY,wc=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":kY(t)},Z3=Pt,_Y=lY,$Y=mb,LY=wc,PY=function(t,r){if(LY(t)!=="Object")throw new Z3("Assertion failed: Type(O) is not Object");if(!$Y(r))throw new Z3("Assertion failed: IsPropertyKey(P) is not true, got "+_Y(r));return t[r]},Fd=Number.isNaN||function(t){return t!==t},FY=Fd,_a=function(e){return(typeof e=="number"||typeof e=="bigint")&&!FY(e)&&e!==1/0&&e!==-1/0},o4=Vt,OY=o4("%Math.abs%"),NY=o4("%Math.floor%"),MY=Fd,IY=_a,yb=function(t){if(typeof t!="number"||MY(t)||!IY(t))return!1;var r=OY(t);return NY(r)===r},RY=Kl,a4=Hn,BY=Vt,JE=BY("%ArrayBuffer%",!0),Jy=a4("ArrayBuffer.prototype.byteLength",!0),jY=a4("Object.prototype.toString"),eL=!!JE&&!Jy&&new JE(0).slice,tL=!!eL&&RY(eL),Od=Jy||tL?function(t){if(!t||typeof t!="object")return!1;try{return Jy?Jy(t):tL(t,0),!0}catch{return!1}}:JE?function(t){return jY(t)==="[object ArrayBuffer]"}:function(t){return!1},zY=Hn,rL=zY("ArrayBuffer.prototype.byteLength",!0),HY=Od,l4=function(t){return HY(t)?rL?rL(t):t.byteLength:NaN},UY=Hn,nL=UY("SharedArrayBuffer.prototype.byteLength",!0),Kg=nL?function(t){if(!t||typeof t!="object")return!1;try{return nL(t),!0}catch{return!1}}:function(t){return!1},WY={},VY=Pt,GY=l4,qY=Vg(),KY=Hn,JY=Od,XY=Kg,YY=KY("SharedArrayBuffer.prototype.byteLength",!0),Nd=function(t){var r=XY(t);if(!JY(t)&&!r)throw new VY("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((r?YY:GY)(t)===0)try{new WY[qY[0]](t)}catch(n){return!!n&&n.name==="TypeError"}return!1},Xx,iL;function u4(){if(iL)return Xx;iL=1;var e=Pt,t=xc,r=mb,n=wc;return Xx=function(s,o){if(n(s)!=="Object")throw new e("Assertion failed: `O` must be an Object");if(!r(o))throw new e("Assertion failed: `P` must be a Property Key");return t(s,o)},Xx}var QY=Vt,c4=QY("%Array%"),ZY=!c4.isArray&&Hn("Object.prototype.toString"),h4=c4.isArray||function(t){return ZY(t)==="[object Array]"},nk=h4,Yx,sL;function d4(){return sL||(sL=1,Yx=function(t){return t==="BIGUINT64"||t==="BIGINT64"}),Yx}var Qx,oL;function eQ(){return oL||(oL=1,Qx=function(t){return t==="UINT8"||t==="UINT8C"||t==="UINT16"||t==="UINT32"||t==="BIGUINT64"}),Qx}var Zx,aL;function tQ(){if(aL)return Zx;aL=1;var e=Vt,t=e("%Math.pow%");return Zx=function(n){var i=n[3]&128?-1:1,s=(n[3]&127)<<1|n[2]>>7,o=(n[2]&127)<<16|n[1]<<8|n[0];return s===0&&o===0?i===1?0:-0:s===255&&o===0?i===1?1/0:-1/0:s===255&&o!==0?NaN:(s-=127,s===-127?i*o*t(2,-149):i*(1+o*t(2,-23))*t(2,s))},Zx}var ew,lL;function rQ(){if(lL)return ew;lL=1;var e=Vt,t=e("%Math.pow%");return ew=function(n){var i=n[7]&128?-1:1,s=(n[7]&127)<<4|(n[6]&240)>>4,o=(n[6]&15)*281474976710656+n[5]*1099511627776+n[4]*4294967296+n[3]*16777216+n[2]*65536+n[1]*256+n[0];return s===0&&o===0?i*0:s===2047&&o!==0?NaN:s===2047&&o===0?i*(1/0):(s-=1023,s===-1023?i*o*5e-324:i*(1+o/4503599627370496)*t(2,s))},ew}var tw,uL;function nQ(){if(uL)return tw;uL=1;var e=Vt,t=e("%Math.pow%"),r=e("%Number%"),n=e("%BigInt%",!0);return tw=function(s,o,a,l){for(var u=l?n:r,c=u(0),h=0;h=0&&t<=255&&(t|0)===t}),nw}var iw,dL;function oQ(){if(dL)return iw;dL=1;var e=Vt,t=Hn,r=qT,n=po,i=Pt,s=e("%BigInt%",!0),o=u4(),a=nk,l=d4(),u=eQ(),c=tQ(),h=rQ(),d=nQ(),f=iQ(),p=sQ(),m=t("Array.prototype.reverse"),y=t("Array.prototype.slice"),b=ZT,v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};return iw=function(D,C,w){if(!o(v,D))throw new i("Assertion failed: `type` must be a TypedArray element type: "+b(v));if(!a(C)||!f(C,p))throw new i("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof w!="boolean")throw new i("Assertion failed: `isLittleEndian` must be a Boolean");var A=v[D];if(C.length!==A)throw new r("Assertion failed: `rawBytes` must have a length of "+A+" for type "+D);var $=l(D);if($&&!s)throw new n("this environment does not support BigInts");return C=y(C,0,A),w||m(C),D==="FLOAT32"?c(C):D==="FLOAT64"?h(C):d(C,A,u(D),$)},iw}var sw,fL;function aQ(){if(fL)return sw;fL=1;var e={}.toString;return sw=Array.isArray||function(t){return e.call(t)=="[object Array]"},sw}var ow,pL;function lQ(){if(pL)return ow;pL=1;var e=Vt,t=e("%Array.prototype.concat%"),r=Kl,n=Hn,i=n("Array.prototype.slice"),s=KT(),o=s&&Symbol.isConcatSpreadable,a=[],l=o?r.apply(t,a):null,u=o?aQ():null;return ow=o?function(h){for(var d=0;d5&&typeof arguments[5]!="boolean")throw new Ko("Assertion failed: `isLittleEndian` must be a boolean, if present");if(bQ(t))throw new Ko("Assertion failed: `arrayBuffer` is detached");if(r<0)throw new Ko("Assertion failed: `byteIndex` must be non-negative");var a=yL.size["$"+n];if(!a)throw new Ko('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');var l;if(o)throw new gQ("SharedArrayBuffer is not supported by this implementation");l=lw(new mQ(t,r),0,a);var u=arguments.length>5?arguments[5]:DQ==="little",c=u?lw(mL([0,0,0,0,0,0,0,0],l),-a):lw(mL(l,[0,0,0,0,0,0,0,0]),0,a);return xQ(n,c,u)},CQ=Vt,AQ=CQ("%Math.max%"),TQ=Vt,kQ=TQ("%Math.min%"),vL=Fd,p4=function(t,r){return t===r?t===0?1/t===1/r:!0:vL(t)&&vL(r)},Rm=Pt,_Q=mb,bL=p4,$Q=wc,xL=function(){try{return delete[].length,!0}catch{return!1}}(),LQ=function(t,r,n,i){if($Q(t)!=="Object")throw new Rm("Assertion failed: `O` must be an Object");if(!_Q(r))throw new Rm("Assertion failed: `P` must be a Property Key");if(typeof i!="boolean")throw new Rm("Assertion failed: `Throw` must be a Boolean");if(i){if(t[r]=n,xL&&!bL(t[r],n))throw new Rm("Attempted to assign to readonly property.");return!0}try{return t[r]=n,xL?bL(t[r],n):!0}catch{return!1}},uw,wL;function PQ(){if(wL)return uw;wL=1;var e=Vt,t=e("%BigInt%",!0),r=Pt,n=po;return uw=function(s){if(typeof s!="string")throw new r("`argument` must be a string");if(!t)throw new n("BigInts are not supported in this environment");try{return t(s)}catch{return}},uw}var cw,SL;function FQ(){return SL||(SL=1,cw=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),cw}var hw,DL;function OQ(){if(DL)return hw;DL=1;var e=Date.prototype.getDay,t=function(o){try{return e.call(o),!0}catch{return!1}},r=Object.prototype.toString,n="[object Date]",i=XT()();return hw=function(o){return typeof o!="object"||o===null?!1:i?t(o):r.call(o)===n},hw}var Bm={exports:{}},EL;function NQ(){if(EL)return Bm.exports;EL=1;var e=Object.prototype.toString,t=W5();if(t){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/,i=function(o){return typeof o.valueOf()!="symbol"?!1:n.test(r.call(o))};Bm.exports=function(o){if(typeof o=="symbol")return!0;if(e.call(o)!=="[object Symbol]")return!1;try{return i(o)}catch{return!1}}}else Bm.exports=function(o){return!1};return Bm.exports}var dw,CL;function MQ(){if(CL)return dw;CL=1;var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",t=FQ(),r=WT,n=OQ(),i=NQ(),s=function(l,u){if(typeof l>"u"||l===null)throw new TypeError("Cannot call method on "+l);if(typeof u!="string"||u!=="number"&&u!=="string")throw new TypeError('hint must be "string" or "number"');var c=u==="string"?["toString","valueOf"]:["valueOf","toString"],h,d,f;for(f=0;f1&&(arguments[1]===String?u="string":arguments[1]===Number&&(u="number"));var c;if(e&&(Symbol.toPrimitive?c=o(l,Symbol.toPrimitive):i(l)&&(c=Symbol.prototype.valueOf)),typeof c<"u"){var h=c.call(l,u);if(t(h))return h;throw new TypeError("unable to convert exotic object to primitive")}return u==="default"&&(n(l)||i(l))&&(u="string"),s(l,u==="default"?"number":u)},dw}var fw,AL;function g4(){if(AL)return fw;AL=1;var e=MQ();return fw=function(r){return arguments.length>1?e(r,arguments[1]):e(r)},fw}var pw,TL;function m4(){if(TL)return pw;TL=1;var e=Vt,t=e("%BigInt%",!0),r=e("%Number%"),n=Pt,i=po,s=PQ(),o=g4();return pw=function(l){if(!t)throw new i("BigInts are not supported in this environment");var u=o(l,r);if(u==null)throw new n("Cannot convert null or undefined to a BigInt");if(typeof u=="boolean")return t(u?1:0);if(typeof u=="number")throw new n("Cannot convert a Number value to a BigInt");if(typeof u=="string"){var c=s(u);if(typeof c>"u")throw new n("Failed to parse String to BigInt");return c}if(typeof u=="symbol")throw new n("Cannot convert a Symbol value to a BigInt");if(typeof u!="bigint")throw new i("Assertion failed: unknown primitive type");return u},pw}var gw,kL;function y4(){if(kL)return gw;kL=1;var e=Vt,t=e("%BigInt%",!0),r=qT,n=Pt,i=t&&t(0);return gw=function(o,a){if(typeof o!="bigint"||typeof a!="bigint")throw new n("Assertion failed: `n` and `d` arguments must be BigInts");if(a===i)throw new r("Division by zero");return o===i?i:o%a},gw}var mw,_L;function v4(){return _L||(_L=1,mw=function(t,r,n){var i=t(r,n);return i>=0?i:i+n}),mw}var yw,$L;function IQ(){if($L)return yw;$L=1;var e=Vt,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=m4(),i=y4(),s=v4(),o=t&&BigInt(r(2,32))*BigInt(r(2,31)),a=t&&BigInt(r(2,32))*BigInt(r(2,32));return yw=function(u){var c=n(u),h=s(i,c,a);return h>=o?h-a:h},yw}var vw,LL;function RQ(){if(LL)return vw;LL=1;var e=Vt,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=m4(),i=y4(),s=v4(),o=t&&BigInt(r(2,32))*BigInt(r(2,32));return vw=function(l){var u=n(l),c=s(i,u,o);return c},vw}var bw,PL;function BQ(){if(PL)return bw;PL=1;var e=Math.floor;return bw=function(r,n){var i=r%n;return e(i>=0?i:i+n)},bw}var xw,FL;function Id(){if(FL)return xw;FL=1;var e=BQ();return xw=function(r,n){return e(r,n)},xw}var ww,OL;function jQ(){return OL||(OL=1,ww=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),ww}var Sw,NL;function zQ(){if(NL)return Sw;NL=1;var e=Hn,t=XT()(),r,n,i,s;if(t){r=e("Object.prototype.hasOwnProperty"),n=e("RegExp.prototype.exec"),i={};var o=function(){throw i};s={toString:o,valueOf:o},typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=o)}var a=e("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor,u="[object RegExp]";return Sw=t?function(h){if(!h||typeof h!="object")return!1;var d=l(h,"lastIndex"),f=d&&r(d,"value");if(!f)return!1;try{n(h,s)}catch(p){return p===i}}:function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:a(h)===u},Sw}var Dw,ML;function HQ(){if(ML)return Dw;ML=1;var e=Hn,t=zQ(),r=e("RegExp.prototype.exec"),n=Pt;return Dw=function(s){if(!t(s))throw new n("`regex` must be a RegExp");return function(a){return r(s,a)!==null}},Dw}var Ew,IL;function b4(){if(IL)return Ew;IL=1;var e=Pt;return Ew=function(r){if(r==null)throw new e(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r},Ew}var UQ=Vt,WQ=UQ("%String%"),VQ=Pt,x4=function(t){if(typeof t=="symbol")throw new VQ("Cannot convert a Symbol value to a string");return WQ(t)},Cw,RL;function w4(){if(RL)return Cw;RL=1;var e=b4(),t=x4,r=Hn,n=r("String.prototype.replace"),i=/^\s$/.test("᠎"),s=i?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,o=i?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;return Cw=function(){var l=t(e(this));return n(n(l,s,""),o,"")},Cw}var Aw,BL;function S4(){if(BL)return Aw;BL=1;var e=w4(),t="​",r="᠎";return Aw=function(){return String.prototype.trim&&t.trim()===t&&r.trim()===r&&("_"+r).trim()==="_"+r&&(r+"_").trim()===r+"_"?String.prototype.trim:e},Aw}var Tw,jL;function GQ(){if(jL)return Tw;jL=1;var e=gb,t=S4();return Tw=function(){var n=t();return e(String.prototype,{trim:n},{trim:function(){return String.prototype.trim!==n}}),n},Tw}var kw,zL;function qQ(){if(zL)return kw;zL=1;var e=Kl,t=gb,r=b4(),n=w4(),i=S4(),s=GQ(),o=e(i()),a=function(u){return r(u),o(u)};return t(a,{getPolyfill:i,implementation:n,shim:s}),kw=a,kw}var _w,HL;function KQ(){if(HL)return _w;HL=1;var e=Vt,t=e("%Number%"),r=e("%RegExp%"),n=Pt,i=e("%parseInt%"),s=Hn,o=HQ(),a=s("String.prototype.slice"),l=o(/^0b[01]+$/i),u=o(/^0o[0-7]+$/i),c=o(/^[-+]0x[0-9a-f]+$/i),h=["…","​","￾"].join(""),d=new r("["+h+"]","g"),f=o(d),p=qQ();return _w=function m(y){if(typeof y!="string")throw new n("Assertion failed: `argument` is not a String");if(l(y))return t(i(a(y,2),2));if(u(y))return t(i(a(y,2),8));if(f(y)||c(y))return NaN;var b=p(y);return b!==y?m(b):t(y)},_w}var JQ=Vt,UL=Pt,WL=JQ("%Number%"),XQ=jQ(),YQ=g4(),QQ=KQ(),Xl=function(t){var r=XQ(t)?t:YQ(t,WL);if(typeof r=="symbol")throw new UL("Cannot convert a Symbol value to a number");if(typeof r=="bigint")throw new UL("Conversion from 'BigInt' to 'number' is not allowed.");return typeof r=="string"?QQ(r):WL(r)},ZQ=Math.floor,ik=function(t){return typeof t=="bigint"?t:ZQ(t)},VL=ik,eZ=Pt,Sc=function(t){if(typeof t!="number"&&typeof t!="bigint")throw new eZ("argument must be a Number or a BigInt");var r=t<0?-VL(-t):VL(t);return r===0?0:r},$w,GL;function tZ(){if(GL)return $w;GL=1;var e=Id(),t=Xl,r=Sc,n=_a,i=65536;return $w=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),u=e(l,i);return u>=32768?u-i:u},$w}var Lw,qL;function rZ(){if(qL)return Lw;qL=1;var e=Id(),t=Xl,r=Sc,n=_a,i=2147483648,s=4294967296;return Lw=function(a){var l=t(a);if(!n(l)||l===0)return 0;var u=r(l),c=e(u,s),h=c>=i?c-s:c;return h===0?0:h},Lw}var Pw,KL;function nZ(){if(KL)return Pw;KL=1;var e=Id(),t=Xl,r=Sc,n=_a;return Pw=function(s){var o=t(s);if(!n(o)||o===0)return 0;var a=r(o),l=e(a,256);return l>=128?l-256:l},Pw}var Fw,JL;function iZ(){if(JL)return Fw;JL=1;var e=Id(),t=Xl,r=Sc,n=_a,i=65536;return Fw=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),u=e(l,i);return u===0?0:u},Fw}var Ow,XL;function sZ(){if(XL)return Ow;XL=1;var e=Id(),t=Xl,r=Sc,n=_a,i=4294967296;return Ow=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),u=e(l,i);return u===0?0:u},Ow}var Nw,YL;function oZ(){if(YL)return Nw;YL=1;var e=_a,t=Id(),r=Xl,n=Sc;return Nw=function(s){var o=r(s);if(!e(o)||o===0)return 0;var a=n(o),l=t(a,256);return l},Nw}var Mw,QL;function aZ(){if(QL)return Mw;QL=1;var e=Vt,t=Pt,r=e("%Math.max%"),n=e("%Math.min%");return Mw=function(s,o,a){if(typeof s!="number"||typeof o!="number"||typeof a!="number"||!(o<=a))throw new t("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return n(r(o,s),a)},Mw}var Iw,ZL;function lZ(){if(ZL)return Iw;ZL=1;var e=aZ(),t=Xl,r=ik,n=Fd;return Iw=function(s){var o=t(s);if(n(o))return 0;var a=e(o,0,255),l=r(a);return al+.5?l+1:l%2===0?l:l+1},Iw}var Rw,eP;function D4(){return eP||(eP=1,Rw=function(t){return t===0&&1/t===-1/0}),Rw}var Bw,tP;function uZ(){if(tP)return Bw;tP=1;var e=Vt,t=e("%Math.abs%"),r=e("%Math.floor%"),n=e("%Math.pow%"),i=_a,s=Fd,o=D4(),a=34028234663852886e22;return Bw=function(u,c){if(s(u))return c?[0,0,192,127]:[127,192,0,0];var h;if(u===0)return h=o(u)?128:0,c?[0,0,0,h]:[h,0,0,0];if(t(u)>a||!i(u))return h=u<0?255:127,c?[0,0,128,h]:[h,128,0,0];var d=u<0?1:0;u=t(u);for(var f=0;u>=2;)f+=1,u/=2;for(;u<1;)f-=1,u*=2;var p=u-1;p*=n(2,23)+.5,p=r(p),f+=127,f<<=23;var m=d<<31|f|p,y=m&255;m>>=8;var b=m&255;m>>=8;var v=m&255;m>>=8;var E=m&255;return c?[y,b,v,E]:[E,v,b,y]},Bw}var jw,rP;function cZ(){if(rP)return jw;rP=1;var e=1075,t=54;return jw=function(n){var i="";if(n===0)return i;for(var s=e,o,a=0;a=1?(n=o-1,i+="1",s===e&&(s=a)):(n=o,i+="0"),o===1||a-s>t)return i;return i},jw}var zw,nP;function hZ(){if(nP)return zw;nP=1;var e=Vt,t=e("%Math.floor%");return zw=function(n){for(var i="",s;n>0;)s=n/2,n=t(s),s===n?i="0"+i:i="1"+i;return i},zw}var Hw,iP;function dZ(){if(iP)return Hw;iP=1;var e=Vt,t=e("%parseInt%"),r=e("%Math.abs%"),n=e("%Math.floor%"),i=Hn,s=i("String.prototype.indexOf"),o=i("String.prototype.slice"),a=cZ(),l=hZ(),u=D4(),c=1023,h="11111111111",d="00000000000",f=d+d+d+d+"0000000";return Hw=function(m,y){var b=m<0||u(m)?"1":"0",v,E;if(isNaN(m))v=h,E="1"+f;else if(!isFinite(m))v=h,E="0"+f;else if(m===0)v=d,E="0"+f;else{m=r(m);var D=n(m),C=l(D),w=a(m-D),A;if(C)v=C.length-1;else{var $=s(w,"1");$>-1&&(A=$+1),v=-A}E=C+w,v<0?(v<=-c&&(A=c-1),E=o(E,A)):E=o(E,1),v=o(d+l(v+c),-11),E=o(E+f+"0",0,52)}for(var O=b+v+E,P=[],N=0;N<8;N++){var F=y?8-N-1:N;P[F]=t(o(O,N*8,(N+1)*8),2)}return P},Hw}var Uw,sP;function fZ(){if(sP)return Uw;sP=1;var e=Vt,t=e("%Number%"),r=e("%BigInt%",!0);return Uw=function(i,s,o){var a=typeof i=="bigint"?r:t;i<0&&(i>>>=0);for(var l=[],u=0;u>=a(8);return l},Uw}var Ww,oP;function pZ(){if(oP)return Ww;oP=1;var e=Pt,t=u4(),r=IQ(),n=RQ(),i=tZ(),s=rZ(),o=nZ(),a=iZ(),l=sZ(),u=oZ(),c=lZ(),h=uZ(),d=dZ(),f=fZ(),p=ZT,m={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},y={__proto__:null,INT8:o,UINT8:u,UINT8C:c,INT16:i,UINT16:a,INT32:s,UINT32:l,BIGINT64:r,BIGUINT64:n};return Ww=function(v,E,D){if(typeof v!="string"||!t(m,v))throw new e("Assertion failed: `type` must be a TypedArray element type: "+p(m));if(typeof E!="number"&&typeof E!="bigint")throw new e("Assertion failed: `value` must be a Number or a BigInt");if(typeof D!="boolean")throw new e("Assertion failed: `isLittleEndian` must be a Boolean");if(v==="FLOAT32")return h(E,D);if(v==="FLOAT64")return d(E,D);var C=m[v],w=y[v],A=w(E);return f(A,C,D)},Ww}var Vw,aP;function gZ(){return aP||(aP=1,Vw=function(t,r){for(var n=0;n6&&typeof arguments[6]!="boolean")throw new Jo("Assertion failed: `isLittleEndian` must be a boolean, if present");if(wZ(t))throw new Jo("Assertion failed: ArrayBuffer is detached");if(xZ(n)?typeof i!="bigint":typeof i!="number")throw new Jo("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var l=lP.size["$"+n],u=arguments.length>6?arguments[6]:AZ==="little",c=SZ(n,i,u);if(a)throw new yZ("SharedArrayBuffer is not supported by this implementation");var h=new vZ(t,r,l);TZ(c,function(d,f){h[f]=d})},_Z=Xl,$Z=Sc,LZ=Fd,PZ=_a,FZ=function(t){var r=_Z(t);return LZ(r)||r===0?0:PZ(r)?$Z(r):r},OZ=po,NZ=Pt,MZ=yb,IZ=qg,uP=vb,sk=function(t){var r=IZ(t);if(r===!1)throw new NZ("Assertion failed: `O` must be a TypedArray");var n=uP.size["$"+uP.name["$"+r]];if(!MZ(n)||n<0)throw new OZ("Assertion failed: Unknown TypedArray type `"+r+"`");return n},RZ=po,BZ=Pt,jZ=qg,zZ=vb,HZ=function(t){var r=jZ(t);if(r===!1)throw new BZ("Assertion failed: `O` must be a TypedArray");var n=zZ.name["$"+r];if(typeof n!="string")throw new RZ("Assertion failed: Unknown TypedArray type `"+r+"`");return n},XE={exports:{}},UZ=Vt,Gw,cP;function ok(){if(cP)return Gw;cP=1;var e=Pt,t=xc,r={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return Gw=function(i){if(!i||typeof i!="object")return!1;for(var s in i)if(t(i,s)&&!r[s])return!1;var o=t(i,"[[Value]]")||t(i,"[[Writable]]"),a=t(i,"[[Get]]")||t(i,"[[Set]]");if(o&&a)throw new e("Property Descriptors may not be both accessor and data descriptors");return!0},Gw}var qw,hP;function WZ(){if(hP)return qw;hP=1;var e=JT,t=pb,r=e.hasArrayLengthDefineBug(),n=r&&h4,i=Hn,s=i("Object.prototype.propertyIsEnumerable");return qw=function(a,l,u,c,h,d){if(!t){if(!a(d)||!d["[[Configurable]]"]||!d["[[Writable]]"]||h in c&&s(c,h)!==!!d["[[Enumerable]]"])return!1;var f=d["[[Value]]"];return c[h]=f,l(c[h],f)}return r&&h==="length"&&"[[Value]]"in d&&n(c)&&c.length!==d["[[Value]]"]?(c.length=d["[[Value]]"],c.length===d["[[Value]]"]):(t(c,h,u(d)),!0)},qw}var Kw,dP;function VZ(){return dP||(dP=1,Kw=function(t){if(typeof t>"u")return t;var r={};return"[[Value]]"in t&&(r.value=t["[[Value]]"]),"[[Writable]]"in t&&(r.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(r.get=t["[[Get]]"]),"[[Set]]"in t&&(r.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(r.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(r.configurable=!!t["[[Configurable]]"]),r}),Kw}var Jw,fP;function GZ(){if(fP)return Jw;fP=1;var e=Pt,t=ok(),r=VZ();return Jw=function(i){if(typeof i<"u"&&!t(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return r(i)},Jw}var Xw,pP;function qZ(){if(pP)return Xw;pP=1;var e=Pt,t=xc,r=ok();return Xw=function(i){if(typeof i>"u")return!1;if(!r(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return!(!t(i,"[[Value]]")&&!t(i,"[[Writable]]"))},Xw}var Yw,gP;function KZ(){return gP||(gP=1,Yw=function(t){return!!t}),Yw}var Qw,mP;function JZ(){return mP||(mP=1,Qw=WT),Qw}var Zw,yP;function XZ(){if(yP)return Zw;yP=1;var e=xc,t=Pt,r=wc,n=KZ(),i=JZ();return Zw=function(o){if(r(o)!=="Object")throw new t("ToPropertyDescriptor requires an object");var a={};if(e(o,"enumerable")&&(a["[[Enumerable]]"]=n(o.enumerable)),e(o,"configurable")&&(a["[[Configurable]]"]=n(o.configurable)),e(o,"value")&&(a["[[Value]]"]=o.value),e(o,"writable")&&(a["[[Writable]]"]=n(o.writable)),e(o,"get")){var l=o.get;if(typeof l<"u"&&!i(l))throw new t("getter must be a function");a["[[Get]]"]=l}if(e(o,"set")){var u=o.set;if(typeof u<"u"&&!i(u))throw new t("setter must be a function");a["[[Set]]"]=u}if((e(a,"[[Get]]")||e(a,"[[Set]]"))&&(e(a,"[[Value]]")||e(a,"[[Writable]]")))throw new t("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return a},Zw}var eS,vP;function YZ(){if(vP)return eS;vP=1;var e=Pt,t=ok(),r=WZ(),n=GZ(),i=qZ(),s=mb,o=p4,a=XZ(),l=wc;return eS=function(c,h,d){if(l(c)!=="Object")throw new e("Assertion failed: Type(O) is not Object");if(!s(h))throw new e("Assertion failed: IsPropertyKey(P) is not true");var f=t(d)?d:a(d);if(!t(f))throw new e("Assertion failed: Desc is not a valid Property Descriptor");return r(i,o,n,c,h,f)},eS}var QZ=UZ,bP=QZ("%Reflect.construct%",!0),Kv=YZ();try{Kv({},"",{"[[Get]]":function(){}})}catch{Kv=null}if(Kv&&bP){var xP={},wP={};Kv(wP,"length",{"[[Get]]":function(){throw xP},"[[Enumerable]]":!0}),XE.exports=function(t){try{bP(t,wP)}catch(r){return r===xP}}}else XE.exports=function(t){return typeof t=="function"&&!!t.prototype};var E4=XE.exports,ZZ=Vt,SP=ZZ("%Symbol.species%",!0),tS=Pt,eee=E4,DP=wc,tee=function(t,r){if(DP(t)!=="Object")throw new tS("Assertion failed: Type(O) is not Object");var n=t.constructor;if(typeof n>"u")return r;if(DP(n)!=="Object")throw new tS("O.constructor is not an Object");var i=SP?n[SP]:void 0;if(i==null)return r;if(eee(i))return i;throw new tS("no constructor found")},EP=xc,ree=Md,nee=yb,C4=function(t){return!!t&&typeof t=="object"&&EP(t,"[[Object]]")&&EP(t,"[[CachedBufferByteLength]]")&&(nee(t["[[CachedBufferByteLength]]"])&&t["[[CachedBufferByteLength]]"]>=0||t["[[CachedBufferByteLength]]"]==="DETACHED")&&ree(t["[[Object]]"])},jm={},A4=VT,iee=Kl,see=Vg(),YE={},oee=fb(),zm=Pd,CP=Object.defineProperty;if(zm){var aee=function(e){return e.byteOffset};A4(see,function(e){if(typeof jm[e]=="function"||typeof jm[e]=="object"){var t=jm[e].prototype,r=zm(t,"byteOffset");if(!r&&oee){var n=t.__proto__;r=zm(n,"byteOffset")}if(r&&r.get)YE[e]=iee(r.get);else if(CP){var i=new jm[e](2);r=zm(i,"byteOffset"),r&&r.configurable&&CP(i,"length",{value:3}),i.length===2&&(YE[e]=aee)}}})}var lee=function(t){var r;return A4(YE,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},uee=Md,ak=function(t){return uee(t)?lee(t):!1},AP={},cee=Kl,T4=VT,Hm=Pd,hee=fb(),dee=Md,fee=H5,QE={__proto__:null},TP=Object.defineProperty;if(Hm){var pee=function(e){return e.length};T4(fee,function(e){var t=AP[e];if(typeof t=="function"||typeof t=="object"){var r=t.prototype,n=Hm(r,"length");if(!n&&hee){var i=r.__proto__;n=Hm(i,"length")}if(n&&n.get)QE["$"+e]=cee(n.get);else if(TP){var s=new AP[e](2);n=Hm(s,"length"),n&&n.configurable&&TP(s,"length",{value:3}),s.length===2&&(QE["$"+e]=pee)}}})}var gee=function(t){var r;return T4(QE,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},k4=function(t){return dee(t)?gee(t):!1},kP=Pt,mee=Nd,yee=sk,vee=C4,bee=Jg,xee=ak,wee=k4,lk=function(t){if(!vee(t))throw new kP("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var r=t["[[Object]]"],n=t["[[CachedBufferByteLength]]"];if(mee(bee(r))&&n!=="DETACHED")throw new kP("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(n==="DETACHED")return!0;var i=xee(r),s,o=wee(r);if(o==="AUTO")s=n;else{var a=yee(r);s=i+o*a}return i>n||s>n},See=Pt,_4=Hn,_P=_4("%ArrayBuffer.prototype.resizable%",!0),$P=_4("%SharedArrayBuffer.prototype.growable%",!0),Dee=Od,Eee=Kg,Cee=function(t){var r=Dee(t),n=Eee(t);if(!r&&!n)throw new See("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return r&&_P?!_P(t):n&&$P?!$P(t):!0},Um=Pt,Aee=ik,Tee=Cee,kee=lk,_ee=sk,$ee=C4,Lee=Jg,Pee=ak,Fee=k4,Oee=function(t){if(!$ee(t))throw new Um("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(kee(t))throw new Um("Assertion failed: `taRecord` is out of bounds");var r=t["[[Object]]"],n=Fee(r);if(n!=="AUTO")return n;if(Tee(Lee(r)))throw new Um("Assertion failed: array buffer is not fixed length");var i=Pee(r),s=_ee(r),o=t["[[CachedBufferByteLength]]"];if(o==="DETACHED")throw new Um("Assertion failed: typed array is detached");return Aee((o-i)/s)},rS=Pt,Nee=Nd,Mee=Od,Iee=Kg,Ree=l4,Bee=function(t,r){var n=Iee(t);if(!Mee(t)&&!n)throw new rS("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new rS("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(Nee(t))throw new rS("Assertion failed: `arrayBuffer` must not be detached");return Ree(t)},LP=Pt,jee=Bee,zee=Nd,Hee=Md,Uee=Jg,Wee=function(t,r){if(!Hee(t))throw new LP("Assertion failed: `obj` must be a Typed Array");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new LP("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=Uee(t),i=zee(n)?"DETACHED":jee(n,r);return{"[[Object]]":t,"[[CachedBufferByteLength]]":i}},Wm=Pt,Vee=lk,Gee=Wee,qee=wc,Kee=Md,$4=function(t,r){if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new Wm("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(qee(t)!=="Object")throw new Wm("Assertion failed: `O` must be an Object");if(!Kee(t))throw new Wm("Assertion failed: `O` must be a Typed Array");var n=Gee(t,r);if(Vee(n))throw new Wm("`O` must be in-bounds and backed by a non-detached buffer");return n},Jee=po,Vm=Pt,Xee=nk,Yee=E4,Qee=lk,Zee=Oee,ete=$4,tte=Vg(),rte=function(t,r){if(!Yee(t))throw new Vm("Assertion failed: `constructor` must be a constructor");if(!Xee(r))throw new Vm("Assertion failed: `argumentList` must be a List");if(tte.length===0)throw new Jee("Assertion failed: Typed Arrays are not supported in this environment");var n;r.length===0?n=new t:r.length===1?n=new t(r[0]):r.length===2?n=new t(r[0],r[1]):n=new t(r[0],r[1],r[2]);var i=ete(n,"SEQ-CST");if(r.length===1&&typeof r[0]=="number"){if(Qee(i))throw new Vm("new Typed Array is out of bounds");var s=Zee(i);if(s"u"?i:NP(r),l;a===-1/0?l=0:a<0?l=nS(i+a,0):l=OP(a,i);var u=nS(l-o,0),c=bte(n,[u]);if(u>0){if(gte(iS(n)))throw new dte("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var h=IP(n),d=IP(c);if(h===d)for(var f=iS(n),p=iS(c),m=vte(n),y=RP(n),b=o*m+y,v=RP(c),E=v+u*m;v2?arguments[2]:uk,o=s.includeSymbols?wb:xb,a=!!s.immutable;return function l(u){var c=a?R4(u,s):u,h={__proto__:null},d=!0,f={node:c,node_:u,path:[].concat(r),parent:n[n.length-1],parents:n,key:r[r.length-1],removedKeys:{__proto__:null},isRoot:r.length===0,level:r.length,circular:null,update:function(y,b){f.isRoot||(f.parent.node[f.key]=y),f.node=y,b&&(d=!1)},delete:function(y){delete f.parent.node[f.key],f.parent.removedKeys[f.key]=!0,y&&(d=!1)},remove:function(y){I4(f.parent.node)?(f.parent.node.splice(f.key,1),f.parent.removedKeys[f.key]=!0,y&&(d=!1)):f.delete(y)},keys:null,before:function(y){h.before=y},after:function(y){h.after=y},pre:function(y){h.pre=y},post:function(y){h.post=y},stop:function(){i=!1},block:function(){d=!1}};if(!i)return f;function p(){if(typeof f.node=="object"&&f.node!==null){(!f.keys||f.node_!==f.node)&&(f.keys=o(f.node)),f.isLeaf=f.keys.length===0;for(var y=0;y1?arguments[1]:uk,this.value=e}Es.prototype.get=function(e){for(var t=this.value,r=0;t&&r1?arguments[1]:uk;return new Es(e,t)}bb(wb(Es.prototype),function(e){j4[e]=function(t){var r=[].slice.call(arguments,1),n=new Es(t);return n[e].apply(n,r)}});var Ute=j4;const ec=jo(Ute);class Fe{constructor(){this.hex="#000000",this.rgb_r=0,this.rgb_g=0,this.rgb_b=0,this.xyz_x=0,this.xyz_y=0,this.xyz_z=0,this.luv_l=0,this.luv_u=0,this.luv_v=0,this.lch_l=0,this.lch_c=0,this.lch_h=0,this.hsluv_h=0,this.hsluv_s=0,this.hsluv_l=0,this.hpluv_h=0,this.hpluv_p=0,this.hpluv_l=0,this.r0s=0,this.r0i=0,this.r1s=0,this.r1i=0,this.g0s=0,this.g0i=0,this.g1s=0,this.g1i=0,this.b0s=0,this.b0i=0,this.b1s=0,this.b1i=0}static fromLinear(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}static toLinear(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92}static yToL(t){return t<=Fe.epsilon?t/Fe.refY*Fe.kappa:116*Math.pow(t/Fe.refY,1/3)-16}static lToY(t){return t<=8?Fe.refY*t/Fe.kappa:Fe.refY*Math.pow((t+16)/116,3)}static rgbChannelToHex(t){const r=Math.round(t*255),n=r%16,i=(r-n)/16|0;return Fe.hexChars.charAt(i)+Fe.hexChars.charAt(n)}static hexToRgbChannel(t,r){const n=Fe.hexChars.indexOf(t.charAt(r)),i=Fe.hexChars.indexOf(t.charAt(r+1));return(n*16+i)/255}static distanceFromOriginAngle(t,r,n){const i=r/(Math.sin(n)-t*Math.cos(n));return i<0?1/0:i}static distanceFromOrigin(t,r){return Math.abs(r)/Math.sqrt(Math.pow(t,2)+1)}static min6(t,r,n,i,s,o){return Math.min(t,Math.min(r,Math.min(n,Math.min(i,Math.min(s,o)))))}rgbToHex(){this.hex="#",this.hex+=Fe.rgbChannelToHex(this.rgb_r),this.hex+=Fe.rgbChannelToHex(this.rgb_g),this.hex+=Fe.rgbChannelToHex(this.rgb_b)}hexToRgb(){this.hex=this.hex.toLowerCase(),this.rgb_r=Fe.hexToRgbChannel(this.hex,1),this.rgb_g=Fe.hexToRgbChannel(this.hex,3),this.rgb_b=Fe.hexToRgbChannel(this.hex,5)}xyzToRgb(){this.rgb_r=Fe.fromLinear(Fe.m_r0*this.xyz_x+Fe.m_r1*this.xyz_y+Fe.m_r2*this.xyz_z),this.rgb_g=Fe.fromLinear(Fe.m_g0*this.xyz_x+Fe.m_g1*this.xyz_y+Fe.m_g2*this.xyz_z),this.rgb_b=Fe.fromLinear(Fe.m_b0*this.xyz_x+Fe.m_b1*this.xyz_y+Fe.m_b2*this.xyz_z)}rgbToXyz(){const t=Fe.toLinear(this.rgb_r),r=Fe.toLinear(this.rgb_g),n=Fe.toLinear(this.rgb_b);this.xyz_x=.41239079926595*t+.35758433938387*r+.18048078840183*n,this.xyz_y=.21263900587151*t+.71516867876775*r+.072192315360733*n,this.xyz_z=.019330818715591*t+.11919477979462*r+.95053215224966*n}xyzToLuv(){const t=this.xyz_x+15*this.xyz_y+3*this.xyz_z;let r=4*this.xyz_x,n=9*this.xyz_y;t!==0?(r/=t,n/=t):(r=NaN,n=NaN),this.luv_l=Fe.yToL(this.xyz_y),this.luv_l===0?(this.luv_u=0,this.luv_v=0):(this.luv_u=13*this.luv_l*(r-Fe.refU),this.luv_v=13*this.luv_l*(n-Fe.refV))}luvToXyz(){if(this.luv_l===0){this.xyz_x=0,this.xyz_y=0,this.xyz_z=0;return}const t=this.luv_u/(13*this.luv_l)+Fe.refU,r=this.luv_v/(13*this.luv_l)+Fe.refV;this.xyz_y=Fe.lToY(this.luv_l),this.xyz_x=0-9*this.xyz_y*t/((t-4)*r-t*r),this.xyz_z=(9*this.xyz_y-15*r*this.xyz_y-r*this.xyz_x)/(3*r)}luvToLch(){if(this.lch_l=this.luv_l,this.lch_c=Math.sqrt(this.luv_u*this.luv_u+this.luv_v*this.luv_v),this.lch_c<1e-8)this.lch_h=0;else{const t=Math.atan2(this.luv_v,this.luv_u);this.lch_h=t*180/Math.PI,this.lch_h<0&&(this.lch_h=360+this.lch_h)}}lchToLuv(){const t=this.lch_h/180*Math.PI;this.luv_l=this.lch_l,this.luv_u=Math.cos(t)*this.lch_c,this.luv_v=Math.sin(t)*this.lch_c}calculateBoundingLines(t){const r=Math.pow(t+16,3)/1560896,n=r>Fe.epsilon?r:t/Fe.kappa,i=n*(284517*Fe.m_r0-94839*Fe.m_r2),s=n*(838422*Fe.m_r2+769860*Fe.m_r1+731718*Fe.m_r0),o=n*(632260*Fe.m_r2-126452*Fe.m_r1),a=n*(284517*Fe.m_g0-94839*Fe.m_g2),l=n*(838422*Fe.m_g2+769860*Fe.m_g1+731718*Fe.m_g0),u=n*(632260*Fe.m_g2-126452*Fe.m_g1),c=n*(284517*Fe.m_b0-94839*Fe.m_b2),h=n*(838422*Fe.m_b2+769860*Fe.m_b1+731718*Fe.m_b0),d=n*(632260*Fe.m_b2-126452*Fe.m_b1);this.r0s=i/o,this.r0i=s*t/o,this.r1s=i/(o+126452),this.r1i=(s-769860)*t/(o+126452),this.g0s=a/u,this.g0i=l*t/u,this.g1s=a/(u+126452),this.g1i=(l-769860)*t/(u+126452),this.b0s=c/d,this.b0i=h*t/d,this.b1s=c/(d+126452),this.b1i=(h-769860)*t/(d+126452)}calcMaxChromaHpluv(){const t=Fe.distanceFromOrigin(this.r0s,this.r0i),r=Fe.distanceFromOrigin(this.r1s,this.r1i),n=Fe.distanceFromOrigin(this.g0s,this.g0i),i=Fe.distanceFromOrigin(this.g1s,this.g1i),s=Fe.distanceFromOrigin(this.b0s,this.b0i),o=Fe.distanceFromOrigin(this.b1s,this.b1i);return Fe.min6(t,r,n,i,s,o)}calcMaxChromaHsluv(t){const r=t/360*Math.PI*2,n=Fe.distanceFromOriginAngle(this.r0s,this.r0i,r),i=Fe.distanceFromOriginAngle(this.r1s,this.r1i,r),s=Fe.distanceFromOriginAngle(this.g0s,this.g0i,r),o=Fe.distanceFromOriginAngle(this.g1s,this.g1i,r),a=Fe.distanceFromOriginAngle(this.b0s,this.b0i,r),l=Fe.distanceFromOriginAngle(this.b1s,this.b1i,r);return Fe.min6(n,i,s,o,a,l)}hsluvToLch(){if(this.hsluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hsluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hsluv_l,this.calculateBoundingLines(this.hsluv_l);const t=this.calcMaxChromaHsluv(this.hsluv_h);this.lch_c=t/100*this.hsluv_s}this.lch_h=this.hsluv_h}lchToHsluv(){if(this.lch_l>99.9999999)this.hsluv_s=0,this.hsluv_l=100;else if(this.lch_l<1e-8)this.hsluv_s=0,this.hsluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHsluv(this.lch_h);this.hsluv_s=this.lch_c/t*100,this.hsluv_l=this.lch_l}this.hsluv_h=this.lch_h}hpluvToLch(){if(this.hpluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hpluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hpluv_l,this.calculateBoundingLines(this.hpluv_l);const t=this.calcMaxChromaHpluv();this.lch_c=t/100*this.hpluv_p}this.lch_h=this.hpluv_h}lchToHpluv(){if(this.lch_l>99.9999999)this.hpluv_p=0,this.hpluv_l=100;else if(this.lch_l<1e-8)this.hpluv_p=0,this.hpluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHpluv();this.hpluv_p=this.lch_c/t*100,this.hpluv_l=this.lch_l}this.hpluv_h=this.lch_h}hsluvToRgb(){this.hsluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hpluvToRgb(){this.hpluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hsluvToHex(){this.hsluvToRgb(),this.rgbToHex()}hpluvToHex(){this.hpluvToRgb(),this.rgbToHex()}rgbToHsluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHsluv()}rgbToHpluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHpluv()}hexToHsluv(){this.hexToRgb(),this.rgbToHsluv()}hexToHpluv(){this.hexToRgb(),this.rgbToHpluv()}}Fe.hexChars="0123456789abcdef";Fe.refY=1;Fe.refU=.19783000664283;Fe.refV=.46831999493879;Fe.kappa=903.2962962;Fe.epsilon=.0088564516;Fe.m_r0=3.240969941904521;Fe.m_r1=-1.537383177570093;Fe.m_r2=-.498610760293;Fe.m_g0=-.96924363628087;Fe.m_g1=1.87596750150772;Fe.m_g2=.041555057407175;Fe.m_b0=.055630079696993;Fe.m_b1=-.20397695888897;Fe.m_b2=1.056971514242878;const{min:Wte,max:Vte}=Math,ju=(e,t=0,r=1)=>Wte(Vte(t,e),r),ck=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=ju(e[t],0,255)):t===3&&(e[t]=ju(e[t],0,1));return e},z4={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])z4[`[object ${e}]`]=e.toLowerCase();function Mt(e){return z4[Object.prototype.toString.call(e)]||"object"}const Tt=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Mt(e[0])=="object"&&t?t.split("").filter(r=>e[0][r]!==void 0).map(r=>e[0][r]):e[0].slice(0),Bd=e=>{if(e.length<2)return null;const t=e.length-1;return Mt(e[t])=="string"?e[t].toLowerCase():null},{PI:Db,min:H4,max:U4}=Math,xs=e=>Math.round(e*100)/100,ZE=e=>Math.round(e*100)/100,ia=Db*2,sS=Db/3,Gte=Db/180,qte=180/Db;function W4(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Ct={format:{},autodetect:[]};class Ie{constructor(...t){const r=this;if(Mt(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let n=Bd(t),i=!1;if(!n){i=!0,Ct.sorted||(Ct.autodetect=Ct.autodetect.sort((s,o)=>o.p-s.p),Ct.sorted=!0);for(let s of Ct.autodetect)if(n=s.test(...t),n)break}if(Ct.format[n]){const s=Ct.format[n].apply(null,i?t:t.slice(0,-1));r._rgb=ck(s)}else throw new Error("unknown format: "+t);r._rgb.length===3&&r._rgb.push(1)}toString(){return Mt(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const Kte="3.1.2",vt=(...e)=>new Ie(...e);vt.version=Kte;const ld={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Jte=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xte=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,V4=e=>{if(e.match(Jte)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),r=t>>16,n=t>>8&255,i=t&255;return[r,n,i,1]}if(e.match(Xte)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),r=t>>24&255,n=t>>16&255,i=t>>8&255,s=Math.round((t&255)/255*100)/100;return[r,n,i,s]}throw new Error(`unknown hex color: ${e}`)},{round:Gm}=Math,G4=(...e)=>{let[t,r,n,i]=Tt(e,"rgba"),s=Bd(e)||"auto";i===void 0&&(i=1),s==="auto"&&(s=i<1?"rgba":"rgb"),t=Gm(t),r=Gm(r),n=Gm(n);let a="000000"+(t<<16|r<<8|n).toString(16);a=a.substr(a.length-6);let l="0"+Gm(i*255).toString(16);switch(l=l.substr(l.length-2),s.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};Ie.prototype.name=function(){const e=G4(this._rgb,"rgb");for(let t of Object.keys(ld))if(ld[t]===e)return t.toLowerCase();return e};Ct.format.named=e=>{if(e=e.toLowerCase(),ld[e])return V4(ld[e]);throw new Error("unknown color name: "+e)};Ct.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Mt(e)==="string"&&ld[e.toLowerCase()])return"named"}});Ie.prototype.alpha=function(e,t=!1){return e!==void 0&&Mt(e)==="number"?t?(this._rgb[3]=e,this):new Ie([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};Ie.prototype.clipped=function(){return this._rgb._clipped||!1};const $o={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},Yte=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function ua(e){const t=Yte.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);$o.labWhitePoint=e,$o.Xn=t[0],$o.Zn=t[1]}function cg(){return $o.labWhitePoint}const hk=(...e)=>{e=Tt(e,"lab");const[t,r,n]=e,[i,s,o]=Qte(t,r,n),[a,l,u]=q4(i,s,o);return[a,l,u,e.length>3?e[3]:1]},Qte=(e,t,r)=>{const{kE:n,kK:i,kKE:s,Xn:o,Yn:a,Zn:l}=$o,u=(e+16)/116,c=.002*t+u,h=u-.005*r,d=c*c*c,f=h*h*h,p=d>n?d:(116*c-16)/i,m=e>s?Math.pow((e+16)/116,3):e/i,y=f>n?f:(116*h-16)/i,b=p*o,v=m*a,E=y*l;return[b,v,E]},oS=e=>{const t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*t},q4=(e,t,r)=>{const{MtxAdaptMa:n,MtxAdaptMaI:i,MtxXYZ2RGB:s,RefWhiteRGB:o,Xn:a,Yn:l,Zn:u}=$o,c=a*n.m00+l*n.m10+u*n.m20,h=a*n.m01+l*n.m11+u*n.m21,d=a*n.m02+l*n.m12+u*n.m22,f=o.X*n.m00+o.Y*n.m10+o.Z*n.m20,p=o.X*n.m01+o.Y*n.m11+o.Z*n.m21,m=o.X*n.m02+o.Y*n.m12+o.Z*n.m22,y=(e*n.m00+t*n.m10+r*n.m20)*(f/c),b=(e*n.m01+t*n.m11+r*n.m21)*(p/h),v=(e*n.m02+t*n.m12+r*n.m22)*(m/d),E=y*i.m00+b*i.m10+v*i.m20,D=y*i.m01+b*i.m11+v*i.m21,C=y*i.m02+b*i.m12+v*i.m22,w=oS(E*s.m00+D*s.m10+C*s.m20),A=oS(E*s.m01+D*s.m11+C*s.m21),$=oS(E*s.m02+D*s.m12+C*s.m22);return[w*255,A*255,$*255]},dk=(...e)=>{const[t,r,n,...i]=Tt(e,"rgb"),[s,o,a]=K4(t,r,n),[l,u,c]=Zte(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]};function Zte(e,t,r){const{Xn:n,Yn:i,Zn:s,kE:o,kK:a}=$o,l=e/n,u=t/i,c=r/s,h=l>o?Math.pow(l,1/3):(a*l+16)/116,d=u>o?Math.pow(u,1/3):(a*u+16)/116,f=c>o?Math.pow(c,1/3):(a*c+16)/116;return[116*d-16,500*(h-d),200*(d-f)]}function aS(e){const t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const K4=(e,t,r)=>{e=aS(e/255),t=aS(t/255),r=aS(r/255);const{MtxRGB2XYZ:n,MtxAdaptMa:i,MtxAdaptMaI:s,Xn:o,Yn:a,Zn:l,As:u,Bs:c,Cs:h}=$o;let d=e*n.m00+t*n.m10+r*n.m20,f=e*n.m01+t*n.m11+r*n.m21,p=e*n.m02+t*n.m12+r*n.m22;const m=o*i.m00+a*i.m10+l*i.m20,y=o*i.m01+a*i.m11+l*i.m21,b=o*i.m02+a*i.m12+l*i.m22;let v=d*i.m00+f*i.m10+p*i.m20,E=d*i.m01+f*i.m11+p*i.m21,D=d*i.m02+f*i.m12+p*i.m22;return v*=m/u,E*=y/c,D*=b/h,d=v*s.m00+E*s.m10+D*s.m20,f=v*s.m01+E*s.m11+D*s.m21,p=v*s.m02+E*s.m12+D*s.m22,[d,f,p]};Ie.prototype.lab=function(){return dk(this._rgb)};const ere=(...e)=>new Ie(...e,"lab");Object.assign(vt,{lab:ere,getLabWhitePoint:cg,setLabWhitePoint:ua});Ct.format.lab=hk;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"lab"),Mt(e)==="array"&&e.length===3)return"lab"}});Ie.prototype.darken=function(e=1){const t=this,r=t.lab();return r[0]-=$o.Kn*e,new Ie(r,"lab").alpha(t.alpha(),!0)};Ie.prototype.brighten=function(e=1){return this.darken(-e)};Ie.prototype.darker=Ie.prototype.darken;Ie.prototype.brighter=Ie.prototype.brighten;Ie.prototype.get=function(e){const[t,r]=e.split("."),n=this[t]();if(r){const i=t.indexOf(r)-(t.substr(0,2)==="ok"?2:0);if(i>-1)return n[i];throw new Error(`unknown channel ${r} in mode ${t}`)}else return n};const{pow:tre}=Math,rre=1e-7,nre=20;Ie.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&Mt(e)==="number"){if(e===0)return new Ie([0,0,0,this._rgb[3]],"rgb");if(e===1)return new Ie([255,255,255,this._rgb[3]],"rgb");let r=this.luminance(),n=nre;const i=(o,a)=>{const l=o.interpolate(a,.5,t),u=l.luminance();return Math.abs(e-u)e?i(o,l):i(l,a)},s=(r>e?i(new Ie([0,0,0]),this):i(this,new Ie([255,255,255]))).rgb();return new Ie([...s,this._rgb[3]])}return ire(...this._rgb.slice(0,3))};const ire=(e,t,r)=>(e=lS(e),t=lS(t),r=lS(r),.2126*e+.7152*t+.0722*r),lS=e=>(e/=255,e<=.03928?e/12.92:tre((e+.055)/1.055,2.4)),Qn={},ud=(e,t,r=.5,...n)=>{let i=n[0]||"lrgb";if(!Qn[i]&&!n.length&&(i=Object.keys(Qn)[0]),!Qn[i])throw new Error(`interpolation mode ${i} is not defined`);return Mt(e)!=="object"&&(e=new Ie(e)),Mt(t)!=="object"&&(t=new Ie(t)),Qn[i](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))};Ie.prototype.mix=Ie.prototype.interpolate=function(e,t=.5,...r){return ud(this,e,t,...r)};Ie.prototype.premultiply=function(e=!1){const t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new Ie([t[0]*r,t[1]*r,t[2]*r,r],"rgb")};const{sin:sre,cos:ore}=Math,J4=(...e)=>{let[t,r,n]=Tt(e,"lch");return isNaN(n)&&(n=0),n=n*Gte,[t,ore(n)*r,sre(n)*r]},fk=(...e)=>{e=Tt(e,"lch");const[t,r,n]=e,[i,s,o]=J4(t,r,n),[a,l,u]=hk(i,s,o);return[a,l,u,e.length>3?e[3]:1]},are=(...e)=>{const t=W4(Tt(e,"hcl"));return fk(...t)},{sqrt:lre,atan2:ure,round:cre}=Math,X4=(...e)=>{const[t,r,n]=Tt(e,"lab"),i=lre(r*r+n*n);let s=(ure(n,r)*qte+360)%360;return cre(i*1e4)===0&&(s=Number.NaN),[t,i,s]},pk=(...e)=>{const[t,r,n,...i]=Tt(e,"rgb"),[s,o,a]=dk(t,r,n),[l,u,c]=X4(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]};Ie.prototype.lch=function(){return pk(this._rgb)};Ie.prototype.hcl=function(){return W4(pk(this._rgb))};const hre=(...e)=>new Ie(...e,"lch"),dre=(...e)=>new Ie(...e,"hcl");Object.assign(vt,{lch:hre,hcl:dre});Ct.format.lch=fk;Ct.format.hcl=are;["lch","hcl"].forEach(e=>Ct.autodetect.push({p:2,test:(...t)=>{if(t=Tt(t,e),Mt(t)==="array"&&t.length===3)return e}}));Ie.prototype.saturate=function(e=1){const t=this,r=t.lch();return r[1]+=$o.Kn*e,r[1]<0&&(r[1]=0),new Ie(r,"lch").alpha(t.alpha(),!0)};Ie.prototype.desaturate=function(e=1){return this.saturate(-e)};Ie.prototype.set=function(e,t,r=!1){const[n,i]=e.split("."),s=this[n]();if(i){const o=n.indexOf(i)-(n.substr(0,2)==="ok"?2:0);if(o>-1){if(Mt(t)=="string")switch(t.charAt(0)){case"+":s[o]+=+t;break;case"-":s[o]+=+t;break;case"*":s[o]*=+t.substr(1);break;case"/":s[o]/=+t.substr(1);break;default:s[o]=+t}else if(Mt(t)==="number")s[o]=t;else throw new Error("unsupported value for Color.set");const a=new Ie(s,n);return r?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${i} in mode ${n}`)}else return s};Ie.prototype.tint=function(e=.5,...t){return ud(this,"white",e,...t)};Ie.prototype.shade=function(e=.5,...t){return ud(this,"black",e,...t)};const fre=(e,t,r)=>{const n=e._rgb,i=t._rgb;return new Ie(n[0]+r*(i[0]-n[0]),n[1]+r*(i[1]-n[1]),n[2]+r*(i[2]-n[2]),"rgb")};Qn.rgb=fre;const{sqrt:uS,pow:rh}=Math,pre=(e,t,r)=>{const[n,i,s]=e._rgb,[o,a,l]=t._rgb;return new Ie(uS(rh(n,2)*(1-r)+rh(o,2)*r),uS(rh(i,2)*(1-r)+rh(a,2)*r),uS(rh(s,2)*(1-r)+rh(l,2)*r),"rgb")};Qn.lrgb=pre;const gre=(e,t,r)=>{const n=e.lab(),i=t.lab();return new Ie(n[0]+r*(i[0]-n[0]),n[1]+r*(i[1]-n[1]),n[2]+r*(i[2]-n[2]),"lab")};Qn.lab=gre;const jd=(e,t,r,n)=>{let i,s;n==="hsl"?(i=e.hsl(),s=t.hsl()):n==="hsv"?(i=e.hsv(),s=t.hsv()):n==="hcg"?(i=e.hcg(),s=t.hcg()):n==="hsi"?(i=e.hsi(),s=t.hsi()):n==="lch"||n==="hcl"?(n="hcl",i=e.hcl(),s=t.hcl()):n==="oklch"&&(i=e.oklch().reverse(),s=t.oklch().reverse());let o,a,l,u,c,h;(n.substr(0,1)==="h"||n==="oklch")&&([o,l,c]=i,[a,u,h]=s);let d,f,p,m;return!isNaN(o)&&!isNaN(a)?(a>o&&a-o>180?m=a-(o+360):a180?m=a+360-o:m=a-o,f=o+r*m):isNaN(o)?isNaN(a)?f=Number.NaN:(f=a,(c==1||c==0)&&n!="hsv"&&(d=u)):(f=o,(h==1||h==0)&&n!="hsv"&&(d=l)),d===void 0&&(d=l+r*(u-l)),p=c+r*(h-c),n==="oklch"?new Ie([p,d,f],n):new Ie([f,d,p],n)},Y4=(e,t,r)=>jd(e,t,r,"lch");Qn.lch=Y4;Qn.hcl=Y4;const mre=e=>{if(Mt(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,r=e>>8&255,n=e&255;return[t,r,n,1]}throw new Error("unknown num color: "+e)},yre=(...e)=>{const[t,r,n]=Tt(e,"rgb");return(t<<16)+(r<<8)+n};Ie.prototype.num=function(){return yre(this._rgb)};const vre=(...e)=>new Ie(...e,"num");Object.assign(vt,{num:vre});Ct.format.num=mre;Ct.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Mt(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const bre=(e,t,r)=>{const n=e.num(),i=t.num();return new Ie(n+r*(i-n),"num")};Qn.num=bre;const{floor:xre}=Math,wre=(...e)=>{e=Tt(e,"hcg");let[t,r,n]=e,i,s,o;n=n*255;const a=r*255;if(r===0)i=s=o=n;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const l=xre(t),u=t-l,c=n*(1-r),h=c+a*(1-u),d=c+a*u,f=c+a;switch(l){case 0:[i,s,o]=[f,d,c];break;case 1:[i,s,o]=[h,f,c];break;case 2:[i,s,o]=[c,f,d];break;case 3:[i,s,o]=[c,h,f];break;case 4:[i,s,o]=[d,c,f];break;case 5:[i,s,o]=[f,c,h];break}}return[i,s,o,e.length>3?e[3]:1]},Sre=(...e)=>{const[t,r,n]=Tt(e,"rgb"),i=H4(t,r,n),s=U4(t,r,n),o=s-i,a=o*100/255,l=i/(255-o)*100;let u;return o===0?u=Number.NaN:(t===s&&(u=(r-n)/o),r===s&&(u=2+(n-t)/o),n===s&&(u=4+(t-r)/o),u*=60,u<0&&(u+=360)),[u,a,l]};Ie.prototype.hcg=function(){return Sre(this._rgb)};const Dre=(...e)=>new Ie(...e,"hcg");vt.hcg=Dre;Ct.format.hcg=wre;Ct.autodetect.push({p:1,test:(...e)=>{if(e=Tt(e,"hcg"),Mt(e)==="array"&&e.length===3)return"hcg"}});const Ere=(e,t,r)=>jd(e,t,r,"hcg");Qn.hcg=Ere;const{cos:nh}=Math,Cre=(...e)=>{e=Tt(e,"hsi");let[t,r,n]=e,i,s,o;return isNaN(t)&&(t=0),isNaN(r)&&(r=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-r)/3,i=(1+r*nh(ia*t)/nh(sS-ia*t))/3,s=1-(o+i)):t<2/3?(t-=1/3,i=(1-r)/3,s=(1+r*nh(ia*t)/nh(sS-ia*t))/3,o=1-(i+s)):(t-=2/3,s=(1-r)/3,o=(1+r*nh(ia*t)/nh(sS-ia*t))/3,i=1-(s+o)),i=ju(n*i*3),s=ju(n*s*3),o=ju(n*o*3),[i*255,s*255,o*255,e.length>3?e[3]:1]},{min:Are,sqrt:Tre,acos:kre}=Math,_re=(...e)=>{let[t,r,n]=Tt(e,"rgb");t/=255,r/=255,n/=255;let i;const s=Are(t,r,n),o=(t+r+n)/3,a=o>0?1-s/o:0;return a===0?i=NaN:(i=(t-r+(t-n))/2,i/=Tre((t-r)*(t-r)+(t-n)*(r-n)),i=kre(i),n>r&&(i=ia-i),i/=ia),[i*360,a,o]};Ie.prototype.hsi=function(){return _re(this._rgb)};const $re=(...e)=>new Ie(...e,"hsi");vt.hsi=$re;Ct.format.hsi=Cre;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"hsi"),Mt(e)==="array"&&e.length===3)return"hsi"}});const Lre=(e,t,r)=>jd(e,t,r,"hsi");Qn.hsi=Lre;const eC=(...e)=>{e=Tt(e,"hsl");const[t,r,n]=e;let i,s,o;if(r===0)i=s=o=n*255;else{const a=[0,0,0],l=[0,0,0],u=n<.5?n*(1+r):n+r-n*r,c=2*n-u,h=t/360;a[0]=h+1/3,a[1]=h,a[2]=h-1/3;for(let d=0;d<3;d++)a[d]<0&&(a[d]+=1),a[d]>1&&(a[d]-=1),6*a[d]<1?l[d]=c+(u-c)*6*a[d]:2*a[d]<1?l[d]=u:3*a[d]<2?l[d]=c+(u-c)*(2/3-a[d])*6:l[d]=c;[i,s,o]=[l[0]*255,l[1]*255,l[2]*255]}return e.length>3?[i,s,o,e[3]]:[i,s,o,1]},Q4=(...e)=>{e=Tt(e,"rgba");let[t,r,n]=e;t/=255,r/=255,n/=255;const i=H4(t,r,n),s=U4(t,r,n),o=(s+i)/2;let a,l;return s===i?(a=0,l=Number.NaN):a=o<.5?(s-i)/(s+i):(s-i)/(2-s-i),t==s?l=(r-n)/(s-i):r==s?l=2+(n-t)/(s-i):n==s&&(l=4+(t-r)/(s-i)),l*=60,l<0&&(l+=360),e.length>3&&e[3]!==void 0?[l,a,o,e[3]]:[l,a,o]};Ie.prototype.hsl=function(){return Q4(this._rgb)};const Pre=(...e)=>new Ie(...e,"hsl");vt.hsl=Pre;Ct.format.hsl=eC;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"hsl"),Mt(e)==="array"&&e.length===3)return"hsl"}});const Fre=(e,t,r)=>jd(e,t,r,"hsl");Qn.hsl=Fre;const{floor:Ore}=Math,Nre=(...e)=>{e=Tt(e,"hsv");let[t,r,n]=e,i,s,o;if(n*=255,r===0)i=s=o=n;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=Ore(t),l=t-a,u=n*(1-r),c=n*(1-r*l),h=n*(1-r*(1-l));switch(a){case 0:[i,s,o]=[n,h,u];break;case 1:[i,s,o]=[c,n,u];break;case 2:[i,s,o]=[u,n,h];break;case 3:[i,s,o]=[u,c,n];break;case 4:[i,s,o]=[h,u,n];break;case 5:[i,s,o]=[n,u,c];break}}return[i,s,o,e.length>3?e[3]:1]},{min:Mre,max:Ire}=Math,Rre=(...e)=>{e=Tt(e,"rgb");let[t,r,n]=e;const i=Mre(t,r,n),s=Ire(t,r,n),o=s-i;let a,l,u;return u=s/255,s===0?(a=Number.NaN,l=0):(l=o/s,t===s&&(a=(r-n)/o),r===s&&(a=2+(n-t)/o),n===s&&(a=4+(t-r)/o),a*=60,a<0&&(a+=360)),[a,l,u]};Ie.prototype.hsv=function(){return Rre(this._rgb)};const Bre=(...e)=>new Ie(...e,"hsv");vt.hsv=Bre;Ct.format.hsv=Nre;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"hsv"),Mt(e)==="array"&&e.length===3)return"hsv"}});const jre=(e,t,r)=>jd(e,t,r,"hsv");Qn.hsv=jre;function Jv(e,t){let r=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(o=>[o]));let n=t[0].length,i=t[0].map((o,a)=>t.map(l=>l[a])),s=e.map(o=>i.map(a=>Array.isArray(o)?o.reduce((l,u,c)=>l+u*(a[c]||0),0):a.reduce((l,u)=>l+u*o,0)));return r===1&&(s=s[0]),n===1?s.map(o=>o[0]):s}const gk=(...e)=>{e=Tt(e,"lab");const[t,r,n,...i]=e,[s,o,a]=zre([t,r,n]),[l,u,c]=q4(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]};function zre(e){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],r=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],n=Jv(r,e);return Jv(t,n.map(i=>i**3))}const mk=(...e)=>{const[t,r,n,...i]=Tt(e,"rgb"),s=K4(t,r,n);return[...Hre(s),...i.length>0&&i[0]<1?[i[0]]:[]]};function Hre(e){const t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],r=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],n=Jv(t,e);return Jv(r,n.map(i=>Math.cbrt(i)))}Ie.prototype.oklab=function(){return mk(this._rgb)};const Ure=(...e)=>new Ie(...e,"oklab");Object.assign(vt,{oklab:Ure});Ct.format.oklab=gk;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"oklab"),Mt(e)==="array"&&e.length===3)return"oklab"}});const Wre=(e,t,r)=>{const n=e.oklab(),i=t.oklab();return new Ie(n[0]+r*(i[0]-n[0]),n[1]+r*(i[1]-n[1]),n[2]+r*(i[2]-n[2]),"oklab")};Qn.oklab=Wre;const Vre=(e,t,r)=>jd(e,t,r,"oklch");Qn.oklch=Vre;const{pow:cS,sqrt:hS,PI:dS,cos:zP,sin:HP,atan2:Gre}=Math,qre=(e,t="lrgb",r=null)=>{const n=e.length;r||(r=Array.from(new Array(n)).map(()=>1));const i=n/r.reduce(function(h,d){return h+d});if(r.forEach((h,d)=>{r[d]*=i}),e=e.map(h=>new Ie(h)),t==="lrgb")return Kre(e,r);const s=e.shift(),o=s.get(t),a=[];let l=0,u=0;for(let h=0;h{const f=h.get(t);c+=h.alpha()*r[d+1];for(let p=0;p=360;)d-=360;o[h]=d}else o[h]=o[h]/a[h];return c/=n,new Ie(o,t).alpha(c>.99999?1:c,!0)},Kre=(e,t)=>{const r=e.length,n=[0,0,0,0];for(let i=0;i.9999999&&(n[3]=1),new Ie(ck(n))},{pow:Jre}=Math;function Xv(e){let t="rgb",r=vt("#ccc"),n=0,i=[0,1],s=[],o=[0,0],a=!1,l=[],u=!1,c=0,h=1,d=!1,f={},p=!0,m=1;const y=function(A){if(A=A||["#fff","#000"],A&&Mt(A)==="string"&&vt.brewer&&vt.brewer[A.toLowerCase()]&&(A=vt.brewer[A.toLowerCase()]),Mt(A)==="array"){A.length===1&&(A=[A[0],A[0]]),A=A.slice(0);for(let $=0;$=a[O];)O++;return O-1}return 0};let v=A=>A,E=A=>A;const D=function(A,$){let O,P;if($==null&&($=!1),isNaN(A)||A===null)return r;$?P=A:a&&a.length>2?P=b(A)/(a.length-2):h!==c?P=(A-c)/(h-c):P=1,P=E(P),$||(P=v(P)),m!==1&&(P=Jre(P,m)),P=o[0]+P*(1-o[0]-o[1]),P=ju(P,0,1);const N=Math.floor(P*1e4);if(p&&f[N])O=f[N];else{if(Mt(l)==="array")for(let F=0;F=L&&F===s.length-1){O=l[F];break}if(P>L&&Pf={};y(e);const w=function(A){const $=vt(D(A));return u&&$[u]?$[u]():$};return w.classes=function(A){if(A!=null){if(Mt(A)==="array")a=A,i=[A[0],A[A.length-1]];else{const $=vt.analyze(i);A===0?a=[$.min,$.max]:a=vt.limits($,"e",A)}return w}return a},w.domain=function(A){if(!arguments.length)return i;c=A[0],h=A[A.length-1],s=[];const $=l.length;if(A.length===$&&c!==h)for(let O of Array.from(A))s.push((O-c)/(h-c));else{for(let O=0;O<$;O++)s.push(O/($-1));if(A.length>2){const O=A.map((N,F)=>F/(A.length-1)),P=A.map(N=>(N-c)/(h-c));P.every((N,F)=>O[F]===N)||(E=N=>{if(N<=0||N>=1)return N;let F=0;for(;N>=P[F+1];)F++;const L=(N-P[F])/(P[F+1]-P[F]);return O[F]+L*(O[F+1]-O[F])})}}return i=[c,h],w},w.mode=function(A){return arguments.length?(t=A,C(),w):t},w.range=function(A,$){return y(A),w},w.out=function(A){return u=A,w},w.spread=function(A){return arguments.length?(n=A,w):n},w.correctLightness=function(A){return A==null&&(A=!0),d=A,C(),d?v=function($){const O=D(0,!0).lab()[0],P=D(1,!0).lab()[0],N=O>P;let F=D($,!0).lab()[0];const L=O+(P-O)*$;let k=F-L,T=0,M=1,R=20;for(;Math.abs(k)>.01&&R-- >0;)(function(){return N&&(k*=-1),k<0?(T=$,$+=(M-$)*.5):(M=$,$+=(T-$)*.5),F=D($,!0).lab()[0],k=F-L})();return $}:v=$=>$,w},w.padding=function(A){return A!=null?(Mt(A)==="number"&&(A=[A,A]),o=A,w):o},w.colors=function(A,$){arguments.length<2&&($="hex");let O=[];if(arguments.length===0)O=l.slice(0);else if(A===1)O=[w(.5)];else if(A>1){const P=i[0],N=i[1]-P;O=Xre(0,A).map(F=>w(P+F/(A-1)*N))}else{e=[];let P=[];if(a&&a.length>2)for(let N=1,F=a.length,L=1<=F;L?NF;L?N++:N--)P.push((a[N-1]+a[N])*.5);else P=i;O=P.map(N=>w(N))}return vt[$]&&(O=O.map(P=>P[$]())),O},w.cache=function(A){return A!=null?(p=A,w):p},w.gamma=function(A){return A!=null?(m=A,w):m},w.nodata=function(A){return A!=null?(r=vt(A),w):r},w}function Xre(e,t,r){let n=[],i=es;i?o++:o--)n.push(o);return n}const Yre=function(e){let t=[1,1];for(let r=1;rnew Ie(s)),e.length===2)[r,n]=e.map(s=>s.lab()),t=function(s){const o=[0,1,2].map(a=>r[a]+s*(n[a]-r[a]));return new Ie(o,"lab")};else if(e.length===3)[r,n,i]=e.map(s=>s.lab()),t=function(s){const o=[0,1,2].map(a=>(1-s)*(1-s)*r[a]+2*(1-s)*s*n[a]+s*s*i[a]);return new Ie(o,"lab")};else if(e.length===4){let s;[r,n,i,s]=e.map(o=>o.lab()),t=function(o){const a=[0,1,2].map(l=>(1-o)*(1-o)*(1-o)*r[l]+3*(1-o)*(1-o)*o*n[l]+3*(1-o)*o*o*i[l]+o*o*o*s[l]);return new Ie(a,"lab")}}else if(e.length>=5){let s,o,a;s=e.map(l=>l.lab()),a=e.length-1,o=Yre(a),t=function(l){const u=1-l,c=[0,1,2].map(h=>s.reduce((d,f,p)=>d+o[p]*u**(a-p)*l**p*f[h],0));return new Ie(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},Zre=e=>{const t=Qre(e);return t.scale=()=>Xv(t),t},{round:Z4}=Math;Ie.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Z4)};Ie.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,r)=>r<3?e===!1?t:Z4(t):t)};const ene=(...e)=>new Ie(...e,"rgb");Object.assign(vt,{rgb:ene});Ct.format.rgb=(...e)=>{const t=Tt(e,"rgba");return t[3]===void 0&&(t[3]=1),t};Ct.autodetect.push({p:3,test:(...e)=>{if(e=Tt(e,"rgba"),Mt(e)==="array"&&(e.length===3||e.length===4&&Mt(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const ao=(e,t,r)=>{if(!ao[r])throw new Error("unknown blend mode "+r);return ao[r](e,t)},Yl=e=>(t,r)=>{const n=vt(r).rgb(),i=vt(t).rgb();return vt.rgb(e(n,i))},Ql=e=>(t,r)=>{const n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n},tne=e=>e,rne=(e,t)=>e*t/255,nne=(e,t)=>e>t?t:e,ine=(e,t)=>e>t?e:t,sne=(e,t)=>255*(1-(1-e/255)*(1-t/255)),one=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),ane=(e,t)=>255*(1-(1-t/255)/(e/255)),lne=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);ao.normal=Yl(Ql(tne));ao.multiply=Yl(Ql(rne));ao.screen=Yl(Ql(sne));ao.overlay=Yl(Ql(one));ao.darken=Yl(Ql(nne));ao.lighten=Yl(Ql(ine));ao.dodge=Yl(Ql(lne));ao.burn=Yl(Ql(ane));const{pow:une,sin:cne,cos:hne}=Math;function dne(e=300,t=-1.5,r=1,n=1,i=[0,1]){let s=0,o;Mt(i)==="array"?o=i[1]-i[0]:(o=0,i=[i,i]);const a=function(l){const u=ia*((e+120)/360+t*l),c=une(i[0]+o*l,n),d=(s!==0?r[0]+l*s:r)*c*(1-c)/2,f=hne(u),p=cne(u),m=c+d*(-.14861*f+1.78277*p),y=c+d*(-.29227*f-.90649*p),b=c+d*(1.97294*f);return vt(ck([m*255,y*255,b*255,1]))};return a.start=function(l){return l==null?e:(e=l,a)},a.rotations=function(l){return l==null?t:(t=l,a)},a.gamma=function(l){return l==null?n:(n=l,a)},a.hue=function(l){return l==null?r:(r=l,Mt(r)==="array"?(s=r[1]-r[0],s===0&&(r=r[1])):s=0,a)},a.lightness=function(l){return l==null?i:(Mt(l)==="array"?(i=l,o=l[1]-l[0]):(i=[l,l],o=0),a)},a.scale=()=>vt.scale(a),a.hue(r),a}const fne="0123456789abcdef",{floor:pne,random:gne}=Math,mne=()=>{let e="#";for(let t=0;t<6;t++)e+=fne.charAt(pne(gne()*16));return new Ie(e,"hex")},{log:UP,pow:yne,floor:vne,abs:bne}=Math;function e6(e,t=null){const r={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Mt(e)==="object"&&(e=Object.values(e)),e.forEach(n=>{t&&Mt(n)==="object"&&(n=n[t]),n!=null&&!isNaN(n)&&(r.values.push(n),r.sum+=n,nr.max&&(r.max=n),r.count+=1)}),r.domain=[r.min,r.max],r.limits=(n,i)=>t6(r,n,i),r}function t6(e,t="equal",r=7){Mt(e)=="array"&&(e=e6(e));const{min:n,max:i}=e,s=e.values.sort((a,l)=>a-l);if(r===1)return[n,i];const o=[];if(t.substr(0,1)==="c"&&(o.push(n),o.push(i)),t.substr(0,1)==="e"){o.push(n);for(let a=1;a 0");const a=Math.LOG10E*UP(n),l=Math.LOG10E*UP(i);o.push(n);for(let u=1;u200&&(h=!1)}const p={};for(let y=0;yy-b),o.push(m[0]);for(let y=1;y{e=new Ie(e),t=new Ie(t);const r=e.luminance(),n=t.luminance();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)};/** + `);const v=b.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&f(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(b)});case"DISPATCH":switch(m.payload.type){case"RESET":return f(p),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Mm(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Mm(l.name));case"ROLLBACK":return Ix(m.state,b=>{if(a===void 0){f(b),c==null||c.init(i.getState());return}f(b[a]),c==null||c.init(Mm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ix(m.state,b=>{if(a===void 0){f(b);return}JSON.stringify(i.getState())!==JSON.stringify(b[a])&&f(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=m.payload,v=(y=b.computedStates.slice(-1)[0])==null?void 0:y.state;if(!v)return;f(a===void 0?v:v[a]),c==null||c.send(null,b);return}case"PAUSE_RECORDING":return d=!d}return}}),p},P5=xK,Ix=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function wK(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var s;const o=l=>l===null?null:JSON.parse(l,void 0),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>r.removeItem(i)}}const kE=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return kE(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return kE(n)(r)}}}},SK=(e,t)=>(r,n,i)=>{let s={storage:wK(()=>localStorage),partialize:m=>m,version:0,merge:(m,y)=>({...y,...m}),...t},o=!1;const a=new Set,l=new Set;let u=s.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...m)},n,i);const c=()=>{const m=s.partialize({...n()});return u.setItem(s.name,{state:m,version:s.version})},h=i.setState;i.setState=(m,y)=>{h(m,y),c()};const d=e((...m)=>{r(...m),c()},n,i);i.getInitialState=()=>d;let f;const p=()=>{var m,y;if(!u)return;o=!1,a.forEach(v=>{var E;return v((E=n())!=null?E:d)});const b=((y=s.onRehydrateStorage)==null?void 0:y.call(s,(m=n())!=null?m:d))||void 0;return kE(u.getItem.bind(u))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return[!0,s.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var E;const[D,C]=v;if(f=s.merge(C,(E=n())!=null?E:d),r(f,!0),D)return c()}).then(()=>{b==null||b(f,void 0),f=n(),o=!0,l.forEach(v=>v(f))}).catch(v=>{b==null||b(void 0,v)})};return i.persist={setOptions:m=>{s={...s,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u==null||u.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},s.skipHydration||p(),f||d},F5=SK,DK="theme-builder-state",EK="playground-state",Mv=[2,4,6,10,20,30,40,50,60,70,80,90,94,96,98],_E=[{name:"bg-basic-level-1-default",dark:3,light:14},{name:"bg-basic-level-1-hovered",dark:4,light:13},{name:"bg-basic-level-1-pressed",dark:5,light:12},{name:"bg-basic-level-2-default",dark:2,light:13},{name:"bg-basic-level-2-hovered",dark:3,light:12},{name:"bg-basic-level-2-pressed",dark:4,light:11},{name:"bg-basic-level-3-default",dark:1,light:12},{name:"bg-basic-level-3-hovered",dark:2,light:11},{name:"bg-basic-level-3-pressed",dark:3,light:10},{name:"bg-basic-transparent-full-default",dark:9,transparencyDark:100,light:6,transparencyLight:100},{name:"bg-basic-transparent-semi-default",dark:9,transparencyDark:84,light:6,transparencyLight:92},{name:"bg-basic-transparent-hovered",dark:9,transparencyDark:76,light:6,transparencyLight:84},{name:"bg-basic-transparent-pressed",dark:9,transparencyDark:68,light:6,transparencyLight:76},{name:"on-bg-basic-emphasis-100-default",dark:12,light:3},{name:"on-bg-basic-emphasis-100-hovered",dark:11,light:4},{name:"on-bg-basic-emphasis-100-pressed",dark:10,light:5},{name:"on-bg-basic-emphasis-90-default",dark:10,light:5},{name:"on-bg-basic-emphasis-90-hovered",dark:9,light:6},{name:"on-bg-basic-emphasis-90-pressed",dark:8,light:7},{name:"on-bg-basic-emphasis-80-default",dark:9,light:6},{name:"on-bg-basic-emphasis-80-hovered",dark:8,light:5},{name:"on-bg-basic-emphasis-80-pressed",dark:7,light:4},{name:"on-bg-basic-emphasis-70-default",dark:8,light:7},{name:"on-bg-basic-emphasis-70-hovered",dark:7,light:6},{name:"on-bg-basic-emphasis-70-pressed",dark:6,light:5},{name:"on-bg-basic-emphasis-60-default",dark:6,light:10},{name:"on-bg-basic-emphasis-60-hovered",dark:5,light:9},{name:"on-bg-basic-emphasis-60-pressed",dark:4,light:8},{name:"on-bg-basic-emphasis-50-default",dark:5,light:9},{name:"on-bg-basic-emphasis-50-hovered",dark:4,light:8},{name:"on-bg-basic-emphasis-50-pressed",dark:3,light:7},{name:"bg-inverted-contrast-max-default",dark:12,light:3},{name:"bg-inverted-contrast-max-hovered",dark:11,light:4},{name:"bg-inverted-contrast-max-pressed",dark:10,light:5},{name:"bg-inverted-contrast-high-default",dark:9,light:6},{name:"bg-inverted-bg-inverted-contrast-high-hovered",dark:8,light:5},{name:"bg-inverted-bg-inverted-contrast-high-pressed",dark:7,light:4},{name:"bg-inverted-contrast-low-default",dark:8,light:7},{name:"bg-inverted-bg-inverted-contrast-low-hovered",dark:7,light:6},{name:"bg-inverted-bg-inverted-contrast-low-pressed",dark:6,light:5},{name:"on-bg-inverted-default",dark:3,light:14},{name:"on-bg-inverted-hovered",dark:4,light:13},{name:"on-bg-inverted-pressed",dark:5,light:12}],CK={name:"Whitelabel",image:{light:"peace-in-a-box.svg",dark:"peace-in-a-box-white.svg"}},TK={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},AK={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},kK={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},_K={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},$K={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},LK={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},PK={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},FK={neutral:{origin:"#646973",originBgLight:"#edeef0",originBgDark:"#070709",originLight:"#646973",originLightAlternative:"#646973",originLightAccessible:!0,originLightHovered:"#4d5159",originLightPressed:"#373a40",originDark:"#646973",originDarkAlternative:"#646973",originDarkAccessible:!0,originDarkHovered:"#7c828e",originDarkPressed:"#969ca9",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},brand:{origin:"#242629",originBgLight:"#edeef0",originBgDark:"#070708",originLight:"#242629",originLightAlternative:"#242629",originLightAccessible:!0,originLightHovered:"#393c40",originLightPressed:"#4f5358",originDark:"#242629",originDarkAlternative:"#5a5f65",originDarkAccessible:!1,originDarkHovered:"#393c40",originDarkPressed:"#4f5358",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},informational:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},warning:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},successful:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"},critical:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"}},OK={yellow:{origin:"#FFD800",originBgLight:"#ffedbc",originBgDark:"#0a0700",originLight:"#FFD800",originLightAlternative:"#8c7600",originLightAccessible:!1,originLightHovered:"#dfbc00",originLightPressed:"#bfa200",originDark:"#FFD800",originDarkAlternative:"#FFD800",originDarkAccessible:!0,originDarkHovered:"#dfbc00",originDarkPressed:"#bfa200",onOriginLight:"#0a0700",onOriginLightHovered:"#261f00",onOriginLightPressed:"#3f3400",onOriginLightAccessible:!0,onOriginLightAlternative:"#0a0700",onOriginDark:"#0a0700",onOriginDarkHovered:"#261f00",onOriginDarkPressed:"#3f3400",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#0a0700"},orange:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},red:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},pink:{origin:"#E93E8F",originBgLight:"#fce9ef",originBgDark:"#160209",originLight:"#E93E8F",originLightAlternative:"#E93E8F",originLightAccessible:!0,originLightHovered:"#be3174",originLightPressed:"#95245a",originDark:"#E93E8F",originDarkAlternative:"#E93E8F",originDarkAccessible:!0,originDarkHovered:"#ef75a6",originDarkPressed:"#f3a0be",onOriginLight:"#260413",onOriginLightHovered:"#490e29",onOriginLightPressed:"#6e1941",onOriginLightAccessible:!0,onOriginLightAlternative:"#260413",onOriginDark:"#260413",onOriginDarkHovered:"#490e29",onOriginDarkPressed:"#6e1941",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#260413"},violet:{origin:"#814997",originBgLight:"#f3ebf7",originBgDark:"#0d0412",originLight:"#814997",originLightAlternative:"#814997",originLightAccessible:!0,originLightHovered:"#623673",originLightPressed:"#452452",originDark:"#814997",originDarkAlternative:"#814997",originDarkAccessible:!0,originDarkHovered:"#a15dbc",originDarkPressed:"#b67cce",onOriginLight:"#fbf8fc",onOriginLightHovered:"#e9d7ee",onOriginLightPressed:"#d7b5e1",onOriginLightAccessible:!0,onOriginLightAlternative:"#fbf8fc",onOriginDark:"#fbf8fc",onOriginDarkHovered:"#e9d7ee",onOriginDarkPressed:"#d7b5e1",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#fbf8fc"},blue:{origin:"#1455C0",originBgLight:"#eaedfe",originBgDark:"#00061b",originLight:"#1455C0",originLightAlternative:"#1455C0",originLightAccessible:!0,originLightHovered:"#0c3f92",originLightPressed:"#062a67",originDark:"#1455C0",originDarkAlternative:"#1558c6",originDarkAccessible:!1,originDarkHovered:"#1c6cf0",originDarkPressed:"#5c87fa",onOriginLight:"#f8f9ff",onOriginLightHovered:"#d5dbff",onOriginLightPressed:"#b0beff",onOriginLightAccessible:!0,onOriginLightAlternative:"#f8f9ff",onOriginDark:"#f8f9ff",onOriginDarkHovered:"#d5dbff",onOriginDarkPressed:"#b0beff",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f8f9ff"},cyan:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},turquoise:{origin:"#00A099",originBgLight:"#9bfff8",originBgDark:"#000908",originLight:"#00A099",originLightAlternative:"#00857f",originLightAccessible:!1,originLightHovered:"#00847e",originLightPressed:"#006864",originDark:"#00A099",originDarkAlternative:"#00A099",originDarkAccessible:!0,originDarkHovered:"#00bdb5",originDarkPressed:"#00dcd2",onOriginLight:"#000908",onOriginLightHovered:"#002422",onOriginLightPressed:"#003c38",onOriginLightAccessible:!0,onOriginLightAlternative:"#000908",onOriginDark:"#000908",onOriginDarkHovered:"#002422",onOriginDarkPressed:"#003c38",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#000908"},green:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"}},HA={branding:CK,spacing:TK,sizing:AK,typography:kK,border:_K,elevation:$K,transition:LK,font:PK,colors:FK,additionalColors:OK},S3=HA,ir=L5()(P5(F5(e=>({darkMode:!1,editorMarkup:"",theme:S3,speakingNames:_E,luminanceSteps:Mv,developerMode:!1,resetDefaults:()=>{e(()=>({theme:S3,luminanceSteps:Mv,speakingNames:_E}))},setColors:t=>{e(({theme:r})=>({theme:{...r,colors:t}}))},setAdditionalColors:t=>{e(({theme:r})=>({theme:{...r,additionalColors:t}}))},setCustomColors:t=>{e(({theme:r})=>({theme:{...r,customColors:t}}))}}),{name:DK}))),Ui=L5()(P5(F5(()=>({nodeTrees:{page:{name:"Page",serializedJson:"",isPage:!0}},currentId:"page",showBorders:!1,showSpacings:!1}),{name:EK}))),vn=()=>{var e,t;if(typeof window<"u"){if(!((e=window.crypto)===null||e===void 0)&&e.randomUUID)return window.crypto.randomUUID();if(!((t=window.crypto)===null||t===void 0)&&t.getRandomValues)return window.crypto.getRandomValues(new Uint32Array(3)).join("-")}return Math.random().toString().substring(2)},O5=(e,t)=>{const r=e.children;Object.values(r).forEach(n=>{n.setAttribute(t.key,t.value),n.children.length>0&&O5(n,t)})},fr=(...e)=>{let t="";return e.forEach((r,n)=>{if(r)if(typeof r=="string")t+=`${r} `;else for(let i in r)r[i]&&(t+=`${i} `)}),t.trim()},IK=["suppressHydrationWarning","suppressContentEditableWarning","translate","title","tabIndex","style","spellCheck","nonce","lang","hidden","draggable","dir","contextMenu","contentEditable","autoFocus","accessKey","is","inputMode","unselectable","security","results","vocab","typeof","rev","resource","rel","property","inlist","datatype","content","about","role","radioGroup","color"],pr=(e,t)=>Object.keys(e).filter(r=>(r.startsWith("data-")||r.startsWith("aria-")||r.startsWith("default")||r.startsWith("auto")||r.startsWith("item")||r.startsWith("on")||IK.includes(r))&&!t.includes(r)).reduce((r,n)=>(r[n]=e[n],r),{}),MK=e=>{var t;const{top:r,bottom:n,left:i,right:s,height:o,width:a}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:u}=window;let c=r<0,h=n>l,d=i<0,f=s>u;const p=e.hasAttribute("data-outside-vy"),m=e.hasAttribute("data-outside-vx"),y=(t=e==null?void 0:e.parentElement)===null||t===void 0?void 0:t.getBoundingClientRect();return y&&(p&&(e.getAttribute("data-outside-vy")==="top"?c=y.top-(n-y.bottom)<0:h=y.bottom+(y.top-r)>l),m&&(e.getAttribute("data-outside-vx")==="left"?d=y.left-(s-y.right)<0:f=y.right+(y.left-i)>u)),{outTop:c,outBottom:h,outLeft:d,outRight:f}},UA=e=>{const{outTop:t,outBottom:r,outLeft:n,outRight:i}=MK(e);let s={};return t||r?(s={vy:t?"top":"bottom"},e.setAttribute("data-outside-vy",s.vy)):e.removeAttribute("data-outside-vy"),n||i?(s=Object.assign(Object.assign({},s),{vx:i?"right":"left"}),e.setAttribute("data-outside-vx",s.vx)):e.removeAttribute("data-outside-vx"),s},NK=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),RK=["Mac","iPhone","iPad","iPod"],Pl=()=>typeof window<"u"&&RK.some(e=>window.navigator.userAgent.includes(e)),Sa=(e,t)=>new Promise(()=>setTimeout(e,t));function BK(e,t){const r=t||z.useRef(t);function n(i){e.onClick&&e.onClick(i)}return z.createElement("button",Object.assign({ref:r},pr(e,[]),{id:e.id,className:fr("db-button",e.className),type:e.type||"button",disabled:e.disabled,"aria-label":e.label,"data-icon":e.icon,"data-size":e.size,"data-state":e.state,"data-width":e.width,"data-variant":e.variant,"data-no-text":e.noText,name:e.name,value:e.value,"aria-describedby":e.describedbyid,"aria-expanded":e.ariaexpanded,"aria-pressed":e.ariapressed,onClick:i=>n(i)}),e.children)}const Dt=z.forwardRef(BK),wc="OVERWRITE_DEFAULT_ID",hb="LABEL SHOULD BE SET",I5=" ",Fl="-message",Ol="-valid-message",Il="-invalid-message",D3="-placeholder",E3="-datalist",Ml="TODO: Add a validMessage",Nl="TODO: Add an invalidMessage",jK="Back",zK="BurgerMenu",HK="db",UK="4",M5="Close Button";var $E;(function(e){e.FUNCTIONAL="functional",e.REGULAR="regular",e.EXPRESSIVE="expressive"})($E||($E={}));Object.entries($E).map(([,e])=>e);var LE;(function(e){e.PRIMARY="primary"})(LE||(LE={}));var PE;(function(e){e.NEUTRAL_BG_LEVEL_1="neutral-bg-basic-level-1",e.NEUTRAL_BG_LEVEL_2="neutral-bg-basic-level-2",e.NEUTRAL_BG_LEVEL_3="neutral-bg-basic-level-3",e.NEUTRAL_BG_TRANSPARENT_SEMI="neutral-bg-basic-transparent-semi",e.NEUTRAL_BG_TRANSPARENT_FULL="neutral-bg-basic-transparent-full",e.BRAND_BG_LEVEL_1="brand-bg-basic-level-1",e.BRAND_BG_LEVEL_2="brand-bg-basic-level-2",e.BRAND_BG_LEVEL_3="brand-bg-basic-level-3",e.BRAND_BG_TRANSPARENT_SEMI="brand-bg-basic-transparent-semi",e.BRAND_BG_TRANSPARENT_FULL="brand-bg-basic-transparent-full",e.SUCCESSFUL_BG_LEVEL_1="successful-bg-basic-level-1",e.SUCCESSFUL_BG_LEVEL_2="successful-bg-basic-level-2",e.SUCCESSFUL_BG_LEVEL_3="successful-bg-basic-level-3",e.SUCCESSFUL_BG_TRANSPARENT_SEMI="successful-bg-basic-transparent-semi",e.SUCCESSFUL_BG_TRANSPARENT_FULL="successful-bg-basic-transparent-full",e.CRITICAL_BG_LEVEL_1="critical-bg-basic-level-1",e.CRITICAL_BG_LEVEL_2="critical-bg-basic-level-2",e.CRITICAL_BG_LEVEL_3="critical-bg-basic-level-3",e.CRITICAL_BG_TRANSPARENT_SEMI="critical-bg-basic-transparent-semi",e.CRITICAL_BG_TRANSPARENT_Full="critical-bg-basic-transparent-full",e.WARNING_BG_LEVEL_1="warning-bg-basic-level-1",e.WARNING_BG_LEVEL_2="warning-bg-basic-level-2",e.WARNING_BG_LEVEL_3="warning-bg-basic-level-3",e.WARNING_BG_TRANSPARENT_SEMI="warning-bg-basic-transparent-semi",e.WARNING_BG_TRANSPARENT_FULL="warning-bg-basic-transparent-full",e.INFORMATIONAL_BG_LEVEL_1="informational-bg-basic-level-1",e.INFORMATIONAL_BG_LEVEL_2="informational-bg-basic-level-2",e.INFORMATIONAL_BG_LEVEL_3="informational-bg-basic-level-3",e.INFORMATIONAL_BG_TRANSPARENT_SEMI="informational-bg-basic-transparent-semi",e.INFORMATIONAL_BG_TRANSPARENT_FULL="informational-bg-basic-transparent-full"})(PE||(PE={}));const WK=Object.entries(PE).map(([,e])=>e);Object.entries(LE).map(([,e])=>e);var FE;(function(e){e.CRITICAL="critical",e.INFORMATIONAL="informational",e.WARNING="warning",e.SUCCESSFUL="successful"})(FE||(FE={}));Object.entries(FE).map(([,e])=>e);const VK={width:390,height:884},GK={width:1920,height:1280};Object.assign({name:"desktop"},GK),Object.assign({name:"mobile"},VK);function qK(e,t){var r;const n=t||z.useRef(t);function i(s){e.onClose&&e.onClose()}return z.createElement("article",Object.assign({ref:n},pr(e,[]),{id:e.id,className:fr("db-notification",e.className),"aria-live":e.ariaLive,"data-semantic":e.semantic,"data-variant":e.variant,"data-icon":e.icon,"data-link-variant":e.linkVariant}),z.createElement(z.Fragment,null,e.image),e.headline?z.createElement("header",null,e.headline):null,z.createElement("p",null,e.children),e.timestamp?z.createElement("span",null,e.timestamp):null,z.createElement(z.Fragment,null,e.link),e.behaviour!=="permanent"?z.createElement(Dt,{icon:"cross",variant:"ghost",size:"small",id:e.closeButtonId,noText:!0,onClick:s=>i()},(r=e.closeButtonText)!==null&&r!==void 0?r:M5):null)}const Nv=z.forwardRef(qK);function KK(e,t){var r,n;const i=t||z.useRef(t),[s,o]=z.useState(()=>!1);return z.useEffect(()=>{o(!0)},[]),z.useEffect(()=>{var a;if(i.current&&s&&!((a=e.placement)===null||a===void 0)&&a.startsWith("corner")){let l=i.current.parentElement;l&&l.localName.includes("badge")&&(l=l.parentElement),l&&l.setAttribute("data-has-badge","true")}},[i.current,s]),z.createElement("span",Object.assign({ref:i},pr(e,[]),{id:e.id,className:fr("db-badge",e.className),"data-semantic":e.semantic,"data-size":e.size,"data-emphasis":e.emphasis,"data-placement":e.placement,"data-label":((r=e.placement)===null||r===void 0?void 0:r.startsWith("corner"))&&((n=e.label)!==null&&n!==void 0?n:hb)}),e.children)}const OE=z.forwardRef(KK);function JK(e,t){var r;const n=t||z.useRef(t);return z.createElement("div",Object.assign({ref:n},pr(e,[]),{"data-icon":e.hideLogo?"none":(r=e.icon)!==null&&r!==void 0?r:HK,id:e.id,className:fr("db-brand",e.className)}),e.children)}const XK=z.forwardRef(JK);function YK(e,t){const r=t||z.useRef(t);function n(i){e.onClick&&e.onClick(i)}return z.createElement("div",Object.assign({ref:r},pr(e,[]),{id:e.id,"data-behaviour":e.behaviour,"data-elevation-level":e.elevationLevel,"data-spacing":e.spacing,role:e.behaviour==="interactive"?"button":void 0,tabIndex:e.behaviour==="interactive"?0:void 0,onClick:i=>n(i),className:fr("db-card",e.className)}),e.children)}const Bi=z.forwardRef(YK);function QK(e,t){const r=t||z.useRef(t);return z.createElement("span",Object.assign({ref:r},pr(e,[]),{id:e.id,className:fr("db-infotext",e.className),"data-icon":e.icon,"data-semantic":e.semantic,"data-size":e.size}),e.children)}const dr=z.forwardRef(QK);function ZK(e,t){var r,n,i,s;const o=t||z.useRef(t),[a,l]=z.useState(()=>!1),[u,c]=z.useState(()=>"checkbox-"+vn()),[h,d]=z.useState(()=>u+Fl),[f,p]=z.useState(()=>u+Ol),[m,y]=z.useState(()=>u+Il),[b,v]=z.useState(()=>""),[E,D]=z.useState(()=>"");function C(k){var O,P,I,F,L,_;e.onChange&&e.onChange(k),e.change&&e.change(k),!(!((O=o.current)===null||O===void 0)&&O.validity.valid)||e.customValidity==="invalid"?(v(m),Pl()&&(D((F=(P=e.invalidMessage)!==null&&P!==void 0?P:(I=o.current)===null||I===void 0?void 0:I.validationMessage)!==null&&F!==void 0?F:Nl),Sa(()=>D(""),1e3))):e.customValidity==="valid"||!((L=o.current)===null||L===void 0)&&L.validity.valid&&e.required?(v(f),Pl()&&(D((_=e.validMessage)!==null&&_!==void 0?_:Ml),Sa(()=>D(""),1e3))):e.message?v(h):v("")}function w(k){e.onBlur&&e.onBlur(k),e.blur&&e.blur(k)}function T(k){e.onFocus&&e.onFocus(k),e.focus&&e.focus(k)}return z.useEffect(()=>{l(!0),c(e.id||u)},[]),z.useEffect(()=>{if(u){const k=u+Fl,O=u+Ol,P=u+Il;d(k),p(O),y(P),e.message&&v(k)}},[u]),z.useEffect(()=>{if(a&&document&&u){const k=document==null?void 0:document.getElementById(u);k&&(e.checked!=null&&(k.checked=e.checked),e.indeterminate!==void 0&&(k.indeterminate=e.indeterminate),l(!1))}},[a,e.indeterminate,e.checked]),z.createElement("div",{"data-size":e.size,"data-variant":e.variant,className:fr("db-checkbox",e.className)},z.createElement("label",{htmlFor:u},z.createElement("input",Object.assign({type:"checkbox","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:o},pr(e,[]),{id:u,name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,required:e.required,onChange:k=>C(k),onBlur:k=>w(k),onFocus:k=>T(k),"aria-describedby":b})),e.label?z.createElement("span",null,e.label):null,e.children),e.message?z.createElement(dr,{size:"small",icon:e.messageIcon,id:h},e.message):null,z.createElement(dr,{size:"small",semantic:"successful",id:f},(r=e.validMessage)!==null&&r!==void 0?r:Ml),z.createElement(dr,{size:"small",semantic:"critical",id:m},(s=(n=e.invalidMessage)!==null&&n!==void 0?n:(i=o.current)===null||i===void 0?void 0:i.validationMessage)!==null&&s!==void 0?s:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},E))}const IE=z.forwardRef(ZK);function eJ(e,t){const r=t||z.useRef(t);return z.createElement("div",Object.assign({ref:r},pr(e,[]),{id:e.id,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,"data-width":e.width,className:fr("db-divider",e.className)}))}const uo=z.forwardRef(eJ);function tJ(e,t){var r;const n=t||z.useRef(t),i=z.useRef(null);function s(a){a.key==="Escape"&&a.preventDefault(),(a==="close"||a.key==="Escape"||a.target.nodeName==="DIALOG"&&a.type==="click"&&e.backdrop!=="none")&&e.onClose&&e.onClose(a)}function o(){n!=null&&n.current&&(e.open&&!n.current.open&&(i.current&&(i.current.hidden=!1),e.backdrop==="none"?n.current.show():n.current.showModal()),!e.open&&n.current.open&&(i.current&&(i.current.hidden=!0),Sa(()=>{var a;i.current&&(i.current.hidden=!1),(a=n.current)===null||a===void 0||a.close()},401)))}return z.useEffect(()=>{o()},[]),z.useEffect(()=>{o()},[e.open]),z.createElement("dialog",Object.assign({className:"db-drawer",id:e.id,ref:n},pr(e,["onClose"]),{onClick:a=>{s(a)},onKeyDown:a=>s(a),"data-backdrop":e.backdrop}),z.createElement("article",{ref:i,className:fr("db-drawer-container",e.className),"data-spacing":e.spacing,"data-width":e.width,"data-direction":e.direction,"data-rounded":e.rounded},z.createElement("header",{className:"db-drawer-header"},z.createElement("div",{className:"db-drawer-header-text"},z.createElement(z.Fragment,null,e.drawerHeader)),z.createElement(Dt,{icon:"cross",variant:"ghost",className:"button-close-drawer",id:e.closeButtonId,noText:!0,onClick:a=>s("close")},(r=e.closeButtonText)!==null&&r!==void 0?r:M5)),z.createElement("div",{className:"db-drawer-content"},e.children)))}const Pd=z.forwardRef(tJ),rJ=e=>{var t,r;const{target:n}=e;return!!(!(!((t=n==null?void 0:n.classList)===null||t===void 0)&&t.contains("db-navigation-item-expand-button"))&&(!((r=n==null?void 0:n.parentElement)===null||r===void 0)&&r.classList.contains("db-navigation-item")))};class nJ{constructor(t,r){this.initialized=!1,this.mouseX=0,this.mouseY=0,this.element=t,this.subNavigation=r,this.parentSubNavigation=this.element.closest(".db-sub-navigation"),this.parentSubNavigation&&!this.element.closest(".db-drawer")&&this.init()}init(){var t,r;const n=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.element.style.setProperty("--db-navigation-item-inline-size",`${n}px`),this.initialized=!0}enableFollow(){var t,r;if(!this.initialized||this.triangleData)return;const n=UA(this.subNavigation),i=this.element.getBoundingClientRect(),s=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.triangleData={itemRect:i,parentElementWidth:s,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(s-i.width)/2,outsideVX:n.vx,outsideVY:n.vy}}disableFollow(){this.triangleData=void 0}getTriangleTipX(){return this.triangleData?this.triangleData.outsideVX==="right"?this.triangleData.itemRect.width-this.mouseX:Math.min(this.mouseX,this.triangleData.itemRect.width*.75):0}getTriangleTipY(){if(!this.triangleData)return 0;const t=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;return this.triangleData.outsideVY==="bottom"?t+(this.triangleData.subNavigationHeight-this.triangleData.padding*2-this.triangleData.itemRect.height):t}hasMouseEnteredSubNavigation(){if(!this.triangleData)return!1;const t=this.triangleData.outsideVX==="right";return!!(t&&this.mouseX<-1*this.triangleData.padding||!t&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding)}getTriangleCoordinates(t){if(!this.triangleData)return;if(t==="fill-gap"){const o=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`,a=`${this.triangleData.parentElementWidth-this.triangleData.padding}px`;return{lb:`${a} ${o}`,lt:`${a} 0`,rt:"100% 0",rb:`100% ${o}`}}const r=this.getTriangleTipX(),n=this.getTriangleTipY(),i=`${r}px ${n+this.triangleData.padding}px`,s=`${r}px ${n-this.triangleData.padding}px`;return{lb:i,lt:s,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(t){if(!this.initialized||!this.triangleData)return;this.mouseX=t.clientX-this.triangleData.itemRect.left,this.mouseY=t.clientY-this.triangleData.itemRect.top;const r=this.hasMouseEnteredSubNavigation(),n=this.getTriangleCoordinates(r?"fill-gap":"safe-triangle");n&&(this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${n.lb}, ${n.lt}, ${n.rt}, ${n.rb})`),r&&(this.triangleData=void 0))}}function iJ(e,t){var r;const n=t||z.useRef(t),[i,s]=z.useState(()=>wc),[o,a]=z.useState(()=>!1),[l,u]=z.useState(()=>!1);function c(){e.onToggle&&e.onToggle(!e.drawerOpen)}function h(d){rJ(d)&&c()}return z.useEffect(()=>{a(!0),s(e.id||"header-"+vn())},[]),z.useEffect(()=>{if(o&&document&&i&&e.forceMobile){const d=document.getElementById(i);d&&O5(d,{key:"data-force-mobile",value:"true"}),u(!0)}},[o]),z.createElement("header",Object.assign({ref:n},pr(e,[]),{className:fr("db-header",e.className),id:i,"data-width":e.width,"data-on-forcing-mobile":e.forceMobile&&!l}),z.createElement(Pd,{spacing:"small",className:"db-header-drawer",rounded:!0,open:e.drawerOpen,onClose:()=>c()},z.createElement("div",{className:"db-header-drawer-navigation"},z.createElement("div",{className:"db-header-navigation",onClick:d=>h(d)},e.children),z.createElement("div",{className:"db-header-meta-navigation"},z.createElement(z.Fragment,null,e.metaNavigation))),z.createElement("div",{className:"db-header-secondary-action"},z.createElement(z.Fragment,null,e.secondaryAction))),z.createElement("div",{className:"db-header-meta-navigation"},z.createElement(z.Fragment,null,e.metaNavigation)),z.createElement("div",{className:"db-header-navigation-bar"},z.createElement("div",{className:"db-header-brand-container"},z.createElement(z.Fragment,null,e.brand)),z.createElement("div",{className:"db-header-navigation-container"},z.createElement("div",{className:"db-header-navigation"},e.children),z.createElement("div",{className:"db-header-primary-action"},z.createElement(z.Fragment,null,e.primaryAction))),z.createElement("div",{className:"db-header-action-container"},z.createElement("div",{className:"db-header-burger-menu-container"},z.createElement(Dt,{icon:"menu",variant:"ghost",id:i+"-burger-menu",noText:!0,onClick:()=>c()},(r=e.burgerMenuLabel)!==null&&r!==void 0?r:zK)),z.createElement("div",{className:"db-header-secondary-action"},z.createElement(z.Fragment,null,e.secondaryAction)))))}const N5=z.forwardRef(iJ);function sJ(e,t){const r=t||z.useRef(t);return z.createElement("span",Object.assign({"aria-hidden":"true",ref:r},pr(e,[]),{id:e.id,className:fr("db-icon",e.className),"data-icon":e.icon,"data-icon-weight":e.weight,"data-icon-variant":e.variant}),e.children)}const Fd=z.forwardRef(sJ);function oJ(e,t){var r,n,i,s,o,a,l;const u=t||z.useRef(t),[c,h]=z.useState(()=>"input-"+vn()),[d,f]=z.useState(()=>c+Fl),[p,m]=z.useState(()=>c+Ol),[y,b]=z.useState(()=>c+Il),[v,E]=z.useState(()=>c+E3),[D,C]=z.useState(()=>""),[w,T]=z.useState(()=>""),[k,O]=z.useState(()=>"");function P(A){e.onInput&&e.onInput(A),e.input&&e.input(A)}function I(A){var M,R,B,U,V,K;e.onChange&&e.onChange(A),e.change&&e.change(A),!(!((M=u.current)===null||M===void 0)&&M.validity.valid)||e.customValidity==="invalid"?(C(y),Pl()&&(O((U=(R=e.invalidMessage)!==null&&R!==void 0?R:(B=u.current)===null||B===void 0?void 0:B.validationMessage)!==null&&U!==void 0?U:Nl),Sa(()=>O(""),1e3))):e.customValidity==="valid"||!((V=u.current)===null||V===void 0)&&V.validity.valid&&(e.required||e.minLength||e.maxLength||e.pattern)?(C(p),Pl()&&(O((K=e.validMessage)!==null&&K!==void 0?K:Ml),Sa(()=>O(""),1e3))):e.message?C(d):C("")}function F(A){e.onBlur&&e.onBlur(A),e.blur&&e.blur(A)}function L(A){e.onFocus&&e.onFocus(A),e.focus&&e.focus(A)}function _(A){return Array.from((NK(A)?A.map(M=>({value:M,label:void 0})):A)||[])}return z.useEffect(()=>{var A;h((A=e.id)!==null&&A!==void 0?A:c)},[]),z.useEffect(()=>{var A;if(c){const M=c+Fl,R=c+Ol,B=c+Il;f(M),m(R),b(B),E((A=e.dataListId)!==null&&A!==void 0?A:c+E3),e.message&&C(M)}},[c]),z.useEffect(()=>{T(e.value)},[e.value]),z.createElement("div",{className:fr("db-input",e.className),"data-variant":e.variant,"data-icon":e.icon,"data-icon-after":e.iconAfter},z.createElement("label",{htmlFor:c},(r=e.label)!==null&&r!==void 0?r:hb),z.createElement("input",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:u},pr(e,[]),{id:c,name:e.name,type:e.type||"text",placeholder:(n=e.placeholder)!==null&&n!==void 0?n:I5,disabled:e.disabled,required:e.required,step:e.step,value:e.value,maxLength:e.maxLength,minLength:e.minLength,max:e.max,min:e.min,readOnly:e.readOnly,form:e.form,pattern:e.pattern,autoComplete:e.autocomplete,onInput:A=>P(A),onChange:A=>I(A),onBlur:A=>F(A),onFocus:A=>L(A),list:e.dataList&&v,"aria-describedby":D})),e.dataList?z.createElement("datalist",{id:v},(i=_(e.dataList))===null||i===void 0?void 0:i.map(A=>z.createElement("option",{key:v+"-option-"+A.value,value:A.value},A.label))):null,e.children,e.message?z.createElement(dr,{size:"small",icon:e.messageIcon,id:d},e.message):null,z.createElement(dr,{size:"small",semantic:"successful",id:p},(s=e.validMessage)!==null&&s!==void 0?s:Ml),z.createElement(dr,{size:"small",semantic:"critical",id:y},(l=(o=e.invalidMessage)!==null&&o!==void 0?o:(a=u.current)===null||a===void 0?void 0:a.validationMessage)!==null&&l!==void 0?l:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},k))}const Kr=z.forwardRef(oJ);function aJ(e,t){const r=t||z.useRef(t);z.useState(()=>wc);function n(i){e.onClick&&e.onClick(i)}return z.createElement("a",Object.assign({ref:r},pr(e,[]),{id:e.id,className:fr("db-link",e.className),href:e.href,target:e.target,rel:e.rel,role:e.role,hrefLang:e.hreflang,"aria-disabled":e.disabled,tabIndex:e.disabled?-1:0,"aria-selected":e.selected,"aria-label":e.label,"aria-current":e.current,"data-size":e.size,"data-variant":e.variant,"data-content":e.content||"internal",onClick:i=>n(i)}),e.text?z.createElement("span",null,e.text):null,e.children)}const Oh=z.forwardRef(aJ);function lJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),s=z.useRef(!1);return s.current||(typeof window<"u"&&document&&(e.documentOverflow==="hidden"||e.variant==="fixed"&&e.documentOverflow!=="auto")&&document.documentElement.classList.add("db-page-document"),s.current=!0),z.useEffect(()=>{i(!e.fadeIn),document&&e.fadeIn?document.fonts.ready.then(()=>{i(!0)}):i(!0)},[]),z.useEffect(()=>()=>{typeof window<"u"&&document.documentElement.classList.contains("db-page-document")&&document.documentElement.classList.remove("db-page-document")},[]),z.createElement("div",Object.assign({ref:r},pr(e,[]),{id:e.id,className:fr("db-page",e.className),"data-variant":e.variant,"data-fade-in":e.fadeIn,"data-fonts-loaded":n}),z.createElement(z.Fragment,null,e.header),z.createElement("main",{className:"db-main"},e.children),z.createElement(z.Fragment,null,e.footer))}const R5=z.forwardRef(lJ);function uJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),[s,o]=z.useState(()=>"radio-"+vn());function a(c){e.onChange&&e.onChange(c),e.change&&e.change(c)}function l(c){e.onBlur&&e.onBlur(c),e.blur&&e.blur(c)}function u(c){e.onFocus&&e.onFocus(c),e.focus&&e.focus(c)}return z.useEffect(()=>{var c;i(!0),o((c=e.id)!==null&&c!==void 0?c:s)},[]),z.useEffect(()=>{if(e.checked&&n&&document&&s){const c=document==null?void 0:document.getElementById(s);c&&e.checked!=null&&(c.checked=!0)}},[n,e.checked]),z.createElement("label",{"data-size":e.size,"data-variant":e.variant,className:fr("db-radio",e.className),htmlFor:s},z.createElement("input",Object.assign({type:"radio","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:r},pr(e,[]),{id:s,name:e.name,checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,value:e.value,required:e.required,onChange:c=>a(c),onBlur:c=>l(c),onFocus:c=>u(c)})),e.label?z.createElement("span",null,e.label):null,e.children)}const ME=z.forwardRef(uJ);function cJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>wc);return z.useEffect(()=>{i(e.id||"section-"+vn())},[]),z.createElement("section",Object.assign({ref:r},pr(e,[]),{id:n,"data-spacing":e.spacing||"medium",className:fr("db-section",e.className)}),z.createElement("div",{"data-width":e.width},e.children))}const Wg=z.forwardRef(cJ);function hJ(e,t){var r,n,i,s,o,a,l;const u=t||z.useRef(t),[c,h]=z.useState(()=>"select-"+vn()),[d,f]=z.useState(()=>c+Fl),[p,m]=z.useState(()=>c+Ol),[y,b]=z.useState(()=>c+Il),[v,E]=z.useState(()=>c+D3),[D,C]=z.useState(()=>""),[w,T]=z.useState(()=>""),[k,O]=z.useState(()=>!1),[P,I]=z.useState(()=>"");function F(B){e.onClick&&e.onClick(B)}function L(B){e.onInput&&e.onInput(B),e.input&&e.input(B)}function _(B){var U,V,K,J,G,Y;e.onChange&&e.onChange(B),e.change&&e.change(B),!(!((U=u.current)===null||U===void 0)&&U.validity.valid)||e.customValidity==="invalid"?(C(y),Pl()&&(I((J=(V=e.invalidMessage)!==null&&V!==void 0?V:(K=u.current)===null||K===void 0?void 0:K.validationMessage)!==null&&J!==void 0?J:Nl),Sa(()=>I(""),1e3))):e.customValidity==="valid"||!((G=u.current)===null||G===void 0)&&G.validity.valid&&e.required?(C(p),Pl()&&(I((Y=e.validMessage)!==null&&Y!==void 0?Y:Ml),Sa(()=>I(""),1e3))):e.message?C(d):C(v)}function A(B){e.onBlur&&e.onBlur(B),e.blur&&e.blur(B)}function M(B){e.onFocus&&e.onFocus(B),e.focus&&e.focus(B)}function R(B){var U;return(U=B.label)!==null&&U!==void 0?U:B.value.toString()}return z.useEffect(()=>{h(e.id||c),O(!0)},[]),z.useEffect(()=>{if(c&&k){const B=c+Fl,U=c+Ol,V=c+Il,K=c+D3;f(B),m(U),b(V),E(K),e.message?C(B):C(K),O(!1)}},[c,k]),z.useEffect(()=>{T(e.value)},[e.value]),z.createElement("div",{className:fr("db-select",e.className),"data-variant":e.variant,"data-icon":e.icon},z.createElement("label",{htmlFor:c},(r=e.label)!==null&&r!==void 0?r:hb),z.createElement("select",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:u},pr(e,[]),{required:e.required,disabled:e.disabled,id:c,name:e.name,value:e.value,autoComplete:e.autocomplete,onInput:B=>L(B),onClick:B=>F(B),onChange:B=>_(B),onBlur:B=>A(B),onFocus:B=>M(B),"aria-describedby":D}),z.createElement("option",{hidden:!0}),e.options?z.createElement(z.Fragment,{key:vn()},(n=e.options)===null||n===void 0?void 0:n.map(B=>{var U;return z.createElement(z.Fragment,{key:vn()},B.options?z.createElement("optgroup",{label:R(B)},(U=B.options)===null||U===void 0?void 0:U.map(V=>z.createElement("option",{key:V.value.toString(),value:V.value,disabled:V.disabled},R(V)))):null,B.options?null:z.createElement("option",{value:B.value,disabled:B.disabled},R(B)))})):null,e.children),z.createElement("span",{id:v},(i=e.placeholder)!==null&&i!==void 0?i:e.label),e.message?z.createElement(dr,{size:"small",icon:e.messageIcon,id:d},e.message):null,z.createElement(dr,{size:"small",semantic:"successful",id:p},(s=e.validMessage)!==null&&s!==void 0?s:Ml),z.createElement(dr,{size:"small",semantic:"critical",id:y},(l=(o=e.invalidMessage)!==null&&o!==void 0?o:(a=u.current)===null||a===void 0?void 0:a.validationMessage)!==null&&l!==void 0?l:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},P))}const Bu=z.forwardRef(hJ);function dJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>"switch-"+vn()),[s,o]=z.useState(()=>!1);z.useState(()=>!1);function a(c){var h;e.onChange&&e.onChange(c),e.change&&e.change(c),o((h=c.target)===null||h===void 0?void 0:h.checked)}function l(c){e.onBlur&&e.onBlur(c),e.blur&&e.blur(c)}function u(c){e.onFocus&&e.onFocus(c),e.focus&&e.focus(c)}return z.useEffect(()=>{i(e.id||n)},[]),z.createElement("label",{"data-visual-aid":e.visualAid,"data-size":e.size,"data-variant":e.variant,"data-emphasis":e.emphasis,htmlFor:n,className:fr("db-switch",e.className)},z.createElement("input",Object.assign({type:"checkbox",role:"switch",id:n,"aria-checked":s,ref:r},pr(e,[]),{checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,name:e.name,required:e.required,"data-aid-icon":e.icon,"data-aid-icon-after":e.iconAfter,onChange:c=>a(c),onBlur:c=>l(c),onFocus:c=>u(c)})),e.children)}const fJ=z.forwardRef(dJ);function pJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),[s,o]=z.useState(()=>!1);function a(l){var u;e.onChange&&e.onChange(l),e.change&&e.change(l),o((u=l.target)===null||u===void 0?void 0:u.checked)}return z.useEffect(()=>{i(!0)},[]),z.useEffect(()=>{e.active&&n&&r.current&&(r.current.click(),i(!1))},[r.current,n]),z.createElement("li",{role:"none",className:fr("db-tab-item",e.className)},z.createElement("label",{htmlFor:e.id,"data-icon":e.icon,"data-icon-after":e.iconAfter,"data-no-text":e.noText},z.createElement("input",Object.assign({type:"radio",role:"tab",disabled:e.disabled,"aria-selected":s,"aria-controls":e.controls,checked:e.checked,ref:r},pr(e,[]),{id:e.id,onChange:l=>a(l)})),e.label?z.createElement(z.Fragment,null,e.label):null,e.children))}const Rv=z.forwardRef(pJ);function gJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1);function s(){e.onRemove&&e.onRemove()}function o(){return e.removeButton?e.removeButton:"Remove tag"}const a=z.useRef(!1);return a.current||(i(!0),a.current=!0),z.useEffect(()=>{var l,u;if(n&&r.current&&e.disabled!==void 0){const c=(l=r.current)===null||l===void 0?void 0:l.querySelector("button:not(.db-tab-remove-button)"),h=(u=r.current)===null||u===void 0?void 0:u.querySelector("input");for(const d of[c,h])d&&(d.disabled=e.disabled)}},[n,e.disabled,r.current]),z.createElement("div",Object.assign({ref:r},pr(e,[]),{id:e.id,className:fr("db-tag",e.className),"data-disabled":e.disabled,"data-semantic":e.semantic,"data-emphasis":e.emphasis,"data-icon":e.icon,"data-no-text":e.noText,"data-overflow":e.overflow}),e.children,e.text?z.createElement(z.Fragment,null,e.text):null,e.behaviour==="removable"?z.createElement("button",{"data-icon":"cross","data-size":"small","data-no-text":"true","data-variant":"ghost",className:"db-button db-tab-remove-button",onClick:l=>s(),title:o()},o()):null)}const Bv=z.forwardRef(gJ);function mJ(e,t){var r,n,i,s,o,a,l;const u=t||z.useRef(t),[c,h]=z.useState(()=>"textarea-"+vn()),[d,f]=z.useState(()=>c+Fl),[p,m]=z.useState(()=>c+Ol),[y,b]=z.useState(()=>c+Il),[v,E]=z.useState(()=>""),[D,C]=z.useState(()=>""),[w,T]=z.useState(()=>"");function k(F){e.onInput&&e.onInput(F),e.input&&e.input(F)}function O(F){var L,_,A,M,R,B;e.onChange&&e.onChange(F),e.change&&e.change(F),!(!((L=u.current)===null||L===void 0)&&L.validity.valid)||e.customValidity==="invalid"?(E(y),Pl()&&(T((M=(_=e.invalidMessage)!==null&&_!==void 0?_:(A=u.current)===null||A===void 0?void 0:A.validationMessage)!==null&&M!==void 0?M:Nl),Sa(()=>T(""),1e3))):e.customValidity==="valid"||!((R=u.current)===null||R===void 0)&&R.validity.valid&&(e.required||e.minLength||e.maxLength)?(E(p),Pl()&&(T((B=e.validMessage)!==null&&B!==void 0?B:Ml),Sa(()=>T(""),1e3))):e.message?E(d):E("")}function P(F){e.onBlur&&e.onBlur(F),e.blur&&e.blur(F)}function I(F){e.onFocus&&e.onFocus(F),e.focus&&e.focus(F)}return z.useEffect(()=>{h(e.id||c)},[]),z.useEffect(()=>{if(c){const F=c+Fl,L=c+Ol,_=c+Il;f(F),m(L),b(_),e.message&&E(F)}},[c]),z.useEffect(()=>{C(e.value)},[e.value]),z.createElement("div",{className:fr("db-textarea",e.className),"data-variant":e.variant},z.createElement("label",{htmlFor:c},(r=e.label)!==null&&r!==void 0?r:hb),z.createElement("textarea",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:u},pr(e,[]),{id:c,"data-resize":e.resize,disabled:e.disabled,required:e.required,readOnly:e.readOnly,form:e.form,maxLength:e.maxLength,minLength:e.minLength,name:e.name,wrap:e.wrap,spellCheck:e.spellCheck,autoComplete:e.autocomplete,onInput:F=>k(F),onChange:F=>O(F),onBlur:F=>P(F),onFocus:F=>I(F),value:e.value,"aria-describedby":v,placeholder:(n=e.placeholder)!==null&&n!==void 0?n:I5,rows:(i=e.rows)!==null&&i!==void 0?i:UK,cols:e.cols})),e.message?z.createElement(dr,{size:"small",icon:e.messageIcon,id:d},e.message):null,z.createElement(dr,{size:"small",semantic:"successful",id:p},(s=e.validMessage)!==null&&s!==void 0?s:Ml),z.createElement(dr,{size:"small",semantic:"critical",id:y},(l=(o=e.invalidMessage)!==null&&o!==void 0?o:(a=u.current)===null||a===void 0?void 0:a.validationMessage)!==null&&l!==void 0?l:Nl),z.createElement("span",{"data-visually-hidden":"true",role:"status"},w))}const Dp=z.forwardRef(mJ);function yJ(e,t){var r;const n=t||z.useRef(t),[i,s]=z.useState(()=>!1),[o,a]=z.useState(()=>!1),[l,u]=z.useState(()=>!0),[c,h]=z.useState(()=>!1),[d,f]=z.useState(()=>"sub-navigation-"+vn()),[p,m]=z.useState(()=>{});function y(E){e.onClick&&e.onClick(E),o&&h(!0)}function b(E){E.stopPropagation(),h(!1)}function v(){var E;if(i&&document&&d){const D=document==null?void 0:document.getElementById(d);D&&(((E=D.children)===null||E===void 0?void 0:E.length)>0?(a(!0),p||m(new nJ(n.current,D))):u(!1))}}return z.useEffect(()=>{s(!0)},[]),z.useEffect(()=>{e.subNavigationExpanded!==void 0&&h(!!e.subNavigationExpanded)},[e.subNavigationExpanded]),z.useEffect(()=>{v()},[i]),z.createElement("li",Object.assign({ref:n},pr(e,[]),{id:e.id,onMouseOver:E=>p==null?void 0:p.enableFollow(),onMouseLeave:E=>p==null?void 0:p.disableFollow(),onMouseMove:E=>p==null?void 0:p.followByMouseEvent(E),className:fr("db-navigation-item",e.className),"data-width":e.width,"data-icon":e.icon,"data-active":e.active,"aria-disabled":e.disabled}),l?null:z.createElement(z.Fragment,null,e.children),l?z.createElement(z.Fragment,null,z.createElement("button",{className:"db-navigation-item-expand-button","aria-haspopup":o,"aria-expanded":c,disabled:e.disabled,onClick:E=>y(E)},e.children),z.createElement("menu",{className:"db-sub-navigation",id:d},o?z.createElement("div",{className:"db-mobile-navigation-back"},z.createElement(Dt,{icon:"arrow_left",variant:"ghost",id:e.backButtonId,onClick:E=>b(E)},(r=e.backButtonText)!==null&&r!==void 0?r:jK)):null,z.createElement(z.Fragment,null,e.subNavigation))):null)}const NE=z.forwardRef(yJ);function vJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>wc),[s,o]=z.useState(()=>!1);function a(l){l==null||l.preventDefault();const u=!s;e.onToggle&&e.onToggle(u),o(u)}return z.useEffect(()=>{i(e.id||"accordion-item-"+vn()),e.defaultOpen&&o(e.defaultOpen)},[]),z.createElement("details",Object.assign({ref:r},pr(e,[]),{id:n,className:fr("db-accordion-item",e.className),"aria-disabled":e.disabled,open:s,name:e.name}),z.createElement("summary",{onClick:l=>a(l)},e.headlinePlain?z.createElement(z.Fragment,null,e.headlinePlain):null,e.headlinePlain?null:z.createElement(z.Fragment,null,e.headline)),z.createElement("div",null,e.content?z.createElement(z.Fragment,null,e.content):null,e.content?null:z.createElement(z.Fragment,null,e.children)))}const B5=z.forwardRef(vJ);function bJ(e,t){var r;const n=t||z.useRef(t),[i,s]=z.useState(()=>[]),[o,a]=z.useState(()=>""),[l,u]=z.useState(()=>!1);function c(d){try{return typeof d=="string"?JSON.parse(d):d}catch(f){console.error(f)}return[]}function h(d){i.includes(d)?e.behaviour==="single"?s([]):s(i.filter(f=>f!==d)):e.behaviour==="single"?s([d]):s([...i,d]),e.onChange&&e.onChange(i)}return z.useEffect(()=>{u(!0)},[]),z.useEffect(()=>{if(n.current&&l){const d=n.current.getElementsByTagName("details");if(d){let f=[];Array.from(d).forEach((p,m)=>{var y;const b=p.id;(p.open||!((y=e.initOpenIndex)===null||y===void 0)&&y.includes(m))&&f.push(b);const v=p.getElementsByTagName("summary");(v==null?void 0:v.length)>0&&v[0].addEventListener("click",()=>{a(b)})}),e.behaviour==="single"&&f.length>1&&(f=[f[0]]),s(f),u(!1)}}},[n.current,l]),z.useEffect(()=>{(o==null?void 0:o.length)>0&&(h(o),a(""))},[o]),z.useEffect(()=>{if(n!=null&&n.current){const d=n.current.getElementsByTagName("details");d&&Array.from(d).forEach(f=>{f.open=i.includes(f.id)})}},[i]),z.createElement("div",Object.assign({ref:n},pr(e,[]),{id:e.id,className:fr("db-accordion",e.className),"data-variant":e.variant}),e.items?null:z.createElement(z.Fragment,null,e.children),e.items?z.createElement(z.Fragment,null,(r=c(e.items))===null||r===void 0?void 0:r.map((d,f)=>z.createElement(B5,{key:`accordion-item-${f}`,headlinePlain:d.headlinePlain,disabled:d.disabled,content:d.content}))):null)}const xJ=z.forwardRef(bJ);function wJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>wc);return z.useEffect(()=>{i(e.id||"navigation-"+vn())},[]),z.createElement("nav",Object.assign({ref:r},pr(e,[]),{id:n,"aria-labelledby":e.labelledBy,className:fr("db-navigation",e.className)}),z.createElement("menu",null,e.children))}const j5=z.forwardRef(wJ);function SJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>!1),[s,o]=z.useState(()=>!1);function a(){if(o(!0),!r.current)return;const c=r.current.querySelector("article");c&&UA(c)}function l(c){const h=c.target;(!h.parentNode||h.parentNode.querySelector(":focus")!==h&&h.parentNode.querySelector(":focus-within")!==h&&h.parentNode.querySelector(":hover")!==h)&&o(!1)}function u(){var c;if(r!=null&&r.current){const h=Array.from(r.current.children);if(h.length>=2){const d=h[0];return d.tagName.includes("-")?((c=d.children)===null||c===void 0?void 0:c.length)>0?d.children[0]:null:d}}return null}return z.useEffect(()=>{i(!0)},[]),z.useEffect(()=>{if(r.current&&n){const c=u();c&&(c.ariaHasPopup="true"),i(!1)}},[r.current,n]),z.useEffect(()=>{if(r.current){const c=u();c&&(c.ariaExpanded=(!!s).toString())}},[r.current,s]),z.createElement("div",Object.assign({ref:r},pr(e,[]),{id:e.id,className:fr("db-popover",e.className),onFocus:c=>a(),onBlur:c=>l(c),onMouseEnter:c=>a(),onMouseLeave:c=>l(c)}),z.createElement(z.Fragment,null,e.trigger),z.createElement("article",{className:"db-popover-content","data-spacing":e.spacing,"data-gap":e.gap,"data-animation":e.animation,"data-open":e.open,"data-delay":e.delay,"data-width":e.width,"data-placement":e.placement},e.children))}const DJ=z.forwardRef(SJ);function EJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>wc),[s,o]=z.useState(()=>!1);function a(u){u.stopPropagation()}function l(){r!=null&&r.current&&UA(r.current)}return z.useEffect(()=>{i(e.id||"tooltip-"+vn()),o(!0)},[]),z.useEffect(()=>{if(r.current&&s){let u=r.current.parentElement;u&&u.localName.includes("tooltip")&&(u=u.parentElement),u&&(["mouseenter","focus"].forEach(c=>{u.addEventListener(c,()=>l())}),u.setAttribute("data-has-tooltip","true"),u.setAttribute("aria-describedby",n)),o(!1)}},[r.current,s]),z.createElement("i",Object.assign({role:"tooltip","aria-hidden":"true","data-gap":"true",ref:r},pr(e,[]),{id:n,"data-emphasis":e.emphasis,"data-animation":e.animation,"data-delay":e.delay,"data-width":e.width,"data-variant":e.variant,"data-placement":e.placement,onClick:u=>a(u),className:fr("db-tooltip",e.className)}),e.children)}const vs=z.forwardRef(EJ);function CJ(e,t){const r=t||z.useRef(t),[n,i]=z.useState(()=>wc);return z.useEffect(()=>{i(e.id||"tab-list-"+vn())},[]),z.createElement("div",Object.assign({ref:r},pr(e,[]),{id:n,className:fr("db-tab-list",e.className)}),z.createElement("ul",{role:"tablist"},e.children))}const WA=z.forwardRef(CJ);function TJ(e,t){const r=t||z.useRef(t);return z.useEffect(()=>{},[]),z.createElement("section",Object.assign({role:"tabpanel",ref:r},pr(e,[]),{className:fr("db-tab-panel",e.className),id:e.id,"aria-labelledby":e.labelledBy}),e.content?z.createElement(z.Fragment,null,e.content):null,e.children)}const jv=z.forwardRef(TJ);function AJ(e,t){var r,n,i,s;const o=t||z.useRef(t),[a,l]=z.useState(()=>"tabs-"+vn()),[u,c]=z.useState(()=>""),[h,d]=z.useState(()=>!1),[f,p]=z.useState(()=>!1),[m,y]=z.useState(()=>!1),[b,v]=z.useState(()=>null);function E(k){try{return typeof k=="string"?JSON.parse(k):k}catch(O){console.error(O)}return[]}function D(k){const O=k.scrollWidth>k.clientWidth;p(O&&k.scrollLeft>1),y(O&&k.scrollLeft{D(O)}))}}}function T(k){if(o.current){const O=Array.from(o.current.getElementsByClassName("db-tab-item"));for(const I of O){const F=O.indexOf(I),L=I.querySelector("label"),_=I.querySelector("input");if(_&&L){if(!_.id){const A=`${u}-tab-${F}`;L.setAttribute("for",A),_.setAttribute("aria-controls",`${u}-tab-panel-${F}`),_.id=A,_.setAttribute("name",u)}if(k){const A=!e.initialSelectedMode||e.initialSelectedMode==="auto",M=e.initialSelectedIndex==null&&F===0||e.initialSelectedIndex===F;A&&M&&_.click()}}}const P=Array.from(o.current.querySelectorAll("& > .db-tab-panel"));for(const I of P){if(I.id)continue;const F=P.indexOf(I);I.id=`${u}-tab-panel-${F}`,I.setAttribute("aria-labelledby",`${u}-tab-${F}`)}}}return z.useEffect(()=>{l(e.id||a),c(e.name||vn()),d(!0)},[]),z.useEffect(()=>{if(o.current&&h){w(),T(!0);const k=o.current.querySelector(".db-tab-list");k&&new MutationObserver(P=>{P.forEach(I=>{(I.removedNodes.length||I.addedNodes.length)&&(w(),T())})}).observe(k,{childList:!0,subtree:!0}),d(!1)}},[o.current,h]),z.createElement("div",Object.assign({ref:o},pr(e,[]),{id:a,className:fr("db-tabs",e.className),"data-orientation":e.orientation,"data-scroll-behaviour":e.behaviour,"data-alignment":(r=e.alignment)!==null&&r!==void 0?r:"start","data-width":(n=e.width)!==null&&n!==void 0?n:"auto"}),f?z.createElement(Dt,{variant:"ghost",icon:"chevron_left",className:"tabs-scroll-left",noText:!0,onClick:k=>C(!0)},"Scroll left"):null,e.tabs?z.createElement(z.Fragment,null,z.createElement(WA,null,(i=E(e.tabs))===null||i===void 0?void 0:i.map((k,O)=>z.createElement(Rv,{key:e.name+"tab-item"+O,active:k.active,label:k.label,iconAfter:k.iconAfter,icon:k.icon,noText:k.noText}))),(s=E(e.tabs))===null||s===void 0?void 0:s.map((k,O)=>z.createElement(jv,{key:e.name+"tab-panel"+O,content:k.content},k.children))):null,m?z.createElement(Dt,{variant:"ghost",icon:"chevron_right",className:"tabs-scroll-right",noText:!0,onClick:k=>C()},"Scroll right"):null,e.children)}const z5=z.forwardRef(AJ),kJ=["ear","ear_disabled","person_with_blind_cane","person_with_rollator","person_with_wheelchair","support_dog","arrow_down","arrow_left","arrow_right","arrow_up","arrow_up_right","arrows_horizontal","arrows_vertical","chevron_down","chevron_left","chevron_right","chevron_up","circular_arrows","sort_down","sort_up","undo","fast_backward_10","fast_backward","fast_backward_30","fast_backward_empty","fast_forward_10","fast_forward","fast_forward_30","fast_forward_empty","microphone","pause","play","skip_backward","skip_forward","stop","subtitles","volume_disabled","volume_down","volume_silent","volume_up","house","market","train_station","cash","credit_card","discount","generic_card","gift","paragraph_mark","sepa","shopping_bag","shopping_basket","shopping_basket_disabled","shopping_cart","shopping_cart_disabled","ticket","tickets","voucher","chat","envelope","paper_plane","speech_bubble","speech_bubble_exclamation_mark","speech_bubble_question_mark","speech_bubbles","translation","alarm_clock","alarm_clock_plus","calendar","clock","camera","fax_machine","mobile_phone","mobile_phone_disabled","printer","telephone","bin","block","check","copy","cross","dots_drag_and_drop","minus","pen","pin","plus","save","cloud","globe","leaf","moon","snow_flake","sun","water_drop","cloud_download","cloud_upload","document","document_check","download","folder","folder_open","image","link_chain","notebook","paper_clip","upload","beverage","breakfast","cup","knife_and_fork","cigarette_disabled","clothes_hanger","hand_washing","person","persons","restricted_mobility_toilet","shower","shower_men","shower_women","stroller","toilet_men","toilet_women","toilets","toys","wc_sign","fullscreen","fullscreen_exit","grid","list","resize","resize_handle_corner","sliders_horizontal","zoom_in","zoom_out","db","s_bahn","subway","compass","location_arrow","location_arrow_north","location_crosshairs","location_pin","map","map_pin","navigation_straight","navigation_to_left","navigation_to_right","navigation_u_turn","parking","road_sign","station","mask","medical_cross","gear_wheel","log_in","log_out","magnifying_glass","menu","more_horizontal","more_vertical","bell","bell_disabled","check_circle","cross_circle","exclamation_mark_circle","exclamation_mark_triangle","information_circle","question_mark_circle","eye","eye_disabled","fingerprint","key","lock_closed","lock_open","shield_check","crown","face_delighted","face_disappointed","face_neutral","face_sad","face_smiling","heart","share","star","thumbs_down","thumbs_up","artificial_intelligence","augmented_reality","bug","database","light_bulb","power_socket","qr_code","qr_code_scan","speedometer","wifi","wifi_disabled","wrench","airplane","bike","bike_trailer","boat","bus","car","electric_car","electric_scooter","handcart","pedestrian","scooter","ship","taxi","train","train_and_car"],_J=()=>{const{notification:e}=ir(s=>s),[t,r]=z.useState(),[n,i]=z.useState(!1);return z.useEffect(()=>{e&&(r(e),setTimeout(()=>ir.setState({notification:void 0}),1500))},[e]),z.useEffect(()=>{(async()=>{setTimeout(()=>i(!0),2e3)})()},[]),j.jsx(Nv,{className:`notification${n?" opacity-100":" opacity-0"}${e?" show":""}`,semantic:"informational",variant:"overlay",children:t})};var H5=Function.prototype.toString,Ih=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,RE,Uy;if(typeof Ih=="function"&&typeof Object.defineProperty=="function")try{RE=Object.defineProperty({},"length",{get:function(){throw Uy}}),Uy={},Ih(function(){throw 42},null,RE)}catch(e){e!==Uy&&(Ih=null)}else Ih=null;var $J=/^\s*class\b/,BE=function(t){try{var r=H5.call(t);return $J.test(r)}catch{return!1}},Mx=function(t){try{return BE(t)?!1:(H5.call(t),!0)}catch{return!1}},Wy=Object.prototype.toString,LJ="[object Object]",PJ="[object Function]",FJ="[object GeneratorFunction]",OJ="[object HTMLAllCollection]",IJ="[object HTML document.all class]",MJ="[object HTMLCollection]",NJ=typeof Symbol=="function"&&!!Symbol.toStringTag,RJ=!(0 in[,]),jE=function(){return!1};if(typeof document=="object"){var BJ=document.all;Wy.call(BJ)===Wy.call(document.all)&&(jE=function(t){if((RJ||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=Wy.call(t);return(r===OJ||r===IJ||r===MJ||r===LJ)&&t("")==null}catch{}return!1})}var VA=Ih?function(t){if(jE(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Ih(t,null,RE)}catch(r){if(r!==Uy)return!1}return!BE(t)&&Mx(t)}:function(t){if(jE(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(NJ)return Mx(t);if(BE(t))return!1;var r=Wy.call(t);return r!==PJ&&r!==FJ&&!/^\[object HTML/.test(r)?!1:Mx(t)},jJ=VA,zJ=Object.prototype.toString,U5=Object.prototype.hasOwnProperty,HJ=function(t,r,n){for(var i=0,s=t.length;i=3&&(i=n),zJ.call(t)==="[object Array]"?HJ(t,r,i):typeof t=="string"?UJ(t,r,i):WJ(t,r,i)},GA=VJ,W5=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],GJ={},Nx=W5,qJ=typeof globalThis>"u"?GJ:globalThis,Vg=function(){for(var t=[],r=0;r"u"||!bn?Wt:bn(Uint8Array),zu={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Wt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Wt:ArrayBuffer,"%ArrayIteratorPrototype%":rh&&bn?bn([][Symbol.iterator]()):Wt,"%AsyncFromSyncIteratorPrototype%":Wt,"%AsyncFunction%":mh,"%AsyncGenerator%":mh,"%AsyncGeneratorFunction%":mh,"%AsyncIteratorPrototype%":mh,"%Atomics%":typeof Atomics>"u"?Wt:Atomics,"%BigInt%":typeof BigInt>"u"?Wt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Wt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Wt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Wt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":hX,"%eval%":eval,"%EvalError%":dX,"%Float32Array%":typeof Float32Array>"u"?Wt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Wt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Wt:FinalizationRegistry,"%Function%":q5,"%GeneratorFunction%":mh,"%Int8Array%":typeof Int8Array>"u"?Wt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Wt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Wt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":rh&&bn?bn(bn([][Symbol.iterator]())):Wt,"%JSON%":typeof JSON=="object"?JSON:Wt,"%Map%":typeof Map>"u"?Wt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!rh||!bn?Wt:bn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Wt:Promise,"%Proxy%":typeof Proxy>"u"?Wt:Proxy,"%RangeError%":fX,"%ReferenceError%":pX,"%Reflect%":typeof Reflect>"u"?Wt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Wt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!rh||!bn?Wt:bn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Wt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":rh&&bn?bn(""[Symbol.iterator]()):Wt,"%Symbol%":rh?Symbol:Wt,"%SyntaxError%":ld,"%ThrowTypeError%":mX,"%TypedArray%":vX,"%TypeError%":Kh,"%Uint8Array%":typeof Uint8Array>"u"?Wt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Wt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Wt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Wt:Uint32Array,"%URIError%":gX,"%WeakMap%":typeof WeakMap>"u"?Wt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Wt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Wt:WeakSet};if(bn)try{null.error}catch(e){var bX=bn(bn(e));zu["%Error.prototype%"]=bX}var xX=function e(t){var r;if(t==="%AsyncFunction%")r=Bx("async function () {}");else if(t==="%GeneratorFunction%")r=Bx("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Bx("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&bn&&(r=bn(i.prototype))}return zu[t]=r,r},A3={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Gg=qA,zv=Sc,wX=Gg.call(Function.call,Array.prototype.concat),SX=Gg.call(Function.apply,Array.prototype.splice),k3=Gg.call(Function.call,String.prototype.replace),Hv=Gg.call(Function.call,String.prototype.slice),DX=Gg.call(Function.call,RegExp.prototype.exec),EX=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,CX=/\\(\\)?/g,TX=function(t){var r=Hv(t,0,1),n=Hv(t,-1);if(r==="%"&&n!=="%")throw new ld("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ld("invalid intrinsic syntax, expected opening `%`");var i=[];return k3(t,EX,function(s,o,a,l){i[i.length]=a?k3(l,CX,"$1"):o||s}),i},AX=function(t,r){var n=t,i;if(zv(A3,n)&&(i=A3[n],n="%"+i[0]+"%"),zv(zu,n)){var s=zu[n];if(s===mh&&(s=xX(n)),typeof s>"u"&&!r)throw new Kh("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new ld("intrinsic "+t+" does not exist!")},Kt=function(t,r){if(typeof t!="string"||t.length===0)throw new Kh("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Kh('"allowMissing" argument must be a boolean');if(DX(/^%?[^%]*%?$/,t)===null)throw new ld("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=TX(t),i=n.length>0?n[0]:"",s=AX("%"+i+"%",r),o=s.name,a=s.value,l=!1,u=s.alias;u&&(i=u[0],SX(n,wX([0,1],u)));for(var c=1,h=!0;c=n.length){var m=ju(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=zv(a,d),a=a[d];h&&!l&&(zu[o]=a)}}return a},zx,_3;function fb(){if(_3)return zx;_3=1;var e=Kt,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return zx=t,zx}var kX=Kt,Vy=kX("%Object.getOwnPropertyDescriptor%",!0);if(Vy)try{Vy([],"length")}catch{Vy=null}var Od=Vy,$3=fb(),_X=yo,nh=Ot,L3=Od,K5=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new nh("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new nh("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new nh("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new nh("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new nh("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new nh("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!L3&&L3(t,r);if($3)$3(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:s===null&&l?l.writable:!s});else if(a||!i&&!s&&!o)t[r]=n;else throw new _X("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},zE=fb(),J5=function(){return!!zE};J5.hasArrayLengthDefineBug=function(){if(!zE)return null;try{return zE([],"length",{value:1}).length!==1}catch{return!0}};var XA=J5,$X=Kt,P3=K5,LX=XA(),F3=Od,O3=Ot,PX=$X("%Math.floor%"),FX=function(t,r){if(typeof t!="function")throw new O3("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||PX(r)!==r)throw new O3("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&F3){var o=F3(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(LX?P3(t,"length",r,!0,!0):P3(t,"length",r)),t};(function(e){var t=qA,r=Kt,n=FX,i=Ot,s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(o,s),l=fb(),u=r("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var f=a(t,o,arguments);return n(f,1+u(0,d.length-(arguments.length-1)),!0)};var c=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c})(V5);var Xl=V5.exports,X5=Kt,Y5=Xl,OX=Y5(X5("String.prototype.indexOf")),Vn=function(t,r){var n=X5(t,!!r);return typeof n=="function"&&OX(t,".prototype.")>-1?Y5(n):n},Hx,I3;function YA(){if(I3)return Hx;I3=1;var e=JA;return Hx=function(){return e()&&!!Symbol.toStringTag},Hx}var IX={},Uv=GA,MX=Vg,M3=Xl,QA=Vn,Gy=Od,NX=QA("Object.prototype.toString"),Q5=YA()(),N3=typeof globalThis>"u"?IX:globalThis,HE=MX(),ZA=QA("String.prototype.slice"),Ux=Object.getPrototypeOf,RX=QA("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:jX(t)}return Gy?BX(t):null},R3=Object.prototype.toString,Z5=function(t){var r=R3.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&R3.call(t.callee)==="[object Function]"),n},Wx,B3;function zX(){if(B3)return Wx;B3=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Z5,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var f=d.constructor;return f&&f.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),h=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(f){var p=f!==null&&typeof f=="object",m=r.call(f)==="[object Function]",y=n(f),b=p&&r.call(f)==="[object String]",v=[];if(!p&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&m;if(b&&f.length>0&&!t.call(f,0))for(var D=0;D0)for(var C=0;C2?arguments[2]:{},n=WX(t);VX&&(n=qX.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i-1e3&&e<1e3||r4.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-K3(-e):K3(e);if(n!==e){var i=String(n),s=nk.call(t,i.length+1);return hl.call(i,r,"$&_")+"."+hl.call(hl.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return hl.call(t,r,"$&_")}var VE=QX,Y3=VE.custom,Q3=s4(Y3)?Y3:null,uY=function e(t,r,n,i){var s=r||{};if(rl(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rl(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=rl(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(rl(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(rl(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return a4(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?X3(t,l):l}if(typeof t=="bigint"){var u=String(t)+"n";return a?X3(t,u):u}var c=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return GE(t)?"[Array]":"[Object]";var h=AY(s,n);if(typeof i>"u")i=[];else if(o4(i,t)>=0)return"[Circular]";function d(L,_,A){if(_&&(i=lY.call(i),i.push(_)),A){var M={depth:s.depth};return rl(s,"quoteStyle")&&(M.quoteStyle=s.quoteStyle),e(L,M,n+1,i)}return e(L,s,n+1,i)}if(typeof t=="function"&&!Z3(t)){var f=vY(t),p=Nm(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+To.call(p,", ")+" }":"")}if(s4(t)){var m=ud?hl.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):WE.call(t);return typeof t=="object"&&!ud?Pf(m):m}if(EY(t)){for(var y="<"+G3.call(String(t.nodeName)),b=t.attributes||[],v=0;v",y}if(GE(t)){if(t.length===0)return"[]";var E=Nm(t,d);return h&&!TY(E)?"["+qE(E,h)+"]":"[ "+To.call(E,", ")+" ]"}if(dY(t)){var D=Nm(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!n4.call(t,"cause")?"{ ["+String(t)+"] "+To.call(q3.call("[cause]: "+d(t.cause),D),", ")+" }":D.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+To.call(D,", ")+" }"}if(typeof t=="object"&&o){if(Q3&&typeof t[Q3]=="function"&&VE)return VE(t,{depth:c-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(bY(t)){var C=[];return U3&&U3.call(t,function(L,_){C.push(d(_,t,!0)+" => "+d(L,t))}),eL("Map",Vv.call(t),C,h)}if(SY(t)){var w=[];return W3&&W3.call(t,function(L){w.push(d(L,t))}),eL("Set",Gv.call(t),w,h)}if(xY(t))return Kx("WeakMap");if(DY(t))return Kx("WeakSet");if(wY(t))return Kx("WeakRef");if(pY(t))return Pf(d(Number(t)));if(mY(t))return Pf(d(UE.call(t)));if(gY(t))return Pf(nY.call(t));if(fY(t))return Pf(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===ZX)return"{ [object globalThis] }";if(!hY(t)&&!Z3(t)){var T=Nm(t,d),k=J3?J3(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",P=!k&&ii&&Object(t)===t&&ii in t?nk.call(Yl(t),8,-1):O?"Object":"",I=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=I+(P||O?"["+To.call(q3.call([],P||[],O||[]),": ")+"] ":"");return T.length===0?F+"{}":h?F+"{"+qE(T,h)+"}":F+"{ "+To.call(T,", ")+" }"}return String(t)};function i4(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function cY(e){return hl.call(String(e),/"/g,""")}function GE(e){return Yl(e)==="[object Array]"&&(!ii||!(typeof e=="object"&&ii in e))}function hY(e){return Yl(e)==="[object Date]"&&(!ii||!(typeof e=="object"&&ii in e))}function Z3(e){return Yl(e)==="[object RegExp]"&&(!ii||!(typeof e=="object"&&ii in e))}function dY(e){return Yl(e)==="[object Error]"&&(!ii||!(typeof e=="object"&&ii in e))}function fY(e){return Yl(e)==="[object String]"&&(!ii||!(typeof e=="object"&&ii in e))}function pY(e){return Yl(e)==="[object Number]"&&(!ii||!(typeof e=="object"&&ii in e))}function gY(e){return Yl(e)==="[object Boolean]"&&(!ii||!(typeof e=="object"&&ii in e))}function s4(e){if(ud)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!WE)return!1;try{return WE.call(e),!0}catch{}return!1}function mY(e){if(!e||typeof e!="object"||!UE)return!1;try{return UE.call(e),!0}catch{}return!1}var yY=Object.prototype.hasOwnProperty||function(e){return e in this};function rl(e,t){return yY.call(e,t)}function Yl(e){return iY.call(e)}function vY(e){if(e.name)return e.name;var t=oY.call(sY.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function o4(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return a4(nk.call(e,0,t.maxStringLength),t)+n}var i=hl.call(hl.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,CY);return i4(i,"single",t)}function CY(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+aY.call(t.toString(16))}function Pf(e){return"Object("+e+")"}function Kx(e){return e+" { ? }"}function eL(e,t,r,n){var i=n?qE(r,n):To.call(r,", ");return e+" ("+t+") {"+i+"}"}function TY(e){for(var t=0;t=0)return!1;return!0}function AY(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=To.call(Array(e.indent+1)," ");else return null;return{base:r,prev:To.call(Array(t+1),r)}}function qE(e,t){if(e.length===0)return"";var r=` +`+t.prev+t.base;return r+To.call(e,","+r)+` +`+t.prev}function Nm(e,t){var r=GE(e),n=[];if(r){n.length=e.length;for(var i=0;i"u")return"Undefined";if(typeof t=="function"||typeof t=="object")return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},_Y=kY,Dc=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":_Y(t)},tL=Ot,$Y=uY,LY=gb,PY=Dc,FY=function(t,r){if(PY(t)!=="Object")throw new tL("Assertion failed: Type(O) is not Object");if(!LY(r))throw new tL("Assertion failed: IsPropertyKey(P) is not true, got "+$Y(r));return t[r]},Id=Number.isNaN||function(t){return t!==t},OY=Id,La=function(e){return(typeof e=="number"||typeof e=="bigint")&&!OY(e)&&e!==1/0&&e!==-1/0},l4=Kt,IY=l4("%Math.abs%"),MY=l4("%Math.floor%"),NY=Id,RY=La,mb=function(t){if(typeof t!="number"||NY(t)||!RY(t))return!1;var r=IY(t);return MY(r)===r},BY=Xl,u4=Vn,jY=Kt,KE=jY("%ArrayBuffer%",!0),Ky=u4("ArrayBuffer.prototype.byteLength",!0),zY=u4("Object.prototype.toString"),rL=!!KE&&!Ky&&new KE(0).slice,nL=!!rL&&BY(rL),Md=Ky||nL?function(t){if(!t||typeof t!="object")return!1;try{return Ky?Ky(t):nL(t,0),!0}catch{return!1}}:KE?function(t){return zY(t)==="[object ArrayBuffer]"}:function(t){return!1},HY=Vn,iL=HY("ArrayBuffer.prototype.byteLength",!0),UY=Md,c4=function(t){return UY(t)?iL?iL(t):t.byteLength:NaN},WY=Vn,sL=WY("SharedArrayBuffer.prototype.byteLength",!0),Kg=sL?function(t){if(!t||typeof t!="object")return!1;try{return sL(t),!0}catch{return!1}}:function(t){return!1},VY={},GY=Ot,qY=c4,KY=Vg(),JY=Vn,XY=Md,YY=Kg,QY=JY("SharedArrayBuffer.prototype.byteLength",!0),Nd=function(t){var r=YY(t);if(!XY(t)&&!r)throw new GY("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((r?QY:qY)(t)===0)try{new VY[KY[0]](t)}catch(n){return!!n&&n.name==="TypeError"}return!1},Jx,oL;function h4(){if(oL)return Jx;oL=1;var e=Ot,t=Sc,r=gb,n=Dc;return Jx=function(s,o){if(n(s)!=="Object")throw new e("Assertion failed: `O` must be an Object");if(!r(o))throw new e("Assertion failed: `P` must be a Property Key");return t(s,o)},Jx}var ZY=Kt,d4=ZY("%Array%"),eQ=!d4.isArray&&Vn("Object.prototype.toString"),f4=d4.isArray||function(t){return eQ(t)==="[object Array]"},ik=f4,Xx,aL;function p4(){return aL||(aL=1,Xx=function(t){return t==="BIGUINT64"||t==="BIGINT64"}),Xx}var Yx,lL;function tQ(){return lL||(lL=1,Yx=function(t){return t==="UINT8"||t==="UINT8C"||t==="UINT16"||t==="UINT32"||t==="BIGUINT64"}),Yx}var Qx,uL;function rQ(){if(uL)return Qx;uL=1;var e=Kt,t=e("%Math.pow%");return Qx=function(n){var i=n[3]&128?-1:1,s=(n[3]&127)<<1|n[2]>>7,o=(n[2]&127)<<16|n[1]<<8|n[0];return s===0&&o===0?i===1?0:-0:s===255&&o===0?i===1?1/0:-1/0:s===255&&o!==0?NaN:(s-=127,s===-127?i*o*t(2,-149):i*(1+o*t(2,-23))*t(2,s))},Qx}var Zx,cL;function nQ(){if(cL)return Zx;cL=1;var e=Kt,t=e("%Math.pow%");return Zx=function(n){var i=n[7]&128?-1:1,s=(n[7]&127)<<4|(n[6]&240)>>4,o=(n[6]&15)*281474976710656+n[5]*1099511627776+n[4]*4294967296+n[3]*16777216+n[2]*65536+n[1]*256+n[0];return s===0&&o===0?i*0:s===2047&&o!==0?NaN:s===2047&&o===0?i*(1/0):(s-=1023,s===-1023?i*o*5e-324:i*(1+o/4503599627370496)*t(2,s))},Zx}var ew,hL;function iQ(){if(hL)return ew;hL=1;var e=Kt,t=e("%Math.pow%"),r=e("%Number%"),n=e("%BigInt%",!0);return ew=function(s,o,a,l){for(var u=l?n:r,c=u(0),h=0;h=0&&t<=255&&(t|0)===t}),rw}var nw,pL;function aQ(){if(pL)return nw;pL=1;var e=Kt,t=Vn,r=KA,n=yo,i=Ot,s=e("%BigInt%",!0),o=h4(),a=ik,l=p4(),u=tQ(),c=rQ(),h=nQ(),d=iQ(),f=sQ(),p=oQ(),m=t("Array.prototype.reverse"),y=t("Array.prototype.slice"),b=ek,v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};return nw=function(D,C,w){if(!o(v,D))throw new i("Assertion failed: `type` must be a TypedArray element type: "+b(v));if(!a(C)||!f(C,p))throw new i("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof w!="boolean")throw new i("Assertion failed: `isLittleEndian` must be a Boolean");var T=v[D];if(C.length!==T)throw new r("Assertion failed: `rawBytes` must have a length of "+T+" for type "+D);var k=l(D);if(k&&!s)throw new n("this environment does not support BigInts");return C=y(C,0,T),w||m(C),D==="FLOAT32"?c(C):D==="FLOAT64"?h(C):d(C,T,u(D),k)},nw}var iw,gL;function lQ(){if(gL)return iw;gL=1;var e={}.toString;return iw=Array.isArray||function(t){return e.call(t)=="[object Array]"},iw}var sw,mL;function uQ(){if(mL)return sw;mL=1;var e=Kt,t=e("%Array.prototype.concat%"),r=Xl,n=Vn,i=n("Array.prototype.slice"),s=JA(),o=s&&Symbol.isConcatSpreadable,a=[],l=o?r.apply(t,a):null,u=o?lQ():null;return sw=o?function(h){for(var d=0;d5&&typeof arguments[5]!="boolean")throw new Xo("Assertion failed: `isLittleEndian` must be a boolean, if present");if(xQ(t))throw new Xo("Assertion failed: `arrayBuffer` is detached");if(r<0)throw new Xo("Assertion failed: `byteIndex` must be non-negative");var a=bL.size["$"+n];if(!a)throw new Xo('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');var l;if(o)throw new mQ("SharedArrayBuffer is not supported by this implementation");l=aw(new yQ(t,r),0,a);var u=arguments.length>5?arguments[5]:EQ==="little",c=u?aw(vL([0,0,0,0,0,0,0,0],l),-a):aw(vL(l,[0,0,0,0,0,0,0,0]),0,a);return wQ(n,c,u)},TQ=Kt,AQ=TQ("%Math.max%"),kQ=Kt,_Q=kQ("%Math.min%"),xL=Id,m4=function(t,r){return t===r?t===0?1/t===1/r:!0:xL(t)&&xL(r)},Rm=Ot,$Q=gb,wL=m4,LQ=Dc,SL=function(){try{return delete[].length,!0}catch{return!1}}(),PQ=function(t,r,n,i){if(LQ(t)!=="Object")throw new Rm("Assertion failed: `O` must be an Object");if(!$Q(r))throw new Rm("Assertion failed: `P` must be a Property Key");if(typeof i!="boolean")throw new Rm("Assertion failed: `Throw` must be a Boolean");if(i){if(t[r]=n,SL&&!wL(t[r],n))throw new Rm("Attempted to assign to readonly property.");return!0}try{return t[r]=n,SL?wL(t[r],n):!0}catch{return!1}},lw,DL;function FQ(){if(DL)return lw;DL=1;var e=Kt,t=e("%BigInt%",!0),r=Ot,n=yo;return lw=function(s){if(typeof s!="string")throw new r("`argument` must be a string");if(!t)throw new n("BigInts are not supported in this environment");try{return t(s)}catch{return}},lw}var uw,EL;function OQ(){return EL||(EL=1,uw=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),uw}var cw,CL;function IQ(){if(CL)return cw;CL=1;var e=Date.prototype.getDay,t=function(o){try{return e.call(o),!0}catch{return!1}},r=Object.prototype.toString,n="[object Date]",i=YA()();return cw=function(o){return typeof o!="object"||o===null?!1:i?t(o):r.call(o)===n},cw}var Bm={exports:{}},TL;function MQ(){if(TL)return Bm.exports;TL=1;var e=Object.prototype.toString,t=G5();if(t){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/,i=function(o){return typeof o.valueOf()!="symbol"?!1:n.test(r.call(o))};Bm.exports=function(o){if(typeof o=="symbol")return!0;if(e.call(o)!=="[object Symbol]")return!1;try{return i(o)}catch{return!1}}}else Bm.exports=function(o){return!1};return Bm.exports}var hw,AL;function NQ(){if(AL)return hw;AL=1;var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",t=OQ(),r=VA,n=IQ(),i=MQ(),s=function(l,u){if(typeof l>"u"||l===null)throw new TypeError("Cannot call method on "+l);if(typeof u!="string"||u!=="number"&&u!=="string")throw new TypeError('hint must be "string" or "number"');var c=u==="string"?["toString","valueOf"]:["valueOf","toString"],h,d,f;for(f=0;f1&&(arguments[1]===String?u="string":arguments[1]===Number&&(u="number"));var c;if(e&&(Symbol.toPrimitive?c=o(l,Symbol.toPrimitive):i(l)&&(c=Symbol.prototype.valueOf)),typeof c<"u"){var h=c.call(l,u);if(t(h))return h;throw new TypeError("unable to convert exotic object to primitive")}return u==="default"&&(n(l)||i(l))&&(u="string"),s(l,u==="default"?"number":u)},hw}var dw,kL;function y4(){if(kL)return dw;kL=1;var e=NQ();return dw=function(r){return arguments.length>1?e(r,arguments[1]):e(r)},dw}var fw,_L;function v4(){if(_L)return fw;_L=1;var e=Kt,t=e("%BigInt%",!0),r=e("%Number%"),n=Ot,i=yo,s=FQ(),o=y4();return fw=function(l){if(!t)throw new i("BigInts are not supported in this environment");var u=o(l,r);if(u==null)throw new n("Cannot convert null or undefined to a BigInt");if(typeof u=="boolean")return t(u?1:0);if(typeof u=="number")throw new n("Cannot convert a Number value to a BigInt");if(typeof u=="string"){var c=s(u);if(typeof c>"u")throw new n("Failed to parse String to BigInt");return c}if(typeof u=="symbol")throw new n("Cannot convert a Symbol value to a BigInt");if(typeof u!="bigint")throw new i("Assertion failed: unknown primitive type");return u},fw}var pw,$L;function b4(){if($L)return pw;$L=1;var e=Kt,t=e("%BigInt%",!0),r=KA,n=Ot,i=t&&t(0);return pw=function(o,a){if(typeof o!="bigint"||typeof a!="bigint")throw new n("Assertion failed: `n` and `d` arguments must be BigInts");if(a===i)throw new r("Division by zero");return o===i?i:o%a},pw}var gw,LL;function x4(){return LL||(LL=1,gw=function(t,r,n){var i=t(r,n);return i>=0?i:i+n}),gw}var mw,PL;function RQ(){if(PL)return mw;PL=1;var e=Kt,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=v4(),i=b4(),s=x4(),o=t&&BigInt(r(2,32))*BigInt(r(2,31)),a=t&&BigInt(r(2,32))*BigInt(r(2,32));return mw=function(u){var c=n(u),h=s(i,c,a);return h>=o?h-a:h},mw}var yw,FL;function BQ(){if(FL)return yw;FL=1;var e=Kt,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=v4(),i=b4(),s=x4(),o=t&&BigInt(r(2,32))*BigInt(r(2,32));return yw=function(l){var u=n(l),c=s(i,u,o);return c},yw}var vw,OL;function jQ(){if(OL)return vw;OL=1;var e=Math.floor;return vw=function(r,n){var i=r%n;return e(i>=0?i:i+n)},vw}var bw,IL;function Bd(){if(IL)return bw;IL=1;var e=jQ();return bw=function(r,n){return e(r,n)},bw}var xw,ML;function zQ(){return ML||(ML=1,xw=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),xw}var ww,NL;function HQ(){if(NL)return ww;NL=1;var e=Vn,t=YA()(),r,n,i,s;if(t){r=e("Object.prototype.hasOwnProperty"),n=e("RegExp.prototype.exec"),i={};var o=function(){throw i};s={toString:o,valueOf:o},typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=o)}var a=e("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor,u="[object RegExp]";return ww=t?function(h){if(!h||typeof h!="object")return!1;var d=l(h,"lastIndex"),f=d&&r(d,"value");if(!f)return!1;try{n(h,s)}catch(p){return p===i}}:function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:a(h)===u},ww}var Sw,RL;function UQ(){if(RL)return Sw;RL=1;var e=Vn,t=HQ(),r=e("RegExp.prototype.exec"),n=Ot;return Sw=function(s){if(!t(s))throw new n("`regex` must be a RegExp");return function(a){return r(s,a)!==null}},Sw}var Dw,BL;function w4(){if(BL)return Dw;BL=1;var e=Ot;return Dw=function(r){if(r==null)throw new e(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r},Dw}var WQ=Kt,VQ=WQ("%String%"),GQ=Ot,S4=function(t){if(typeof t=="symbol")throw new GQ("Cannot convert a Symbol value to a string");return VQ(t)},Ew,jL;function D4(){if(jL)return Ew;jL=1;var e=w4(),t=S4,r=Vn,n=r("String.prototype.replace"),i=/^\s$/.test("᠎"),s=i?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,o=i?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;return Ew=function(){var l=t(e(this));return n(n(l,s,""),o,"")},Ew}var Cw,zL;function E4(){if(zL)return Cw;zL=1;var e=D4(),t="​",r="᠎";return Cw=function(){return String.prototype.trim&&t.trim()===t&&r.trim()===r&&("_"+r).trim()==="_"+r&&(r+"_").trim()===r+"_"?String.prototype.trim:e},Cw}var Tw,HL;function qQ(){if(HL)return Tw;HL=1;var e=pb,t=E4();return Tw=function(){var n=t();return e(String.prototype,{trim:n},{trim:function(){return String.prototype.trim!==n}}),n},Tw}var Aw,UL;function KQ(){if(UL)return Aw;UL=1;var e=Xl,t=pb,r=w4(),n=D4(),i=E4(),s=qQ(),o=e(i()),a=function(u){return r(u),o(u)};return t(a,{getPolyfill:i,implementation:n,shim:s}),Aw=a,Aw}var kw,WL;function JQ(){if(WL)return kw;WL=1;var e=Kt,t=e("%Number%"),r=e("%RegExp%"),n=Ot,i=e("%parseInt%"),s=Vn,o=UQ(),a=s("String.prototype.slice"),l=o(/^0b[01]+$/i),u=o(/^0o[0-7]+$/i),c=o(/^[-+]0x[0-9a-f]+$/i),h=["…","​","￾"].join(""),d=new r("["+h+"]","g"),f=o(d),p=KQ();return kw=function m(y){if(typeof y!="string")throw new n("Assertion failed: `argument` is not a String");if(l(y))return t(i(a(y,2),2));if(u(y))return t(i(a(y,2),8));if(f(y)||c(y))return NaN;var b=p(y);return b!==y?m(b):t(y)},kw}var XQ=Kt,VL=Ot,GL=XQ("%Number%"),YQ=zQ(),QQ=y4(),ZQ=JQ(),Ql=function(t){var r=YQ(t)?t:QQ(t,GL);if(typeof r=="symbol")throw new VL("Cannot convert a Symbol value to a number");if(typeof r=="bigint")throw new VL("Conversion from 'BigInt' to 'number' is not allowed.");return typeof r=="string"?ZQ(r):GL(r)},eZ=Math.floor,sk=function(t){return typeof t=="bigint"?t:eZ(t)},qL=sk,tZ=Ot,Ec=function(t){if(typeof t!="number"&&typeof t!="bigint")throw new tZ("argument must be a Number or a BigInt");var r=t<0?-qL(-t):qL(t);return r===0?0:r},_w,KL;function rZ(){if(KL)return _w;KL=1;var e=Bd(),t=Ql,r=Ec,n=La,i=65536;return _w=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),u=e(l,i);return u>=32768?u-i:u},_w}var $w,JL;function nZ(){if(JL)return $w;JL=1;var e=Bd(),t=Ql,r=Ec,n=La,i=2147483648,s=4294967296;return $w=function(a){var l=t(a);if(!n(l)||l===0)return 0;var u=r(l),c=e(u,s),h=c>=i?c-s:c;return h===0?0:h},$w}var Lw,XL;function iZ(){if(XL)return Lw;XL=1;var e=Bd(),t=Ql,r=Ec,n=La;return Lw=function(s){var o=t(s);if(!n(o)||o===0)return 0;var a=r(o),l=e(a,256);return l>=128?l-256:l},Lw}var Pw,YL;function sZ(){if(YL)return Pw;YL=1;var e=Bd(),t=Ql,r=Ec,n=La,i=65536;return Pw=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),u=e(l,i);return u===0?0:u},Pw}var Fw,QL;function oZ(){if(QL)return Fw;QL=1;var e=Bd(),t=Ql,r=Ec,n=La,i=4294967296;return Fw=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),u=e(l,i);return u===0?0:u},Fw}var Ow,ZL;function aZ(){if(ZL)return Ow;ZL=1;var e=La,t=Bd(),r=Ql,n=Ec;return Ow=function(s){var o=r(s);if(!e(o)||o===0)return 0;var a=n(o),l=t(a,256);return l},Ow}var Iw,eP;function lZ(){if(eP)return Iw;eP=1;var e=Kt,t=Ot,r=e("%Math.max%"),n=e("%Math.min%");return Iw=function(s,o,a){if(typeof s!="number"||typeof o!="number"||typeof a!="number"||!(o<=a))throw new t("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return n(r(o,s),a)},Iw}var Mw,tP;function uZ(){if(tP)return Mw;tP=1;var e=lZ(),t=Ql,r=sk,n=Id;return Mw=function(s){var o=t(s);if(n(o))return 0;var a=e(o,0,255),l=r(a);return al+.5?l+1:l%2===0?l:l+1},Mw}var Nw,rP;function C4(){return rP||(rP=1,Nw=function(t){return t===0&&1/t===-1/0}),Nw}var Rw,nP;function cZ(){if(nP)return Rw;nP=1;var e=Kt,t=e("%Math.abs%"),r=e("%Math.floor%"),n=e("%Math.pow%"),i=La,s=Id,o=C4(),a=34028234663852886e22;return Rw=function(u,c){if(s(u))return c?[0,0,192,127]:[127,192,0,0];var h;if(u===0)return h=o(u)?128:0,c?[0,0,0,h]:[h,0,0,0];if(t(u)>a||!i(u))return h=u<0?255:127,c?[0,0,128,h]:[h,128,0,0];var d=u<0?1:0;u=t(u);for(var f=0;u>=2;)f+=1,u/=2;for(;u<1;)f-=1,u*=2;var p=u-1;p*=n(2,23)+.5,p=r(p),f+=127,f<<=23;var m=d<<31|f|p,y=m&255;m>>=8;var b=m&255;m>>=8;var v=m&255;m>>=8;var E=m&255;return c?[y,b,v,E]:[E,v,b,y]},Rw}var Bw,iP;function hZ(){if(iP)return Bw;iP=1;var e=1075,t=54;return Bw=function(n){var i="";if(n===0)return i;for(var s=e,o,a=0;a=1?(n=o-1,i+="1",s===e&&(s=a)):(n=o,i+="0"),o===1||a-s>t)return i;return i},Bw}var jw,sP;function dZ(){if(sP)return jw;sP=1;var e=Kt,t=e("%Math.floor%");return jw=function(n){for(var i="",s;n>0;)s=n/2,n=t(s),s===n?i="0"+i:i="1"+i;return i},jw}var zw,oP;function fZ(){if(oP)return zw;oP=1;var e=Kt,t=e("%parseInt%"),r=e("%Math.abs%"),n=e("%Math.floor%"),i=Vn,s=i("String.prototype.indexOf"),o=i("String.prototype.slice"),a=hZ(),l=dZ(),u=C4(),c=1023,h="11111111111",d="00000000000",f=d+d+d+d+"0000000";return zw=function(m,y){var b=m<0||u(m)?"1":"0",v,E;if(isNaN(m))v=h,E="1"+f;else if(!isFinite(m))v=h,E="0"+f;else if(m===0)v=d,E="0"+f;else{m=r(m);var D=n(m),C=l(D),w=a(m-D),T;if(C)v=C.length-1;else{var k=s(w,"1");k>-1&&(T=k+1),v=-T}E=C+w,v<0?(v<=-c&&(T=c-1),E=o(E,T)):E=o(E,1),v=o(d+l(v+c),-11),E=o(E+f+"0",0,52)}for(var O=b+v+E,P=[],I=0;I<8;I++){var F=y?8-I-1:I;P[F]=t(o(O,I*8,(I+1)*8),2)}return P},zw}var Hw,aP;function pZ(){if(aP)return Hw;aP=1;var e=Kt,t=e("%Number%"),r=e("%BigInt%",!0);return Hw=function(i,s,o){var a=typeof i=="bigint"?r:t;i<0&&(i>>>=0);for(var l=[],u=0;u>=a(8);return l},Hw}var Uw,lP;function gZ(){if(lP)return Uw;lP=1;var e=Ot,t=h4(),r=RQ(),n=BQ(),i=rZ(),s=nZ(),o=iZ(),a=sZ(),l=oZ(),u=aZ(),c=uZ(),h=cZ(),d=fZ(),f=pZ(),p=ek,m={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},y={__proto__:null,INT8:o,UINT8:u,UINT8C:c,INT16:i,UINT16:a,INT32:s,UINT32:l,BIGINT64:r,BIGUINT64:n};return Uw=function(v,E,D){if(typeof v!="string"||!t(m,v))throw new e("Assertion failed: `type` must be a TypedArray element type: "+p(m));if(typeof E!="number"&&typeof E!="bigint")throw new e("Assertion failed: `value` must be a Number or a BigInt");if(typeof D!="boolean")throw new e("Assertion failed: `isLittleEndian` must be a Boolean");if(v==="FLOAT32")return h(E,D);if(v==="FLOAT64")return d(E,D);var C=m[v],w=y[v],T=w(E);return f(T,C,D)},Uw}var Ww,uP;function mZ(){return uP||(uP=1,Ww=function(t,r){for(var n=0;n6&&typeof arguments[6]!="boolean")throw new Yo("Assertion failed: `isLittleEndian` must be a boolean, if present");if(SZ(t))throw new Yo("Assertion failed: ArrayBuffer is detached");if(wZ(n)?typeof i!="bigint":typeof i!="number")throw new Yo("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var l=cP.size["$"+n],u=arguments.length>6?arguments[6]:AZ==="little",c=DZ(n,i,u);if(a)throw new vZ("SharedArrayBuffer is not supported by this implementation");var h=new bZ(t,r,l);kZ(c,function(d,f){h[f]=d})},$Z=Ql,LZ=Ec,PZ=Id,FZ=La,OZ=function(t){var r=$Z(t);return PZ(r)||r===0?0:FZ(r)?LZ(r):r},IZ=yo,MZ=Ot,NZ=mb,RZ=qg,hP=yb,ok=function(t){var r=RZ(t);if(r===!1)throw new MZ("Assertion failed: `O` must be a TypedArray");var n=hP.size["$"+hP.name["$"+r]];if(!NZ(n)||n<0)throw new IZ("Assertion failed: Unknown TypedArray type `"+r+"`");return n},BZ=yo,jZ=Ot,zZ=qg,HZ=yb,UZ=function(t){var r=zZ(t);if(r===!1)throw new jZ("Assertion failed: `O` must be a TypedArray");var n=HZ.name["$"+r];if(typeof n!="string")throw new BZ("Assertion failed: Unknown TypedArray type `"+r+"`");return n},JE={exports:{}},WZ=Kt,Vw,dP;function ak(){if(dP)return Vw;dP=1;var e=Ot,t=Sc,r={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return Vw=function(i){if(!i||typeof i!="object")return!1;for(var s in i)if(t(i,s)&&!r[s])return!1;var o=t(i,"[[Value]]")||t(i,"[[Writable]]"),a=t(i,"[[Get]]")||t(i,"[[Set]]");if(o&&a)throw new e("Property Descriptors may not be both accessor and data descriptors");return!0},Vw}var Gw,fP;function VZ(){if(fP)return Gw;fP=1;var e=XA,t=fb(),r=e.hasArrayLengthDefineBug(),n=r&&f4,i=Vn,s=i("Object.prototype.propertyIsEnumerable");return Gw=function(a,l,u,c,h,d){if(!t){if(!a(d)||!d["[[Configurable]]"]||!d["[[Writable]]"]||h in c&&s(c,h)!==!!d["[[Enumerable]]"])return!1;var f=d["[[Value]]"];return c[h]=f,l(c[h],f)}return r&&h==="length"&&"[[Value]]"in d&&n(c)&&c.length!==d["[[Value]]"]?(c.length=d["[[Value]]"],c.length===d["[[Value]]"]):(t(c,h,u(d)),!0)},Gw}var qw,pP;function GZ(){return pP||(pP=1,qw=function(t){if(typeof t>"u")return t;var r={};return"[[Value]]"in t&&(r.value=t["[[Value]]"]),"[[Writable]]"in t&&(r.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(r.get=t["[[Get]]"]),"[[Set]]"in t&&(r.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(r.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(r.configurable=!!t["[[Configurable]]"]),r}),qw}var Kw,gP;function qZ(){if(gP)return Kw;gP=1;var e=Ot,t=ak(),r=GZ();return Kw=function(i){if(typeof i<"u"&&!t(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return r(i)},Kw}var Jw,mP;function KZ(){if(mP)return Jw;mP=1;var e=Ot,t=Sc,r=ak();return Jw=function(i){if(typeof i>"u")return!1;if(!r(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return!(!t(i,"[[Value]]")&&!t(i,"[[Writable]]"))},Jw}var Xw,yP;function JZ(){return yP||(yP=1,Xw=function(t){return!!t}),Xw}var Yw,vP;function XZ(){return vP||(vP=1,Yw=VA),Yw}var Qw,bP;function YZ(){if(bP)return Qw;bP=1;var e=Sc,t=Ot,r=Dc,n=JZ(),i=XZ();return Qw=function(o){if(r(o)!=="Object")throw new t("ToPropertyDescriptor requires an object");var a={};if(e(o,"enumerable")&&(a["[[Enumerable]]"]=n(o.enumerable)),e(o,"configurable")&&(a["[[Configurable]]"]=n(o.configurable)),e(o,"value")&&(a["[[Value]]"]=o.value),e(o,"writable")&&(a["[[Writable]]"]=n(o.writable)),e(o,"get")){var l=o.get;if(typeof l<"u"&&!i(l))throw new t("getter must be a function");a["[[Get]]"]=l}if(e(o,"set")){var u=o.set;if(typeof u<"u"&&!i(u))throw new t("setter must be a function");a["[[Set]]"]=u}if((e(a,"[[Get]]")||e(a,"[[Set]]"))&&(e(a,"[[Value]]")||e(a,"[[Writable]]")))throw new t("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return a},Qw}var Zw,xP;function QZ(){if(xP)return Zw;xP=1;var e=Ot,t=ak(),r=VZ(),n=qZ(),i=KZ(),s=gb,o=m4,a=YZ(),l=Dc;return Zw=function(c,h,d){if(l(c)!=="Object")throw new e("Assertion failed: Type(O) is not Object");if(!s(h))throw new e("Assertion failed: IsPropertyKey(P) is not true");var f=t(d)?d:a(d);if(!t(f))throw new e("Assertion failed: Desc is not a valid Property Descriptor");return r(i,o,n,c,h,f)},Zw}var ZZ=WZ,wP=ZZ("%Reflect.construct%",!0),qv=QZ();try{qv({},"",{"[[Get]]":function(){}})}catch{qv=null}if(qv&&wP){var SP={},DP={};qv(DP,"length",{"[[Get]]":function(){throw SP},"[[Enumerable]]":!0}),JE.exports=function(t){try{wP(t,DP)}catch(r){return r===SP}}}else JE.exports=function(t){return typeof t=="function"&&!!t.prototype};var T4=JE.exports,eee=Kt,EP=eee("%Symbol.species%",!0),eS=Ot,tee=T4,CP=Dc,ree=function(t,r){if(CP(t)!=="Object")throw new eS("Assertion failed: Type(O) is not Object");var n=t.constructor;if(typeof n>"u")return r;if(CP(n)!=="Object")throw new eS("O.constructor is not an Object");var i=EP?n[EP]:void 0;if(i==null)return r;if(tee(i))return i;throw new eS("no constructor found")},TP=Sc,nee=Rd,iee=mb,A4=function(t){return!!t&&typeof t=="object"&&TP(t,"[[Object]]")&&TP(t,"[[CachedBufferByteLength]]")&&(iee(t["[[CachedBufferByteLength]]"])&&t["[[CachedBufferByteLength]]"]>=0||t["[[CachedBufferByteLength]]"]==="DETACHED")&&nee(t["[[Object]]"])},jm={},k4=GA,see=Xl,oee=Vg(),XE={},aee=db(),zm=Od,AP=Object.defineProperty;if(zm){var lee=function(e){return e.byteOffset};k4(oee,function(e){if(typeof jm[e]=="function"||typeof jm[e]=="object"){var t=jm[e].prototype,r=zm(t,"byteOffset");if(!r&&aee){var n=t.__proto__;r=zm(n,"byteOffset")}if(r&&r.get)XE[e]=see(r.get);else if(AP){var i=new jm[e](2);r=zm(i,"byteOffset"),r&&r.configurable&&AP(i,"length",{value:3}),i.length===2&&(XE[e]=lee)}}})}var uee=function(t){var r;return k4(XE,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},cee=Rd,lk=function(t){return cee(t)?uee(t):!1},kP={},hee=Xl,_4=GA,Hm=Od,dee=db(),fee=Rd,pee=W5,YE={__proto__:null},_P=Object.defineProperty;if(Hm){var gee=function(e){return e.length};_4(pee,function(e){var t=kP[e];if(typeof t=="function"||typeof t=="object"){var r=t.prototype,n=Hm(r,"length");if(!n&&dee){var i=r.__proto__;n=Hm(i,"length")}if(n&&n.get)YE["$"+e]=hee(n.get);else if(_P){var s=new kP[e](2);n=Hm(s,"length"),n&&n.configurable&&_P(s,"length",{value:3}),s.length===2&&(YE["$"+e]=gee)}}})}var mee=function(t){var r;return _4(YE,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},$4=function(t){return fee(t)?mee(t):!1},$P=Ot,yee=Nd,vee=ok,bee=A4,xee=Jg,wee=lk,See=$4,uk=function(t){if(!bee(t))throw new $P("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var r=t["[[Object]]"],n=t["[[CachedBufferByteLength]]"];if(yee(xee(r))&&n!=="DETACHED")throw new $P("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(n==="DETACHED")return!0;var i=wee(r),s,o=See(r);if(o==="AUTO")s=n;else{var a=vee(r);s=i+o*a}return i>n||s>n},Dee=Ot,L4=Vn,LP=L4("%ArrayBuffer.prototype.resizable%",!0),PP=L4("%SharedArrayBuffer.prototype.growable%",!0),Eee=Md,Cee=Kg,Tee=function(t){var r=Eee(t),n=Cee(t);if(!r&&!n)throw new Dee("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return r&&LP?!LP(t):n&&PP?!PP(t):!0},Um=Ot,Aee=sk,kee=Tee,_ee=uk,$ee=ok,Lee=A4,Pee=Jg,Fee=lk,Oee=$4,Iee=function(t){if(!Lee(t))throw new Um("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(_ee(t))throw new Um("Assertion failed: `taRecord` is out of bounds");var r=t["[[Object]]"],n=Oee(r);if(n!=="AUTO")return n;if(kee(Pee(r)))throw new Um("Assertion failed: array buffer is not fixed length");var i=Fee(r),s=$ee(r),o=t["[[CachedBufferByteLength]]"];if(o==="DETACHED")throw new Um("Assertion failed: typed array is detached");return Aee((o-i)/s)},tS=Ot,Mee=Nd,Nee=Md,Ree=Kg,Bee=c4,jee=function(t,r){var n=Ree(t);if(!Nee(t)&&!n)throw new tS("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new tS("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(Mee(t))throw new tS("Assertion failed: `arrayBuffer` must not be detached");return Bee(t)},FP=Ot,zee=jee,Hee=Nd,Uee=Rd,Wee=Jg,Vee=function(t,r){if(!Uee(t))throw new FP("Assertion failed: `obj` must be a Typed Array");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new FP("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=Wee(t),i=Hee(n)?"DETACHED":zee(n,r);return{"[[Object]]":t,"[[CachedBufferByteLength]]":i}},Wm=Ot,Gee=uk,qee=Vee,Kee=Dc,Jee=Rd,P4=function(t,r){if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new Wm("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(Kee(t)!=="Object")throw new Wm("Assertion failed: `O` must be an Object");if(!Jee(t))throw new Wm("Assertion failed: `O` must be a Typed Array");var n=qee(t,r);if(Gee(n))throw new Wm("`O` must be in-bounds and backed by a non-detached buffer");return n},Xee=yo,Vm=Ot,Yee=ik,Qee=T4,Zee=uk,ete=Iee,tte=P4,rte=Vg(),nte=function(t,r){if(!Qee(t))throw new Vm("Assertion failed: `constructor` must be a constructor");if(!Yee(r))throw new Vm("Assertion failed: `argumentList` must be a List");if(rte.length===0)throw new Xee("Assertion failed: Typed Arrays are not supported in this environment");var n;r.length===0?n=new t:r.length===1?n=new t(r[0]):r.length===2?n=new t(r[0],r[1]):n=new t(r[0],r[1],r[2]);var i=tte(n,"SEQ-CST");if(r.length===1&&typeof r[0]=="number"){if(Zee(i))throw new Vm("new Typed Array is out of bounds");var s=ete(i);if(s"u"?i:NP(r),l;a===-1/0?l=0:a<0?l=rS(i+a,0):l=MP(a,i);var u=rS(l-o,0),c=xte(n,[u]);if(u>0){if(mte(nS(n)))throw new fte("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var h=BP(n),d=BP(c);if(h===d)for(var f=nS(n),p=nS(c),m=bte(n),y=jP(n),b=o*m+y,v=jP(c),E=v+u*m;v2?arguments[2]:ck,o=s.includeSymbols?xb:bb,a=!!s.immutable;return function l(u){var c=a?j4(u,s):u,h={__proto__:null},d=!0,f={node:c,node_:u,path:[].concat(r),parent:n[n.length-1],parents:n,key:r[r.length-1],removedKeys:{__proto__:null},isRoot:r.length===0,level:r.length,circular:null,update:function(y,b){f.isRoot||(f.parent.node[f.key]=y),f.node=y,b&&(d=!1)},delete:function(y){delete f.parent.node[f.key],f.parent.removedKeys[f.key]=!0,y&&(d=!1)},remove:function(y){B4(f.parent.node)?(f.parent.node.splice(f.key,1),f.parent.removedKeys[f.key]=!0,y&&(d=!1)):f.delete(y)},keys:null,before:function(y){h.before=y},after:function(y){h.after=y},pre:function(y){h.pre=y},post:function(y){h.post=y},stop:function(){i=!1},block:function(){d=!1}};if(!i)return f;function p(){if(typeof f.node=="object"&&f.node!==null){(!f.keys||f.node_!==f.node)&&(f.keys=o(f.node)),f.isLeaf=f.keys.length===0;for(var y=0;y1?arguments[1]:ck,this.value=e}As.prototype.get=function(e){for(var t=this.value,r=0;t&&r1?arguments[1]:ck;return new As(e,t)}vb(xb(As.prototype),function(e){H4[e]=function(t){var r=[].slice.call(arguments,1),n=new As(t);return n[e].apply(n,r)}});var Wte=H4;const rc=Ho(Wte);class Fe{constructor(){this.hex="#000000",this.rgb_r=0,this.rgb_g=0,this.rgb_b=0,this.xyz_x=0,this.xyz_y=0,this.xyz_z=0,this.luv_l=0,this.luv_u=0,this.luv_v=0,this.lch_l=0,this.lch_c=0,this.lch_h=0,this.hsluv_h=0,this.hsluv_s=0,this.hsluv_l=0,this.hpluv_h=0,this.hpluv_p=0,this.hpluv_l=0,this.r0s=0,this.r0i=0,this.r1s=0,this.r1i=0,this.g0s=0,this.g0i=0,this.g1s=0,this.g1i=0,this.b0s=0,this.b0i=0,this.b1s=0,this.b1i=0}static fromLinear(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}static toLinear(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92}static yToL(t){return t<=Fe.epsilon?t/Fe.refY*Fe.kappa:116*Math.pow(t/Fe.refY,1/3)-16}static lToY(t){return t<=8?Fe.refY*t/Fe.kappa:Fe.refY*Math.pow((t+16)/116,3)}static rgbChannelToHex(t){const r=Math.round(t*255),n=r%16,i=(r-n)/16|0;return Fe.hexChars.charAt(i)+Fe.hexChars.charAt(n)}static hexToRgbChannel(t,r){const n=Fe.hexChars.indexOf(t.charAt(r)),i=Fe.hexChars.indexOf(t.charAt(r+1));return(n*16+i)/255}static distanceFromOriginAngle(t,r,n){const i=r/(Math.sin(n)-t*Math.cos(n));return i<0?1/0:i}static distanceFromOrigin(t,r){return Math.abs(r)/Math.sqrt(Math.pow(t,2)+1)}static min6(t,r,n,i,s,o){return Math.min(t,Math.min(r,Math.min(n,Math.min(i,Math.min(s,o)))))}rgbToHex(){this.hex="#",this.hex+=Fe.rgbChannelToHex(this.rgb_r),this.hex+=Fe.rgbChannelToHex(this.rgb_g),this.hex+=Fe.rgbChannelToHex(this.rgb_b)}hexToRgb(){this.hex=this.hex.toLowerCase(),this.rgb_r=Fe.hexToRgbChannel(this.hex,1),this.rgb_g=Fe.hexToRgbChannel(this.hex,3),this.rgb_b=Fe.hexToRgbChannel(this.hex,5)}xyzToRgb(){this.rgb_r=Fe.fromLinear(Fe.m_r0*this.xyz_x+Fe.m_r1*this.xyz_y+Fe.m_r2*this.xyz_z),this.rgb_g=Fe.fromLinear(Fe.m_g0*this.xyz_x+Fe.m_g1*this.xyz_y+Fe.m_g2*this.xyz_z),this.rgb_b=Fe.fromLinear(Fe.m_b0*this.xyz_x+Fe.m_b1*this.xyz_y+Fe.m_b2*this.xyz_z)}rgbToXyz(){const t=Fe.toLinear(this.rgb_r),r=Fe.toLinear(this.rgb_g),n=Fe.toLinear(this.rgb_b);this.xyz_x=.41239079926595*t+.35758433938387*r+.18048078840183*n,this.xyz_y=.21263900587151*t+.71516867876775*r+.072192315360733*n,this.xyz_z=.019330818715591*t+.11919477979462*r+.95053215224966*n}xyzToLuv(){const t=this.xyz_x+15*this.xyz_y+3*this.xyz_z;let r=4*this.xyz_x,n=9*this.xyz_y;t!==0?(r/=t,n/=t):(r=NaN,n=NaN),this.luv_l=Fe.yToL(this.xyz_y),this.luv_l===0?(this.luv_u=0,this.luv_v=0):(this.luv_u=13*this.luv_l*(r-Fe.refU),this.luv_v=13*this.luv_l*(n-Fe.refV))}luvToXyz(){if(this.luv_l===0){this.xyz_x=0,this.xyz_y=0,this.xyz_z=0;return}const t=this.luv_u/(13*this.luv_l)+Fe.refU,r=this.luv_v/(13*this.luv_l)+Fe.refV;this.xyz_y=Fe.lToY(this.luv_l),this.xyz_x=0-9*this.xyz_y*t/((t-4)*r-t*r),this.xyz_z=(9*this.xyz_y-15*r*this.xyz_y-r*this.xyz_x)/(3*r)}luvToLch(){if(this.lch_l=this.luv_l,this.lch_c=Math.sqrt(this.luv_u*this.luv_u+this.luv_v*this.luv_v),this.lch_c<1e-8)this.lch_h=0;else{const t=Math.atan2(this.luv_v,this.luv_u);this.lch_h=t*180/Math.PI,this.lch_h<0&&(this.lch_h=360+this.lch_h)}}lchToLuv(){const t=this.lch_h/180*Math.PI;this.luv_l=this.lch_l,this.luv_u=Math.cos(t)*this.lch_c,this.luv_v=Math.sin(t)*this.lch_c}calculateBoundingLines(t){const r=Math.pow(t+16,3)/1560896,n=r>Fe.epsilon?r:t/Fe.kappa,i=n*(284517*Fe.m_r0-94839*Fe.m_r2),s=n*(838422*Fe.m_r2+769860*Fe.m_r1+731718*Fe.m_r0),o=n*(632260*Fe.m_r2-126452*Fe.m_r1),a=n*(284517*Fe.m_g0-94839*Fe.m_g2),l=n*(838422*Fe.m_g2+769860*Fe.m_g1+731718*Fe.m_g0),u=n*(632260*Fe.m_g2-126452*Fe.m_g1),c=n*(284517*Fe.m_b0-94839*Fe.m_b2),h=n*(838422*Fe.m_b2+769860*Fe.m_b1+731718*Fe.m_b0),d=n*(632260*Fe.m_b2-126452*Fe.m_b1);this.r0s=i/o,this.r0i=s*t/o,this.r1s=i/(o+126452),this.r1i=(s-769860)*t/(o+126452),this.g0s=a/u,this.g0i=l*t/u,this.g1s=a/(u+126452),this.g1i=(l-769860)*t/(u+126452),this.b0s=c/d,this.b0i=h*t/d,this.b1s=c/(d+126452),this.b1i=(h-769860)*t/(d+126452)}calcMaxChromaHpluv(){const t=Fe.distanceFromOrigin(this.r0s,this.r0i),r=Fe.distanceFromOrigin(this.r1s,this.r1i),n=Fe.distanceFromOrigin(this.g0s,this.g0i),i=Fe.distanceFromOrigin(this.g1s,this.g1i),s=Fe.distanceFromOrigin(this.b0s,this.b0i),o=Fe.distanceFromOrigin(this.b1s,this.b1i);return Fe.min6(t,r,n,i,s,o)}calcMaxChromaHsluv(t){const r=t/360*Math.PI*2,n=Fe.distanceFromOriginAngle(this.r0s,this.r0i,r),i=Fe.distanceFromOriginAngle(this.r1s,this.r1i,r),s=Fe.distanceFromOriginAngle(this.g0s,this.g0i,r),o=Fe.distanceFromOriginAngle(this.g1s,this.g1i,r),a=Fe.distanceFromOriginAngle(this.b0s,this.b0i,r),l=Fe.distanceFromOriginAngle(this.b1s,this.b1i,r);return Fe.min6(n,i,s,o,a,l)}hsluvToLch(){if(this.hsluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hsluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hsluv_l,this.calculateBoundingLines(this.hsluv_l);const t=this.calcMaxChromaHsluv(this.hsluv_h);this.lch_c=t/100*this.hsluv_s}this.lch_h=this.hsluv_h}lchToHsluv(){if(this.lch_l>99.9999999)this.hsluv_s=0,this.hsluv_l=100;else if(this.lch_l<1e-8)this.hsluv_s=0,this.hsluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHsluv(this.lch_h);this.hsluv_s=this.lch_c/t*100,this.hsluv_l=this.lch_l}this.hsluv_h=this.lch_h}hpluvToLch(){if(this.hpluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hpluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hpluv_l,this.calculateBoundingLines(this.hpluv_l);const t=this.calcMaxChromaHpluv();this.lch_c=t/100*this.hpluv_p}this.lch_h=this.hpluv_h}lchToHpluv(){if(this.lch_l>99.9999999)this.hpluv_p=0,this.hpluv_l=100;else if(this.lch_l<1e-8)this.hpluv_p=0,this.hpluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHpluv();this.hpluv_p=this.lch_c/t*100,this.hpluv_l=this.lch_l}this.hpluv_h=this.lch_h}hsluvToRgb(){this.hsluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hpluvToRgb(){this.hpluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hsluvToHex(){this.hsluvToRgb(),this.rgbToHex()}hpluvToHex(){this.hpluvToRgb(),this.rgbToHex()}rgbToHsluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHsluv()}rgbToHpluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHpluv()}hexToHsluv(){this.hexToRgb(),this.rgbToHsluv()}hexToHpluv(){this.hexToRgb(),this.rgbToHpluv()}}Fe.hexChars="0123456789abcdef";Fe.refY=1;Fe.refU=.19783000664283;Fe.refV=.46831999493879;Fe.kappa=903.2962962;Fe.epsilon=.0088564516;Fe.m_r0=3.240969941904521;Fe.m_r1=-1.537383177570093;Fe.m_r2=-.498610760293;Fe.m_g0=-.96924363628087;Fe.m_g1=1.87596750150772;Fe.m_g2=.041555057407175;Fe.m_b0=.055630079696993;Fe.m_b1=-.20397695888897;Fe.m_b2=1.056971514242878;const{min:Vte,max:Gte}=Math,Hu=(e,t=0,r=1)=>Vte(Gte(t,e),r),hk=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=Hu(e[t],0,255)):t===3&&(e[t]=Hu(e[t],0,1));return e},U4={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])U4[`[object ${e}]`]=e.toLowerCase();function Rt(e){return U4[Object.prototype.toString.call(e)]||"object"}const _t=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Rt(e[0])=="object"&&t?t.split("").filter(r=>e[0][r]!==void 0).map(r=>e[0][r]):e[0].slice(0),zd=e=>{if(e.length<2)return null;const t=e.length-1;return Rt(e[t])=="string"?e[t].toLowerCase():null},{PI:Sb,min:W4,max:V4}=Math,Ds=e=>Math.round(e*100)/100,QE=e=>Math.round(e*100)/100,oa=Sb*2,iS=Sb/3,qte=Sb/180,Kte=180/Sb;function G4(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const At={format:{},autodetect:[]};class Ne{constructor(...t){const r=this;if(Rt(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let n=zd(t),i=!1;if(!n){i=!0,At.sorted||(At.autodetect=At.autodetect.sort((s,o)=>o.p-s.p),At.sorted=!0);for(let s of At.autodetect)if(n=s.test(...t),n)break}if(At.format[n]){const s=At.format[n].apply(null,i?t:t.slice(0,-1));r._rgb=hk(s)}else throw new Error("unknown format: "+t);r._rgb.length===3&&r._rgb.push(1)}toString(){return Rt(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const Jte="3.1.2",bt=(...e)=>new Ne(...e);bt.version=Jte;const cd={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Xte=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Yte=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,q4=e=>{if(e.match(Xte)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),r=t>>16,n=t>>8&255,i=t&255;return[r,n,i,1]}if(e.match(Yte)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),r=t>>24&255,n=t>>16&255,i=t>>8&255,s=Math.round((t&255)/255*100)/100;return[r,n,i,s]}throw new Error(`unknown hex color: ${e}`)},{round:Gm}=Math,K4=(...e)=>{let[t,r,n,i]=_t(e,"rgba"),s=zd(e)||"auto";i===void 0&&(i=1),s==="auto"&&(s=i<1?"rgba":"rgb"),t=Gm(t),r=Gm(r),n=Gm(n);let a="000000"+(t<<16|r<<8|n).toString(16);a=a.substr(a.length-6);let l="0"+Gm(i*255).toString(16);switch(l=l.substr(l.length-2),s.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};Ne.prototype.name=function(){const e=K4(this._rgb,"rgb");for(let t of Object.keys(cd))if(cd[t]===e)return t.toLowerCase();return e};At.format.named=e=>{if(e=e.toLowerCase(),cd[e])return q4(cd[e]);throw new Error("unknown color name: "+e)};At.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Rt(e)==="string"&&cd[e.toLowerCase()])return"named"}});Ne.prototype.alpha=function(e,t=!1){return e!==void 0&&Rt(e)==="number"?t?(this._rgb[3]=e,this):new Ne([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};Ne.prototype.clipped=function(){return this._rgb._clipped||!1};const Fo={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},Qte=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function ha(e){const t=Qte.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);Fo.labWhitePoint=e,Fo.Xn=t[0],Fo.Zn=t[1]}function cg(){return Fo.labWhitePoint}const dk=(...e)=>{e=_t(e,"lab");const[t,r,n]=e,[i,s,o]=Zte(t,r,n),[a,l,u]=J4(i,s,o);return[a,l,u,e.length>3?e[3]:1]},Zte=(e,t,r)=>{const{kE:n,kK:i,kKE:s,Xn:o,Yn:a,Zn:l}=Fo,u=(e+16)/116,c=.002*t+u,h=u-.005*r,d=c*c*c,f=h*h*h,p=d>n?d:(116*c-16)/i,m=e>s?Math.pow((e+16)/116,3):e/i,y=f>n?f:(116*h-16)/i,b=p*o,v=m*a,E=y*l;return[b,v,E]},sS=e=>{const t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*t},J4=(e,t,r)=>{const{MtxAdaptMa:n,MtxAdaptMaI:i,MtxXYZ2RGB:s,RefWhiteRGB:o,Xn:a,Yn:l,Zn:u}=Fo,c=a*n.m00+l*n.m10+u*n.m20,h=a*n.m01+l*n.m11+u*n.m21,d=a*n.m02+l*n.m12+u*n.m22,f=o.X*n.m00+o.Y*n.m10+o.Z*n.m20,p=o.X*n.m01+o.Y*n.m11+o.Z*n.m21,m=o.X*n.m02+o.Y*n.m12+o.Z*n.m22,y=(e*n.m00+t*n.m10+r*n.m20)*(f/c),b=(e*n.m01+t*n.m11+r*n.m21)*(p/h),v=(e*n.m02+t*n.m12+r*n.m22)*(m/d),E=y*i.m00+b*i.m10+v*i.m20,D=y*i.m01+b*i.m11+v*i.m21,C=y*i.m02+b*i.m12+v*i.m22,w=sS(E*s.m00+D*s.m10+C*s.m20),T=sS(E*s.m01+D*s.m11+C*s.m21),k=sS(E*s.m02+D*s.m12+C*s.m22);return[w*255,T*255,k*255]},fk=(...e)=>{const[t,r,n,...i]=_t(e,"rgb"),[s,o,a]=X4(t,r,n),[l,u,c]=ere(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]};function ere(e,t,r){const{Xn:n,Yn:i,Zn:s,kE:o,kK:a}=Fo,l=e/n,u=t/i,c=r/s,h=l>o?Math.pow(l,1/3):(a*l+16)/116,d=u>o?Math.pow(u,1/3):(a*u+16)/116,f=c>o?Math.pow(c,1/3):(a*c+16)/116;return[116*d-16,500*(h-d),200*(d-f)]}function oS(e){const t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const X4=(e,t,r)=>{e=oS(e/255),t=oS(t/255),r=oS(r/255);const{MtxRGB2XYZ:n,MtxAdaptMa:i,MtxAdaptMaI:s,Xn:o,Yn:a,Zn:l,As:u,Bs:c,Cs:h}=Fo;let d=e*n.m00+t*n.m10+r*n.m20,f=e*n.m01+t*n.m11+r*n.m21,p=e*n.m02+t*n.m12+r*n.m22;const m=o*i.m00+a*i.m10+l*i.m20,y=o*i.m01+a*i.m11+l*i.m21,b=o*i.m02+a*i.m12+l*i.m22;let v=d*i.m00+f*i.m10+p*i.m20,E=d*i.m01+f*i.m11+p*i.m21,D=d*i.m02+f*i.m12+p*i.m22;return v*=m/u,E*=y/c,D*=b/h,d=v*s.m00+E*s.m10+D*s.m20,f=v*s.m01+E*s.m11+D*s.m21,p=v*s.m02+E*s.m12+D*s.m22,[d,f,p]};Ne.prototype.lab=function(){return fk(this._rgb)};const tre=(...e)=>new Ne(...e,"lab");Object.assign(bt,{lab:tre,getLabWhitePoint:cg,setLabWhitePoint:ha});At.format.lab=dk;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"lab"),Rt(e)==="array"&&e.length===3)return"lab"}});Ne.prototype.darken=function(e=1){const t=this,r=t.lab();return r[0]-=Fo.Kn*e,new Ne(r,"lab").alpha(t.alpha(),!0)};Ne.prototype.brighten=function(e=1){return this.darken(-e)};Ne.prototype.darker=Ne.prototype.darken;Ne.prototype.brighter=Ne.prototype.brighten;Ne.prototype.get=function(e){const[t,r]=e.split("."),n=this[t]();if(r){const i=t.indexOf(r)-(t.substr(0,2)==="ok"?2:0);if(i>-1)return n[i];throw new Error(`unknown channel ${r} in mode ${t}`)}else return n};const{pow:rre}=Math,nre=1e-7,ire=20;Ne.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&Rt(e)==="number"){if(e===0)return new Ne([0,0,0,this._rgb[3]],"rgb");if(e===1)return new Ne([255,255,255,this._rgb[3]],"rgb");let r=this.luminance(),n=ire;const i=(o,a)=>{const l=o.interpolate(a,.5,t),u=l.luminance();return Math.abs(e-u)e?i(o,l):i(l,a)},s=(r>e?i(new Ne([0,0,0]),this):i(this,new Ne([255,255,255]))).rgb();return new Ne([...s,this._rgb[3]])}return sre(...this._rgb.slice(0,3))};const sre=(e,t,r)=>(e=aS(e),t=aS(t),r=aS(r),.2126*e+.7152*t+.0722*r),aS=e=>(e/=255,e<=.03928?e/12.92:rre((e+.055)/1.055,2.4)),ti={},hd=(e,t,r=.5,...n)=>{let i=n[0]||"lrgb";if(!ti[i]&&!n.length&&(i=Object.keys(ti)[0]),!ti[i])throw new Error(`interpolation mode ${i} is not defined`);return Rt(e)!=="object"&&(e=new Ne(e)),Rt(t)!=="object"&&(t=new Ne(t)),ti[i](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))};Ne.prototype.mix=Ne.prototype.interpolate=function(e,t=.5,...r){return hd(this,e,t,...r)};Ne.prototype.premultiply=function(e=!1){const t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new Ne([t[0]*r,t[1]*r,t[2]*r,r],"rgb")};const{sin:ore,cos:are}=Math,Y4=(...e)=>{let[t,r,n]=_t(e,"lch");return isNaN(n)&&(n=0),n=n*qte,[t,are(n)*r,ore(n)*r]},pk=(...e)=>{e=_t(e,"lch");const[t,r,n]=e,[i,s,o]=Y4(t,r,n),[a,l,u]=dk(i,s,o);return[a,l,u,e.length>3?e[3]:1]},lre=(...e)=>{const t=G4(_t(e,"hcl"));return pk(...t)},{sqrt:ure,atan2:cre,round:hre}=Math,Q4=(...e)=>{const[t,r,n]=_t(e,"lab"),i=ure(r*r+n*n);let s=(cre(n,r)*Kte+360)%360;return hre(i*1e4)===0&&(s=Number.NaN),[t,i,s]},gk=(...e)=>{const[t,r,n,...i]=_t(e,"rgb"),[s,o,a]=fk(t,r,n),[l,u,c]=Q4(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]};Ne.prototype.lch=function(){return gk(this._rgb)};Ne.prototype.hcl=function(){return G4(gk(this._rgb))};const dre=(...e)=>new Ne(...e,"lch"),fre=(...e)=>new Ne(...e,"hcl");Object.assign(bt,{lch:dre,hcl:fre});At.format.lch=pk;At.format.hcl=lre;["lch","hcl"].forEach(e=>At.autodetect.push({p:2,test:(...t)=>{if(t=_t(t,e),Rt(t)==="array"&&t.length===3)return e}}));Ne.prototype.saturate=function(e=1){const t=this,r=t.lch();return r[1]+=Fo.Kn*e,r[1]<0&&(r[1]=0),new Ne(r,"lch").alpha(t.alpha(),!0)};Ne.prototype.desaturate=function(e=1){return this.saturate(-e)};Ne.prototype.set=function(e,t,r=!1){const[n,i]=e.split("."),s=this[n]();if(i){const o=n.indexOf(i)-(n.substr(0,2)==="ok"?2:0);if(o>-1){if(Rt(t)=="string")switch(t.charAt(0)){case"+":s[o]+=+t;break;case"-":s[o]+=+t;break;case"*":s[o]*=+t.substr(1);break;case"/":s[o]/=+t.substr(1);break;default:s[o]=+t}else if(Rt(t)==="number")s[o]=t;else throw new Error("unsupported value for Color.set");const a=new Ne(s,n);return r?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${i} in mode ${n}`)}else return s};Ne.prototype.tint=function(e=.5,...t){return hd(this,"white",e,...t)};Ne.prototype.shade=function(e=.5,...t){return hd(this,"black",e,...t)};const pre=(e,t,r)=>{const n=e._rgb,i=t._rgb;return new Ne(n[0]+r*(i[0]-n[0]),n[1]+r*(i[1]-n[1]),n[2]+r*(i[2]-n[2]),"rgb")};ti.rgb=pre;const{sqrt:lS,pow:ih}=Math,gre=(e,t,r)=>{const[n,i,s]=e._rgb,[o,a,l]=t._rgb;return new Ne(lS(ih(n,2)*(1-r)+ih(o,2)*r),lS(ih(i,2)*(1-r)+ih(a,2)*r),lS(ih(s,2)*(1-r)+ih(l,2)*r),"rgb")};ti.lrgb=gre;const mre=(e,t,r)=>{const n=e.lab(),i=t.lab();return new Ne(n[0]+r*(i[0]-n[0]),n[1]+r*(i[1]-n[1]),n[2]+r*(i[2]-n[2]),"lab")};ti.lab=mre;const Hd=(e,t,r,n)=>{let i,s;n==="hsl"?(i=e.hsl(),s=t.hsl()):n==="hsv"?(i=e.hsv(),s=t.hsv()):n==="hcg"?(i=e.hcg(),s=t.hcg()):n==="hsi"?(i=e.hsi(),s=t.hsi()):n==="lch"||n==="hcl"?(n="hcl",i=e.hcl(),s=t.hcl()):n==="oklch"&&(i=e.oklch().reverse(),s=t.oklch().reverse());let o,a,l,u,c,h;(n.substr(0,1)==="h"||n==="oklch")&&([o,l,c]=i,[a,u,h]=s);let d,f,p,m;return!isNaN(o)&&!isNaN(a)?(a>o&&a-o>180?m=a-(o+360):a180?m=a+360-o:m=a-o,f=o+r*m):isNaN(o)?isNaN(a)?f=Number.NaN:(f=a,(c==1||c==0)&&n!="hsv"&&(d=u)):(f=o,(h==1||h==0)&&n!="hsv"&&(d=l)),d===void 0&&(d=l+r*(u-l)),p=c+r*(h-c),n==="oklch"?new Ne([p,d,f],n):new Ne([f,d,p],n)},Z4=(e,t,r)=>Hd(e,t,r,"lch");ti.lch=Z4;ti.hcl=Z4;const yre=e=>{if(Rt(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,r=e>>8&255,n=e&255;return[t,r,n,1]}throw new Error("unknown num color: "+e)},vre=(...e)=>{const[t,r,n]=_t(e,"rgb");return(t<<16)+(r<<8)+n};Ne.prototype.num=function(){return vre(this._rgb)};const bre=(...e)=>new Ne(...e,"num");Object.assign(bt,{num:bre});At.format.num=yre;At.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Rt(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const xre=(e,t,r)=>{const n=e.num(),i=t.num();return new Ne(n+r*(i-n),"num")};ti.num=xre;const{floor:wre}=Math,Sre=(...e)=>{e=_t(e,"hcg");let[t,r,n]=e,i,s,o;n=n*255;const a=r*255;if(r===0)i=s=o=n;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const l=wre(t),u=t-l,c=n*(1-r),h=c+a*(1-u),d=c+a*u,f=c+a;switch(l){case 0:[i,s,o]=[f,d,c];break;case 1:[i,s,o]=[h,f,c];break;case 2:[i,s,o]=[c,f,d];break;case 3:[i,s,o]=[c,h,f];break;case 4:[i,s,o]=[d,c,f];break;case 5:[i,s,o]=[f,c,h];break}}return[i,s,o,e.length>3?e[3]:1]},Dre=(...e)=>{const[t,r,n]=_t(e,"rgb"),i=W4(t,r,n),s=V4(t,r,n),o=s-i,a=o*100/255,l=i/(255-o)*100;let u;return o===0?u=Number.NaN:(t===s&&(u=(r-n)/o),r===s&&(u=2+(n-t)/o),n===s&&(u=4+(t-r)/o),u*=60,u<0&&(u+=360)),[u,a,l]};Ne.prototype.hcg=function(){return Dre(this._rgb)};const Ere=(...e)=>new Ne(...e,"hcg");bt.hcg=Ere;At.format.hcg=Sre;At.autodetect.push({p:1,test:(...e)=>{if(e=_t(e,"hcg"),Rt(e)==="array"&&e.length===3)return"hcg"}});const Cre=(e,t,r)=>Hd(e,t,r,"hcg");ti.hcg=Cre;const{cos:sh}=Math,Tre=(...e)=>{e=_t(e,"hsi");let[t,r,n]=e,i,s,o;return isNaN(t)&&(t=0),isNaN(r)&&(r=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-r)/3,i=(1+r*sh(oa*t)/sh(iS-oa*t))/3,s=1-(o+i)):t<2/3?(t-=1/3,i=(1-r)/3,s=(1+r*sh(oa*t)/sh(iS-oa*t))/3,o=1-(i+s)):(t-=2/3,s=(1-r)/3,o=(1+r*sh(oa*t)/sh(iS-oa*t))/3,i=1-(s+o)),i=Hu(n*i*3),s=Hu(n*s*3),o=Hu(n*o*3),[i*255,s*255,o*255,e.length>3?e[3]:1]},{min:Are,sqrt:kre,acos:_re}=Math,$re=(...e)=>{let[t,r,n]=_t(e,"rgb");t/=255,r/=255,n/=255;let i;const s=Are(t,r,n),o=(t+r+n)/3,a=o>0?1-s/o:0;return a===0?i=NaN:(i=(t-r+(t-n))/2,i/=kre((t-r)*(t-r)+(t-n)*(r-n)),i=_re(i),n>r&&(i=oa-i),i/=oa),[i*360,a,o]};Ne.prototype.hsi=function(){return $re(this._rgb)};const Lre=(...e)=>new Ne(...e,"hsi");bt.hsi=Lre;At.format.hsi=Tre;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"hsi"),Rt(e)==="array"&&e.length===3)return"hsi"}});const Pre=(e,t,r)=>Hd(e,t,r,"hsi");ti.hsi=Pre;const ZE=(...e)=>{e=_t(e,"hsl");const[t,r,n]=e;let i,s,o;if(r===0)i=s=o=n*255;else{const a=[0,0,0],l=[0,0,0],u=n<.5?n*(1+r):n+r-n*r,c=2*n-u,h=t/360;a[0]=h+1/3,a[1]=h,a[2]=h-1/3;for(let d=0;d<3;d++)a[d]<0&&(a[d]+=1),a[d]>1&&(a[d]-=1),6*a[d]<1?l[d]=c+(u-c)*6*a[d]:2*a[d]<1?l[d]=u:3*a[d]<2?l[d]=c+(u-c)*(2/3-a[d])*6:l[d]=c;[i,s,o]=[l[0]*255,l[1]*255,l[2]*255]}return e.length>3?[i,s,o,e[3]]:[i,s,o,1]},e6=(...e)=>{e=_t(e,"rgba");let[t,r,n]=e;t/=255,r/=255,n/=255;const i=W4(t,r,n),s=V4(t,r,n),o=(s+i)/2;let a,l;return s===i?(a=0,l=Number.NaN):a=o<.5?(s-i)/(s+i):(s-i)/(2-s-i),t==s?l=(r-n)/(s-i):r==s?l=2+(n-t)/(s-i):n==s&&(l=4+(t-r)/(s-i)),l*=60,l<0&&(l+=360),e.length>3&&e[3]!==void 0?[l,a,o,e[3]]:[l,a,o]};Ne.prototype.hsl=function(){return e6(this._rgb)};const Fre=(...e)=>new Ne(...e,"hsl");bt.hsl=Fre;At.format.hsl=ZE;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"hsl"),Rt(e)==="array"&&e.length===3)return"hsl"}});const Ore=(e,t,r)=>Hd(e,t,r,"hsl");ti.hsl=Ore;const{floor:Ire}=Math,Mre=(...e)=>{e=_t(e,"hsv");let[t,r,n]=e,i,s,o;if(n*=255,r===0)i=s=o=n;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=Ire(t),l=t-a,u=n*(1-r),c=n*(1-r*l),h=n*(1-r*(1-l));switch(a){case 0:[i,s,o]=[n,h,u];break;case 1:[i,s,o]=[c,n,u];break;case 2:[i,s,o]=[u,n,h];break;case 3:[i,s,o]=[u,c,n];break;case 4:[i,s,o]=[h,u,n];break;case 5:[i,s,o]=[n,u,c];break}}return[i,s,o,e.length>3?e[3]:1]},{min:Nre,max:Rre}=Math,Bre=(...e)=>{e=_t(e,"rgb");let[t,r,n]=e;const i=Nre(t,r,n),s=Rre(t,r,n),o=s-i;let a,l,u;return u=s/255,s===0?(a=Number.NaN,l=0):(l=o/s,t===s&&(a=(r-n)/o),r===s&&(a=2+(n-t)/o),n===s&&(a=4+(t-r)/o),a*=60,a<0&&(a+=360)),[a,l,u]};Ne.prototype.hsv=function(){return Bre(this._rgb)};const jre=(...e)=>new Ne(...e,"hsv");bt.hsv=jre;At.format.hsv=Mre;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"hsv"),Rt(e)==="array"&&e.length===3)return"hsv"}});const zre=(e,t,r)=>Hd(e,t,r,"hsv");ti.hsv=zre;function Kv(e,t){let r=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(o=>[o]));let n=t[0].length,i=t[0].map((o,a)=>t.map(l=>l[a])),s=e.map(o=>i.map(a=>Array.isArray(o)?o.reduce((l,u,c)=>l+u*(a[c]||0),0):a.reduce((l,u)=>l+u*o,0)));return r===1&&(s=s[0]),n===1?s.map(o=>o[0]):s}const mk=(...e)=>{e=_t(e,"lab");const[t,r,n,...i]=e,[s,o,a]=Hre([t,r,n]),[l,u,c]=J4(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]};function Hre(e){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],r=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],n=Kv(r,e);return Kv(t,n.map(i=>i**3))}const yk=(...e)=>{const[t,r,n,...i]=_t(e,"rgb"),s=X4(t,r,n);return[...Ure(s),...i.length>0&&i[0]<1?[i[0]]:[]]};function Ure(e){const t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],r=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],n=Kv(t,e);return Kv(r,n.map(i=>Math.cbrt(i)))}Ne.prototype.oklab=function(){return yk(this._rgb)};const Wre=(...e)=>new Ne(...e,"oklab");Object.assign(bt,{oklab:Wre});At.format.oklab=mk;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"oklab"),Rt(e)==="array"&&e.length===3)return"oklab"}});const Vre=(e,t,r)=>{const n=e.oklab(),i=t.oklab();return new Ne(n[0]+r*(i[0]-n[0]),n[1]+r*(i[1]-n[1]),n[2]+r*(i[2]-n[2]),"oklab")};ti.oklab=Vre;const Gre=(e,t,r)=>Hd(e,t,r,"oklch");ti.oklch=Gre;const{pow:uS,sqrt:cS,PI:hS,cos:UP,sin:WP,atan2:qre}=Math,Kre=(e,t="lrgb",r=null)=>{const n=e.length;r||(r=Array.from(new Array(n)).map(()=>1));const i=n/r.reduce(function(h,d){return h+d});if(r.forEach((h,d)=>{r[d]*=i}),e=e.map(h=>new Ne(h)),t==="lrgb")return Jre(e,r);const s=e.shift(),o=s.get(t),a=[];let l=0,u=0;for(let h=0;h{const f=h.get(t);c+=h.alpha()*r[d+1];for(let p=0;p=360;)d-=360;o[h]=d}else o[h]=o[h]/a[h];return c/=n,new Ne(o,t).alpha(c>.99999?1:c,!0)},Jre=(e,t)=>{const r=e.length,n=[0,0,0,0];for(let i=0;i.9999999&&(n[3]=1),new Ne(hk(n))},{pow:Xre}=Math;function Jv(e){let t="rgb",r=bt("#ccc"),n=0,i=[0,1],s=[],o=[0,0],a=!1,l=[],u=!1,c=0,h=1,d=!1,f={},p=!0,m=1;const y=function(T){if(T=T||["#fff","#000"],T&&Rt(T)==="string"&&bt.brewer&&bt.brewer[T.toLowerCase()]&&(T=bt.brewer[T.toLowerCase()]),Rt(T)==="array"){T.length===1&&(T=[T[0],T[0]]),T=T.slice(0);for(let k=0;k=a[O];)O++;return O-1}return 0};let v=T=>T,E=T=>T;const D=function(T,k){let O,P;if(k==null&&(k=!1),isNaN(T)||T===null)return r;k?P=T:a&&a.length>2?P=b(T)/(a.length-2):h!==c?P=(T-c)/(h-c):P=1,P=E(P),k||(P=v(P)),m!==1&&(P=Xre(P,m)),P=o[0]+P*(1-o[0]-o[1]),P=Hu(P,0,1);const I=Math.floor(P*1e4);if(p&&f[I])O=f[I];else{if(Rt(l)==="array")for(let F=0;F=L&&F===s.length-1){O=l[F];break}if(P>L&&Pf={};y(e);const w=function(T){const k=bt(D(T));return u&&k[u]?k[u]():k};return w.classes=function(T){if(T!=null){if(Rt(T)==="array")a=T,i=[T[0],T[T.length-1]];else{const k=bt.analyze(i);T===0?a=[k.min,k.max]:a=bt.limits(k,"e",T)}return w}return a},w.domain=function(T){if(!arguments.length)return i;c=T[0],h=T[T.length-1],s=[];const k=l.length;if(T.length===k&&c!==h)for(let O of Array.from(T))s.push((O-c)/(h-c));else{for(let O=0;O2){const O=T.map((I,F)=>F/(T.length-1)),P=T.map(I=>(I-c)/(h-c));P.every((I,F)=>O[F]===I)||(E=I=>{if(I<=0||I>=1)return I;let F=0;for(;I>=P[F+1];)F++;const L=(I-P[F])/(P[F+1]-P[F]);return O[F]+L*(O[F+1]-O[F])})}}return i=[c,h],w},w.mode=function(T){return arguments.length?(t=T,C(),w):t},w.range=function(T,k){return y(T),w},w.out=function(T){return u=T,w},w.spread=function(T){return arguments.length?(n=T,w):n},w.correctLightness=function(T){return T==null&&(T=!0),d=T,C(),d?v=function(k){const O=D(0,!0).lab()[0],P=D(1,!0).lab()[0],I=O>P;let F=D(k,!0).lab()[0];const L=O+(P-O)*k;let _=F-L,A=0,M=1,R=20;for(;Math.abs(_)>.01&&R-- >0;)(function(){return I&&(_*=-1),_<0?(A=k,k+=(M-k)*.5):(M=k,k+=(A-k)*.5),F=D(k,!0).lab()[0],_=F-L})();return k}:v=k=>k,w},w.padding=function(T){return T!=null?(Rt(T)==="number"&&(T=[T,T]),o=T,w):o},w.colors=function(T,k){arguments.length<2&&(k="hex");let O=[];if(arguments.length===0)O=l.slice(0);else if(T===1)O=[w(.5)];else if(T>1){const P=i[0],I=i[1]-P;O=Yre(0,T).map(F=>w(P+F/(T-1)*I))}else{e=[];let P=[];if(a&&a.length>2)for(let I=1,F=a.length,L=1<=F;L?IF;L?I++:I--)P.push((a[I-1]+a[I])*.5);else P=i;O=P.map(I=>w(I))}return bt[k]&&(O=O.map(P=>P[k]())),O},w.cache=function(T){return T!=null?(p=T,w):p},w.gamma=function(T){return T!=null?(m=T,w):m},w.nodata=function(T){return T!=null?(r=bt(T),w):r},w}function Yre(e,t,r){let n=[],i=es;i?o++:o--)n.push(o);return n}const Qre=function(e){let t=[1,1];for(let r=1;rnew Ne(s)),e.length===2)[r,n]=e.map(s=>s.lab()),t=function(s){const o=[0,1,2].map(a=>r[a]+s*(n[a]-r[a]));return new Ne(o,"lab")};else if(e.length===3)[r,n,i]=e.map(s=>s.lab()),t=function(s){const o=[0,1,2].map(a=>(1-s)*(1-s)*r[a]+2*(1-s)*s*n[a]+s*s*i[a]);return new Ne(o,"lab")};else if(e.length===4){let s;[r,n,i,s]=e.map(o=>o.lab()),t=function(o){const a=[0,1,2].map(l=>(1-o)*(1-o)*(1-o)*r[l]+3*(1-o)*(1-o)*o*n[l]+3*(1-o)*o*o*i[l]+o*o*o*s[l]);return new Ne(a,"lab")}}else if(e.length>=5){let s,o,a;s=e.map(l=>l.lab()),a=e.length-1,o=Qre(a),t=function(l){const u=1-l,c=[0,1,2].map(h=>s.reduce((d,f,p)=>d+o[p]*u**(a-p)*l**p*f[h],0));return new Ne(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},ene=e=>{const t=Zre(e);return t.scale=()=>Jv(t),t},{round:t6}=Math;Ne.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(t6)};Ne.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,r)=>r<3?e===!1?t:t6(t):t)};const tne=(...e)=>new Ne(...e,"rgb");Object.assign(bt,{rgb:tne});At.format.rgb=(...e)=>{const t=_t(e,"rgba");return t[3]===void 0&&(t[3]=1),t};At.autodetect.push({p:3,test:(...e)=>{if(e=_t(e,"rgba"),Rt(e)==="array"&&(e.length===3||e.length===4&&Rt(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const co=(e,t,r)=>{if(!co[r])throw new Error("unknown blend mode "+r);return co[r](e,t)},Zl=e=>(t,r)=>{const n=bt(r).rgb(),i=bt(t).rgb();return bt.rgb(e(n,i))},eu=e=>(t,r)=>{const n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n},rne=e=>e,nne=(e,t)=>e*t/255,ine=(e,t)=>e>t?t:e,sne=(e,t)=>e>t?e:t,one=(e,t)=>255*(1-(1-e/255)*(1-t/255)),ane=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),lne=(e,t)=>255*(1-(1-t/255)/(e/255)),une=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);co.normal=Zl(eu(rne));co.multiply=Zl(eu(nne));co.screen=Zl(eu(one));co.overlay=Zl(eu(ane));co.darken=Zl(eu(ine));co.lighten=Zl(eu(sne));co.dodge=Zl(eu(une));co.burn=Zl(eu(lne));const{pow:cne,sin:hne,cos:dne}=Math;function fne(e=300,t=-1.5,r=1,n=1,i=[0,1]){let s=0,o;Rt(i)==="array"?o=i[1]-i[0]:(o=0,i=[i,i]);const a=function(l){const u=oa*((e+120)/360+t*l),c=cne(i[0]+o*l,n),d=(s!==0?r[0]+l*s:r)*c*(1-c)/2,f=dne(u),p=hne(u),m=c+d*(-.14861*f+1.78277*p),y=c+d*(-.29227*f-.90649*p),b=c+d*(1.97294*f);return bt(hk([m*255,y*255,b*255,1]))};return a.start=function(l){return l==null?e:(e=l,a)},a.rotations=function(l){return l==null?t:(t=l,a)},a.gamma=function(l){return l==null?n:(n=l,a)},a.hue=function(l){return l==null?r:(r=l,Rt(r)==="array"?(s=r[1]-r[0],s===0&&(r=r[1])):s=0,a)},a.lightness=function(l){return l==null?i:(Rt(l)==="array"?(i=l,o=l[1]-l[0]):(i=[l,l],o=0),a)},a.scale=()=>bt.scale(a),a.hue(r),a}const pne="0123456789abcdef",{floor:gne,random:mne}=Math,yne=()=>{let e="#";for(let t=0;t<6;t++)e+=pne.charAt(gne(mne()*16));return new Ne(e,"hex")},{log:VP,pow:vne,floor:bne,abs:xne}=Math;function r6(e,t=null){const r={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Rt(e)==="object"&&(e=Object.values(e)),e.forEach(n=>{t&&Rt(n)==="object"&&(n=n[t]),n!=null&&!isNaN(n)&&(r.values.push(n),r.sum+=n,nr.max&&(r.max=n),r.count+=1)}),r.domain=[r.min,r.max],r.limits=(n,i)=>n6(r,n,i),r}function n6(e,t="equal",r=7){Rt(e)=="array"&&(e=r6(e));const{min:n,max:i}=e,s=e.values.sort((a,l)=>a-l);if(r===1)return[n,i];const o=[];if(t.substr(0,1)==="c"&&(o.push(n),o.push(i)),t.substr(0,1)==="e"){o.push(n);for(let a=1;a 0");const a=Math.LOG10E*VP(n),l=Math.LOG10E*VP(i);o.push(n);for(let u=1;u200&&(h=!1)}const p={};for(let y=0;yy-b),o.push(m[0]);for(let y=1;y{e=new Ne(e),t=new Ne(t);const r=e.luminance(),n=t.luminance();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)};/** * @license * * The APCA contrast prediction algorithm is based of the formulas published @@ -84,12 +84,12 @@ Error generating stack: `+s.message+` * * You can read more about the APCA Readability Criterion at * https://readtech.org/ARC/ - */const WP=.027,wne=5e-4,Sne=.1,VP=1.14,qm=.022,GP=1.414,Dne=(e,t)=>{e=new Ie(e),t=new Ie(t),e.alpha()<1&&(e=ud(t,e,e.alpha(),"rgb"));const r=qP(...e.rgb()),n=qP(...t.rgb()),i=r>=qm?r:r+Math.pow(qm-r,GP),s=n>=qm?n:n+Math.pow(qm-n,GP),o=Math.pow(s,.56)-Math.pow(i,.57),a=Math.pow(s,.65)-Math.pow(i,.62),l=Math.abs(s-i)0?l-WP:l+WP)*100};function qP(e,t,r){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(r/255,2.4)}const{sqrt:Xo,pow:Qr,min:Ene,max:Cne,atan2:KP,abs:JP,cos:Km,sin:XP,exp:Ane,PI:YP}=Math;function Tne(e,t,r=1,n=1,i=1){var s=function(G){return 360*G/(2*YP)},o=function(G){return 2*YP*G/360};e=new Ie(e),t=new Ie(t);const[a,l,u]=Array.from(e.lab()),[c,h,d]=Array.from(t.lab()),f=(a+c)/2,p=Xo(Qr(l,2)+Qr(u,2)),m=Xo(Qr(h,2)+Qr(d,2)),y=(p+m)/2,b=.5*(1-Xo(Qr(y,7)/(Qr(y,7)+Qr(25,7)))),v=l*(1+b),E=h*(1+b),D=Xo(Qr(v,2)+Qr(u,2)),C=Xo(Qr(E,2)+Qr(d,2)),w=(D+C)/2,A=s(KP(u,v)),$=s(KP(d,E)),O=A>=0?A:A+360,P=$>=0?$:$+360,N=JP(O-P)>180?(O+P+360)/2:(O+P)/2,F=1-.17*Km(o(N-30))+.24*Km(o(2*N))+.32*Km(o(3*N+6))-.2*Km(o(4*N-63));let L=P-O;L=JP(L)<=180?L:P<=O?L+360:L-360,L=2*Xo(D*C)*XP(o(L)/2);const k=c-a,T=C-D,M=1+.015*Qr(f-50,2)/Xo(20+Qr(f-50,2)),R=1+.045*w,B=1+.015*w*F,U=30*Ane(-Qr((N-275)/25,2)),K=-(2*Xo(Qr(w,7)/(Qr(w,7)+Qr(25,7))))*XP(2*o(U)),J=Xo(Qr(k/(r*M),2)+Qr(T/(n*R),2)+Qr(L/(i*B),2)+K*(T/(n*R))*(L/(i*B)));return Cne(0,Ene(100,J))}function kne(e,t,r="lab"){e=new Ie(e),t=new Ie(t);const n=e.get(r),i=t.get(r);let s=0;for(let o in n){const a=(n[o]||0)-(i[o]||0);s+=a*a}return Math.sqrt(s)}const _ne=(...e)=>{try{return new Ie(...e),!0}catch{return!1}},$ne={cool(){return Xv([vt.hsl(180,1,.9),vt.hsl(250,.7,.4)])},hot(){return Xv(["#000","#f00","#ff0","#fff"]).mode("rgb")}},tC={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},r6=Object.keys(tC),QP=new Map(r6.map(e=>[e.toLowerCase(),e])),Lne=typeof Proxy=="function"?new Proxy(tC,{get(e,t){const r=t.toLowerCase();if(QP.has(r))return e[QP.get(r)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(r6)}}):tC,Pne=(...e)=>{e=Tt(e,"cmyk");const[t,r,n,i]=e,s=e.length>4?e[4]:1;return i===1?[0,0,0,s]:[t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),n>=1?0:255*(1-n)*(1-i),s]},{max:ZP}=Math,Fne=(...e)=>{let[t,r,n]=Tt(e,"rgb");t=t/255,r=r/255,n=n/255;const i=1-ZP(t,ZP(r,n)),s=i<1?1/(1-i):0,o=(1-t-i)*s,a=(1-r-i)*s,l=(1-n-i)*s;return[o,a,l,i]};Ie.prototype.cmyk=function(){return Fne(this._rgb)};const One=(...e)=>new Ie(...e,"cmyk");Object.assign(vt,{cmyk:One});Ct.format.cmyk=Pne;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"cmyk"),Mt(e)==="array"&&e.length===4)return"cmyk"}});const Nne=(...e)=>{const t=Tt(e,"hsla");let r=Bd(e)||"lsa";return t[0]=xs(t[0]||0)+"deg",t[1]=xs(t[1]*100)+"%",t[2]=xs(t[2]*100)+"%",r==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),r="hsla"):t.length=3,`${r.substr(0,3)}(${t.join(" ")})`},Mne=(...e)=>{const t=Tt(e,"lab");let r=Bd(e)||"lab";return t[0]=xs(t[0])+"%",t[1]=xs(t[1]),t[2]=xs(t[2]),r==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},Ine=(...e)=>{const t=Tt(e,"lch");let r=Bd(e)||"lab";return t[0]=xs(t[0])+"%",t[1]=xs(t[1]),t[2]=isNaN(t[2])?"none":xs(t[2])+"deg",r==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},Rne=(...e)=>{const t=Tt(e,"lab");return t[0]=xs(t[0]*100)+"%",t[1]=ZE(t[1]),t[2]=ZE(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},n6=(...e)=>{const[t,r,n,...i]=Tt(e,"rgb"),[s,o,a]=mk(t,r,n),[l,u,c]=X4(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]},Bne=(...e)=>{const t=Tt(e,"lch");return t[0]=xs(t[0]*100)+"%",t[1]=ZE(t[1]),t[2]=isNaN(t[2])?"none":xs(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:fS}=Math,jne=(...e)=>{const t=Tt(e,"rgba");let r=Bd(e)||"rgb";if(r.substr(0,3)==="hsl")return Nne(Q4(t),r);if(r.substr(0,3)==="lab"){const n=cg();ua("d50");const i=Mne(dk(t),r);return ua(n),i}if(r.substr(0,3)==="lch"){const n=cg();ua("d50");const i=Ine(pk(t),r);return ua(n),i}return r.substr(0,5)==="oklab"?Rne(mk(t)):r.substr(0,5)==="oklch"?Bne(n6(t)):(t[0]=fS(t[0]),t[1]=fS(t[1]),t[2]=fS(t[2]),(r==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),r="rgba"),`${r.substr(0,3)}(${t.slice(0,r==="rgb"?3:4).join(" ")})`)},i6=(...e)=>{e=Tt(e,"lch");const[t,r,n,...i]=e,[s,o,a]=J4(t,r,n),[l,u,c]=gk(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]},da=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ro=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Yv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,Cs=/\s*/.source,zd=/\s+/.source,yk=/\s*,\s*/.source,Eb=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,Hd=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,s6=new RegExp("^rgba?\\("+Cs+[da,da,da].join(zd)+Hd+"\\)$"),o6=new RegExp("^rgb\\("+Cs+[da,da,da].join(yk)+Cs+"\\)$"),a6=new RegExp("^rgba\\("+Cs+[da,da,da,ro].join(yk)+Cs+"\\)$"),l6=new RegExp("^hsla?\\("+Cs+[Eb,Yv,Yv].join(zd)+Hd+"\\)$"),u6=new RegExp("^hsl?\\("+Cs+[Eb,Yv,Yv].join(yk)+Cs+"\\)$"),c6=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,h6=new RegExp("^lab\\("+Cs+[ro,ro,ro].join(zd)+Hd+"\\)$"),d6=new RegExp("^lch\\("+Cs+[ro,ro,Eb].join(zd)+Hd+"\\)$"),f6=new RegExp("^oklab\\("+Cs+[ro,ro,ro].join(zd)+Hd+"\\)$"),p6=new RegExp("^oklch\\("+Cs+[ro,ro,Eb].join(zd)+Hd+"\\)$"),{round:g6}=Math,ih=e=>e.map((t,r)=>r<=2?ju(g6(t),0,255):t),Zr=(e,t=0,r=100,n=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,n?e=t+(e+1)*.5*(r-t):e=t+e*(r-t)),+e),ui=(e,t)=>e==="none"?t:e,vk=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Ct.format.named)try{return Ct.format.named(e)}catch{}if((t=e.match(s6))||(t=e.match(o6))){let r=t.slice(1,4);for(let i=0;i<3;i++)r[i]=+Zr(ui(r[i],0),0,255);r=ih(r);const n=t[4]!==void 0?+Zr(t[4],0,1):1;return r[3]=n,r}if(t=e.match(a6)){const r=t.slice(1,5);for(let n=0;n<4;n++)r[n]=+Zr(r[n],0,255);return r}if((t=e.match(l6))||(t=e.match(u6))){const r=t.slice(1,4);r[0]=+ui(r[0].replace("deg",""),0),r[1]=+Zr(ui(r[1],0),0,100)*.01,r[2]=+Zr(ui(r[2],0),0,100)*.01;const n=ih(eC(r)),i=t[4]!==void 0?+Zr(t[4],0,1):1;return n[3]=i,n}if(t=e.match(c6)){const r=t.slice(1,4);r[1]*=.01,r[2]*=.01;const n=eC(r);for(let i=0;i<3;i++)n[i]=g6(n[i]);return n[3]=+t[4],n}if(t=e.match(h6)){const r=t.slice(1,4);r[0]=Zr(ui(r[0],0),0,100),r[1]=Zr(ui(r[1],0),-125,125,!0),r[2]=Zr(ui(r[2],0),-125,125,!0);const n=cg();ua("d50");const i=ih(hk(r));ua(n);const s=t[4]!==void 0?+Zr(t[4],0,1):1;return i[3]=s,i}if(t=e.match(d6)){const r=t.slice(1,4);r[0]=Zr(r[0],0,100),r[1]=Zr(ui(r[1],0),0,150,!1),r[2]=+ui(r[2].replace("deg",""),0);const n=cg();ua("d50");const i=ih(fk(r));ua(n);const s=t[4]!==void 0?+Zr(t[4],0,1):1;return i[3]=s,i}if(t=e.match(f6)){const r=t.slice(1,4);r[0]=Zr(ui(r[0],0),0,1),r[1]=Zr(ui(r[1],0),-.4,.4,!0),r[2]=Zr(ui(r[2],0),-.4,.4,!0);const n=ih(gk(r)),i=t[4]!==void 0?+Zr(t[4],0,1):1;return n[3]=i,n}if(t=e.match(p6)){const r=t.slice(1,4);r[0]=Zr(ui(r[0],0),0,1),r[1]=Zr(ui(r[1],0),0,.4,!1),r[2]=+ui(r[2].replace("deg",""),0);const n=ih(i6(r)),i=t[4]!==void 0?+Zr(t[4],0,1):1;return n[3]=i,n}};vk.test=e=>s6.test(e)||l6.test(e)||h6.test(e)||d6.test(e)||f6.test(e)||p6.test(e)||o6.test(e)||a6.test(e)||u6.test(e)||c6.test(e)||e==="transparent";Ie.prototype.css=function(e){return jne(this._rgb,e)};const zne=(...e)=>new Ie(...e,"css");vt.css=zne;Ct.format.css=vk;Ct.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Mt(e)==="string"&&vk.test(e))return"css"}});Ct.format.gl=(...e)=>{const t=Tt(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const Hne=(...e)=>new Ie(...e,"gl");vt.gl=Hne;Ie.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};Ie.prototype.hex=function(e){return G4(this._rgb,e)};const Une=(...e)=>new Ie(...e,"hex");vt.hex=Une;Ct.format.hex=V4;Ct.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Mt(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Jm}=Math,m6=e=>{const t=e/100;let r,n,i;return t<66?(r=255,n=t<6?0:-155.25485562709179-.44596950469579133*(n=t-2)+104.49216199393888*Jm(n),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*Jm(i)):(r=351.97690566805693+.114206453784165*(r=t-55)-40.25366309332127*Jm(r),n=325.4494125711974+.07943456536662342*(n=t-50)-28.0852963507957*Jm(n),i=255),[r,n,i,1]},{round:Wne}=Math,Vne=(...e)=>{const t=Tt(e,"rgb"),r=t[0],n=t[2];let i=1e3,s=4e4;const o=.4;let a;for(;s-i>o;){a=(s+i)*.5;const l=m6(a);l[2]/l[0]>=n/r?s=a:i=a}return Wne(a)};Ie.prototype.temp=Ie.prototype.kelvin=Ie.prototype.temperature=function(){return Vne(this._rgb)};const pS=(...e)=>new Ie(...e,"temp");Object.assign(vt,{temp:pS,kelvin:pS,temperature:pS});Ct.format.temp=Ct.format.kelvin=Ct.format.temperature=m6;Ie.prototype.oklch=function(){return n6(this._rgb)};const Gne=(...e)=>new Ie(...e,"oklch");Object.assign(vt,{oklch:Gne});Ct.format.oklch=i6;Ct.autodetect.push({p:2,test:(...e)=>{if(e=Tt(e,"oklch"),Mt(e)==="array"&&e.length===3)return"oklch"}});Object.assign(vt,{analyze:e6,average:qre,bezier:Zre,blend:ao,brewer:Lne,Color:Ie,colors:ld,contrast:xne,contrastAPCA:Dne,cubehelix:dne,deltaE:Tne,distance:kne,input:Ct,interpolate:ud,limits:t6,mix:ud,random:mne,scale:Xv,scales:$ne,valid:_ne});const eF=(e,t,r)=>{const n=(t?e:e.reverse()).find(i=>vt.contrast(vt.hex(i.hex),vt.hex((r==null?void 0:r.hex)||"#ff69b4"))>=3);return(n==null?void 0:n.hex)||"#ff69b4"},bk=(e,t,r=Iv)=>{const n=[];try{return r.forEach((i,s)=>{const o=new Fe;o.hex=t,o.hexToHsluv();const a={hex:"",saturation:o.hsluv_s,hue:o.hsluv_h,luminance:e==="neutral"&&s===r.length-1?100:i};o.hsluv_l=a.luminance,o.hsluvToHex(),a.hex=o.hex,n.push(a)}),[...n.sort((i,s)=>i.luminance>s.luminance?1:i.luminance({...i,index:s}))]}catch{return console.warn("Missing color",t),n}},ot="db",rC=(e,t)=>{let r="";for(const[n,i]of Object.entries(e))r+=`${n}: ${i}; -`;return t?`:root{${r}}`:r},tF=(e,t)=>{let r="";for(const[n,i]of Object.entries(e))r+=`@property ${n} { syntax: "<${t}>"; initial-value: ${i}; inherits: true; } -`;return r},qne=["opacity","elevation","transition","font"],Kne=e=>e[0]==="font"&&e[1]==="family"||e[0]!=="font",y6=(e,t)=>{const r={};return ec(e).forEach(function(n){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="colors"&&this.path[0]!=="additionalColors"&&this.path[0]!=="customColors"&&this.path[0]!=="branding"&&Kne(this.path)&&!this.path.includes("_scale")){const i=`--${ot}-${this.path.map(s=>s.toLowerCase()).map(s=>s==="lineheight"?"line-height":s==="fontsize"?"font-size":s).join("-")}`;if(r[i]=!qne.includes(this.path[0])&&(typeof n=="string"||n instanceof String)?`${n}rem`:n,this.path.at(-1)==="fontSize"){const s=[...this.path];s[s.length-1]="lineHeight";const o=Number(n),a=Number(ec(e).get(s)),l=this.path.filter(c=>c!=="typography"&&c!=="fontSize").join("-"),u=o*a;r[`--${ot}-base-icon-weight-${l}`]=u*16,r[`--${ot}-base-icon-font-size-${l}`]=`${u}rem`}}}),t?rC(r):r},Jne=e=>`:root{ - ${y6(e,!0)} + */const GP=.027,Sne=5e-4,Dne=.1,qP=1.14,qm=.022,KP=1.414,Ene=(e,t)=>{e=new Ne(e),t=new Ne(t),e.alpha()<1&&(e=hd(t,e,e.alpha(),"rgb"));const r=JP(...e.rgb()),n=JP(...t.rgb()),i=r>=qm?r:r+Math.pow(qm-r,KP),s=n>=qm?n:n+Math.pow(qm-n,KP),o=Math.pow(s,.56)-Math.pow(i,.57),a=Math.pow(s,.65)-Math.pow(i,.62),l=Math.abs(s-i)0?l-GP:l+GP)*100};function JP(e,t,r){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(r/255,2.4)}const{sqrt:Qo,pow:en,min:Cne,max:Tne,atan2:XP,abs:YP,cos:Km,sin:QP,exp:Ane,PI:ZP}=Math;function kne(e,t,r=1,n=1,i=1){var s=function(G){return 360*G/(2*ZP)},o=function(G){return 2*ZP*G/360};e=new Ne(e),t=new Ne(t);const[a,l,u]=Array.from(e.lab()),[c,h,d]=Array.from(t.lab()),f=(a+c)/2,p=Qo(en(l,2)+en(u,2)),m=Qo(en(h,2)+en(d,2)),y=(p+m)/2,b=.5*(1-Qo(en(y,7)/(en(y,7)+en(25,7)))),v=l*(1+b),E=h*(1+b),D=Qo(en(v,2)+en(u,2)),C=Qo(en(E,2)+en(d,2)),w=(D+C)/2,T=s(XP(u,v)),k=s(XP(d,E)),O=T>=0?T:T+360,P=k>=0?k:k+360,I=YP(O-P)>180?(O+P+360)/2:(O+P)/2,F=1-.17*Km(o(I-30))+.24*Km(o(2*I))+.32*Km(o(3*I+6))-.2*Km(o(4*I-63));let L=P-O;L=YP(L)<=180?L:P<=O?L+360:L-360,L=2*Qo(D*C)*QP(o(L)/2);const _=c-a,A=C-D,M=1+.015*en(f-50,2)/Qo(20+en(f-50,2)),R=1+.045*w,B=1+.015*w*F,U=30*Ane(-en((I-275)/25,2)),K=-(2*Qo(en(w,7)/(en(w,7)+en(25,7))))*QP(2*o(U)),J=Qo(en(_/(r*M),2)+en(A/(n*R),2)+en(L/(i*B),2)+K*(A/(n*R))*(L/(i*B)));return Tne(0,Cne(100,J))}function _ne(e,t,r="lab"){e=new Ne(e),t=new Ne(t);const n=e.get(r),i=t.get(r);let s=0;for(let o in n){const a=(n[o]||0)-(i[o]||0);s+=a*a}return Math.sqrt(s)}const $ne=(...e)=>{try{return new Ne(...e),!0}catch{return!1}},Lne={cool(){return Jv([bt.hsl(180,1,.9),bt.hsl(250,.7,.4)])},hot(){return Jv(["#000","#f00","#ff0","#fff"]).mode("rgb")}},eC={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i6=Object.keys(eC),eF=new Map(i6.map(e=>[e.toLowerCase(),e])),Pne=typeof Proxy=="function"?new Proxy(eC,{get(e,t){const r=t.toLowerCase();if(eF.has(r))return e[eF.get(r)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(i6)}}):eC,Fne=(...e)=>{e=_t(e,"cmyk");const[t,r,n,i]=e,s=e.length>4?e[4]:1;return i===1?[0,0,0,s]:[t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),n>=1?0:255*(1-n)*(1-i),s]},{max:tF}=Math,One=(...e)=>{let[t,r,n]=_t(e,"rgb");t=t/255,r=r/255,n=n/255;const i=1-tF(t,tF(r,n)),s=i<1?1/(1-i):0,o=(1-t-i)*s,a=(1-r-i)*s,l=(1-n-i)*s;return[o,a,l,i]};Ne.prototype.cmyk=function(){return One(this._rgb)};const Ine=(...e)=>new Ne(...e,"cmyk");Object.assign(bt,{cmyk:Ine});At.format.cmyk=Fne;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"cmyk"),Rt(e)==="array"&&e.length===4)return"cmyk"}});const Mne=(...e)=>{const t=_t(e,"hsla");let r=zd(e)||"lsa";return t[0]=Ds(t[0]||0)+"deg",t[1]=Ds(t[1]*100)+"%",t[2]=Ds(t[2]*100)+"%",r==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),r="hsla"):t.length=3,`${r.substr(0,3)}(${t.join(" ")})`},Nne=(...e)=>{const t=_t(e,"lab");let r=zd(e)||"lab";return t[0]=Ds(t[0])+"%",t[1]=Ds(t[1]),t[2]=Ds(t[2]),r==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},Rne=(...e)=>{const t=_t(e,"lch");let r=zd(e)||"lab";return t[0]=Ds(t[0])+"%",t[1]=Ds(t[1]),t[2]=isNaN(t[2])?"none":Ds(t[2])+"deg",r==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},Bne=(...e)=>{const t=_t(e,"lab");return t[0]=Ds(t[0]*100)+"%",t[1]=QE(t[1]),t[2]=QE(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},s6=(...e)=>{const[t,r,n,...i]=_t(e,"rgb"),[s,o,a]=yk(t,r,n),[l,u,c]=Q4(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]},jne=(...e)=>{const t=_t(e,"lch");return t[0]=Ds(t[0]*100)+"%",t[1]=QE(t[1]),t[2]=isNaN(t[2])?"none":Ds(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:dS}=Math,zne=(...e)=>{const t=_t(e,"rgba");let r=zd(e)||"rgb";if(r.substr(0,3)==="hsl")return Mne(e6(t),r);if(r.substr(0,3)==="lab"){const n=cg();ha("d50");const i=Nne(fk(t),r);return ha(n),i}if(r.substr(0,3)==="lch"){const n=cg();ha("d50");const i=Rne(gk(t),r);return ha(n),i}return r.substr(0,5)==="oklab"?Bne(yk(t)):r.substr(0,5)==="oklch"?jne(s6(t)):(t[0]=dS(t[0]),t[1]=dS(t[1]),t[2]=dS(t[2]),(r==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),r="rgba"),`${r.substr(0,3)}(${t.slice(0,r==="rgb"?3:4).join(" ")})`)},o6=(...e)=>{e=_t(e,"lch");const[t,r,n,...i]=e,[s,o,a]=Y4(t,r,n),[l,u,c]=mk(s,o,a);return[l,u,c,...i.length>0&&i[0]<1?[i[0]]:[]]},pa=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,so=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Xv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,ks=/\s*/.source,Ud=/\s+/.source,vk=/\s*,\s*/.source,Db=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,Wd=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,a6=new RegExp("^rgba?\\("+ks+[pa,pa,pa].join(Ud)+Wd+"\\)$"),l6=new RegExp("^rgb\\("+ks+[pa,pa,pa].join(vk)+ks+"\\)$"),u6=new RegExp("^rgba\\("+ks+[pa,pa,pa,so].join(vk)+ks+"\\)$"),c6=new RegExp("^hsla?\\("+ks+[Db,Xv,Xv].join(Ud)+Wd+"\\)$"),h6=new RegExp("^hsl?\\("+ks+[Db,Xv,Xv].join(vk)+ks+"\\)$"),d6=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,f6=new RegExp("^lab\\("+ks+[so,so,so].join(Ud)+Wd+"\\)$"),p6=new RegExp("^lch\\("+ks+[so,so,Db].join(Ud)+Wd+"\\)$"),g6=new RegExp("^oklab\\("+ks+[so,so,so].join(Ud)+Wd+"\\)$"),m6=new RegExp("^oklch\\("+ks+[so,so,Db].join(Ud)+Wd+"\\)$"),{round:y6}=Math,oh=e=>e.map((t,r)=>r<=2?Hu(y6(t),0,255):t),tn=(e,t=0,r=100,n=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,n?e=t+(e+1)*.5*(r-t):e=t+e*(r-t)),+e),di=(e,t)=>e==="none"?t:e,bk=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(At.format.named)try{return At.format.named(e)}catch{}if((t=e.match(a6))||(t=e.match(l6))){let r=t.slice(1,4);for(let i=0;i<3;i++)r[i]=+tn(di(r[i],0),0,255);r=oh(r);const n=t[4]!==void 0?+tn(t[4],0,1):1;return r[3]=n,r}if(t=e.match(u6)){const r=t.slice(1,5);for(let n=0;n<4;n++)r[n]=+tn(r[n],0,255);return r}if((t=e.match(c6))||(t=e.match(h6))){const r=t.slice(1,4);r[0]=+di(r[0].replace("deg",""),0),r[1]=+tn(di(r[1],0),0,100)*.01,r[2]=+tn(di(r[2],0),0,100)*.01;const n=oh(ZE(r)),i=t[4]!==void 0?+tn(t[4],0,1):1;return n[3]=i,n}if(t=e.match(d6)){const r=t.slice(1,4);r[1]*=.01,r[2]*=.01;const n=ZE(r);for(let i=0;i<3;i++)n[i]=y6(n[i]);return n[3]=+t[4],n}if(t=e.match(f6)){const r=t.slice(1,4);r[0]=tn(di(r[0],0),0,100),r[1]=tn(di(r[1],0),-125,125,!0),r[2]=tn(di(r[2],0),-125,125,!0);const n=cg();ha("d50");const i=oh(dk(r));ha(n);const s=t[4]!==void 0?+tn(t[4],0,1):1;return i[3]=s,i}if(t=e.match(p6)){const r=t.slice(1,4);r[0]=tn(r[0],0,100),r[1]=tn(di(r[1],0),0,150,!1),r[2]=+di(r[2].replace("deg",""),0);const n=cg();ha("d50");const i=oh(pk(r));ha(n);const s=t[4]!==void 0?+tn(t[4],0,1):1;return i[3]=s,i}if(t=e.match(g6)){const r=t.slice(1,4);r[0]=tn(di(r[0],0),0,1),r[1]=tn(di(r[1],0),-.4,.4,!0),r[2]=tn(di(r[2],0),-.4,.4,!0);const n=oh(mk(r)),i=t[4]!==void 0?+tn(t[4],0,1):1;return n[3]=i,n}if(t=e.match(m6)){const r=t.slice(1,4);r[0]=tn(di(r[0],0),0,1),r[1]=tn(di(r[1],0),0,.4,!1),r[2]=+di(r[2].replace("deg",""),0);const n=oh(o6(r)),i=t[4]!==void 0?+tn(t[4],0,1):1;return n[3]=i,n}};bk.test=e=>a6.test(e)||c6.test(e)||f6.test(e)||p6.test(e)||g6.test(e)||m6.test(e)||l6.test(e)||u6.test(e)||h6.test(e)||d6.test(e)||e==="transparent";Ne.prototype.css=function(e){return zne(this._rgb,e)};const Hne=(...e)=>new Ne(...e,"css");bt.css=Hne;At.format.css=bk;At.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Rt(e)==="string"&&bk.test(e))return"css"}});At.format.gl=(...e)=>{const t=_t(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const Une=(...e)=>new Ne(...e,"gl");bt.gl=Une;Ne.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};Ne.prototype.hex=function(e){return K4(this._rgb,e)};const Wne=(...e)=>new Ne(...e,"hex");bt.hex=Wne;At.format.hex=q4;At.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Rt(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Jm}=Math,v6=e=>{const t=e/100;let r,n,i;return t<66?(r=255,n=t<6?0:-155.25485562709179-.44596950469579133*(n=t-2)+104.49216199393888*Jm(n),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*Jm(i)):(r=351.97690566805693+.114206453784165*(r=t-55)-40.25366309332127*Jm(r),n=325.4494125711974+.07943456536662342*(n=t-50)-28.0852963507957*Jm(n),i=255),[r,n,i,1]},{round:Vne}=Math,Gne=(...e)=>{const t=_t(e,"rgb"),r=t[0],n=t[2];let i=1e3,s=4e4;const o=.4;let a;for(;s-i>o;){a=(s+i)*.5;const l=v6(a);l[2]/l[0]>=n/r?s=a:i=a}return Vne(a)};Ne.prototype.temp=Ne.prototype.kelvin=Ne.prototype.temperature=function(){return Gne(this._rgb)};const fS=(...e)=>new Ne(...e,"temp");Object.assign(bt,{temp:fS,kelvin:fS,temperature:fS});At.format.temp=At.format.kelvin=At.format.temperature=v6;Ne.prototype.oklch=function(){return s6(this._rgb)};const qne=(...e)=>new Ne(...e,"oklch");Object.assign(bt,{oklch:qne});At.format.oklch=o6;At.autodetect.push({p:2,test:(...e)=>{if(e=_t(e,"oklch"),Rt(e)==="array"&&e.length===3)return"oklch"}});Object.assign(bt,{analyze:r6,average:Kre,bezier:ene,blend:co,brewer:Pne,Color:Ne,colors:cd,contrast:wne,contrastAPCA:Ene,cubehelix:fne,deltaE:kne,distance:_ne,input:At,interpolate:hd,limits:n6,mix:hd,random:yne,scale:Jv,scales:Lne,valid:$ne});const rF=(e,t,r)=>{const n=(t?e:e.reverse()).find(i=>bt.contrast(bt.hex(i.hex),bt.hex((r==null?void 0:r.hex)||"#ff69b4"))>=3);return(n==null?void 0:n.hex)||"#ff69b4"},xk=(e,t,r=Mv)=>{const n=[];try{return r.forEach((i,s)=>{const o=new Fe;o.hex=t,o.hexToHsluv();const a={hex:"",saturation:o.hsluv_s,hue:o.hsluv_h,luminance:e==="neutral"&&s===r.length-1?100:i};o.hsluv_l=a.luminance,o.hsluvToHex(),a.hex=o.hex,n.push(a)}),[...n.sort((i,s)=>i.luminance>s.luminance?1:i.luminance({...i,index:s}))]}catch{return console.warn("Missing color",t),n}},ot="db",tC=(e,t)=>{let r="";for(const[n,i]of Object.entries(e))r+=`${n}: ${i}; +`;return t?`:root{${r}}`:r},nF=(e,t)=>{let r="";for(const[n,i]of Object.entries(e))r+=`@property ${n} { syntax: "<${t}>"; initial-value: ${i}; inherits: true; } +`;return r},Kne=["opacity","elevation","transition","font"],Jne=e=>e[0]==="font"&&e[1]==="family"||e[0]!=="font",b6=(e,t)=>{const r={};return rc(e).forEach(function(n){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="colors"&&this.path[0]!=="additionalColors"&&this.path[0]!=="customColors"&&this.path[0]!=="branding"&&Jne(this.path)&&!this.path.includes("_scale")){const i=`--${ot}-${this.path.map(s=>s.toLowerCase()).map(s=>s==="lineheight"?"line-height":s==="fontsize"?"font-size":s).join("-")}`;if(r[i]=!Kne.includes(this.path[0])&&(typeof n=="string"||n instanceof String)?`${n}rem`:n,this.path.at(-1)==="fontSize"){const s=[...this.path];s[s.length-1]="lineHeight";const o=Number(n),a=Number(rc(e).get(s)),l=this.path.filter(c=>c!=="typography"&&c!=="fontSize").join("-"),u=o*a;r[`--${ot}-base-icon-weight-${l}`]=u*16,r[`--${ot}-base-icon-font-size-${l}`]=`${u}rem`}}}),t?tC(r):r},Xne=e=>`:root{ + ${b6(e,!0)} } - `,rF=(e,t)=>`${e} + `,iF=(e,t)=>`${e} ${t} [data-color-scheme="light"] { @@ -99,9 +99,9 @@ Error generating stack: `+s.message+` [data-color-scheme="dark"] { color-scheme: dark; } - `,xk=(e,t)=>Object.entries(e).map(r=>{const n=r[0],i=r[1],s=bk(n,i.origin,t);return{[n]:s}}).reduce((r,n)=>({...r,...n}),{}),nC=(e,t)=>{const r=xk(e,t),n={};return Object.entries(e).forEach(([i,s])=>{const o=i.toLowerCase();r[i].forEach(l=>{n[`--${ot}-${o}-${l.index??l.name}`]=l.hex}),n[`--${ot}-${o}-origin`]=s.origin,n[`--${ot}-${o}-origin-light-default`]=s.originLight,n[`--${ot}-${o}-origin-light-hovered`]=s.originLightHovered,n[`--${ot}-${o}-origin-light-pressed`]=s.originLightPressed,n[`--${ot}-${o}-on-origin-light-default`]=s.onOriginLight,n[`--${ot}-${o}-on-origin-light-hovered`]=s.onOriginLightHovered,n[`--${ot}-${o}-on-origin-light-pressed`]=s.onOriginLightPressed,n[`--${ot}-${o}-origin-dark-default`]=s.originDark,n[`--${ot}-${o}-origin-dark-hovered`]=s.originDarkHovered,n[`--${ot}-${o}-origin-dark-pressed`]=s.originDarkPressed,n[`--${ot}-${o}-on-origin-dark-default`]=s.onOriginDark,n[`--${ot}-${o}-on-origin-dark-hovered`]=s.onOriginDarkHovered,n[`--${ot}-${o}-on-origin-dark-pressed`]=s.onOriginDarkPressed}),n},iC=(e,t)=>{const r={};return Object.entries(t).forEach(([n])=>{const i=n.toLowerCase();r[`--${ot}-${i}-origin-default`]=`light-dark(var(--${ot}-${i}-origin-light-default),var(--${ot}-${i}-origin-dark-default))`,r[`--${ot}-${i}-origin-hovered`]=`light-dark(var(--${ot}-${i}-origin-light-hovered),var(--${ot}-${i}-origin-dark-hovered))`,r[`--${ot}-${i}-origin-pressed`]=`light-dark(var(--${ot}-${i}-origin-light-pressed),var(--${ot}-${i}-origin-dark-pressed))`,r[`--${ot}-${i}-on-origin-default`]=`light-dark(var(--${ot}-${i}-on-origin-light-default),var(--${ot}-${i}-on-origin-dark-default))`,r[`--${ot}-${i}-on-origin-hovered`]=`light-dark(var(--${ot}-${i}-on-origin-light-hovered),var(--${ot}-${i}-on-origin-dark-hovered))`,r[`--${ot}-${i}-on-origin-pressed`]=`light-dark(var(--${ot}-${i}-on-origin-light-pressed),var(--${ot}-${i}-on-origin-dark-pressed))`,e.forEach(s=>{s.transparencyDark!==void 0||s.transparencyLight!==void 0?r[`--${ot}-${i}-${s.name}`]=`light-dark(color-mix(in srgb, transparent ${s.transparencyLight}%, var(--${ot}-${i}-${s.light})),color-mix(in srgb, transparent ${s.transparencyDark}%, var(--${ot}-${i}-${s.dark})))`:r[`--${ot}-${i}-${s.name}`]=`light-dark(var(--${ot}-${i}-${s.light}),var(--${ot}-${i}-${s.dark}))`})}),r},Xne=()=>{const{speakingNames:e,luminanceSteps:t,theme:r}=tr(n=>n);return z.useEffect(()=>{const n={...r.colors,...r.additionalColors,...r.customColors},i={...nC(n,t),...iC(e,n),...y6(r)},s=document.getElementsByTagName("html");Array.from(s).forEach(o=>{o.setAttribute("style",Object.entries(i).map(a=>`${a[0]}:${a[1]};`).join(" "))})},[e,r,t]),j.jsxs(j.Fragment,{children:[j.jsx(TJ,{}),j.jsx(Wq,{})]})},Yne=(...e)=>{console!=null&&console.warn&&(zu(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},nF={},sC=(...e)=>{zu(e[0])&&nF[e[0]]||(zu(e[0])&&(nF[e[0]]=new Date),Yne(...e))},v6=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},iF=(e,t,r)=>{e.loadNamespaces(t,v6(e,r))},sF=(e,t,r,n)=>{zu(r)&&(r=[r]),r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,v6(e,n))},Qne=(e,t,r={})=>!t.languages||!t.languages.length?(sC("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{var s;if(((s=r.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),zu=e=>typeof e=="string",Zne=e=>typeof e=="object"&&e!==null,eie=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,tie={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},rie=e=>tie[e],nie=e=>e.replace(eie,rie);let oC={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:nie};const iie=(e={})=>{oC={...oC,...e}},sie=()=>oC;let b6;const oie=e=>{b6=e},aie=()=>b6,lie={type:"3rdParty",init(e){iie(e.options.react),oie(e)}},uie=z.createContext();class cie{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const hie=(e,t)=>{const r=z.useRef();return z.useEffect(()=>{r.current=e},[e,t]),r.current},x6=(e,t,r,n)=>e.getFixedT(t,r,n),die=(e,t,r,n)=>z.useCallback(x6(e,t,r,n),[e,t,r,n]),Yt=(e,t={})=>{var D,C,w,A;const{i18n:r}=t,{i18n:n,defaultNS:i}=z.useContext(uie)||{},s=r||n||aie();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new cie),!s){sC("You will need to pass in an i18next instance by using initReactI18next");const $=(P,N)=>zu(N)?N:Zne(N)&&zu(N.defaultValue)?N.defaultValue:Array.isArray(P)?P[P.length-1]:P,O=[$,{},!1];return O.t=$,O.i18n={},O.ready=!1,O}(D=s.options.react)!=null&&D.wait&&sC("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...sie(),...s.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let u=i||((C=s.options)==null?void 0:C.defaultNS);u=zu(u)?[u]:u||["translation"],(A=(w=s.reportNamespaces).addUsedNamespaces)==null||A.call(w,u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every($=>Qne($,s,o)),h=die(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),d=()=>h,f=()=>x6(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),[p,m]=z.useState(d);let y=u.join();t.lng&&(y=`${t.lng}${y}`);const b=hie(y),v=z.useRef(!0);z.useEffect(()=>{const{bindI18n:$,bindI18nStore:O}=o;v.current=!0,!c&&!a&&(t.lng?sF(s,t.lng,u,()=>{v.current&&m(f)}):iF(s,u,()=>{v.current&&m(f)})),c&&b&&b!==y&&v.current&&m(f);const P=()=>{v.current&&m(f)};return $&&(s==null||s.on($,P)),O&&(s==null||s.store.on(O,P)),()=>{v.current=!1,s&&($==null||$.split(" ").forEach(N=>s.off(N,P))),O&&s&&O.split(" ").forEach(N=>s.store.off(N,P))}},[s,y]),z.useEffect(()=>{v.current&&c&&m(d)},[s,l,c]);const E=[p,s,c];if(E.t=p,E.i18n=s,E.ready=c,c||!c&&!a)return E;throw new Promise($=>{t.lng?sF(s,t.lng,u,()=>$()):iF(s,u,()=>$())})},fie=()=>{const{t:e}=Yt(),{resetDefaults:t}=tr(n=>n),r=C5();return j.jsx("div",{className:"w-[100vw] h-[100vh] flex",children:j.jsxs("div",{className:"m-auto flex flex-col gap-fix-md",children:[j.jsx(ur,{semantic:"critical",icon:"quiet_zone",children:e("errorMessage")}),j.jsx(wt,{className:"mx-auto",size:"small",icon:"undo",onClick:()=>{t(),r(0)},children:e("reset")})]})})},Dt=e=>typeof e=="string",Lf=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},oF=e=>e==null?"":""+e,pie=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},gie=/###/g,aF=e=>e&&e.indexOf("###")>-1?e.replace(gie,"."):e,lF=e=>!e||Dt(e),Ep=(e,t,r)=>{const n=Dt(t)?t.split("."):t;let i=0;for(;i{const{obj:n,k:i}=Ep(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=Ep(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Ep(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=r},mie=(e,t,r,n)=>{const{obj:i,k:s}=Ep(e,t,Object);i[s]=i[s]||[],i[s].push(r)},Qv=(e,t)=>{const{obj:r,k:n}=Ep(e,t);if(r)return r[n]},yie=(e,t,r)=>{const n=Qv(e,r);return n!==void 0?n:Qv(t,r)},w6=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?Dt(e[n])||e[n]instanceof String||Dt(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):w6(e[n],t[n],r):e[n]=t[n]);return e},sh=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vie={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const bie=e=>Dt(e)?e.replace(/[&<>"'\/]/g,t=>vie[t]):e;class xie{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const wie=[" ",",","?","!",";"],Sie=new xie(20),Die=(e,t,r)=>{t=t||"",r=r||"";const n=wie.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=Sie.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s},aC=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let s=0;s-1&&le&&e.replace("_","-"),Eie={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class e0{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||Eie,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let[a,l]=o;for(let u=0;u{let[a,l]=o;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],n&&(Array.isArray(n)?a.push(...n):Dt(n)&&s?a.push(...n.split(s)):a.push(n)));const l=Qv(this.data,a);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=a[0],r=a[1],n=a.slice(2).join(".")),l||!o||!Dt(n)?l:aC(this.data&&this.data[t]&&this.data[t][r],n,s)}addResource(t,r,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,r];n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(a=t.split("."),i=r,r=a[1]),this.addNamespaces(r),uF(this.data,a,i),s.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(Dt(n[s])||Array.isArray(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let l=Qv(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?w6(l,n,s):l={...l,...n},uF(this.data,a,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var S6={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,r,n,i))}),t}};const hF={};class t0 extends Cb{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),pie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Co.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Die(t,n,i);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:s};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return Dt(s)&&(s=[s]),{key:t,namespaces:s}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],r),l=a[a.length-1],u=r.lng||this.language,c=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const D=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${D}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${D}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const h=this.resolve(t,r);let d=h&&h.res;const f=h&&h.usedKey||o,p=h&&h.exactUsedKey||o,m=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],b=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,E=!Dt(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&E&&y.indexOf(m)<0&&!(Dt(b)&&Array.isArray(d))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...r,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=D,h.usedParams=this.getUsedParamsDetails(r),h):D}if(s){const D=Array.isArray(d),C=D?[]:{},w=D?p:f;for(const A in d)if(Object.prototype.hasOwnProperty.call(d,A)){const $=`${w}${s}${A}`;C[A]=this.translate($,{...r,joinArrays:!1,ns:a}),C[A]===$&&(C[A]=d[A])}d=C}}else if(v&&Dt(b)&&Array.isArray(d))d=d.join(b),d&&(d=this.extendTranslation(d,t,r,n));else{let D=!1,C=!1;const w=r.count!==void 0&&!Dt(r.count),A=t0.hasDefaultValue(r),$=w?this.pluralResolver.getSuffix(u,r.count,r):"",O=r.ordinal&&w?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",P=w&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),N=P&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${$}`]||r[`defaultValue${O}`]||r.defaultValue;!this.isValidLookup(d)&&A&&(D=!0,d=N),this.isValidLookup(d)||(C=!0,d=o);const L=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,k=A&&N!==d&&this.options.updateMissing;if(C||D||k){if(this.logger.log(k?"updateKey":"missingKey",u,l,o,k?N:d),s){const B=this.resolve(o,{...r,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let B=0;B{const K=A&&V!==d?V:L;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,U,K,k,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,U,K,k,r),this.emit("missingKey",B,l,U,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(B=>{const U=this.pluralResolver.getSuffixes(B,r);P&&r[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(V=>{R([B],o+V,r[`defaultValue${V}`]||N)})}):R(T,o,N))}d=this.extendTranslation(d,t,r,h,n),C&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(C||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,D?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(r),h):d}extendTranslation(t,r,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=Dt(t)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let h=n.replace&&!Dt(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,n.lng||this.language||i.usedLng,n),u){const d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,a;return Dt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;i=c;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=r.count!==void 0&&!Dt(r.count),f=d&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(Dt(r.context)||typeof r.context=="number")&&r.context!=="",m=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(y=>{this.isValidLookup(n)||(a=y,!hF[`${m[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(hF[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(b=>{if(this.isValidLookup(n))return;o=b;const v=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,c,b,y,r);else{let D;d&&(D=this.pluralResolver.getSuffix(b,r.count,r));const C=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(c+D),r.ordinal&&D.indexOf(w)===0&&v.push(c+D.replace(w,this.options.pluralSeparator)),f&&v.push(c+C)),p){const A=`${c}${this.options.contextSeparator}${r.context}`;v.push(A),d&&(v.push(A+D),r.ordinal&&D.indexOf(w)===0&&v.push(A+D.replace(w,this.options.pluralSeparator)),f&&v.push(A+C))}}let E;for(;E=v.pop();)this.isValidLookup(n)||(s=E,n=this.getResource(b,y,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Dt(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of r)delete i[s]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}const gS=e=>e.charAt(0).toUpperCase()+e.slice(1);class dF{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Co.create("languageUtils")}getScriptPartFromCode(t){if(t=Zv(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Zv(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Dt(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=gS(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=gS(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=gS(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Dt(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Dt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Dt(t)&&s(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let Cie=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Aie={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const Tie=["v1","v2","v3"],kie=["v4"],fF={zero:0,one:1,two:2,few:3,many:4,other:5},_ie=()=>{const e={};return Cie.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:Aie[t.fc]}})}),e};class $ie{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Co.create("pluralResolver"),(!this.options.compatibilityJSON||kie.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=_ie(),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Zv(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[s]=o,o}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,s)=>fF[i]-fF[s]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Tie.includes(this.options.compatibilityJSON)}}const pF=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=yie(e,t,r);return!s&&i&&Dt(r)&&(s=aC(e,r,n),s===void 0&&(s=aC(t,r,n))),s},mS=e=>e.replace(/\$/g,"$$$$");class Lie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Co.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=r!==void 0?r:bie,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?sh(s):o||"{{",this.suffix=a?sh(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?sh(d):f||sh("$t("),this.nestingSuffix=p?sh(p):m||sh(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=b||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=f=>{if(f.indexOf(this.formatSeparator)<0){const b=pF(r,l,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...i,...r,interpolationkey:f}):b}const p=f.split(this.formatSeparator),m=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(pF(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,n,{...i,...r,interpolationkey:m})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>mS(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?mS(this.escape(f)):mS(f)}].forEach(f=>{for(a=0;s=f.regex.exec(t);){const p=s[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const y=c(t,s,i);o=Dt(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(h){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!Dt(o)&&!this.useRawValueToEscape&&(o=oF(o));const m=f.safeValue(o);if(t=t.replace(s[0],m),h?(f.regex.lastIndex+=o.length,f.regex.lastIndex-=s[0].length):f.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const h=l.split(new RegExp(`${c}[ ]*{`));let d=`{${h[1]}`;l=h[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(f&&f.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!Dt(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=c.shift(),l=c,u=!0}if(s=r(a.call(this,i[1].trim(),o),o),s&&i[0]===t&&!Dt(s))return s;Dt(s)||(s=oF(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,h)=>this.format(c,h,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const Pie=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},oh=e=>{const t={};return(r,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=n+JSON.stringify(s);let a=t[o];return a||(a=e(Zv(n),i),t[o]=a),a(r)}};class Fie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Co.create("formatter"),this.options=t,this.formats={number:oh((r,n)=>i=>new Intl.NumberFormat(r,{...n}).format(i)),currency:oh((r,n)=>i=>new Intl.NumberFormat(r,{...n,style:"currency"}).format(i)),datetime:oh((r,n)=>i=>new Intl.DateTimeFormat(r,{...n}).format(i)),relativetime:oh((r,n)=>i=>new Intl.RelativeTimeFormat(r,{...n}).format(i,n.range||"day")),list:oh((r,n)=>i=>new Intl.ListFormat(r,{...n}).format(i))},this.init(t)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=oh(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,l)=>{const{formatName:u,formatOptions:c}=Pie(l);if(this.formats[u]){let h=a;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},f=d.locale||d.lng||i.locale||i.lng||n;h=this.formats[u](a,f,{...c,...i,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const Oie=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Nie extends Cb{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Co.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,r,n,i){const s={},o={},a={},l={};return t.forEach(u=>{let c=!0;r.forEach(h=>{const d=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),l[h]===void 0&&(l[h]=!0)))}),c||(a[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),s=i[0],o=i[1];r&&this.emit("failedLoading",s,o,r),!r&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const a={};this.queue.forEach(l=>{mie(l.loaded,[s],o),Oie(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(h=>{a[u][h]===void 0&&(a[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&c&&i{this.read.call(this,t,r,n,i+1,s*2,o)},s);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(t,r);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,r,a)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Dt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Dt(r)&&(r=[r]);const s=this.queueLoad(t,r,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${r}loaded namespace ${s} for language ${i}`,a),this.loaded(t,o,a)})}saveMissing(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,r,n,i,l):c=u(t,r,n,i),c&&typeof c.then=="function"?c.then(h=>a(null,h)).catch(a):a(null,c)}catch(c){a(c)}else u(t,r,n,i,a,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const gF=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Dt(e[1])&&(t.defaultValue=e[1]),Dt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),mF=e=>(Dt(e.ns)&&(e.ns=[e.ns]),Dt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Dt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Xm=()=>{},Mie=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class hg extends Cb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=mF(t),this.services={},this.logger=Co,this.modules={external:[]},Mie(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Dt(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=gF();this.options={...i,...this.options,...mF(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Co.init(s(this.modules.logger),this.options):Co.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Fie);const h=new dF(this.options);this.store=new cF(this.options.resources,this.options);const d=this.services;d.logger=Co,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new $ie(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Lie(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Nie(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Xm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=Lf(),u=()=>{const c=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(d),n(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xm;const i=Dt(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(t,r,n){const i=Lf();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Xm),this.services.backendConnector.reload(t,r,s=>{i.resolve(),n(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&S6.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=Lf();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=Dt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,r,n){var i=this;const s=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),h=2;h`${l.keyPrefix}${d}${p}`):f=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(f,l)};return Dt(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(r.precheck){const a=r.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(s,t)))}loadNamespaces(t,r){const n=Lf();return this.options.ns?(Dt(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=Lf();Dt(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new dF(gF());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new hg(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xm;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new hg(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new cF(this.store.data,i),s.services.resourceStore=s.store),s.translator=new t0(s.services,i),s.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c"u"?"undefined":lC(XMLHttpRequest))==="object"}function Iie(e){return!!e&&typeof e.then=="function"}function Rie(e){return Iie(e)?e:Promise.resolve(e)}function rp(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uC={exports:{}},Ym={exports:{}},yF;function Bie(){return yF||(yF=1,function(e,t){var r={},n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof r<"u"&&r,i=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var l=typeof o<"u"&&o||typeof self<"u"&&self||typeof l<"u"&&l,u={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function c(M){return M&&DataView.prototype.isPrototypeOf(M)}if(u.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function f(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||M==="")throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function p(M){return typeof M!="string"&&(M=String(M)),M}function m(M){var R={next:function(){var B=M.shift();return{done:B===void 0,value:B}}};return u.iterable&&(R[Symbol.iterator]=function(){return R}),R}function y(M){this.map={},M instanceof y?M.forEach(function(R,B){this.append(B,R)},this):Array.isArray(M)?M.forEach(function(R){this.append(R[0],R[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(R){this.append(R,M[R])},this)}y.prototype.append=function(M,R){M=f(M),R=p(R);var B=this.map[M];this.map[M]=B?B+", "+R:R},y.prototype.delete=function(M){delete this.map[f(M)]},y.prototype.get=function(M){return M=f(M),this.has(M)?this.map[M]:null},y.prototype.has=function(M){return this.map.hasOwnProperty(f(M))},y.prototype.set=function(M,R){this.map[f(M)]=p(R)},y.prototype.forEach=function(M,R){for(var B in this.map)this.map.hasOwnProperty(B)&&M.call(R,this.map[B],B,this)},y.prototype.keys=function(){var M=[];return this.forEach(function(R,B){M.push(B)}),m(M)},y.prototype.values=function(){var M=[];return this.forEach(function(R){M.push(R)}),m(M)},y.prototype.entries=function(){var M=[];return this.forEach(function(R,B){M.push([B,R])}),m(M)},u.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function v(M){return new Promise(function(R,B){M.onload=function(){R(M.result)},M.onerror=function(){B(M.error)}})}function E(M){var R=new FileReader,B=v(R);return R.readAsArrayBuffer(M),B}function D(M){var R=new FileReader,B=v(R);return R.readAsText(M),B}function C(M){for(var R=new Uint8Array(M),B=new Array(R.length),U=0;U-1?R:M}function P(M,R){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R=R||{};var B=R.body;if(M instanceof P){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,R.headers||(this.headers=new y(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!B&&M._bodyInit!=null&&(B=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=R.credentials||this.credentials||"same-origin",(R.headers||!this.headers)&&(this.headers=new y(R.headers)),this.method=O(R.method||this.method||"GET"),this.mode=R.mode||this.mode||null,this.signal=R.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(B),(this.method==="GET"||this.method==="HEAD")&&(R.cache==="no-store"||R.cache==="no-cache")){var U=/([?&])_=[^&]*/;if(U.test(this.url))this.url=this.url.replace(U,"$1_="+new Date().getTime());else{var V=/\?/;this.url+=(V.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function N(M){var R=new FormData;return M.trim().split("&").forEach(function(B){if(B){var U=B.split("="),V=U.shift().replace(/\+/g," "),K=U.join("=").replace(/\+/g," ");R.append(decodeURIComponent(V),decodeURIComponent(K))}}),R}function F(M){var R=new y,B=M.replace(/\r?\n[\t ]+/g," ");return B.split("\r").map(function(U){return U.indexOf(` -`)===0?U.substr(1,U.length):U}).forEach(function(U){var V=U.split(":"),K=V.shift().trim();if(K){var J=V.join(":").trim();R.append(K,J)}}),R}A.call(P.prototype);function L(M,R){if(!(this instanceof L))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new y(R.headers),this.url=R.url||"",this._initBody(M)}A.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},L.error=function(){var M=new L(null,{status:0,statusText:""});return M.type="error",M};var k=[301,302,303,307,308];L.redirect=function(M,R){if(k.indexOf(R)===-1)throw new RangeError("Invalid status code");return new L(null,{status:R,headers:{location:M}})},a.DOMException=l.DOMException;try{new a.DOMException}catch{a.DOMException=function(R,B){this.message=R,this.name=B;var U=Error(R);this.stack=U.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function T(M,R){return new Promise(function(B,U){var V=new P(M,R);if(V.signal&&V.signal.aborted)return U(new a.DOMException("Aborted","AbortError"));var K=new XMLHttpRequest;function J(){K.abort()}K.onload=function(){var Y={status:K.status,statusText:K.statusText,headers:F(K.getAllResponseHeaders()||"")};Y.url="responseURL"in K?K.responseURL:Y.headers.get("X-Request-URL");var Q="response"in K?K.response:K.responseText;setTimeout(function(){B(new L(Q,Y))},0)},K.onerror=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},K.ontimeout=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},K.onabort=function(){setTimeout(function(){U(new a.DOMException("Aborted","AbortError"))},0)};function G(Y){try{return Y===""&&l.location.href?l.location.href:Y}catch{return Y}}K.open(V.method,G(V.url),!0),V.credentials==="include"?K.withCredentials=!0:V.credentials==="omit"&&(K.withCredentials=!1),"responseType"in K&&(u.blob?K.responseType="blob":u.arrayBuffer&&V.headers.get("Content-Type")&&V.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(K.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof y)?Object.getOwnPropertyNames(R.headers).forEach(function(Y){K.setRequestHeader(Y,p(R.headers[Y]))}):V.headers.forEach(function(Y,Q){K.setRequestHeader(Q,Y)}),V.signal&&(V.signal.addEventListener("abort",J),K.onreadystatechange=function(){K.readyState===4&&V.signal.removeEventListener("abort",J)}),K.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return T.polyfill=!0,l.fetch||(l.fetch=T,l.Headers=y,l.Request=P,l.Response=L),a.Headers=y,a.Request=P,a.Response=L,a.fetch=T,a})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=n.fetch?n:i;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t}(Ym,Ym.exports)),Ym.exports}(function(e,t){var r={},n;if(typeof fetch=="function"&&(typeof r<"u"&&r.fetch?n=r.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof rp<"u"&&typeof window>"u"){var i=n||Bie();i.default&&(i=i.default),t.default=i,e.exports=t.default}})(uC,uC.exports);var E6=uC.exports;const C6=jo(E6),vF=RA({__proto__:null,default:C6},[E6]);var Jn={};function bF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xF(e){for(var t=1;t"u"&&typeof Jn<"u"&&typeof Jn.process<"u"&&Jn.process.versions&&Jn.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(Jn.process.version,"; ").concat(Jn.process.platform," ").concat(Jn.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(n):t.requestOptions,a=xF({method:n?"POST":"GET",body:n?t.stringify(n):void 0,headers:s},SF?{}:o),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{wF(r,a,i,l)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(o).forEach(function(c){delete a[c]}),wF(r,a,i,l),SF=!0}catch(c){i(c)}}},Wie=function(t,r,n,i){n&&tc(n)==="object"&&(n=cC("",n).slice(1)),t.queryStringParams&&(r=cC(r,t.queryStringParams));try{var s;dg?s=new dg:s=new r0("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",r,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(l){console&&console.log(l)}},Vie=function(t,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},fa&&r.indexOf("file:")!==0)return Uie(t,r,n,i);if(D6()||typeof ActiveXObject=="function")return Wie(t,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function cd(e){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cd(e)}function DF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yS(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Gie(this,e),this.services=t,this.options=r,this.allOptions=n,this.type="backend",this.init(t,r,n)}return Kie(e,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=yS(yS(yS({},Xie()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);cd(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,s,o){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(r,i)),l=Rie(l),l.then(function(u){if(!u)return o(null,{});var c=a.services.interpolator.interpolate(u,{lng:r.join("+"),ns:i.join("+")});a.loadUrl(c,o,n,s)})}},{key:"loadUrl",value:function(r,n,i,s){var o=this,a=typeof i=="string"?[i]:i,l=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(a,l);this.options.request(this.options,r,u,function(c,h){if(h&&(h.status>=500&&h.status<600||!h.status))return n("failed loading "+r+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return n("failed loading "+r+"; status code: "+h.status,!1);if(!h&&c&&c.message){var d=c.message.toLowerCase(),f=["failed","fetch","network","load"].find(function(y){return d.indexOf(y)>-1});if(f)return n("failed loading "+r+": "+c.message,!0)}if(c)return n(c,!1);var p,m;try{typeof h.data=="string"?p=o.options.parse(h.data,i,s):p=h.data}catch{m="failed parsing "+r+" to json"}if(m)return n(m,!1);n(null,p)})}},{key:"create",value:function(r,n,i,s,o){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var l=this.options.parsePayload(n,i,s),u=0,c=[],h=[];r.forEach(function(d){var f=a.options.addPath;typeof a.options.addPath=="function"&&(f=a.options.addPath(d,n));var p=a.services.interpolator.interpolate(f,{lng:d,ns:n});a.options.request(a.options,p,l,function(m,y){u+=1,c.push(m),h.push(y),u===r.length&&typeof o=="function"&&o(c,h)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],u=function(h){var d=s.toResolveHierarchy(h);d.forEach(function(f){l.indexOf(f)<0&&l.push(f)})};u(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){r.allOptions.ns.forEach(function(h){i.read(c,h,"read",null,null,function(d,f){d&&o.warn("loading namespace ".concat(h," for language ").concat(c," failed"),d),!d&&f&&o.log("loaded namespace ".concat(h," for language ").concat(c),f),i.loaded("".concat(c,"|").concat(h),d,f)})})})}}}])}();k6.type="backend";const{slice:Yie,forEach:Qie}=[];function Zie(e){return Qie.call(Yie.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}const EF=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ese=(e,t,r)=>{const n=r||{};n.path=n.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!EF.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!EF.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},CF={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=ese(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,l)===t&&(r=o[a].substring(l+1))}}return r}};let Pf=null;const AF=()=>{if(Pf!==null)return Pf;try{Pf=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Pf=!1}return Pf};var nse={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&AF())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&AF()&&window.localStorage.setItem(r,e)}};let Ff=null;const TF=()=>{if(Ff!==null)return Ff;try{Ff=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ff=!1}return Ff};var ise={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&TF())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&TF()&&window.sessionStorage.setItem(r,e)}},sse={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let s=0;s0?t:void 0}},ose={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},ase={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},lse={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function use(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class _6{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Zie(r,this.options||{},use()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(tse),this.addDetector(rse),this.addDetector(nse),this.addDetector(ise),this.addDetector(sse),this.addDetector(ose),this.addDetector(ase),this.addDetector(lse)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}_6.type="languageDetector";const Ab="/theme-builder/main",Ji="#ff69b4";ni.use(k6).use(_6).use(lie).init({fallbackLng:"en",backend:{loadPath:`${Ab}/locales/{{lng}}/translation.json`},debug:!1,keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});var Tr={},wk={},Sk={};Object.defineProperty(Sk,"__esModule",{value:!0});Sk.default=fse;var kF="html",_F="head",Qm="body",cse=/<([a-zA-Z]+[0-9]?)/,$F=//i,LF=//i,n0=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},hC=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},PF=typeof window=="object"&&window.DOMParser;if(typeof PF=="function"){var hse=new PF,dse="text/html";hC=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),hse.parseFromString(e,dse)},n0=hC}if(typeof document=="object"&&document.implementation){var Zm=document.implementation.createHTMLDocument();n0=function(e,t){if(t){var r=Zm.documentElement.querySelector(t);return r&&(r.innerHTML=e),Zm}return Zm.documentElement.innerHTML=e,Zm}}var ey=typeof document=="object"&&document.createElement("template"),dC;ey&&ey.content&&(dC=function(e){return ey.innerHTML=e,ey.content.childNodes});function fse(e){var t,r,n=e.match(cse),i=n&&n[1]?n[1].toLowerCase():"";switch(i){case kF:{var s=hC(e);if(!$F.test(e)){var o=s.querySelector(_F);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!LF.test(e)){var o=s.querySelector(Qm);(r=o==null?void 0:o.parentNode)===null||r===void 0||r.removeChild(o)}return s.querySelectorAll(kF)}case _F:case Qm:{var a=n0(e).querySelectorAll(i);return LF.test(e)&&$F.test(e)?a[0].parentNode.childNodes:a}default:{if(dC)return dC(e);var o=n0(e,Qm).querySelector(Qm);return o.childNodes}}}var Tb={},Dk={},Ek={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function r(n){return n.type===t.Tag||n.type===t.Script||n.type===t.Style}e.isTag=r,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Ek);var Bt={},Zl=lr&&lr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cp=lr&&lr.__assign||function(){return Cp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t}(Ck);Bt.NodeWithChildren=_b;var F6=function(e){Zl(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=zi.ElementType.CDATA,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(_b);Bt.CDATA=F6;var O6=function(e){Zl(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=zi.ElementType.Root,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(_b);Bt.Document=O6;var N6=function(e){Zl(t,e);function t(r,n,i,s){i===void 0&&(i=[]),s===void 0&&(s=r==="script"?zi.ElementType.Script:r==="style"?zi.ElementType.Style:zi.ElementType.Tag);var o=e.call(this,i)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var i,s;return{name:n,value:r.attribs[n],namespace:(i=r["x-attribsNamespace"])===null||i===void 0?void 0:i[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),t}(_b);Bt.Element=N6;function M6(e){return(0,zi.isTag)(e)}Bt.isTag=M6;function I6(e){return e.type===zi.ElementType.CDATA}Bt.isCDATA=I6;function R6(e){return e.type===zi.ElementType.Text}Bt.isText=R6;function B6(e){return e.type===zi.ElementType.Comment}Bt.isComment=B6;function j6(e){return e.type===zi.ElementType.Directive}Bt.isDirective=j6;function z6(e){return e.type===zi.ElementType.Root}Bt.isDocument=z6;function pse(e){return Object.prototype.hasOwnProperty.call(e,"children")}Bt.hasChildren=pse;function Ak(e,t){t===void 0&&(t=!1);var r;if(R6(e))r=new $6(e.data);else if(B6(e))r=new L6(e.data);else if(M6(e)){var n=t?vS(e.children):[],i=new N6(e.name,Cp({},e.attribs),n);n.forEach(function(l){return l.parent=i}),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=Cp({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=Cp({},e["x-attribsPrefix"])),r=i}else if(I6(e)){var n=t?vS(e.children):[],s=new F6(n);n.forEach(function(u){return u.parent=s}),r=s}else if(z6(e)){var n=t?vS(e.children):[],o=new O6(n);n.forEach(function(u){return u.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),r=o}else if(j6(e)){var a=new P6(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),r=a}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Bt.cloneNode=Ak;function vS(e){for(var t=e.map(function(n){return Ak(n,!0)}),r=1;r/;function Sse(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(wse),r=t?t[1]:void 0;return(0,xse.formatDOM)((0,bse.default)(e),null,r)}var $b={},go={},Lb={},Dse=0;Lb.SAME=Dse;var Ese=1;Lb.CAMELCASE=Ese;Lb.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const V6=0,eu=1,Pb=2,Fb=3,Tk=4,G6=5,q6=6;function Cse(e){return Rn.hasOwnProperty(e)?Rn[e]:null}function Ci(e,t,r,n,i,s,o){this.acceptsBooleans=t===Pb||t===Fb||t===Tk,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const Rn={},Ase=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ase.forEach(e=>{Rn[e]=new Ci(e,V6,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{Rn[e]=new Ci(e,eu,!1,t,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(e=>{Rn[e]=new Ci(e,Pb,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{Rn[e]=new Ci(e,Pb,!1,e,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{Rn[e]=new Ci(e,Fb,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(e=>{Rn[e]=new Ci(e,Fb,!0,e,null,!1,!1)});["capture","download"].forEach(e=>{Rn[e]=new Ci(e,Tk,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(e=>{Rn[e]=new Ci(e,q6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(e=>{Rn[e]=new Ci(e,G6,!1,e.toLowerCase(),null,!1,!1)});const kk=/[\-\:]([a-z])/g,_k=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(kk,_k);Rn[t]=new Ci(t,eu,!1,e,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(kk,_k);Rn[t]=new Ci(t,eu,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(kk,_k);Rn[t]=new Ci(t,eu,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(e=>{Rn[e]=new Ci(e,eu,!1,e.toLowerCase(),null,!1,!1)});const Tse="xlinkHref";Rn[Tse]=new Ci("xlinkHref",eu,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(e=>{Rn[e]=new Ci(e,eu,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:kse,SAME:_se,possibleStandardNames:FF}=Lb,$se=":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",Lse=$se+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Pse=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Lse+"]*$")),Fse=Object.keys(FF).reduce((e,t)=>{const r=FF[t];return r===_se?e[t]=t:r===kse?e[t.toLowerCase()]=t:e[t]=r,e},{});go.BOOLEAN=Fb;go.BOOLEANISH_STRING=Pb;go.NUMERIC=G6;go.OVERLOADED_BOOLEAN=Tk;go.POSITIVE_NUMERIC=q6;go.RESERVED=V6;go.STRING=eu;go.getPropertyInfo=Cse;go.isCustomAttribute=Pse;go.possibleStandardNames=Fse;var $k={},Lk={},OF=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ose=/\n/g,Nse=/^\s*/,Mse=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ise=/^:\s*/,Rse=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Bse=/^[;\s]*/,jse=/^\s+|\s+$/g,zse=` -`,NF="/",MF="*",Su="",Hse="comment",Use="declaration",Wse=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(p){var m=p.match(Ose);m&&(r+=m.length);var y=p.lastIndexOf(zse);n=~y?p.length-y:n+p.length}function s(){var p={line:r,column:n};return function(m){return m.position=new o(p),u(),m}}function o(p){this.start=p,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+":"+r+":"+n+": "+p);if(m.reason=p,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var y=m[0];return i(y),e=e.slice(y.length),m}}function u(){l(Nse)}function c(p){var m;for(p=p||[];m=h();)m!==!1&&p.push(m);return p}function h(){var p=s();if(!(NF!=e.charAt(0)||MF!=e.charAt(1))){for(var m=2;Su!=e.charAt(m)&&(MF!=e.charAt(m)||NF!=e.charAt(m+1));)++m;if(m+=2,Su===e.charAt(m-1))return a("End of comment missing");var y=e.slice(2,m-2);return n+=2,i(y),e=e.slice(m),n+=2,p({type:Hse,comment:y})}}function d(){var p=s(),m=l(Mse);if(m){if(h(),!l(Ise))return a("property missing ':'");var y=l(Rse),b=p({type:Use,property:IF(m[0].replace(OF,Su)),value:y?IF(y[0].replace(OF,Su)):Su});return l(Bse),b}}function f(){var p=[];c(p);for(var m;m=d();)m!==!1&&(p.push(m),c(p));return p}return u(),f()};function IF(e){return e?e.replace(jse,Su):Su}var Vse=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lk,"__esModule",{value:!0});Lk.default=qse;var Gse=Vse(Wse);function qse(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,Gse.default)(e),i=typeof t=="function";return n.forEach(function(s){if(s.type==="declaration"){var o=s.property,a=s.value;i?t(o,a,s):a&&(r=r||{},r[o]=a)}}),r}var Ob={};Object.defineProperty(Ob,"__esModule",{value:!0});Ob.camelCase=void 0;var Kse=/^--[a-zA-Z0-9_-]+$/,Jse=/-([a-z])/g,Xse=/^[^-]+$/,Yse=/^-(webkit|moz|ms|o|khtml)-/,Qse=/^-(ms)-/,Zse=function(e){return!e||Xse.test(e)||Kse.test(e)},eoe=function(e,t){return t.toUpperCase()},RF=function(e,t){return"".concat(t,"-")},toe=function(e,t){return t===void 0&&(t={}),Zse(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Qse,RF):e=e.replace(Yse,RF),e.replace(Jse,eoe))};Ob.camelCase=toe;var roe=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},noe=roe(Lk),ioe=Ob;function fC(e,t){var r={};return!e||typeof e!="string"||(0,noe.default)(e,function(n,i){n&&i&&(r[(0,ioe.camelCase)(n,t)]=i)}),r}fC.default=fC;var soe=fC;(function(e){var t=lr&&lr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=s,e.setStyleProp=a;var r=z,n=t(soe),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(c,h){return c.includes("-")?!i.has(c):!!(h&&typeof h.is=="string")}var o={reactCompat:!0};function a(c,h){if(typeof c=="string"){if(!c.trim()){h.style={};return}try{h.style=(0,n.default)(c,o)}catch{h.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(c){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(c.name)};e.canTextBeChildOfNode=l;var u=function(c){return c};e.returnFirstArg=u})($k);Object.defineProperty($b,"__esModule",{value:!0});$b.default=uoe;var np=go,BF=$k,ooe=["checked","value"],aoe=["input","select","textarea"],loe={reset:!0,submit:!0};function uoe(e,t){e===void 0&&(e={});var r={},n=!!(e.type&&loe[e.type]);for(var i in e){var s=e[i];if((0,np.isCustomAttribute)(i)){r[i]=s;continue}var o=i.toLowerCase(),a=jF(o);if(a){var l=(0,np.getPropertyInfo)(a);switch(ooe.includes(a)&&aoe.includes(t)&&!n&&(a=jF("default"+o)),r[a]=s,l&&l.type){case np.BOOLEAN:r[a]=!0;break;case np.OVERLOADED_BOOLEAN:s===""&&(r[a]=!0);break}continue}BF.PRESERVE_CUSTOM_ATTRIBUTES&&(r[i]=s)}return(0,BF.setStyleProp)(e.style,r),r}function jF(e){return np.possibleStandardNames[e]}var Pk={},coe=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pk,"__esModule",{value:!0});Pk.default=K6;var bS=z,hoe=coe($b),Ap=$k,doe={cloneElement:bS.cloneElement,createElement:bS.createElement,isValidElement:bS.isValidElement};function K6(e,t){t===void 0&&(t={});for(var r=[],n=typeof t.replace=="function",i=t.transform||Ap.returnFirstArg,s=t.library||doe,o=s.cloneElement,a=s.createElement,l=s.isValidElement,u=e.length,c=0;c1&&(d=o(d,{key:d.key||c})),r.push(i(d,h,c));continue}}if(h.type==="text"){var f=!h.data.trim().length;if(f&&h.parent&&!(0,Ap.canTextBeChildOfNode)(h.parent)||t.trim&&f)continue;r.push(i(h.data,h,c));continue}var p=h,m={};foe(p)?((0,Ap.setStyleProp)(p.attribs.style,p.attribs),m=p.attribs):p.attribs&&(m=(0,hoe.default)(p.attribs,p.name));var y=void 0;switch(h.type){case"script":case"style":h.children[0]&&(m.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?m.defaultValue=h.children[0].data:h.children&&h.children.length&&(y=K6(h.children,t));break;default:continue}u>1&&(m.key=c),r.push(i(a(h.name,m,y),h,c))}return r.length===1?r[0]:r}function foe(e){return Ap.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,Ap.isCustomComponent)(e.name,e.attribs)}(function(e){var t=lr&&lr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=a;var r=t(wk);e.htmlToDOM=r.default;var n=t($b);e.attributesToProps=n.default;var i=t(Pk);e.domToReact=i.default;var s=Dk;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function a(l,u){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,i.default)((0,r.default)(l,(u==null?void 0:u.htmlparser2)||o),u):[]}})(Tr);const zF=jo(Tr),J6=zF.default||zF;var X6={exports:{}};(function(e,t){(function(){var r="ace",n=function(){return this}();!n&&typeof window<"u"&&(n=window);var i=function(c,h,d){if(typeof c!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=h),i.modules[c]||(i.payloads[c]=d,i.modules[c]=null)};i.modules={},i.payloads={};var s=function(c,h,d){if(typeof h=="string"){var f=l(c,h);if(f!=null)return d&&d(),f}else if(Object.prototype.toString.call(h)==="[object Array]"){for(var p=[],m=0,y=h.length;ml.length)&&(a=l.length),a-=o.length;var u=l.indexOf(o,a);return u!==-1&&u===a}),String.prototype.repeat||s(String.prototype,"repeat",function(o){for(var a="",l=this;o>0;)o&1&&(a+=l),(o>>=1)&&(l+=l);return a}),String.prototype.includes||s(String.prototype,"includes",function(o,a){return this.indexOf(o,a)!=-1}),Object.assign||(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(o),l=1;l>>0,u=arguments[1],c=u>>0,h=c<0?Math.max(l+c,0):Math.min(c,l),d=arguments[2],f=d===void 0?l:d>>0,p=f<0?Math.max(l+f,0):Math.min(f,l);h0;)l&1&&(u+=a),(l>>=1)&&(a+=a);return u};var s=/^\s\s*/,o=/\s\s*$/;n.stringTrimLeft=function(a){return a.replace(s,"")},n.stringTrimRight=function(a){return a.replace(o,"")},n.copyObject=function(a){var l={};for(var u in a)l[u]=a[u];return l},n.copyArray=function(a){for(var l=[],u=0,c=a.length;u65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(r,n,i){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var s=typeof navigator=="object"?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),a=s.userAgent||"",l=s.appName||"";n.isWin=o=="win",n.isMac=o=="mac",n.isLinux=o=="linux",n.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=a.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(a.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(a.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(a.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(a.split(" Edge/")[1])||void 0,n.isAIR=a.indexOf("AdobeAIR")>=0,n.isAndroid=a.indexOf("Android")>=0,n.isChromeOS=a.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("./useragent"),o="http://www.w3.org/1999/xhtml";n.buildDom=function d(f,p,m){if(typeof f=="string"&&f){var y=document.createTextNode(f);return p&&p.appendChild(y),y}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var b=[],v=0;v"u")){if(l){if(p)u();else if(p===!1)return l.push([d,f])}if(!a){var m=p;!p||!p.getRootNode?m=document:(m=p.getRootNode(),(!m||m==p)&&(m=document));var y=m.ownerDocument||m;if(f&&n.hasCssString(f,m))return null;f&&(d+=` + `,wk=(e,t)=>Object.entries(e).map(r=>{const n=r[0],i=r[1],s=xk(n,i.origin,t);return{[n]:s}}).reduce((r,n)=>({...r,...n}),{}),rC=(e,t)=>{const r=wk(e,t),n={};return Object.entries(e).forEach(([i,s])=>{const o=i.toLowerCase();r[i].forEach(l=>{n[`--${ot}-${o}-${l.index??l.name}`]=l.hex}),n[`--${ot}-${o}-origin`]=s.origin,n[`--${ot}-${o}-origin-light-default`]=s.originLight,n[`--${ot}-${o}-origin-light-hovered`]=s.originLightHovered,n[`--${ot}-${o}-origin-light-pressed`]=s.originLightPressed,n[`--${ot}-${o}-on-origin-light-default`]=s.onOriginLight,n[`--${ot}-${o}-on-origin-light-hovered`]=s.onOriginLightHovered,n[`--${ot}-${o}-on-origin-light-pressed`]=s.onOriginLightPressed,n[`--${ot}-${o}-origin-dark-default`]=s.originDark,n[`--${ot}-${o}-origin-dark-hovered`]=s.originDarkHovered,n[`--${ot}-${o}-origin-dark-pressed`]=s.originDarkPressed,n[`--${ot}-${o}-on-origin-dark-default`]=s.onOriginDark,n[`--${ot}-${o}-on-origin-dark-hovered`]=s.onOriginDarkHovered,n[`--${ot}-${o}-on-origin-dark-pressed`]=s.onOriginDarkPressed}),n},nC=(e,t)=>{const r={};return Object.entries(t).forEach(([n])=>{const i=n.toLowerCase();r[`--${ot}-${i}-origin-default`]=`light-dark(var(--${ot}-${i}-origin-light-default),var(--${ot}-${i}-origin-dark-default))`,r[`--${ot}-${i}-origin-hovered`]=`light-dark(var(--${ot}-${i}-origin-light-hovered),var(--${ot}-${i}-origin-dark-hovered))`,r[`--${ot}-${i}-origin-pressed`]=`light-dark(var(--${ot}-${i}-origin-light-pressed),var(--${ot}-${i}-origin-dark-pressed))`,r[`--${ot}-${i}-on-origin-default`]=`light-dark(var(--${ot}-${i}-on-origin-light-default),var(--${ot}-${i}-on-origin-dark-default))`,r[`--${ot}-${i}-on-origin-hovered`]=`light-dark(var(--${ot}-${i}-on-origin-light-hovered),var(--${ot}-${i}-on-origin-dark-hovered))`,r[`--${ot}-${i}-on-origin-pressed`]=`light-dark(var(--${ot}-${i}-on-origin-light-pressed),var(--${ot}-${i}-on-origin-dark-pressed))`,e.forEach(s=>{s.transparencyDark!==void 0||s.transparencyLight!==void 0?r[`--${ot}-${i}-${s.name}`]=`light-dark(color-mix(in srgb, transparent ${s.transparencyLight}%, var(--${ot}-${i}-${s.light})),color-mix(in srgb, transparent ${s.transparencyDark}%, var(--${ot}-${i}-${s.dark})))`:r[`--${ot}-${i}-${s.name}`]=`light-dark(var(--${ot}-${i}-${s.light}),var(--${ot}-${i}-${s.dark}))`})}),r},Yne=()=>{const{speakingNames:e,luminanceSteps:t,theme:r}=ir(n=>n);return z.useEffect(()=>{const n={...r.colors,...r.additionalColors,...r.customColors},i={...rC(n,t),...nC(e,n),...b6(r)},s=document.getElementsByTagName("html");Array.from(s).forEach(o=>{o.setAttribute("style",Object.entries(i).map(a=>`${a[0]}:${a[1]};`).join(" "))})},[e,r,t]),j.jsxs(j.Fragment,{children:[j.jsx(_J,{}),j.jsx(Gq,{})]})},Qne=(...e)=>{console!=null&&console.warn&&(Uu(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},sF={},iC=(...e)=>{Uu(e[0])&&sF[e[0]]||(Uu(e[0])&&(sF[e[0]]=new Date),Qne(...e))},x6=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},oF=(e,t,r)=>{e.loadNamespaces(t,x6(e,r))},aF=(e,t,r,n)=>{Uu(r)&&(r=[r]),r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,x6(e,n))},Zne=(e,t,r={})=>!t.languages||!t.languages.length?(iC("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{var s;if(((s=r.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),Uu=e=>typeof e=="string",eie=e=>typeof e=="object"&&e!==null,tie=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,rie={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},nie=e=>rie[e],iie=e=>e.replace(tie,nie);let sC={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:iie};const sie=(e={})=>{sC={...sC,...e}},oie=()=>sC;let w6;const aie=e=>{w6=e},lie=()=>w6,uie={type:"3rdParty",init(e){sie(e.options.react),aie(e)}},cie=z.createContext();class hie{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const die=(e,t)=>{const r=z.useRef();return z.useEffect(()=>{r.current=e},[e,t]),r.current},S6=(e,t,r,n)=>e.getFixedT(t,r,n),fie=(e,t,r,n)=>z.useCallback(S6(e,t,r,n),[e,t,r,n]),er=(e,t={})=>{var D,C,w,T;const{i18n:r}=t,{i18n:n,defaultNS:i}=z.useContext(cie)||{},s=r||n||lie();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new hie),!s){iC("You will need to pass in an i18next instance by using initReactI18next");const k=(P,I)=>Uu(I)?I:eie(I)&&Uu(I.defaultValue)?I.defaultValue:Array.isArray(P)?P[P.length-1]:P,O=[k,{},!1];return O.t=k,O.i18n={},O.ready=!1,O}(D=s.options.react)!=null&&D.wait&&iC("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...oie(),...s.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let u=i||((C=s.options)==null?void 0:C.defaultNS);u=Uu(u)?[u]:u||["translation"],(T=(w=s.reportNamespaces).addUsedNamespaces)==null||T.call(w,u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every(k=>Zne(k,s,o)),h=fie(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),d=()=>h,f=()=>S6(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),[p,m]=z.useState(d);let y=u.join();t.lng&&(y=`${t.lng}${y}`);const b=die(y),v=z.useRef(!0);z.useEffect(()=>{const{bindI18n:k,bindI18nStore:O}=o;v.current=!0,!c&&!a&&(t.lng?aF(s,t.lng,u,()=>{v.current&&m(f)}):oF(s,u,()=>{v.current&&m(f)})),c&&b&&b!==y&&v.current&&m(f);const P=()=>{v.current&&m(f)};return k&&(s==null||s.on(k,P)),O&&(s==null||s.store.on(O,P)),()=>{v.current=!1,s&&(k==null||k.split(" ").forEach(I=>s.off(I,P))),O&&s&&O.split(" ").forEach(I=>s.store.off(I,P))}},[s,y]),z.useEffect(()=>{v.current&&c&&m(d)},[s,l,c]);const E=[p,s,c];if(E.t=p,E.i18n=s,E.ready=c,c||!c&&!a)return E;throw new Promise(k=>{t.lng?aF(s,t.lng,u,()=>k()):oF(s,u,()=>k())})},pie=()=>{const{t:e}=er(),{resetDefaults:t}=ir(n=>n),r=A5();return j.jsx("div",{className:"w-[100vw] h-[100vh] flex",children:j.jsxs("div",{className:"m-auto flex flex-col gap-fix-md",children:[j.jsx(dr,{semantic:"critical",icon:"quiet_zone",children:e("errorMessage")}),j.jsx(Dt,{className:"mx-auto",size:"small",icon:"undo",onClick:()=>{t(),r(0)},children:e("reset")})]})})},Ct=e=>typeof e=="string",Ff=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},lF=e=>e==null?"":""+e,gie=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},mie=/###/g,uF=e=>e&&e.indexOf("###")>-1?e.replace(mie,"."):e,cF=e=>!e||Ct(e),Tp=(e,t,r)=>{const n=Ct(t)?t.split("."):t;let i=0;for(;i{const{obj:n,k:i}=Tp(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=Tp(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Tp(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=r},yie=(e,t,r,n)=>{const{obj:i,k:s}=Tp(e,t,Object);i[s]=i[s]||[],i[s].push(r)},Yv=(e,t)=>{const{obj:r,k:n}=Tp(e,t);if(r)return r[n]},vie=(e,t,r)=>{const n=Yv(e,r);return n!==void 0?n:Yv(t,r)},D6=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?Ct(e[n])||e[n]instanceof String||Ct(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):D6(e[n],t[n],r):e[n]=t[n]);return e},ah=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var bie={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const xie=e=>Ct(e)?e.replace(/[&<>"'\/]/g,t=>bie[t]):e;class wie{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const Sie=[" ",",","?","!",";"],Die=new wie(20),Eie=(e,t,r)=>{t=t||"",r=r||"";const n=Sie.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=Die.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s},oC=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let s=0;s-1&&le&&e.replace("_","-"),Cie={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Zv{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||Cie,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let[a,l]=o;for(let u=0;u{let[a,l]=o;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],n&&(Array.isArray(n)?a.push(...n):Ct(n)&&s?a.push(...n.split(s)):a.push(n)));const l=Yv(this.data,a);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=a[0],r=a[1],n=a.slice(2).join(".")),l||!o||!Ct(n)?l:oC(this.data&&this.data[t]&&this.data[t][r],n,s)}addResource(t,r,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,r];n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(a=t.split("."),i=r,r=a[1]),this.addNamespaces(r),hF(this.data,a,i),s.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(Ct(n[s])||Array.isArray(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let l=Yv(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?D6(l,n,s):l={...l,...n},hF(this.data,a,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var E6={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,r,n,i))}),t}};const fF={};class e0 extends Eb{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),gie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ko.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Eie(t,n,i);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:s};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return Ct(s)&&(s=[s]),{key:t,namespaces:s}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],r),l=a[a.length-1],u=r.lng||this.language,c=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const D=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${D}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${D}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const h=this.resolve(t,r);let d=h&&h.res;const f=h&&h.usedKey||o,p=h&&h.exactUsedKey||o,m=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],b=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,E=!Ct(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&E&&y.indexOf(m)<0&&!(Ct(b)&&Array.isArray(d))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...r,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=D,h.usedParams=this.getUsedParamsDetails(r),h):D}if(s){const D=Array.isArray(d),C=D?[]:{},w=D?p:f;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const k=`${w}${s}${T}`;C[T]=this.translate(k,{...r,joinArrays:!1,ns:a}),C[T]===k&&(C[T]=d[T])}d=C}}else if(v&&Ct(b)&&Array.isArray(d))d=d.join(b),d&&(d=this.extendTranslation(d,t,r,n));else{let D=!1,C=!1;const w=r.count!==void 0&&!Ct(r.count),T=e0.hasDefaultValue(r),k=w?this.pluralResolver.getSuffix(u,r.count,r):"",O=r.ordinal&&w?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",P=w&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),I=P&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${k}`]||r[`defaultValue${O}`]||r.defaultValue;!this.isValidLookup(d)&&T&&(D=!0,d=I),this.isValidLookup(d)||(C=!0,d=o);const L=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,_=T&&I!==d&&this.options.updateMissing;if(C||D||_){if(this.logger.log(_?"updateKey":"missingKey",u,l,o,_?I:d),s){const B=this.resolve(o,{...r,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let B=0;B{const K=T&&V!==d?V:L;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,U,K,_,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,U,K,_,r),this.emit("missingKey",B,l,U,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?A.forEach(B=>{const U=this.pluralResolver.getSuffixes(B,r);P&&r[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(V=>{R([B],o+V,r[`defaultValue${V}`]||I)})}):R(A,o,I))}d=this.extendTranslation(d,t,r,h,n),C&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(C||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,D?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(r),h):d}extendTranslation(t,r,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=Ct(t)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let h=n.replace&&!Ct(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,n.lng||this.language||i.usedLng,n),u){const d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,a;return Ct(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;i=c;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=r.count!==void 0&&!Ct(r.count),f=d&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(Ct(r.context)||typeof r.context=="number")&&r.context!=="",m=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(y=>{this.isValidLookup(n)||(a=y,!fF[`${m[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(fF[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(b=>{if(this.isValidLookup(n))return;o=b;const v=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,c,b,y,r);else{let D;d&&(D=this.pluralResolver.getSuffix(b,r.count,r));const C=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(c+D),r.ordinal&&D.indexOf(w)===0&&v.push(c+D.replace(w,this.options.pluralSeparator)),f&&v.push(c+C)),p){const T=`${c}${this.options.contextSeparator}${r.context}`;v.push(T),d&&(v.push(T+D),r.ordinal&&D.indexOf(w)===0&&v.push(T+D.replace(w,this.options.pluralSeparator)),f&&v.push(T+C))}}let E;for(;E=v.pop();)this.isValidLookup(n)||(s=E,n=this.getResource(b,y,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Ct(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of r)delete i[s]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}const pS=e=>e.charAt(0).toUpperCase()+e.slice(1);class pF{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ko.create("languageUtils")}getScriptPartFromCode(t){if(t=Qv(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Qv(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Ct(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=pS(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=pS(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=pS(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Ct(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Ct(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Ct(t)&&s(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let Tie=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Aie={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const kie=["v1","v2","v3"],_ie=["v4"],gF={zero:0,one:1,two:2,few:3,many:4,other:5},$ie=()=>{const e={};return Tie.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:Aie[t.fc]}})}),e};class Lie{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=ko.create("pluralResolver"),(!this.options.compatibilityJSON||_ie.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=$ie(),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Qv(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[s]=o,o}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,s)=>gF[i]-gF[s]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!kie.includes(this.options.compatibilityJSON)}}const mF=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=vie(e,t,r);return!s&&i&&Ct(r)&&(s=oC(e,r,n),s===void 0&&(s=oC(t,r,n))),s},gS=e=>e.replace(/\$/g,"$$$$");class Pie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ko.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=r!==void 0?r:xie,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?ah(s):o||"{{",this.suffix=a?ah(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?ah(d):f||ah("$t("),this.nestingSuffix=p?ah(p):m||ah(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=b||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=f=>{if(f.indexOf(this.formatSeparator)<0){const b=mF(r,l,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...i,...r,interpolationkey:f}):b}const p=f.split(this.formatSeparator),m=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(mF(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,n,{...i,...r,interpolationkey:m})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>gS(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?gS(this.escape(f)):gS(f)}].forEach(f=>{for(a=0;s=f.regex.exec(t);){const p=s[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const y=c(t,s,i);o=Ct(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(h){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!Ct(o)&&!this.useRawValueToEscape&&(o=lF(o));const m=f.safeValue(o);if(t=t.replace(s[0],m),h?(f.regex.lastIndex+=o.length,f.regex.lastIndex-=s[0].length):f.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const h=l.split(new RegExp(`${c}[ ]*{`));let d=`{${h[1]}`;l=h[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(f&&f.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!Ct(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=c.shift(),l=c,u=!0}if(s=r(a.call(this,i[1].trim(),o),o),s&&i[0]===t&&!Ct(s))return s;Ct(s)||(s=lF(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,h)=>this.format(c,h,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const Fie=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},lh=e=>{const t={};return(r,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=n+JSON.stringify(s);let a=t[o];return a||(a=e(Qv(n),i),t[o]=a),a(r)}};class Oie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ko.create("formatter"),this.options=t,this.formats={number:lh((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return s=>i.format(s)}),currency:lh((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return s=>i.format(s)}),datetime:lh((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return s=>i.format(s)}),relativetime:lh((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return s=>i.format(s,n.range||"day")}),list:lh((r,n)=>{const i=new Intl.ListFormat(r,{...n});return s=>i.format(s)})},this.init(t)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=lh(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,l)=>{const{formatName:u,formatOptions:c}=Fie(l);if(this.formats[u]){let h=a;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},f=d.locale||d.lng||i.locale||i.lng||n;h=this.formats[u](a,f,{...c,...i,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const Iie=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Mie extends Eb{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ko.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,r,n,i){const s={},o={},a={},l={};return t.forEach(u=>{let c=!0;r.forEach(h=>{const d=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),l[h]===void 0&&(l[h]=!0)))}),c||(a[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),s=i[0],o=i[1];r&&this.emit("failedLoading",s,o,r),!r&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const a={};this.queue.forEach(l=>{yie(l.loaded,[s],o),Iie(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(h=>{a[u][h]===void 0&&(a[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&c&&i{this.read.call(this,t,r,n,i+1,s*2,o)},s);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(t,r);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,r,a)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ct(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ct(r)&&(r=[r]);const s=this.queueLoad(t,r,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${r}loaded namespace ${s} for language ${i}`,a),this.loaded(t,o,a)})}saveMissing(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,r,n,i,l):c=u(t,r,n,i),c&&typeof c.then=="function"?c.then(h=>a(null,h)).catch(a):a(null,c)}catch(c){a(c)}else u(t,r,n,i,a,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const yF=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ct(e[1])&&(t.defaultValue=e[1]),Ct(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),vF=e=>(Ct(e.ns)&&(e.ns=[e.ns]),Ct(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ct(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Xm=()=>{},Nie=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class hg extends Eb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=vF(t),this.services={},this.logger=ko,this.modules={external:[]},Nie(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Ct(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=yF();this.options={...i,...this.options,...vF(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ko.init(s(this.modules.logger),this.options):ko.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Oie);const h=new pF(this.options);this.store=new dF(this.options.resources,this.options);const d=this.services;d.logger=ko,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new Lie(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Pie(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Mie(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Xm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=Ff(),u=()=>{const c=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(d),n(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xm;const i=Ct(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(t,r,n){const i=Ff();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Xm),this.services.backendConnector.reload(t,r,s=>{i.resolve(),n(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&E6.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=Ff();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=Ct(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,r,n){var i=this;const s=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),h=2;h`${l.keyPrefix}${d}${p}`):f=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(f,l)};return Ct(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(r.precheck){const a=r.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(s,t)))}loadNamespaces(t,r){const n=Ff();return this.options.ns?(Ct(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=Ff();Ct(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new pF(yF());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new hg(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xm;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new hg(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new dF(this.store.data,i),s.services.resourceStore=s.store),s.translator=new e0(s.services,i),s.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c"u"?"undefined":aC(XMLHttpRequest))==="object"}function Rie(e){return!!e&&typeof e.then=="function"}function Bie(e){return Rie(e)?e:Promise.resolve(e)}function ip(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var lC={exports:{}},Ym={exports:{}},bF;function jie(){return bF||(bF=1,function(e,t){var r={},n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof r<"u"&&r,i=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var l=typeof o<"u"&&o||typeof self<"u"&&self||typeof l<"u"&&l,u={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function c(M){return M&&DataView.prototype.isPrototypeOf(M)}if(u.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function f(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||M==="")throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function p(M){return typeof M!="string"&&(M=String(M)),M}function m(M){var R={next:function(){var B=M.shift();return{done:B===void 0,value:B}}};return u.iterable&&(R[Symbol.iterator]=function(){return R}),R}function y(M){this.map={},M instanceof y?M.forEach(function(R,B){this.append(B,R)},this):Array.isArray(M)?M.forEach(function(R){this.append(R[0],R[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(R){this.append(R,M[R])},this)}y.prototype.append=function(M,R){M=f(M),R=p(R);var B=this.map[M];this.map[M]=B?B+", "+R:R},y.prototype.delete=function(M){delete this.map[f(M)]},y.prototype.get=function(M){return M=f(M),this.has(M)?this.map[M]:null},y.prototype.has=function(M){return this.map.hasOwnProperty(f(M))},y.prototype.set=function(M,R){this.map[f(M)]=p(R)},y.prototype.forEach=function(M,R){for(var B in this.map)this.map.hasOwnProperty(B)&&M.call(R,this.map[B],B,this)},y.prototype.keys=function(){var M=[];return this.forEach(function(R,B){M.push(B)}),m(M)},y.prototype.values=function(){var M=[];return this.forEach(function(R){M.push(R)}),m(M)},y.prototype.entries=function(){var M=[];return this.forEach(function(R,B){M.push([B,R])}),m(M)},u.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function v(M){return new Promise(function(R,B){M.onload=function(){R(M.result)},M.onerror=function(){B(M.error)}})}function E(M){var R=new FileReader,B=v(R);return R.readAsArrayBuffer(M),B}function D(M){var R=new FileReader,B=v(R);return R.readAsText(M),B}function C(M){for(var R=new Uint8Array(M),B=new Array(R.length),U=0;U-1?R:M}function P(M,R){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R=R||{};var B=R.body;if(M instanceof P){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,R.headers||(this.headers=new y(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!B&&M._bodyInit!=null&&(B=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=R.credentials||this.credentials||"same-origin",(R.headers||!this.headers)&&(this.headers=new y(R.headers)),this.method=O(R.method||this.method||"GET"),this.mode=R.mode||this.mode||null,this.signal=R.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(B),(this.method==="GET"||this.method==="HEAD")&&(R.cache==="no-store"||R.cache==="no-cache")){var U=/([?&])_=[^&]*/;if(U.test(this.url))this.url=this.url.replace(U,"$1_="+new Date().getTime());else{var V=/\?/;this.url+=(V.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function I(M){var R=new FormData;return M.trim().split("&").forEach(function(B){if(B){var U=B.split("="),V=U.shift().replace(/\+/g," "),K=U.join("=").replace(/\+/g," ");R.append(decodeURIComponent(V),decodeURIComponent(K))}}),R}function F(M){var R=new y,B=M.replace(/\r?\n[\t ]+/g," ");return B.split("\r").map(function(U){return U.indexOf(` +`)===0?U.substr(1,U.length):U}).forEach(function(U){var V=U.split(":"),K=V.shift().trim();if(K){var J=V.join(":").trim();R.append(K,J)}}),R}T.call(P.prototype);function L(M,R){if(!(this instanceof L))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new y(R.headers),this.url=R.url||"",this._initBody(M)}T.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},L.error=function(){var M=new L(null,{status:0,statusText:""});return M.type="error",M};var _=[301,302,303,307,308];L.redirect=function(M,R){if(_.indexOf(R)===-1)throw new RangeError("Invalid status code");return new L(null,{status:R,headers:{location:M}})},a.DOMException=l.DOMException;try{new a.DOMException}catch{a.DOMException=function(R,B){this.message=R,this.name=B;var U=Error(R);this.stack=U.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function A(M,R){return new Promise(function(B,U){var V=new P(M,R);if(V.signal&&V.signal.aborted)return U(new a.DOMException("Aborted","AbortError"));var K=new XMLHttpRequest;function J(){K.abort()}K.onload=function(){var Y={status:K.status,statusText:K.statusText,headers:F(K.getAllResponseHeaders()||"")};Y.url="responseURL"in K?K.responseURL:Y.headers.get("X-Request-URL");var Q="response"in K?K.response:K.responseText;setTimeout(function(){B(new L(Q,Y))},0)},K.onerror=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},K.ontimeout=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},K.onabort=function(){setTimeout(function(){U(new a.DOMException("Aborted","AbortError"))},0)};function G(Y){try{return Y===""&&l.location.href?l.location.href:Y}catch{return Y}}K.open(V.method,G(V.url),!0),V.credentials==="include"?K.withCredentials=!0:V.credentials==="omit"&&(K.withCredentials=!1),"responseType"in K&&(u.blob?K.responseType="blob":u.arrayBuffer&&V.headers.get("Content-Type")&&V.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(K.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof y)?Object.getOwnPropertyNames(R.headers).forEach(function(Y){K.setRequestHeader(Y,p(R.headers[Y]))}):V.headers.forEach(function(Y,Q){K.setRequestHeader(Q,Y)}),V.signal&&(V.signal.addEventListener("abort",J),K.onreadystatechange=function(){K.readyState===4&&V.signal.removeEventListener("abort",J)}),K.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return A.polyfill=!0,l.fetch||(l.fetch=A,l.Headers=y,l.Request=P,l.Response=L),a.Headers=y,a.Request=P,a.Response=L,a.fetch=A,a})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=n.fetch?n:i;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t}(Ym,Ym.exports)),Ym.exports}(function(e,t){var r={},n;if(typeof fetch=="function"&&(typeof r<"u"&&r.fetch?n=r.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof ip<"u"&&typeof window>"u"){var i=n||jie();i.default&&(i=i.default),t.default=i,e.exports=t.default}})(lC,lC.exports);var T6=lC.exports;const A6=Ho(T6),xF=BT({__proto__:null,default:A6},[T6]);var Qn={};function wF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function SF(e){for(var t=1;t"u"&&typeof Qn<"u"&&typeof Qn.process<"u"&&Qn.process.versions&&Qn.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(Qn.process.version,"; ").concat(Qn.process.platform," ").concat(Qn.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(n):t.requestOptions,a=SF({method:n?"POST":"GET",body:n?t.stringify(n):void 0,headers:s},EF?{}:o),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{DF(r,a,i,l)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(o).forEach(function(c){delete a[c]}),DF(r,a,i,l),EF=!0}catch(c){i(c)}}},Vie=function(t,r,n,i){n&&nc(n)==="object"&&(n=uC("",n).slice(1)),t.queryStringParams&&(r=uC(r,t.queryStringParams));try{var s;dg?s=new dg:s=new t0("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",r,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(l){console&&console.log(l)}},Gie=function(t,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},ga&&r.indexOf("file:")!==0)return Wie(t,r,n,i);if(C6()||typeof ActiveXObject=="function")return Vie(t,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function dd(e){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function CF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mS(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};qie(this,e),this.services=t,this.options=r,this.allOptions=n,this.type="backend",this.init(t,r,n)}return Jie(e,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=mS(mS(mS({},Yie()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);dd(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,s,o){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(r,i)),l=Bie(l),l.then(function(u){if(!u)return o(null,{});var c=a.services.interpolator.interpolate(u,{lng:r.join("+"),ns:i.join("+")});a.loadUrl(c,o,n,s)})}},{key:"loadUrl",value:function(r,n,i,s){var o=this,a=typeof i=="string"?[i]:i,l=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(a,l);this.options.request(this.options,r,u,function(c,h){if(h&&(h.status>=500&&h.status<600||!h.status))return n("failed loading "+r+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return n("failed loading "+r+"; status code: "+h.status,!1);if(!h&&c&&c.message){var d=c.message.toLowerCase(),f=["failed","fetch","network","load"].find(function(y){return d.indexOf(y)>-1});if(f)return n("failed loading "+r+": "+c.message,!0)}if(c)return n(c,!1);var p,m;try{typeof h.data=="string"?p=o.options.parse(h.data,i,s):p=h.data}catch{m="failed parsing "+r+" to json"}if(m)return n(m,!1);n(null,p)})}},{key:"create",value:function(r,n,i,s,o){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var l=this.options.parsePayload(n,i,s),u=0,c=[],h=[];r.forEach(function(d){var f=a.options.addPath;typeof a.options.addPath=="function"&&(f=a.options.addPath(d,n));var p=a.services.interpolator.interpolate(f,{lng:d,ns:n});a.options.request(a.options,p,l,function(m,y){u+=1,c.push(m),h.push(y),u===r.length&&typeof o=="function"&&o(c,h)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],u=function(h){var d=s.toResolveHierarchy(h);d.forEach(function(f){l.indexOf(f)<0&&l.push(f)})};u(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){r.allOptions.ns.forEach(function(h){i.read(c,h,"read",null,null,function(d,f){d&&o.warn("loading namespace ".concat(h," for language ").concat(c," failed"),d),!d&&f&&o.log("loaded namespace ".concat(h," for language ").concat(c),f),i.loaded("".concat(c,"|").concat(h),d,f)})})})}}}])}();$6.type="backend";const{slice:Qie,forEach:Zie}=[];function ese(e){return Zie.call(Qie.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}const TF=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,tse=(e,t,r)=>{const n=r||{};n.path=n.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!TF.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!TF.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},AF={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=tse(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,l)===t&&(r=o[a].substring(l+1))}}return r}};let Of=null;const kF=()=>{if(Of!==null)return Of;try{Of=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Of=!1}return Of};var ise={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&kF())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&kF()&&window.localStorage.setItem(r,e)}};let If=null;const _F=()=>{if(If!==null)return If;try{If=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{If=!1}return If};var sse={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&_F())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&_F()&&window.sessionStorage.setItem(r,e)}},ose={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let s=0;s0?t:void 0}},ase={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},lse={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},use={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function cse(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class L6{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=ese(r,this.options||{},cse()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(rse),this.addDetector(nse),this.addDetector(ise),this.addDetector(sse),this.addDetector(ose),this.addDetector(ase),this.addDetector(lse),this.addDetector(use)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}L6.type="languageDetector";const Cb="/theme-builder/main",Qi="#ff69b4";oi.use($6).use(L6).use(uie).init({fallbackLng:"en",backend:{loadPath:`${Cb}/locales/{{lng}}/translation.json`},debug:!1,keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});var $r={},Sk={},Dk={};Object.defineProperty(Dk,"__esModule",{value:!0});Dk.default=pse;var $F="html",LF="head",Qm="body",hse=/<([a-zA-Z]+[0-9]?)/,PF=//i,FF=//i,r0=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},cC=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},OF=typeof window=="object"&&window.DOMParser;if(typeof OF=="function"){var dse=new OF,fse="text/html";cC=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),dse.parseFromString(e,fse)},r0=cC}if(typeof document=="object"&&document.implementation){var Zm=document.implementation.createHTMLDocument();r0=function(e,t){if(t){var r=Zm.documentElement.querySelector(t);return r&&(r.innerHTML=e),Zm}return Zm.documentElement.innerHTML=e,Zm}}var ey=typeof document=="object"&&document.createElement("template"),hC;ey&&ey.content&&(hC=function(e){return ey.innerHTML=e,ey.content.childNodes});function pse(e){var t,r,n=e.match(hse),i=n&&n[1]?n[1].toLowerCase():"";switch(i){case $F:{var s=cC(e);if(!PF.test(e)){var o=s.querySelector(LF);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!FF.test(e)){var o=s.querySelector(Qm);(r=o==null?void 0:o.parentNode)===null||r===void 0||r.removeChild(o)}return s.querySelectorAll($F)}case LF:case Qm:{var a=r0(e).querySelectorAll(i);return FF.test(e)&&PF.test(e)?a[0].parentNode.childNodes:a}default:{if(hC)return hC(e);var o=r0(e,Qm).querySelector(Qm);return o.childNodes}}}var Tb={},Ek={},Ck={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function r(n){return n.type===t.Tag||n.type===t.Script||n.type===t.Style}e.isTag=r,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Ck);var Ht={},tu=hr&&hr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ap=hr&&hr.__assign||function(){return Ap=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t}(Tk);Ht.NodeWithChildren=kb;var I6=function(e){tu(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Wi.ElementType.CDATA,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(kb);Ht.CDATA=I6;var M6=function(e){tu(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Wi.ElementType.Root,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(kb);Ht.Document=M6;var N6=function(e){tu(t,e);function t(r,n,i,s){i===void 0&&(i=[]),s===void 0&&(s=r==="script"?Wi.ElementType.Script:r==="style"?Wi.ElementType.Style:Wi.ElementType.Tag);var o=e.call(this,i)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var i,s;return{name:n,value:r.attribs[n],namespace:(i=r["x-attribsNamespace"])===null||i===void 0?void 0:i[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),t}(kb);Ht.Element=N6;function R6(e){return(0,Wi.isTag)(e)}Ht.isTag=R6;function B6(e){return e.type===Wi.ElementType.CDATA}Ht.isCDATA=B6;function j6(e){return e.type===Wi.ElementType.Text}Ht.isText=j6;function z6(e){return e.type===Wi.ElementType.Comment}Ht.isComment=z6;function H6(e){return e.type===Wi.ElementType.Directive}Ht.isDirective=H6;function U6(e){return e.type===Wi.ElementType.Root}Ht.isDocument=U6;function gse(e){return Object.prototype.hasOwnProperty.call(e,"children")}Ht.hasChildren=gse;function Ak(e,t){t===void 0&&(t=!1);var r;if(j6(e))r=new P6(e.data);else if(z6(e))r=new F6(e.data);else if(R6(e)){var n=t?yS(e.children):[],i=new N6(e.name,Ap({},e.attribs),n);n.forEach(function(l){return l.parent=i}),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=Ap({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=Ap({},e["x-attribsPrefix"])),r=i}else if(B6(e)){var n=t?yS(e.children):[],s=new I6(n);n.forEach(function(u){return u.parent=s}),r=s}else if(U6(e)){var n=t?yS(e.children):[],o=new M6(n);n.forEach(function(u){return u.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),r=o}else if(H6(e)){var a=new O6(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),r=a}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Ht.cloneNode=Ak;function yS(e){for(var t=e.map(function(n){return Ak(n,!0)}),r=1;r/;function Dse(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(Sse),r=t?t[1]:void 0;return(0,wse.formatDOM)((0,xse.default)(e),null,r)}var _b={},vo={},$b={},Ese=0;$b.SAME=Ese;var Cse=1;$b.CAMELCASE=Cse;$b.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const q6=0,ru=1,Lb=2,Pb=3,kk=4,K6=5,J6=6;function Tse(e){return zn.hasOwnProperty(e)?zn[e]:null}function ki(e,t,r,n,i,s,o){this.acceptsBooleans=t===Lb||t===Pb||t===kk,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const zn={},Ase=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ase.forEach(e=>{zn[e]=new ki(e,q6,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{zn[e]=new ki(e,ru,!1,t,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(e=>{zn[e]=new ki(e,Lb,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{zn[e]=new ki(e,Lb,!1,e,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{zn[e]=new ki(e,Pb,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(e=>{zn[e]=new ki(e,Pb,!0,e,null,!1,!1)});["capture","download"].forEach(e=>{zn[e]=new ki(e,kk,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(e=>{zn[e]=new ki(e,J6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(e=>{zn[e]=new ki(e,K6,!1,e.toLowerCase(),null,!1,!1)});const _k=/[\-\:]([a-z])/g,$k=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(_k,$k);zn[t]=new ki(t,ru,!1,e,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(_k,$k);zn[t]=new ki(t,ru,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(_k,$k);zn[t]=new ki(t,ru,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(e=>{zn[e]=new ki(e,ru,!1,e.toLowerCase(),null,!1,!1)});const kse="xlinkHref";zn[kse]=new ki("xlinkHref",ru,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(e=>{zn[e]=new ki(e,ru,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:_se,SAME:$se,possibleStandardNames:IF}=$b,Lse=":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",Pse=Lse+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Fse=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Pse+"]*$")),Ose=Object.keys(IF).reduce((e,t)=>{const r=IF[t];return r===$se?e[t]=t:r===_se?e[t.toLowerCase()]=t:e[t]=r,e},{});vo.BOOLEAN=Pb;vo.BOOLEANISH_STRING=Lb;vo.NUMERIC=K6;vo.OVERLOADED_BOOLEAN=kk;vo.POSITIVE_NUMERIC=J6;vo.RESERVED=q6;vo.STRING=ru;vo.getPropertyInfo=Tse;vo.isCustomAttribute=Fse;vo.possibleStandardNames=Ose;var Lk={},Pk={},MF=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ise=/\n/g,Mse=/^\s*/,Nse=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Rse=/^:\s*/,Bse=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,jse=/^[;\s]*/,zse=/^\s+|\s+$/g,Hse=` +`,NF="/",RF="*",Eu="",Use="comment",Wse="declaration",Vse=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(p){var m=p.match(Ise);m&&(r+=m.length);var y=p.lastIndexOf(Hse);n=~y?p.length-y:n+p.length}function s(){var p={line:r,column:n};return function(m){return m.position=new o(p),u(),m}}function o(p){this.start=p,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+":"+r+":"+n+": "+p);if(m.reason=p,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var y=m[0];return i(y),e=e.slice(y.length),m}}function u(){l(Mse)}function c(p){var m;for(p=p||[];m=h();)m!==!1&&p.push(m);return p}function h(){var p=s();if(!(NF!=e.charAt(0)||RF!=e.charAt(1))){for(var m=2;Eu!=e.charAt(m)&&(RF!=e.charAt(m)||NF!=e.charAt(m+1));)++m;if(m+=2,Eu===e.charAt(m-1))return a("End of comment missing");var y=e.slice(2,m-2);return n+=2,i(y),e=e.slice(m),n+=2,p({type:Use,comment:y})}}function d(){var p=s(),m=l(Nse);if(m){if(h(),!l(Rse))return a("property missing ':'");var y=l(Bse),b=p({type:Wse,property:BF(m[0].replace(MF,Eu)),value:y?BF(y[0].replace(MF,Eu)):Eu});return l(jse),b}}function f(){var p=[];c(p);for(var m;m=d();)m!==!1&&(p.push(m),c(p));return p}return u(),f()};function BF(e){return e?e.replace(zse,Eu):Eu}var Gse=hr&&hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pk,"__esModule",{value:!0});Pk.default=Kse;var qse=Gse(Vse);function Kse(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,qse.default)(e),i=typeof t=="function";return n.forEach(function(s){if(s.type==="declaration"){var o=s.property,a=s.value;i?t(o,a,s):a&&(r=r||{},r[o]=a)}}),r}var Fb={};Object.defineProperty(Fb,"__esModule",{value:!0});Fb.camelCase=void 0;var Jse=/^--[a-zA-Z0-9_-]+$/,Xse=/-([a-z])/g,Yse=/^[^-]+$/,Qse=/^-(webkit|moz|ms|o|khtml)-/,Zse=/^-(ms)-/,eoe=function(e){return!e||Yse.test(e)||Jse.test(e)},toe=function(e,t){return t.toUpperCase()},jF=function(e,t){return"".concat(t,"-")},roe=function(e,t){return t===void 0&&(t={}),eoe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Zse,jF):e=e.replace(Qse,jF),e.replace(Xse,toe))};Fb.camelCase=roe;var noe=hr&&hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ioe=noe(Pk),soe=Fb;function dC(e,t){var r={};return!e||typeof e!="string"||(0,ioe.default)(e,function(n,i){n&&i&&(r[(0,soe.camelCase)(n,t)]=i)}),r}dC.default=dC;var ooe=dC;(function(e){var t=hr&&hr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=s,e.setStyleProp=a;var r=z,n=t(ooe),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(c,h){return c.includes("-")?!i.has(c):!!(h&&typeof h.is=="string")}var o={reactCompat:!0};function a(c,h){if(typeof c=="string"){if(!c.trim()){h.style={};return}try{h.style=(0,n.default)(c,o)}catch{h.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(c){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(c.name)};e.canTextBeChildOfNode=l;var u=function(c){return c};e.returnFirstArg=u})(Lk);Object.defineProperty(_b,"__esModule",{value:!0});_b.default=coe;var sp=vo,zF=Lk,aoe=["checked","value"],loe=["input","select","textarea"],uoe={reset:!0,submit:!0};function coe(e,t){e===void 0&&(e={});var r={},n=!!(e.type&&uoe[e.type]);for(var i in e){var s=e[i];if((0,sp.isCustomAttribute)(i)){r[i]=s;continue}var o=i.toLowerCase(),a=HF(o);if(a){var l=(0,sp.getPropertyInfo)(a);switch(aoe.includes(a)&&loe.includes(t)&&!n&&(a=HF("default"+o)),r[a]=s,l&&l.type){case sp.BOOLEAN:r[a]=!0;break;case sp.OVERLOADED_BOOLEAN:s===""&&(r[a]=!0);break}continue}zF.PRESERVE_CUSTOM_ATTRIBUTES&&(r[i]=s)}return(0,zF.setStyleProp)(e.style,r),r}function HF(e){return sp.possibleStandardNames[e]}var Fk={},hoe=hr&&hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fk,"__esModule",{value:!0});Fk.default=X6;var vS=z,doe=hoe(_b),kp=Lk,foe={cloneElement:vS.cloneElement,createElement:vS.createElement,isValidElement:vS.isValidElement};function X6(e,t){t===void 0&&(t={});for(var r=[],n=typeof t.replace=="function",i=t.transform||kp.returnFirstArg,s=t.library||foe,o=s.cloneElement,a=s.createElement,l=s.isValidElement,u=e.length,c=0;c1&&(d=o(d,{key:d.key||c})),r.push(i(d,h,c));continue}}if(h.type==="text"){var f=!h.data.trim().length;if(f&&h.parent&&!(0,kp.canTextBeChildOfNode)(h.parent)||t.trim&&f)continue;r.push(i(h.data,h,c));continue}var p=h,m={};poe(p)?((0,kp.setStyleProp)(p.attribs.style,p.attribs),m=p.attribs):p.attribs&&(m=(0,doe.default)(p.attribs,p.name));var y=void 0;switch(h.type){case"script":case"style":h.children[0]&&(m.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?m.defaultValue=h.children[0].data:h.children&&h.children.length&&(y=X6(h.children,t));break;default:continue}u>1&&(m.key=c),r.push(i(a(h.name,m,y),h,c))}return r.length===1?r[0]:r}function poe(e){return kp.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,kp.isCustomComponent)(e.name,e.attribs)}(function(e){var t=hr&&hr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=a;var r=t(Sk);e.htmlToDOM=r.default;var n=t(_b);e.attributesToProps=n.default;var i=t(Fk);e.domToReact=i.default;var s=Ek;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function a(l,u){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,i.default)((0,r.default)(l,(u==null?void 0:u.htmlparser2)||o),u):[]}})($r);const UF=Ho($r),Y6=UF.default||UF;var Q6={exports:{}};(function(e,t){(function(){var r="ace",n=function(){return this}();!n&&typeof window<"u"&&(n=window);var i=function(c,h,d){if(typeof c!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=h),i.modules[c]||(i.payloads[c]=d,i.modules[c]=null)};i.modules={},i.payloads={};var s=function(c,h,d){if(typeof h=="string"){var f=l(c,h);if(f!=null)return d&&d(),f}else if(Object.prototype.toString.call(h)==="[object Array]"){for(var p=[],m=0,y=h.length;ml.length)&&(a=l.length),a-=o.length;var u=l.indexOf(o,a);return u!==-1&&u===a}),String.prototype.repeat||s(String.prototype,"repeat",function(o){for(var a="",l=this;o>0;)o&1&&(a+=l),(o>>=1)&&(l+=l);return a}),String.prototype.includes||s(String.prototype,"includes",function(o,a){return this.indexOf(o,a)!=-1}),Object.assign||(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(o),l=1;l>>0,u=arguments[1],c=u>>0,h=c<0?Math.max(l+c,0):Math.min(c,l),d=arguments[2],f=d===void 0?l:d>>0,p=f<0?Math.max(l+f,0):Math.min(f,l);h0;)l&1&&(u+=a),(l>>=1)&&(a+=a);return u};var s=/^\s\s*/,o=/\s\s*$/;n.stringTrimLeft=function(a){return a.replace(s,"")},n.stringTrimRight=function(a){return a.replace(o,"")},n.copyObject=function(a){var l={};for(var u in a)l[u]=a[u];return l},n.copyArray=function(a){for(var l=[],u=0,c=a.length;u65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(r,n,i){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var s=typeof navigator=="object"?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),a=s.userAgent||"",l=s.appName||"";n.isWin=o=="win",n.isMac=o=="mac",n.isLinux=o=="linux",n.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=a.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(a.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(a.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(a.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(a.split(" Edge/")[1])||void 0,n.isAIR=a.indexOf("AdobeAIR")>=0,n.isAndroid=a.indexOf("Android")>=0,n.isChromeOS=a.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("./useragent"),o="http://www.w3.org/1999/xhtml";n.buildDom=function d(f,p,m){if(typeof f=="string"&&f){var y=document.createTextNode(f);return p&&p.appendChild(y),y}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var b=[],v=0;v"u")){if(l){if(p)u();else if(p===!1)return l.push([d,f])}if(!a){var m=p;!p||!p.getRootNode?m=document:(m=p.getRootNode(),(!m||m==p)&&(m=document));var y=m.ownerDocument||m;if(f&&n.hasCssString(f,m))return null;f&&(d+=` /*# sourceURL=ace/css/`+f+" */");var b=n.createElement("style");b.appendChild(y.createTextNode(d)),f&&(b.id=f),m==y&&(m=n.getDocumentHead(y)),m.insertBefore(b,m.firstChild)}}}if(n.importCssString=c,n.importCssStylsheet=function(d,f){n.buildDom(["link",{rel:"stylesheet",href:d}],n.getDocumentHead(f))},n.scrollbarWidth=function(d){var f=n.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=n.createElement("ace_outer"),m=p.style;m.position="absolute",m.left="-10000px",m.overflow="hidden",m.width="200px",m.minWidth="0px",m.height="150px",m.display="block",p.appendChild(f);var y=d&&d.documentElement||document&&document.documentElement;if(!y)return 0;y.appendChild(p);var b=f.offsetWidth;m.overflow="scroll";var v=f.offsetWidth;return b===v&&(v=p.clientWidth),y.removeChild(p),b-v},n.computedStyle=function(d,f){return window.getComputedStyle(d,"")||{}},n.setStyle=function(d,f,p){d[f]!==p&&(d[f]=p)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=s.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,s.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var h=document.createElement("div");n.HI_DPI&&h.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!s.isEdge&&typeof h.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),h=null}n.HAS_CSS_TRANSFORMS?n.translate=function(d,f,p){d.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:n.translate=function(d,f,p){d.style.top=Math.round(p)+"px",d.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("./dom");n.get=function(o,a){var l=new XMLHttpRequest;l.open("GET",o,!0),l.onreadystatechange=function(){l.readyState===4&&a(l.responseText)},l.send(null)},n.loadScript=function(o,a){var l=s.getDocumentHead(),u=document.createElement("script");u.src=o,l.appendChild(u),u.onload=u.onreadystatechange=function(c,h){(h||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,h||a())}},n.qualifyURL=function(o){var a=document.createElement("a");return a.href=o,a.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(r,n,i){n.inherits=function(s,o){s.super_=o,s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(s,o){for(var a in o)s[a]=o[a];return s},n.implement=function(s,o){n.mixin(s,o)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(r,n,i){var s={},o=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};s._emit=s._dispatchEvent=function(l,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[l]||[],h=this._defaultHandlers[l];if(!(!c.length&&!h)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=l),u.stopPropagation||(u.stopPropagation=o),u.preventDefault||(u.preventDefault=a),c=c.slice();for(var d=0;d1&&(b=m[m.length-2]);var E=u[p+"Path"];return E==null?E=u.basePath:y=="/"&&(p=y=""),E&&E.slice(-1)!="/"&&(E+="/"),E+p+y+b+this.get("suffix")},n.setModuleUrl=function(f,p){return u.$moduleUrls[f]=p};var c=function(f,p){if(f==="ace/theme/textmate"||f==="./theme/textmate")return p(null,r("./theme/textmate"));if(h)return h(f,p);console.error("loader is not configured")},h;n.setLoader=function(f){h=f},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(f,p){var m;if(Array.isArray(f))var y=f[0],b=f[1];else if(typeof f=="string")var b=f;var v=function(E){if(E&&!n.$loading[b])return p&&p(E);if(n.$loading[b]||(n.$loading[b]=[]),n.$loading[b].push(p),!(n.$loading[b].length>1)){var D=function(){c(b,function(C,w){w&&(n.$loaded[b]=w),n._emit("load.module",{name:b,module:w});var A=n.$loading[b];n.$loading[b]=null,A.forEach(function($){$&&$(w)})})};if(!n.get("packaged"))return D();o.loadScript(n.moduleUrl(b,y),D),d()}};if(n.dynamicModules[b])n.dynamicModules[b]().then(function(E){E.default?v(E.default):v(E)});else{try{m=this.$require(b)}catch{}v(m||n.$loaded[b])}},n.$require=function(f){if(typeof i.require=="function"){var p="require";return i[p](f)}},n.setModuleLoader=function(f,p){n.dynamicModules[f]=p};var d=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),d=function(){})};n.version="1.36.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(r,n,i){r("./lib/fixoldbrowsers");var s=r("./config");s.setLoader(function(u,c){r([u],function(h){c(null,h)})});var o=function(){return this||typeof window<"u"&&window}();i.exports=function(u){s.init=a,s.$require=r,u.require=r},a(!0);function a(u){if(!(!o||!o.document)){s.set("packaged",u||r.packaged||i.packaged||o.define&&(void 0).packaged);var c={},h="",d=document.currentScript||document._currentScript,f=d&&d.ownerDocument||document;d&&d.src&&(h=d.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),m=0;m ["+this.end.row+"/"+this.end.column+"]"},o.prototype.contains=function(a,l){return this.compare(a,l)==0},o.prototype.compareRange=function(a){var l,u=a.end,c=a.start;return l=this.compare(u.row,u.column),l==1?(l=this.compare(c.row,c.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(c.row,c.column),l==-1?-1:l==1?42:0)},o.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},o.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},o.prototype.intersects=function(a){var l=this.compareRange(a);return l==-1||l==0||l==1},o.prototype.isEnd=function(a,l){return this.end.row==a&&this.end.column==l},o.prototype.isStart=function(a,l){return this.start.row==a&&this.start.column==l},o.prototype.setStart=function(a,l){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=l)},o.prototype.setEnd=function(a,l){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=l)},o.prototype.inside=function(a,l){return this.compare(a,l)==0?!(this.isEnd(a,l)||this.isStart(a,l)):!1},o.prototype.insideStart=function(a,l){return this.compare(a,l)==0?!this.isEnd(a,l):!1},o.prototype.insideEnd=function(a,l){return this.compare(a,l)==0?!this.isStart(a,l):!1},o.prototype.compare=function(a,l){return!this.isMultiLine()&&a===this.start.row?lthis.end.column?1:0:athis.end.row?1:this.start.row===a?l>=this.start.column?0:-1:this.end.row===a?l<=this.end.column?0:1:0},o.prototype.compareStart=function(a,l){return this.start.row==a&&this.start.column==l?-1:this.compare(a,l)},o.prototype.compareEnd=function(a,l){return this.end.row==a&&this.end.column==l?1:this.compare(a,l)},o.prototype.compareInside=function(a,l){return this.end.row==a&&this.end.column==l?1:this.start.row==a&&this.start.column==l?-1:this.compare(a,l)},o.prototype.clipRows=function(a,l){if(this.end.row>l)var u={row:l+1,column:0};else if(this.end.rowl)var c={row:l+1,column:0};else if(this.start.row1?($++,$>4&&($=1)):$=1,o.isIE){var T=Math.abs(k.clientX-O)>5||Math.abs(k.clientY-P)>5;(!N||T)&&($=1),N&&clearTimeout(N),N=setTimeout(function(){N=null},D[$-1]||600),$==1&&(O=k.clientX,P=k.clientY)}if(k._clicks=$,C[w]("mousedown",k),$>4)$=0;else if($>1)return C[w](F[$],k)}Array.isArray(E)||(E=[E]),E.forEach(function(k){f(k,"mousedown",L,A)})};function m(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}n.getModifierString=function(E){return s.KEY_MODS[m(E)]};function y(E,D,C){var w=m(D);if(!C&&D.code&&(C=s.$codeToKeyCode[D.code]||C),!o.isMac&&a){if(D.getModifierState&&(D.getModifierState("OS")||D.getModifierState("Win"))&&(w|=8),a.altGr)if((3&w)!=3)a.altGr=0;else return;if(C===18||C===17){var A=D.location;if(C===17&&A===1)a[C]==1&&(l=D.timeStamp);else if(C===18&&w===3&&A===2){var $=D.timeStamp-l;$<50&&(a.altGr=!0)}}}if(C in s.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&D.location===3&&(E(D,w,-C),D.defaultPrevented))){if(o.isChromeOS&&w&8){if(E(D,w,C),D.defaultPrevented)return;w&=-9}return!w&&!(C in s.FUNCTION_KEYS)&&!(C in s.PRINTABLE_KEYS)?!1:E(D,w,C)}}n.addCommandKeyListener=function(E,D,C){var w=null;f(E,"keydown",function(A){a[A.keyCode]=(a[A.keyCode]||0)+1;var $=y(D,A,A.keyCode);return w=A.defaultPrevented,$},C),f(E,"keypress",function(A){w&&(A.ctrlKey||A.altKey||A.shiftKey||A.metaKey)&&(n.stopEvent(A),w=null)},C),f(E,"keyup",function(A){a[A.keyCode]=null},C),a||(b(),f(window,"focus",b))};function b(){a=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!o.isOldIE){var v=1;n.nextTick=function(E,D){D=D||window;var C="zero-timeout-message-"+v++,w=function(A){A.data==C&&(n.stopPropagation(A),p(D,"message",w),E())};f(D,"message",w),D.postMessage(C,"*")}}n.$idleBlocked=!1,n.onIdle=function(E,D){return setTimeout(function C(){n.$idleBlocked?setTimeout(C,100):E()},D)},n.$idleBlockId=null,n.blockIdle=function(E){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},E||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(r,n,i){var s;i.exports={lineMode:!1,pasteCancelled:function(){return s&&s>Date.now()-50?!0:s=!1},cancel:function(){s=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(r,n,i){var s=r("../lib/event"),o=r("../config").nls,a=r("../lib/useragent"),l=r("../lib/dom"),u=r("../lib/lang"),c=r("../clipboard"),h=a.isChrome<18,d=a.isIE,f=a.isChrome>63,p=400,m=r("../lib/keys"),y=m.KEY_MODS,b=a.isIOS,v=b?/\s/:/\n/,E=a.isMobile,D;D=function(C,w){var A=l.createElement("textarea");A.className="ace_text-input",A.setAttribute("wrap","off"),A.setAttribute("autocorrect","off"),A.setAttribute("autocapitalize","off"),A.setAttribute("spellcheck","false"),A.style.opacity="0",C.insertBefore(A,C.firstChild);var $=!1,O=!1,P=!1,N=!1,F="";E||(A.style.fontSize="1px");var L=!1,k=!1,T="",M=0,R=0,B=0,U=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,K=0;try{var J=document.activeElement===A}catch{}this.setNumberOfExtraLines=function(ae){if(U=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,ae<0){K=0;return}K=ae},this.setAriaOptions=function(ae){if(ae.activeDescendant?(A.setAttribute("aria-haspopup","true"),A.setAttribute("aria-autocomplete",ae.inline?"both":"list"),A.setAttribute("aria-activedescendant",ae.activeDescendant)):(A.setAttribute("aria-haspopup","false"),A.setAttribute("aria-autocomplete","both"),A.removeAttribute("aria-activedescendant")),ae.role&&A.setAttribute("role",ae.role),ae.setLabel){A.setAttribute("aria-roledescription",o("text-input.aria-roledescription","editor"));var ve="";if(w.$textInputAriaLabel&&(ve+="".concat(w.$textInputAriaLabel,", ")),w.session){var Ae=w.session.selection.cursor.row;ve+=o("text-input.aria-label","Cursor at row $0",[Ae+1])}A.setAttribute("aria-label",ve)}},this.setAriaOptions({role:"textbox"}),s.addListener(A,"blur",function(ae){k||(w.onBlur(ae),J=!1)},w),s.addListener(A,"focus",function(ae){if(!k){if(J=!0,a.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(ae),a.isEdge?setTimeout(Y):Y()}},w),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:w.renderer.enableKeyboardAccessibility}),F||f||this.$focusScroll=="browser")return A.focus({preventScroll:!0});var ae=A.style.top;A.style.position="fixed",A.style.top="0px";try{var ve=A.getBoundingClientRect().top!=0}catch{return}var Ae=[];if(ve)for(var ze=A.parentElement;ze&&ze.nodeType==1;)Ae.push(ze),ze.setAttribute("ace_nocontext","true"),!ze.parentElement&&ze.getRootNode?ze=ze.getRootNode().host:ze=ze.parentElement;A.focus({preventScroll:!0}),ve&&Ae.forEach(function(at){at.removeAttribute("ace_nocontext")}),setTimeout(function(){A.style.position="",A.style.top=="0px"&&(A.style.top=ae)},0)},this.blur=function(){A.blur()},this.isFocused=function(){return J},w.on("beforeEndOperation",function(){var ae=w.curOp,ve=ae&&ae.command&&ae.command.name;if(ve!="insertstring"){var Ae=ve&&(ae.docChanged||ae.selectionChanged);P&&Ae&&(T=A.value="",re()),Y()}});var G=function(ae,ve){for(var Ae=ve,ze=1;ze<=ae-U&&ze<2*K+1;ze++)Ae+=w.session.getLine(ae-ze).length+1;return Ae},Y=b?function(ae){if(!(!J||$&&!ae||N)){ae||(ae="");var ve=` +`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(r,n,i){n.isDark=!1,n.cssClass="ace-tm",n.cssText=r("./textmate-css"),n.$id="ace/theme/textmate";var s=r("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(r,n,i){"no use strict";var s=r("./lib/lang"),o=r("./lib/net"),a=r("./lib/dom"),l=r("./lib/app_config").AppConfig;i.exports=n=new l;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};n.get=function(f){if(!u.hasOwnProperty(f))throw new Error("Unknown config key: "+f);return u[f]},n.set=function(f,p){if(u.hasOwnProperty(f))u[f]=p;else if(this.setDefaultValue("",f,p)==!1)throw new Error("Unknown config key: "+f);f=="useStrictCSP"&&a.useStrictCSP(p)},n.all=function(){return s.copyObject(u)},n.$modes={},n.moduleUrl=function(f,p){if(u.$moduleUrls[f])return u.$moduleUrls[f];var m=f.split("/");p=p||m[m.length-2]||"";var y=p=="snippets"?"/":"-",b=m[m.length-1];if(p=="worker"&&y=="-"){var v=new RegExp("^"+p+"[\\-_]|[\\-_]"+p+"$","g");b=b.replace(v,"")}(!b||b==p)&&m.length>1&&(b=m[m.length-2]);var E=u[p+"Path"];return E==null?E=u.basePath:y=="/"&&(p=y=""),E&&E.slice(-1)!="/"&&(E+="/"),E+p+y+b+this.get("suffix")},n.setModuleUrl=function(f,p){return u.$moduleUrls[f]=p};var c=function(f,p){if(f==="ace/theme/textmate"||f==="./theme/textmate")return p(null,r("./theme/textmate"));if(h)return h(f,p);console.error("loader is not configured")},h;n.setLoader=function(f){h=f},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(f,p){var m;if(Array.isArray(f))var y=f[0],b=f[1];else if(typeof f=="string")var b=f;var v=function(E){if(E&&!n.$loading[b])return p&&p(E);if(n.$loading[b]||(n.$loading[b]=[]),n.$loading[b].push(p),!(n.$loading[b].length>1)){var D=function(){c(b,function(C,w){w&&(n.$loaded[b]=w),n._emit("load.module",{name:b,module:w});var T=n.$loading[b];n.$loading[b]=null,T.forEach(function(k){k&&k(w)})})};if(!n.get("packaged"))return D();o.loadScript(n.moduleUrl(b,y),D),d()}};if(n.dynamicModules[b])n.dynamicModules[b]().then(function(E){E.default?v(E.default):v(E)});else{try{m=this.$require(b)}catch{}v(m||n.$loaded[b])}},n.$require=function(f){if(typeof i.require=="function"){var p="require";return i[p](f)}},n.setModuleLoader=function(f,p){n.dynamicModules[f]=p};var d=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),d=function(){})};n.version="1.36.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(r,n,i){r("./lib/fixoldbrowsers");var s=r("./config");s.setLoader(function(u,c){r([u],function(h){c(null,h)})});var o=function(){return this||typeof window<"u"&&window}();i.exports=function(u){s.init=a,s.$require=r,u.require=r},a(!0);function a(u){if(!(!o||!o.document)){s.set("packaged",u||r.packaged||i.packaged||o.define&&(void 0).packaged);var c={},h="",d=document.currentScript||document._currentScript,f=d&&d.ownerDocument||document;d&&d.src&&(h=d.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),m=0;m ["+this.end.row+"/"+this.end.column+"]"},o.prototype.contains=function(a,l){return this.compare(a,l)==0},o.prototype.compareRange=function(a){var l,u=a.end,c=a.start;return l=this.compare(u.row,u.column),l==1?(l=this.compare(c.row,c.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(c.row,c.column),l==-1?-1:l==1?42:0)},o.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},o.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},o.prototype.intersects=function(a){var l=this.compareRange(a);return l==-1||l==0||l==1},o.prototype.isEnd=function(a,l){return this.end.row==a&&this.end.column==l},o.prototype.isStart=function(a,l){return this.start.row==a&&this.start.column==l},o.prototype.setStart=function(a,l){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=l)},o.prototype.setEnd=function(a,l){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=l)},o.prototype.inside=function(a,l){return this.compare(a,l)==0?!(this.isEnd(a,l)||this.isStart(a,l)):!1},o.prototype.insideStart=function(a,l){return this.compare(a,l)==0?!this.isEnd(a,l):!1},o.prototype.insideEnd=function(a,l){return this.compare(a,l)==0?!this.isStart(a,l):!1},o.prototype.compare=function(a,l){return!this.isMultiLine()&&a===this.start.row?lthis.end.column?1:0:athis.end.row?1:this.start.row===a?l>=this.start.column?0:-1:this.end.row===a?l<=this.end.column?0:1:0},o.prototype.compareStart=function(a,l){return this.start.row==a&&this.start.column==l?-1:this.compare(a,l)},o.prototype.compareEnd=function(a,l){return this.end.row==a&&this.end.column==l?1:this.compare(a,l)},o.prototype.compareInside=function(a,l){return this.end.row==a&&this.end.column==l?1:this.start.row==a&&this.start.column==l?-1:this.compare(a,l)},o.prototype.clipRows=function(a,l){if(this.end.row>l)var u={row:l+1,column:0};else if(this.end.rowl)var c={row:l+1,column:0};else if(this.start.row1?(k++,k>4&&(k=1)):k=1,o.isIE){var A=Math.abs(_.clientX-O)>5||Math.abs(_.clientY-P)>5;(!I||A)&&(k=1),I&&clearTimeout(I),I=setTimeout(function(){I=null},D[k-1]||600),k==1&&(O=_.clientX,P=_.clientY)}if(_._clicks=k,C[w]("mousedown",_),k>4)k=0;else if(k>1)return C[w](F[k],_)}Array.isArray(E)||(E=[E]),E.forEach(function(_){f(_,"mousedown",L,T)})};function m(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}n.getModifierString=function(E){return s.KEY_MODS[m(E)]};function y(E,D,C){var w=m(D);if(!C&&D.code&&(C=s.$codeToKeyCode[D.code]||C),!o.isMac&&a){if(D.getModifierState&&(D.getModifierState("OS")||D.getModifierState("Win"))&&(w|=8),a.altGr)if((3&w)!=3)a.altGr=0;else return;if(C===18||C===17){var T=D.location;if(C===17&&T===1)a[C]==1&&(l=D.timeStamp);else if(C===18&&w===3&&T===2){var k=D.timeStamp-l;k<50&&(a.altGr=!0)}}}if(C in s.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&D.location===3&&(E(D,w,-C),D.defaultPrevented))){if(o.isChromeOS&&w&8){if(E(D,w,C),D.defaultPrevented)return;w&=-9}return!w&&!(C in s.FUNCTION_KEYS)&&!(C in s.PRINTABLE_KEYS)?!1:E(D,w,C)}}n.addCommandKeyListener=function(E,D,C){var w=null;f(E,"keydown",function(T){a[T.keyCode]=(a[T.keyCode]||0)+1;var k=y(D,T,T.keyCode);return w=T.defaultPrevented,k},C),f(E,"keypress",function(T){w&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(n.stopEvent(T),w=null)},C),f(E,"keyup",function(T){a[T.keyCode]=null},C),a||(b(),f(window,"focus",b))};function b(){a=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!o.isOldIE){var v=1;n.nextTick=function(E,D){D=D||window;var C="zero-timeout-message-"+v++,w=function(T){T.data==C&&(n.stopPropagation(T),p(D,"message",w),E())};f(D,"message",w),D.postMessage(C,"*")}}n.$idleBlocked=!1,n.onIdle=function(E,D){return setTimeout(function C(){n.$idleBlocked?setTimeout(C,100):E()},D)},n.$idleBlockId=null,n.blockIdle=function(E){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},E||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(r,n,i){var s;i.exports={lineMode:!1,pasteCancelled:function(){return s&&s>Date.now()-50?!0:s=!1},cancel:function(){s=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(r,n,i){var s=r("../lib/event"),o=r("../config").nls,a=r("../lib/useragent"),l=r("../lib/dom"),u=r("../lib/lang"),c=r("../clipboard"),h=a.isChrome<18,d=a.isIE,f=a.isChrome>63,p=400,m=r("../lib/keys"),y=m.KEY_MODS,b=a.isIOS,v=b?/\s/:/\n/,E=a.isMobile,D;D=function(C,w){var T=l.createElement("textarea");T.className="ace_text-input",T.setAttribute("wrap","off"),T.setAttribute("autocorrect","off"),T.setAttribute("autocapitalize","off"),T.setAttribute("spellcheck","false"),T.style.opacity="0",C.insertBefore(T,C.firstChild);var k=!1,O=!1,P=!1,I=!1,F="";E||(T.style.fontSize="1px");var L=!1,_=!1,A="",M=0,R=0,B=0,U=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,K=0;try{var J=document.activeElement===T}catch{}this.setNumberOfExtraLines=function(ae){if(U=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,ae<0){K=0;return}K=ae},this.setAriaOptions=function(ae){if(ae.activeDescendant?(T.setAttribute("aria-haspopup","true"),T.setAttribute("aria-autocomplete",ae.inline?"both":"list"),T.setAttribute("aria-activedescendant",ae.activeDescendant)):(T.setAttribute("aria-haspopup","false"),T.setAttribute("aria-autocomplete","both"),T.removeAttribute("aria-activedescendant")),ae.role&&T.setAttribute("role",ae.role),ae.setLabel){T.setAttribute("aria-roledescription",o("text-input.aria-roledescription","editor"));var ve="";if(w.$textInputAriaLabel&&(ve+="".concat(w.$textInputAriaLabel,", ")),w.session){var Te=w.session.selection.cursor.row;ve+=o("text-input.aria-label","Cursor at row $0",[Te+1])}T.setAttribute("aria-label",ve)}},this.setAriaOptions({role:"textbox"}),s.addListener(T,"blur",function(ae){_||(w.onBlur(ae),J=!1)},w),s.addListener(T,"focus",function(ae){if(!_){if(J=!0,a.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(ae),a.isEdge?setTimeout(Y):Y()}},w),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:w.renderer.enableKeyboardAccessibility}),F||f||this.$focusScroll=="browser")return T.focus({preventScroll:!0});var ae=T.style.top;T.style.position="fixed",T.style.top="0px";try{var ve=T.getBoundingClientRect().top!=0}catch{return}var Te=[];if(ve)for(var ze=T.parentElement;ze&&ze.nodeType==1;)Te.push(ze),ze.setAttribute("ace_nocontext","true"),!ze.parentElement&&ze.getRootNode?ze=ze.getRootNode().host:ze=ze.parentElement;T.focus({preventScroll:!0}),ve&&Te.forEach(function(at){at.removeAttribute("ace_nocontext")}),setTimeout(function(){T.style.position="",T.style.top=="0px"&&(T.style.top=ae)},0)},this.blur=function(){T.blur()},this.isFocused=function(){return J},w.on("beforeEndOperation",function(){var ae=w.curOp,ve=ae&&ae.command&&ae.command.name;if(ve!="insertstring"){var Te=ve&&(ae.docChanged||ae.selectionChanged);P&&Te&&(A=T.value="",re()),Y()}});var G=function(ae,ve){for(var Te=ve,ze=1;ze<=ae-U&&ze<2*K+1;ze++)Te+=w.session.getLine(ae-ze).length+1;return Te},Y=b?function(ae){if(!(!J||k&&!ae||I)){ae||(ae="");var ve=` ab`+ae+`cde fg -`;ve!=A.value&&(A.value=T=ve);var Ae=4,ze=4+(ae.length||(w.selection.isEmpty()?0:1));(M!=Ae||R!=ze)&&A.setSelectionRange(Ae,ze),M=Ae,R=ze}}:function(){if(!(P||N)&&!(!J&&!be)){P=!0;var ae=0,ve=0,Ae="";if(w.session){var ze=w.selection,at=ze.getRange(),bt=ze.cursor.row;bt===V+1?(U=V+1,V=U+2*K):bt===U-1?(V=U-1,U=V-2*K):(btV+1)&&(U=bt>K?bt-K:0,V=bt>K?bt+K:2*K);for(var ft=[],At=U;At<=V;At++)ft.push(w.session.getLine(At));if(Ae=ft.join(` -`),ae=G(at.start.row,at.start.column),ve=G(at.end.row,at.end.column),at.start.rowV){var ht=w.session.getLine(V+1);ve=at.end.row>V+1?ht.length:at.end.column,ve+=Ae.length+1,Ae=Ae+` -`+ht}else E&&bt>0&&(Ae=` -`+Ae,ve+=1,ae+=1);Ae.length>p&&(ae=T.length&&ae.value===T&&T&&ae.selectionEnd!==R},X=function(ae){P||($?$=!1:Q(A)?(w.selectAll(),Y()):E&&A.selectionStart!=M&&Y())},le=null;this.setInputHandler=function(ae){le=ae},this.getInputHandler=function(){return le};var be=!1,ce=function(ae,ve){if(be&&(be=!1),O)return Y(),ae&&w.onPaste(ae),O=!1,"";for(var Ae=A.selectionStart,ze=A.selectionEnd,at=M,bt=T.length-R,ft=ae,At=ae.length-Ae,nt=ae.length-ze,ht=0;at>0&&T[ht]==ae[ht];)ht++,at--;for(ft=ft.slice(ht),ht=1;bt>0&&T.length-ht>M-1&&T[T.length-ht]==ae[ae.length-ht];)ht++,bt--;At-=ht-1,nt-=ht-1;var Ft=ft.length-ht+1;if(Ft<0&&(at=-Ft,Ft=0),ft=ft.slice(0,Ft),!ve&&!ft&&!At&&!at&&!bt&&!nt)return"";N=!0;var rr=!1;return a.isAndroid&&ft==". "&&(ft=" ",rr=!0),ft&&!at&&!bt&&!At&&!nt||L?w.onTextInput(ft):w.onTextInput(ft,{extendLeft:at,extendRight:bt,restoreStart:At,restoreEnd:nt}),N=!1,T=ae,M=Ae,R=ze,B=nt,rr?` -`:ft},xe=function(ae){if(P)return pe();if(ae&&ae.inputType){if(ae.inputType=="historyUndo")return w.execCommand("undo");if(ae.inputType=="historyRedo")return w.execCommand("redo")}var ve=A.value,Ae=ce(ve,!0);(ve.length>p+100||v.test(Ae)||E&&M<1&&M==R)&&Y()},ke=function(ae,ve,Ae){var ze=ae.clipboardData||window.clipboardData;if(!(!ze||h)){var at=d||Ae?"Text":"text/plain";try{return ve?ze.setData(at,ve)!==!1:ze.getData(at)}catch(bt){if(!Ae)return ke(bt,ve,!0)}}},Re=function(ae,ve){var Ae=w.getCopyText();if(!Ae)return s.preventDefault(ae);ke(ae,Ae)?(b&&(Y(Ae),$=Ae,setTimeout(function(){$=!1},10)),ve?w.onCut():w.onCopy(),s.preventDefault(ae)):($=!0,A.value=Ae,A.select(),setTimeout(function(){$=!1,Y(),ve?w.onCut():w.onCopy()}))},$t=function(ae){Re(ae,!0)},mt=function(ae){Re(ae,!1)},W=function(ae){var ve=ke(ae);c.pasteCancelled()||(typeof ve=="string"?(ve&&w.onPaste(ve,ae),a.isIE&&setTimeout(Y),s.preventDefault(ae)):(A.value="",O=!0))};s.addCommandKeyListener(A,function(ae,ve,Ae){if(!P)return w.onCommandKey(ae,ve,Ae)},w),s.addListener(A,"select",X,w),s.addListener(A,"input",xe,w),s.addListener(A,"cut",$t,w),s.addListener(A,"copy",mt,w),s.addListener(A,"paste",W,w),(!("oncut"in A)||!("oncopy"in A)||!("onpaste"in A))&&s.addListener(C,"keydown",function(ae){if(!(a.isMac&&!ae.metaKey||!ae.ctrlKey))switch(ae.keyCode){case 67:mt(ae);break;case 86:W(ae);break;case 88:$t(ae);break}},w);var ye=function(ae){if(!(P||!w.onCompositionStart||w.$readOnly)&&(P={},!L)){ae.data&&(P.useTextareaForIME=!1),setTimeout(pe,0),w._signal("compositionStart"),w.on("mousedown",ee);var ve=w.getSelectionRange();ve.end.row=ve.start.row,ve.end.column=ve.start.column,P.markerRange=ve,P.selectionStart=M,w.onCompositionStart(P),P.useTextareaForIME?(T=A.value="",M=0,R=0):(A.msGetInputContext&&(P.context=A.msGetInputContext()),A.getInputContext&&(P.context=A.getInputContext()))}},pe=function(){if(!(!P||!w.onCompositionUpdate||w.$readOnly)){if(L)return ee();if(P.useTextareaForIME)w.onCompositionUpdate(A.value);else{var ae=A.value;ce(ae),P.markerRange&&(P.context&&(P.markerRange.start.column=P.selectionStart=P.context.compositionStartOffset),P.markerRange.end.column=P.markerRange.start.column+R-P.selectionStart+B)}}},re=function(ae){!w.onCompositionEnd||w.$readOnly||(P=!1,w.onCompositionEnd(),w.off("mousedown",ee),ae&&xe())};function ee(){k=!0,A.blur(),A.focus(),k=!1}var ue=u.delayedCall(pe,50).schedule.bind(null,null);function De(ae){ae.keyCode==27&&A.value.lengthR&&T[nt]==` -`?ht=m.end:AtR&&T.slice(0,nt).split(` -`).length>2?ht=m.down:nt>R&&T[nt-1]==" "?(ht=m.right,Ft=y.option):(nt>R||nt==R&&R!=M&&At==nt)&&(ht=m.right),At!==nt&&(Ft|=y.shift),ht){var rr=ve.onCommandKey({},Ft,ht);if(!rr&&ve.commands){ht=m.keyCodeToString(ht);var sn=ve.commands.findKeyCommand(Ft,ht);sn&&ve.execCommand(sn)}M=At,R=nt,Y("")}}};document.addEventListener("selectionchange",bt),ve.on("destroy",function(){document.removeEventListener("selectionchange",bt)})}this.destroy=function(){A.parentElement&&A.parentElement.removeChild(A)}},n.TextInput=D,n.$setUserAgentForTests=function(C,w){E=C,b=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("../lib/useragent"),o=0,a=550,l=function(){function h(d){d.$clickSelection=null;var f=d.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(d)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(d)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(d)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(d)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(d));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(m){d[m]=this[m]},this),d.selectByLines=this.extendSelectionBy.bind(d,"getLineRange"),d.selectByWords=this.extendSelectionBy.bind(d,"getWordRange")}return h.prototype.onMouseDown=function(d){var f=d.inSelection(),p=d.getDocumentPosition();this.mousedownEvent=d;var m=this.editor,y=d.getButton();if(y!==0){var b=m.getSelectionRange(),v=b.isEmpty();(v||y==1)&&m.selection.moveToPosition(p),y==2&&(m.textInput.onContextMenu(d.domEvent),s.isMozilla||d.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!m.isFocused()&&(m.focus(),this.$focusTimeout&&!this.$clickSelection&&!m.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(d);return}return this.captureMouse(d),this.startSelect(p,d.domEvent._clicks>1),d.preventDefault()},h.prototype.startSelect=function(d,f){d=d||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(d):f||p.selection.moveToPosition(d),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},h.prototype.select=function(){var d,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(p);if(m==-1)d=this.$clickSelection.end;else if(m==1)d=this.$clickSelection.start;else{var y=c(this.$clickSelection,p);p=y.cursor,d=y.anchor}f.selection.setSelectionAnchor(d.row,d.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},h.prototype.extendSelectionBy=function(d){var f,p=this.editor,m=p.renderer.screenToTextCoordinates(this.x,this.y),y=p.selection[d](m.row,m.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(y.start),v=this.$clickSelection.comparePoint(y.end);if(b==-1&&v<=0)f=this.$clickSelection.end,(y.end.row!=m.row||y.end.column!=m.column)&&(m=y.start);else if(v==1&&b>=0)f=this.$clickSelection.start,(y.start.row!=m.row||y.start.column!=m.column)&&(m=y.end);else if(b==-1&&v==1)m=y.end,f=y.start;else{var E=c(this.$clickSelection,m);m=E.cursor,f=E.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(m),p.renderer.scrollCursorIntoView()},h.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},h.prototype.focusWait=function(){var d=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(d>o||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},h.prototype.onDoubleClick=function(d){var f=d.getDocumentPosition(),p=this.editor,m=p.session,y=m.getBracketRange(f);y?(y.isEmpty()&&(y.start.column--,y.end.column++),this.setState("select")):(y=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=y,this.select()},h.prototype.onTripleClick=function(d){var f=d.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var m=p.getSelectionRange();m.isMultiLine()&&m.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(m.start.row),this.$clickSelection.end=p.selection.getLineRange(m.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},h.prototype.onQuadClick=function(d){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},h.prototype.onMouseWheel=function(d){if(!d.getAccelKey()){d.getShiftKey()&&d.wheelY&&!d.wheelX&&(d.wheelX=d.wheelY,d.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,m=d.domEvent.timeStamp,y=m-p.t,b=y?d.wheelX/y:p.vx,v=y?d.wheelY/y:p.vy;y=1&&f.renderer.isScrollableBy(d.wheelX*d.speed,0)&&(D=!0),E<=1&&f.renderer.isScrollableBy(0,d.wheelY*d.speed)&&(D=!0),D)p.allowed=m;else if(m-p.alloweda.clientHeight;l||o.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(r,n,i){var s=this&&this.__extends||function(){var m=function(y,b){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,E){v.__proto__=E}||function(v,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D])},m(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");m(y,b);function v(){this.constructor=y}y.prototype=b===null?Object.create(b):(v.prototype=b.prototype,new v)}}(),o=this&&this.__values||function(m){var y=typeof Symbol=="function"&&Symbol.iterator,b=y&&m[y],v=0;if(b)return b.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&v>=m.length&&(m=void 0),{value:m&&m[v++],done:!m}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},a=r("./lib/dom");r("./lib/event");var l=r("./range").Range,u=r("./lib/scroll").preventParentScroll,c="ace_tooltip",h=function(){function m(y){this.isOpen=!1,this.$element=null,this.$parentNode=y}return m.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},m.prototype.getElement=function(){return this.$element||this.$init()},m.prototype.setText=function(y){this.getElement().textContent=y},m.prototype.setHtml=function(y){this.getElement().innerHTML=y},m.prototype.setPosition=function(y,b){this.getElement().style.left=y+"px",this.getElement().style.top=b+"px"},m.prototype.setClassName=function(y){a.addCssClass(this.getElement(),y)},m.prototype.setTheme=function(y){this.$element.className=c+" "+(y.isDark?"ace_dark ":"")+(y.cssClass||"")},m.prototype.show=function(y,b,v){y!=null&&this.setText(y),b!=null&&v!=null&&this.setPosition(b,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},m.prototype.hide=function(y){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},m.prototype.getHeight=function(){return this.getElement().offsetHeight},m.prototype.getWidth=function(){return this.getElement().offsetWidth},m.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},m}(),d=function(){function m(){this.popups=[]}return m.prototype.addPopup=function(y){this.popups.push(y),this.updatePopups()},m.prototype.removePopup=function(y){var b=this.popups.indexOf(y);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},m.prototype.updatePopups=function(){var y,b,v,E;this.popups.sort(function(F,L){return L.priority-F.priority});var D=[];try{for(var C=o(this.popups),w=C.next();!w.done;w=C.next()){var A=w.value,$=!0;try{for(var O=(v=void 0,o(D)),P=O.next();!P.done;P=O.next()){var N=P.value;if(this.doPopupsOverlap(N,A)){$=!1;break}}}catch(F){v={error:F}}finally{try{P&&!P.done&&(E=O.return)&&E.call(O)}finally{if(v)throw v.error}}$?D.push(A):A.hide()}}catch(F){y={error:F}}finally{try{w&&!w.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}},m.prototype.doPopupsOverlap=function(y,b){var v=y.getElement().getBoundingClientRect(),E=b.getElement().getBoundingClientRect();return v.leftE.left&&v.topE.top},m}(),f=new d;n.popupManager=f,n.Tooltip=h;var p=function(m){s(y,m);function y(b){b===void 0&&(b=document.body);var v=m.call(this,b)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var E=v.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",v.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(v)),E.addEventListener("wheel",u),v}return y.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},y.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},y.prototype.onMouseMove=function(b,v){this.lastEvent=b,this.lastT=Date.now();var E=v.$mouseHandler.isMousePressed;if(this.isOpen){var D=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(D.row,D.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},y.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},y.prototype.isOutsideOfText=function(b){var v=b.editor,E=b.getDocumentPosition(),D=v.session.getLine(E.row);if(E.column==D.length){var C=v.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),w=v.session.documentToScreenPosition(E.row,E.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},y.prototype.setDataProvider=function(b){this.$gatherData=b},y.prototype.showForRange=function(b,v,E,D){var C=10;if(!(D&&D!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=b.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,b.session),this.range=l.fromPoints(v.start,v.end);var A=w.textToScreenCoordinates(v.start.row,v.start.column),$=w.scroller.getBoundingClientRect();A.pageX<$.left&&(A.pageX=$.left);var O=this.getElement();O.innerHTML="",O.appendChild(E),O.style.maxHeight="",O.style.display="block";var P=O.clientHeight,N=O.clientWidth,F=window.innerHeight-A.pageY-w.lineHeight,L=!0;A.pageY-P<0&&A.pageY=f.length&&(f=void 0),{value:f&&f[y++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},a=r("../lib/dom"),l=r("../lib/event"),u=r("../tooltip").Tooltip,c=r("../config").nls;r("../lib/lang");function h(f){var p=f.editor,m=p.renderer.$gutterLayer,y=new d(p);f.editor.setDefaultHandler("guttermousedown",function(w){if(!(!p.isFocused()||w.getButton()!=0)){var A=m.getRegion(w);if(A!="foldWidgets"){var $=w.getDocumentPosition().row,O=p.session.selection;if(w.getShiftKey())O.selectTo($,0);else{if(w.domEvent.detail==2)return p.selectAll(),w.preventDefault();f.$clickSelection=p.selection.getLineRange($)}return f.setState("selectByLines"),f.captureMouse(w),w.preventDefault()}}});var b,v;function E(){var w=v.getDocumentPosition().row,A=p.session.getLength();if(w==A){var $=p.renderer.pixelToScreenCoordinates(0,v.y).row,O=v.$pos;if($>p.session.documentToScreenRow(O.row,O.column))return D()}if(y.showTooltip(w),!!y.isOpen)if(p.on("mousewheel",D),f.$tooltipFollowsMouse)C(v);else{var P=v.getGutterRow(),N=m.$lines.get(P);if(N){var F=N.element.querySelector(".ace_gutter_annotation"),L=F.getBoundingClientRect(),k=y.getElement().style;k.left=L.right+"px",k.top=L.bottom+"px"}else C(v)}}function D(){b&&(b=clearTimeout(b)),y.isOpen&&(y.hideTooltip(),p.off("mousewheel",D))}function C(w){y.setPosition(w.x,w.y)}f.editor.setDefaultHandler("guttermousemove",function(w){var A=w.domEvent.target||w.domEvent.srcElement;if(a.hasCssClass(A,"ace_fold-widget"))return D();y.isOpen&&f.$tooltipFollowsMouse&&C(w),v=w,!b&&(b=setTimeout(function(){b=null,v&&!f.isMousePressed?E():D()},50))}),l.addListener(p.renderer.$gutter,"mouseout",function(w){v=null,!(!y.isOpen||b)&&(b=setTimeout(function(){b=null,D()},50))},p),p.on("changeSession",D),p.on("input",D)}n.GutterHandler=h;var d=function(f){s(p,f);function p(m){var y=f.call(this,m.container)||this;return y.editor=m,y}return p.prototype.setPosition=function(m,y){var b=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),D=this.getHeight();m+=15,y+=15,m+E>b&&(m-=m+E-b),y+D>v&&(y-=20+D),u.prototype.setPosition.call(this,m,y)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(m){var y,b=this.editor.renderer.$gutterLayer,v=b.$annotations[m],E;v?E={displayText:Array.from(v.displayText),type:Array.from(v.type)}:E={displayText:[],type:[]};var D=b.session.getFoldLine(m);if(D&&b.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},w={error:1,security:2,warning:3,info:4,hint:5},A,$=m+1;$<=D.end.row;$++)if(b.$annotations[$])for(var O=0;Oc?F=null:Q-F>=u&&(p.renderer.scrollCursorIntoView(),F=null)}}function T(G,Y){var Q=Date.now(),X=p.renderer.layerConfig.lineHeight,le=p.renderer.layerConfig.characterWidth,be=p.renderer.scroller.getBoundingClientRect(),ce={x:{left:E-be.left,right:be.right-E},y:{top:D-be.top,bottom:be.bottom-D}},xe=Math.min(ce.x.left,ce.x.right),ke=Math.min(ce.y.top,ce.y.bottom),Re={row:G.row,column:G.column};xe/le<=2&&(Re.column+=ce.x.left=l&&p.renderer.scrollCursorIntoView(Re):N=Q:N=null}function M(){var G=A;A=p.renderer.screenToTextCoordinates(E,D),k(A,G),T(A,G)}function R(){w=p.selection.toOrientedRange(),v=p.session.addMarker(w,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),M(),C=setInterval(M,20),$=0,o.addListener(document,"mousemove",V)}function B(){clearInterval(C),p.session.removeMarker(v),v=null,p.selection.fromOrientedRange(w),p.isFocused()&&!P&&p.$resetCursorStyle(),w=null,A=null,$=0,N=null,F=null,o.removeListener(document,"mousemove",V)}var U=null;function V(){U==null&&(U=setTimeout(function(){U!=null&&v&&B()},20))}function K(G){var Y=G.types;return!Y||Array.prototype.some.call(Y,function(Q){return Q=="text/plain"||Q=="Text"})}function J(G){var Y=["copy","copymove","all","uninitialized"],Q=["move","copymove","linkmove","all","uninitialized"],X=a.isMac?G.altKey:G.ctrlKey,le="uninitialized";try{le=G.dataTransfer.effectAllowed.toLowerCase()}catch{}var be="none";return X&&Y.indexOf(le)>=0?be="copy":Q.indexOf(le)>=0?be="move":Y.indexOf(le)>=0&&(be="copy"),be}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var m=a.isWin?"default":"move";f.renderer.setCursorStyle(m),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(a.isIE&&this.state=="dragReady"){var m=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);m>3&&p.dragDrop()}if(this.state==="dragWait"){var m=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);m>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,m=f.inSelection(),y=f.getButton(),b=f.domEvent.detail||1;if(b===1&&y===0&&m){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),p.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var E=p.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(h.prototype);function d(f,p,m,y){return Math.sqrt(Math.pow(m-f,2)+Math.pow(y-p,2))}n.DragdropHandler=h}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(r,n,i){var s=r("./mouse_event").MouseEvent,o=r("../lib/event"),a=r("../lib/dom");n.addTouchListeners=function(l,u){var c="scroll",h,d,f,p,m,y,b=0,v,E=0,D=0,C=0,w,A;function $(){var k=window.navigator&&window.navigator.clipboard,T=!1,M=function(){var U=u.getCopyText(),V=u.session.getUndoManager().hasUndo();A.replaceChild(a.buildDom(T?["span",!U&&R("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],U&&R("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],U&&R("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],k&&R("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],V&&R("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],R("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],R("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),A.firstChild)},R=function(U){return u.commands.canExecute(U,u)},B=function(U){var V=U.target.getAttribute("action");if(V=="more"||!T)return T=!T,M();V=="paste"?k.readText().then(function(K){u.execCommand(V,K)}):V&&((V=="cut"||V=="copy")&&(k?k.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(V)),A.firstChild.style.display="none",T=!1,V!="openCommandPalette"&&u.focus()};A=a.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(U){c="menu",U.stopPropagation(),U.preventDefault(),u.textInput.focus()},ontouchend:function(U){U.stopPropagation(),U.preventDefault(),B(U)},onclick:B},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function O(){if(!u.getOption("enableMobileMenu")){A&&P();return}A||$();var k=u.selection.cursor,T=u.renderer.textToScreenCoordinates(k.row,k.column),M=u.renderer.textToScreenCoordinates(0,0).pageX,R=u.renderer.scrollLeft,B=u.container.getBoundingClientRect();A.style.top=T.pageY-B.top-3+"px",T.pageX-B.left=2?u.selection.getLineRange(v.row):u.session.getBracketRange(v);k&&!k.isEmpty()?u.selection.setRange(k):u.selection.selectWord(),c="wait"}o.addListener(l,"contextmenu",function(k){if(w){var T=u.textInput.getElement();T.focus()}},u),o.addListener(l,"touchstart",function(k){var T=k.touches;if(m||T.length>1){clearTimeout(m),m=null,f=-1,c="zoom";return}w=u.$mouseHandler.isMousePressed=!0;var M=u.renderer.layerConfig.lineHeight,R=u.renderer.layerConfig.lineHeight,B=k.timeStamp;p=B;var U=T[0],V=U.clientX,K=U.clientY;Math.abs(h-V)+Math.abs(d-K)>M&&(f=-1),h=k.clientX=V,d=k.clientY=K,D=C=0;var J=new s(k,u);if(v=J.getDocumentPosition(),B-f<500&&T.length==1&&!b)E++,k.preventDefault(),k.button=0,F();else{E=0;var G=u.selection.cursor,Y=u.selection.isEmpty()?G:u.selection.anchor,Q=u.renderer.$cursorLayer.getPixelPosition(G,!0),X=u.renderer.$cursorLayer.getPixelPosition(Y,!0),le=u.renderer.scroller.getBoundingClientRect(),be=u.renderer.layerConfig.offset,ce=u.renderer.scrollLeft,xe=function($t,mt){return $t=$t/R,mt=mt/M-.75,$t*$t+mt*mt};if(k.clientXRe?"cursor":"anchor"),Re<3.5?c="anchor":ke<3.5?c="cursor":c="scroll",m=setTimeout(N,450)}f=B},u),o.addListener(l,"touchend",function(k){w=u.$mouseHandler.isMousePressed=!1,y&&clearInterval(y),c=="zoom"?(c="",b=0):m?(u.selection.moveToPosition(v),b=0,O()):c=="scroll"?(L(),P()):O(),clearTimeout(m),m=null},u),o.addListener(l,"touchmove",function(k){m&&(clearTimeout(m),m=null);var T=k.touches;if(!(T.length>1||c=="zoom")){var M=T[0],R=h-M.clientX,B=d-M.clientY;if(c=="wait")if(R*R+B*B>4)c="cursor";else return k.preventDefault();h=M.clientX,d=M.clientY,k.clientX=M.clientX,k.clientY=M.clientY;var U=k.timeStamp,V=U-p;if(p=U,c=="scroll"){var K=new s(k,u);K.speed=1,K.wheelX=R,K.wheelY=B,10*Math.abs(R)0)if(Re==16){for(W=mt;W-1){for(W=mt;W=0&&X[re]==w;re--)Y[re]=s}}}function V(G,Y,Q){if(!(o=G){for(be=le+1;be=G;)be++;for(ce=le,xe=be-1;ce=Y.length||(be=Q[X-1])!=y&&be!=b||(ce=Y[X+1])!=y&&ce!=b?v:(a&&(ce=b),ce==be?ce:v);case $:return be=X>0?Q[X-1]:E,be==y&&X+10&&Q[X-1]==y)return y;if(a)return v;for(ke=X+1,xe=Y.length;ke=1425&&Re<=2303||Re==64286;if(be=Y[ke],$t&&(be==m||be==C))return m}return X<1||(be=Y[X-1])==E?v:Q[X-1];case E:return a=!1,l=!0,s;case D:return u=!0,v;case N:case F:case k:case T:case L:a=!1;case M:return v}}function J(G){var Y=G.charCodeAt(0),Q=Y>>8;return Q==0?Y>191?p:R[Y]:Q==5?/[\u0591-\u05f4]/.test(G)?m:p:Q==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(G)?P:/[\u0660-\u0669\u066b-\u066c]/.test(G)?b:Y==1642?O:/[\u06f0-\u06f9]/.test(G)?y:C:Q==32&&Y<=8287?B[Y&255]:Q==254&&Y>=65136?C:v}n.L=p,n.R=m,n.EN=y,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(G,Y,Q){if(G.length<2)return{};var X=G.split(""),le=new Array(X.length),be=new Array(X.length),ce=[];s=Q?f:d,U(X,ce,X.length,Y);for(var xe=0;xeC&&Y[xe]0&&X[xe-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(X[xe])&&(ce[xe-1]=ce[xe]=n.R_H,xe++);X[X.length-1]===n.DOT&&(ce[X.length-1]=n.B),X[0]==="‫"&&(ce[0]=n.RLE);for(var xe=0;xe=0&&(c=this.session.$docRowCache[d])}return c},u.prototype.getSplitIndex=function(){var c=0,h=this.session.$screenRowCache;if(h.length)for(var d,f=this.session.$getRowCacheIndex(h,this.currentRow);this.currentRow-c>0&&(d=this.session.$getRowCacheIndex(h,this.currentRow-c-1),d===f);)f=d,c++;else c=this.currentRow;return c},u.prototype.updateRowLine=function(c,h){c===void 0&&(c=this.getDocumentRow());var d=c===this.session.getLength()-1,f=d?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[c];p&&(h===void 0&&(h=this.getSplitIndex()),h>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=hh?this.session.getOverwrite()?c:c-1:h,f=s.getVisualFromLogicalIdx(d,this.bidiMap),p=this.bidiMap.bidiLevels,m=0;!this.session.getOverwrite()&&c<=h&&p[f]%2!==0&&f++;for(var y=0;yh&&p[f]%2===0&&(m+=this.charWidths[p[f]]),this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(m+=this.rtlLineOffset),m},u.prototype.getSelections=function(c,h){var d=this.bidiMap,f=d.bidiLevels,p,m=[],y=0,b=Math.min(c,h)-this.wrapIndent,v=Math.max(c,h)-this.wrapIndent,E=!1,D=!1,C=0;this.wrapIndent&&(y+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,A=0;A=b&&wf+y/2;){if(f+=y,p===m.length-1){y=0;break}y=this.charWidths[m[++p]]}return p>0&&m[p-1]%2!==0&&m[p]%2===0?(d0&&m[p-1]%2===0&&m[p]%2!==0?h=1+(d>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===m.length-1&&y===0&&m[p-1]%2===0||!this.isRtlDir&&p===0&&m[p]%2!==0?h=1+this.bidiMap.logicalFromVisual[p]:(p>0&&m[p-1]%2!==0&&y!==0&&p--,h=this.bidiMap.logicalFromVisual[p]),h===0&&this.isRtlDir&&h++,h+this.wrapIndent},u}();n.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/lang"),a=r("./lib/event_emitter").EventEmitter,l=r("./range").Range,u=function(){function c(h){this.session=h,this.doc=h.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var d=this;this.cursor.on("change",function(f){d.$cursorChanged=!0,d.$silent||d._emit("changeCursor"),!d.$isEmpty&&!d.$silent&&d._emit("changeSelection"),!d.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(d.$desiredColumn=null)}),this.anchor.on("change",function(){d.$anchorChanged=!0,!d.$isEmpty&&!d.$silent&&d._emit("changeSelection")})}return c.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},c.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},c.prototype.getCursor=function(){return this.lead.getPosition()},c.prototype.setAnchor=function(h,d){this.$isEmpty=!1,this.anchor.setPosition(h,d)},c.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},c.prototype.getSelectionLead=function(){return this.lead.getPosition()},c.prototype.isBackwards=function(){var h=this.anchor,d=this.lead;return h.row>d.row||h.row==d.row&&h.column>d.column},c.prototype.getRange=function(){var h=this.anchor,d=this.lead;return this.$isEmpty?l.fromPoints(d,d):this.isBackwards()?l.fromPoints(d,h):l.fromPoints(h,d)},c.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},c.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},c.prototype.setRange=function(h,d){var f=d?h.end:h.start,p=d?h.start:h.end;this.$setSelection(f.row,f.column,p.row,p.column)},c.prototype.$setSelection=function(h,d,f,p){if(!this.$silent){var m=this.$isEmpty,y=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(h,d),this.cursor.setPosition(f,p),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||m!=this.$isEmpty||y)&&this._emit("changeSelection")}},c.prototype.$moveSelection=function(h){var d=this.lead;this.$isEmpty&&this.setSelectionAnchor(d.row,d.column),h.call(this)},c.prototype.selectTo=function(h,d){this.$moveSelection(function(){this.moveCursorTo(h,d)})},c.prototype.selectToPosition=function(h){this.$moveSelection(function(){this.moveCursorToPosition(h)})},c.prototype.moveTo=function(h,d){this.clearSelection(),this.moveCursorTo(h,d)},c.prototype.moveToPosition=function(h){this.clearSelection(),this.moveCursorToPosition(h)},c.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},c.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},c.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},c.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},c.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},c.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},c.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},c.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},c.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},c.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},c.prototype.getWordRange=function(h,d){if(typeof d>"u"){var f=h||this.lead;h=f.row,d=f.column}return this.session.getWordRange(h,d)},c.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},c.prototype.selectAWord=function(){var h=this.getCursor(),d=this.session.getAWordRange(h.row,h.column);this.setSelectionRange(d)},c.prototype.getLineRange=function(h,d){var f=typeof h=="number"?h:this.lead.row,p,m=this.session.getFoldLine(f);return m?(f=m.start.row,p=m.end.row):p=f,d===!0?new l(f,0,p,this.session.getLine(p).length):new l(f,0,p+1,0)},c.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},c.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},c.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},c.prototype.wouldMoveIntoSoftTab=function(h,d,f){var p=h.column,m=h.column+d;return f<0&&(p=h.column-d,m=h.column),this.session.isTabStop(h)&&this.doc.getLine(h.row).slice(p,m).split(" ").length-1==d},c.prototype.moveCursorLeft=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,-1))this.moveCursorTo(d.start.row,d.start.column);else if(h.column===0)h.row>0&&this.moveCursorTo(h.row-1,this.doc.getLine(h.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(h,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},c.prototype.moveCursorRight=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,1))this.moveCursorTo(d.end.row,d.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(d.column=p)}}this.moveCursorTo(d.row,d.column)},c.prototype.moveCursorFileEnd=function(){var h=this.doc.getLength()-1,d=this.doc.getLine(h).length;this.moveCursorTo(h,d)},c.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},c.prototype.moveCursorLongWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var m=this.session.getFoldAt(h,d,1);if(m){this.moveCursorTo(m.end.row,m.end.column);return}if(this.session.nonTokenRe.exec(p)&&(d+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(d)),d>=f.length){this.moveCursorTo(h,f.length),this.moveCursorRight(),h0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(m)&&(d-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(h,d)},c.prototype.$shortWordEndIndex=function(h){var d=0,f,p=/\s/,m=this.session.tokenRe;if(m.lastIndex=0,this.session.tokenRe.exec(h))d=this.session.tokenRe.lastIndex;else{for(;(f=h[d])&&p.test(f);)d++;if(d<1){for(m.lastIndex=0;(f=h[d])&&!m.test(f);)if(m.lastIndex=0,d++,p.test(f))if(d>2){d--;break}else{for(;(f=h[d])&&p.test(f);)d++;if(d>2)break}}}return m.lastIndex=0,d},c.prototype.moveCursorShortWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d),m=this.session.getFoldAt(h,d,1);if(m)return this.moveCursorTo(m.end.row,m.end.column);if(d==f.length){var y=this.doc.getLength();do h++,p=this.doc.getLine(h);while(h0&&/^\s*$/.test(p));d=p.length,/\s+$/.test(p)||(p="")}var m=o.stringReverse(p),y=this.$shortWordEndIndex(m);return this.moveCursorTo(h,d-y)},c.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},c.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},c.prototype.moveCursorBy=function(h,d){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(d===0&&(h!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),h!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var m=this.session.lineWidgets[this.lead.row];h<0?h-=m.rowsAbove||0:h>0&&(h+=m.rowCount-(m.rowsAbove||0))}var y=this.session.screenToDocumentPosition(f.row+h,f.column,p);h!==0&&d===0&&y.row===this.lead.row&&(y.column,this.lead.column),this.moveCursorTo(y.row,y.column+d,d===0)},c.prototype.moveCursorToPosition=function(h){this.moveCursorTo(h.row,h.column)},c.prototype.moveCursorTo=function(h,d,f){var p=this.session.getFoldAt(h,d,1);p&&(h=p.start.row,d=p.start.column),this.$keepDesiredColumnOnChange=!0;var m=this.session.getLine(h);/[\uDC00-\uDFFF]/.test(m.charAt(d))&&m.charAt(d-1)&&(this.lead.row==h&&this.lead.column==d+1?d=d-1:d=d+1),this.lead.setPosition(h,d),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},c.prototype.moveCursorToScreen=function(h,d,f){var p=this.session.screenToDocumentPosition(h,d);this.moveCursorTo(p.row,p.column,f)},c.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},c.prototype.fromOrientedRange=function(h){this.setSelectionRange(h,h.cursor==h.start),this.$desiredColumn=h.desiredColumn||this.$desiredColumn},c.prototype.toOrientedRange=function(h){var d=this.getRange();return h?(h.start.column=d.start.column,h.start.row=d.start.row,h.end.column=d.end.column,h.end.row=d.end.row):h=d,h.cursor=this.isBackwards()?h.start:h.end,h.desiredColumn=this.$desiredColumn,h},c.prototype.getRangeOfMovements=function(h){var d=this.getCursor();try{h(this);var f=this.getCursor();return l.fromPoints(d,f)}catch{return l.fromPoints(d,d)}finally{this.moveCursorToPosition(d)}},c.prototype.toJSON=function(){if(this.rangeCount)var h=this.ranges.map(function(d){var f=d.clone();return f.isBackwards=d.cursor==d.start,f});else{var h=this.getRange();h.isBackwards=this.isBackwards()}return h},c.prototype.fromJSON=function(h){if(h.start==null)if(this.rangeList&&h.length>1){this.toSingleRange(h[0]);for(var d=h.length;d--;){var f=l.fromPoints(h[d].start,h[d].end);h[d].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else h=h[0];this.rangeList&&this.toSingleRange(h),this.setSelectionRange(h,h.isBackwards)},c.prototype.isEqual=function(h){if((h.length||this.rangeCount)&&h.length!=this.rangeCount)return!1;if(!h.length||!this.ranges)return this.getRange().isEqual(h);for(var d=this.ranges.length;d--;)if(!this.ranges[d].isEqual(h[d]))return!1;return!0},c}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,s.implement(u.prototype,a),n.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(r,n,i){var s=r("./lib/report_error").reportError,o=2e3,a=function(){function l(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var c in this.states){for(var h=this.states[c],d=[],f=0,p=this.matchMappings[c]={defaultToken:"text"},m="g",y=[],b=0;b1?v.onMatch=this.$applyToken:v.onMatch=v.token),D>1&&(/\\\d/.test(v.regex)?E=v.regex.replace(/\\([0-9]+)/g,function(C,w){return"\\"+(parseInt(w,10)+f+1)}):(D=1,E=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&y.push(v)),p[f]=b,f+=D,d.push(E),v.onMatch||(v.onMatch=null)}}d.length||(p[0]=0,d.push("$")),y.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,m)},this),this.regExps[c]=new RegExp("("+d.join(")|(")+")|($)",m)}}return l.prototype.$setMaxTokenCount=function(u){o=u|0},l.prototype.$applyToken=function(u){var c=this.splitRegex.exec(u).slice(1),h=this.token.apply(this,c);if(typeof h=="string")return[{type:h,value:u}];for(var d=[],f=0,p=h.length;fv){var O=u.substring(v,$-A.length);D.type==C?D.value+=O:(D.type&&b.push(D),D={type:C,value:O})}for(var P=0;Po){for(E>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:u});v1&&h[0]!==d&&h.unshift("#tmp",d),{tokens:b,state:h.length?h:d}},l}();a.prototype.reportError=s,n.Tokenizer=a}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(r,n,i){var s=r("../lib/deep_copy").deepCopy,o;o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,c){if(!c){for(var h in u)this.$rules[h]=u[h];return}for(var h in u){for(var d=u[h],f=0;f=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},a.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},a.prototype.getCurrentTokenRow=function(){return this.$row},a.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,u=this.$tokenIndex,c=l[u].start;if(c!==void 0)return c;for(c=0;u>0;)u-=1,c+=l[u].value.length;return c},a.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},a.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new s(this.$row,u,this.$row,u+l.value.length)},a}();n.TokenIterator=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,a=r("../../token_iterator").TokenIterator,l=r("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h,d={},f={'"':'"',"'":"'"},p=function(b){var v=-1;if(b.multiSelect&&(v=b.selection.index,d.rangeCount!=b.multiSelect.rangeCount&&(d={rangeCount:b.multiSelect.rangeCount})),d[v])return h=d[v];h=d[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(b,v,E,D){var C=b.end.row-b.start.row;return{text:E+v+D,selection:[0,b.start.column+1,C,b.end.column+(C?0:1)]}},y;y=function(b){b=b||{},this.add("braces","insertion",function(v,E,D,C,w){var A=D.getCursorPosition(),$=C.doc.getLine(A.row);if(w=="{"){p(D);var O=D.getSelectionRange(),P=C.doc.getTextRange(O),N=C.getTokenAt(A.row,A.column);if(P!==""&&P!=="{"&&D.getWrapBehavioursEnabled())return m(O,P,"{","}");if(N&&/(?:string)\.quasi|\.xml/.test(N.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(U){return U.test(N.type)})||/(string)\.quasi/.test(N.type)&&N.value[A.column-N.start-1]!=="$"?void 0:(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]})}else if(y.isSaneInsertion(D,C))return/[\]\}\)]/.test($[A.column])||D.inMultiSelectMode||b.braces?(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(D,C,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){p(D);var L=$.substring(A.column,A.column+1);if(L=="}"){var k=C.$findOpeningBracket("}",{column:A.column+1,row:A.row});if(k!==null&&y.isAutoInsertedClosing(A,$,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==` +`;ve!=T.value&&(T.value=A=ve);var Te=4,ze=4+(ae.length||(w.selection.isEmpty()?0:1));(M!=Te||R!=ze)&&T.setSelectionRange(Te,ze),M=Te,R=ze}}:function(){if(!(P||I)&&!(!J&&!be)){P=!0;var ae=0,ve=0,Te="";if(w.session){var ze=w.selection,at=ze.getRange(),xt=ze.cursor.row;xt===V+1?(U=V+1,V=U+2*K):xt===U-1?(V=U-1,U=V-2*K):(xtV+1)&&(U=xt>K?xt-K:0,V=xt>K?xt+K:2*K);for(var pt=[],kt=U;kt<=V;kt++)pt.push(w.session.getLine(kt));if(Te=pt.join(` +`),ae=G(at.start.row,at.start.column),ve=G(at.end.row,at.end.column),at.start.rowV){var ht=w.session.getLine(V+1);ve=at.end.row>V+1?ht.length:at.end.column,ve+=Te.length+1,Te=Te+` +`+ht}else E&&xt>0&&(Te=` +`+Te,ve+=1,ae+=1);Te.length>p&&(ae=A.length&&ae.value===A&&A&&ae.selectionEnd!==R},X=function(ae){P||(k?k=!1:Q(T)?(w.selectAll(),Y()):E&&T.selectionStart!=M&&Y())},le=null;this.setInputHandler=function(ae){le=ae},this.getInputHandler=function(){return le};var be=!1,ce=function(ae,ve){if(be&&(be=!1),O)return Y(),ae&&w.onPaste(ae),O=!1,"";for(var Te=T.selectionStart,ze=T.selectionEnd,at=M,xt=A.length-R,pt=ae,kt=ae.length-Te,nt=ae.length-ze,ht=0;at>0&&A[ht]==ae[ht];)ht++,at--;for(pt=pt.slice(ht),ht=1;xt>0&&A.length-ht>M-1&&A[A.length-ht]==ae[ae.length-ht];)ht++,xt--;kt-=ht-1,nt-=ht-1;var It=pt.length-ht+1;if(It<0&&(at=-It,It=0),pt=pt.slice(0,It),!ve&&!pt&&!kt&&!at&&!xt&&!nt)return"";I=!0;var sr=!1;return a.isAndroid&&pt==". "&&(pt=" ",sr=!0),pt&&!at&&!xt&&!kt&&!nt||L?w.onTextInput(pt):w.onTextInput(pt,{extendLeft:at,extendRight:xt,restoreStart:kt,restoreEnd:nt}),I=!1,A=ae,M=Te,R=ze,B=nt,sr?` +`:pt},xe=function(ae){if(P)return pe();if(ae&&ae.inputType){if(ae.inputType=="historyUndo")return w.execCommand("undo");if(ae.inputType=="historyRedo")return w.execCommand("redo")}var ve=T.value,Te=ce(ve,!0);(ve.length>p+100||v.test(Te)||E&&M<1&&M==R)&&Y()},ke=function(ae,ve,Te){var ze=ae.clipboardData||window.clipboardData;if(!(!ze||h)){var at=d||Te?"Text":"text/plain";try{return ve?ze.setData(at,ve)!==!1:ze.getData(at)}catch(xt){if(!Te)return ke(xt,ve,!0)}}},Re=function(ae,ve){var Te=w.getCopyText();if(!Te)return s.preventDefault(ae);ke(ae,Te)?(b&&(Y(Te),k=Te,setTimeout(function(){k=!1},10)),ve?w.onCut():w.onCopy(),s.preventDefault(ae)):(k=!0,T.value=Te,T.select(),setTimeout(function(){k=!1,Y(),ve?w.onCut():w.onCopy()}))},Pt=function(ae){Re(ae,!0)},yt=function(ae){Re(ae,!1)},W=function(ae){var ve=ke(ae);c.pasteCancelled()||(typeof ve=="string"?(ve&&w.onPaste(ve,ae),a.isIE&&setTimeout(Y),s.preventDefault(ae)):(T.value="",O=!0))};s.addCommandKeyListener(T,function(ae,ve,Te){if(!P)return w.onCommandKey(ae,ve,Te)},w),s.addListener(T,"select",X,w),s.addListener(T,"input",xe,w),s.addListener(T,"cut",Pt,w),s.addListener(T,"copy",yt,w),s.addListener(T,"paste",W,w),(!("oncut"in T)||!("oncopy"in T)||!("onpaste"in T))&&s.addListener(C,"keydown",function(ae){if(!(a.isMac&&!ae.metaKey||!ae.ctrlKey))switch(ae.keyCode){case 67:yt(ae);break;case 86:W(ae);break;case 88:Pt(ae);break}},w);var ye=function(ae){if(!(P||!w.onCompositionStart||w.$readOnly)&&(P={},!L)){ae.data&&(P.useTextareaForIME=!1),setTimeout(pe,0),w._signal("compositionStart"),w.on("mousedown",ee);var ve=w.getSelectionRange();ve.end.row=ve.start.row,ve.end.column=ve.start.column,P.markerRange=ve,P.selectionStart=M,w.onCompositionStart(P),P.useTextareaForIME?(A=T.value="",M=0,R=0):(T.msGetInputContext&&(P.context=T.msGetInputContext()),T.getInputContext&&(P.context=T.getInputContext()))}},pe=function(){if(!(!P||!w.onCompositionUpdate||w.$readOnly)){if(L)return ee();if(P.useTextareaForIME)w.onCompositionUpdate(T.value);else{var ae=T.value;ce(ae),P.markerRange&&(P.context&&(P.markerRange.start.column=P.selectionStart=P.context.compositionStartOffset),P.markerRange.end.column=P.markerRange.start.column+R-P.selectionStart+B)}}},re=function(ae){!w.onCompositionEnd||w.$readOnly||(P=!1,w.onCompositionEnd(),w.off("mousedown",ee),ae&&xe())};function ee(){_=!0,T.blur(),T.focus(),_=!1}var ue=u.delayedCall(pe,50).schedule.bind(null,null);function De(ae){ae.keyCode==27&&T.value.lengthR&&A[nt]==` +`?ht=m.end:ktR&&A.slice(0,nt).split(` +`).length>2?ht=m.down:nt>R&&A[nt-1]==" "?(ht=m.right,It=y.option):(nt>R||nt==R&&R!=M&&kt==nt)&&(ht=m.right),kt!==nt&&(It|=y.shift),ht){var sr=ve.onCommandKey({},It,ht);if(!sr&&ve.commands){ht=m.keyCodeToString(ht);var ln=ve.commands.findKeyCommand(It,ht);ln&&ve.execCommand(ln)}M=kt,R=nt,Y("")}}};document.addEventListener("selectionchange",xt),ve.on("destroy",function(){document.removeEventListener("selectionchange",xt)})}this.destroy=function(){T.parentElement&&T.parentElement.removeChild(T)}},n.TextInput=D,n.$setUserAgentForTests=function(C,w){E=C,b=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("../lib/useragent"),o=0,a=550,l=function(){function h(d){d.$clickSelection=null;var f=d.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(d)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(d)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(d)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(d)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(d));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(m){d[m]=this[m]},this),d.selectByLines=this.extendSelectionBy.bind(d,"getLineRange"),d.selectByWords=this.extendSelectionBy.bind(d,"getWordRange")}return h.prototype.onMouseDown=function(d){var f=d.inSelection(),p=d.getDocumentPosition();this.mousedownEvent=d;var m=this.editor,y=d.getButton();if(y!==0){var b=m.getSelectionRange(),v=b.isEmpty();(v||y==1)&&m.selection.moveToPosition(p),y==2&&(m.textInput.onContextMenu(d.domEvent),s.isMozilla||d.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!m.isFocused()&&(m.focus(),this.$focusTimeout&&!this.$clickSelection&&!m.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(d);return}return this.captureMouse(d),this.startSelect(p,d.domEvent._clicks>1),d.preventDefault()},h.prototype.startSelect=function(d,f){d=d||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(d):f||p.selection.moveToPosition(d),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},h.prototype.select=function(){var d,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(p);if(m==-1)d=this.$clickSelection.end;else if(m==1)d=this.$clickSelection.start;else{var y=c(this.$clickSelection,p);p=y.cursor,d=y.anchor}f.selection.setSelectionAnchor(d.row,d.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},h.prototype.extendSelectionBy=function(d){var f,p=this.editor,m=p.renderer.screenToTextCoordinates(this.x,this.y),y=p.selection[d](m.row,m.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(y.start),v=this.$clickSelection.comparePoint(y.end);if(b==-1&&v<=0)f=this.$clickSelection.end,(y.end.row!=m.row||y.end.column!=m.column)&&(m=y.start);else if(v==1&&b>=0)f=this.$clickSelection.start,(y.start.row!=m.row||y.start.column!=m.column)&&(m=y.end);else if(b==-1&&v==1)m=y.end,f=y.start;else{var E=c(this.$clickSelection,m);m=E.cursor,f=E.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(m),p.renderer.scrollCursorIntoView()},h.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},h.prototype.focusWait=function(){var d=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(d>o||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},h.prototype.onDoubleClick=function(d){var f=d.getDocumentPosition(),p=this.editor,m=p.session,y=m.getBracketRange(f);y?(y.isEmpty()&&(y.start.column--,y.end.column++),this.setState("select")):(y=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=y,this.select()},h.prototype.onTripleClick=function(d){var f=d.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var m=p.getSelectionRange();m.isMultiLine()&&m.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(m.start.row),this.$clickSelection.end=p.selection.getLineRange(m.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},h.prototype.onQuadClick=function(d){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},h.prototype.onMouseWheel=function(d){if(!d.getAccelKey()){d.getShiftKey()&&d.wheelY&&!d.wheelX&&(d.wheelX=d.wheelY,d.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,m=d.domEvent.timeStamp,y=m-p.t,b=y?d.wheelX/y:p.vx,v=y?d.wheelY/y:p.vy;y=1&&f.renderer.isScrollableBy(d.wheelX*d.speed,0)&&(D=!0),E<=1&&f.renderer.isScrollableBy(0,d.wheelY*d.speed)&&(D=!0),D)p.allowed=m;else if(m-p.alloweda.clientHeight;l||o.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(r,n,i){var s=this&&this.__extends||function(){var m=function(y,b){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,E){v.__proto__=E}||function(v,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D])},m(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");m(y,b);function v(){this.constructor=y}y.prototype=b===null?Object.create(b):(v.prototype=b.prototype,new v)}}(),o=this&&this.__values||function(m){var y=typeof Symbol=="function"&&Symbol.iterator,b=y&&m[y],v=0;if(b)return b.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&v>=m.length&&(m=void 0),{value:m&&m[v++],done:!m}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},a=r("./lib/dom");r("./lib/event");var l=r("./range").Range,u=r("./lib/scroll").preventParentScroll,c="ace_tooltip",h=function(){function m(y){this.isOpen=!1,this.$element=null,this.$parentNode=y}return m.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},m.prototype.getElement=function(){return this.$element||this.$init()},m.prototype.setText=function(y){this.getElement().textContent=y},m.prototype.setHtml=function(y){this.getElement().innerHTML=y},m.prototype.setPosition=function(y,b){this.getElement().style.left=y+"px",this.getElement().style.top=b+"px"},m.prototype.setClassName=function(y){a.addCssClass(this.getElement(),y)},m.prototype.setTheme=function(y){this.$element.className=c+" "+(y.isDark?"ace_dark ":"")+(y.cssClass||"")},m.prototype.show=function(y,b,v){y!=null&&this.setText(y),b!=null&&v!=null&&this.setPosition(b,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},m.prototype.hide=function(y){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},m.prototype.getHeight=function(){return this.getElement().offsetHeight},m.prototype.getWidth=function(){return this.getElement().offsetWidth},m.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},m}(),d=function(){function m(){this.popups=[]}return m.prototype.addPopup=function(y){this.popups.push(y),this.updatePopups()},m.prototype.removePopup=function(y){var b=this.popups.indexOf(y);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},m.prototype.updatePopups=function(){var y,b,v,E;this.popups.sort(function(F,L){return L.priority-F.priority});var D=[];try{for(var C=o(this.popups),w=C.next();!w.done;w=C.next()){var T=w.value,k=!0;try{for(var O=(v=void 0,o(D)),P=O.next();!P.done;P=O.next()){var I=P.value;if(this.doPopupsOverlap(I,T)){k=!1;break}}}catch(F){v={error:F}}finally{try{P&&!P.done&&(E=O.return)&&E.call(O)}finally{if(v)throw v.error}}k?D.push(T):T.hide()}}catch(F){y={error:F}}finally{try{w&&!w.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}},m.prototype.doPopupsOverlap=function(y,b){var v=y.getElement().getBoundingClientRect(),E=b.getElement().getBoundingClientRect();return v.leftE.left&&v.topE.top},m}(),f=new d;n.popupManager=f,n.Tooltip=h;var p=function(m){s(y,m);function y(b){b===void 0&&(b=document.body);var v=m.call(this,b)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var E=v.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",v.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(v)),E.addEventListener("wheel",u),v}return y.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},y.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},y.prototype.onMouseMove=function(b,v){this.lastEvent=b,this.lastT=Date.now();var E=v.$mouseHandler.isMousePressed;if(this.isOpen){var D=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(D.row,D.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},y.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},y.prototype.isOutsideOfText=function(b){var v=b.editor,E=b.getDocumentPosition(),D=v.session.getLine(E.row);if(E.column==D.length){var C=v.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),w=v.session.documentToScreenPosition(E.row,E.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},y.prototype.setDataProvider=function(b){this.$gatherData=b},y.prototype.showForRange=function(b,v,E,D){var C=10;if(!(D&&D!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=b.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,b.session),this.range=l.fromPoints(v.start,v.end);var T=w.textToScreenCoordinates(v.start.row,v.start.column),k=w.scroller.getBoundingClientRect();T.pageX=f.length&&(f=void 0),{value:f&&f[y++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},a=r("../lib/dom"),l=r("../lib/event"),u=r("../tooltip").Tooltip,c=r("../config").nls;r("../lib/lang");function h(f){var p=f.editor,m=p.renderer.$gutterLayer,y=new d(p);f.editor.setDefaultHandler("guttermousedown",function(w){if(!(!p.isFocused()||w.getButton()!=0)){var T=m.getRegion(w);if(T!="foldWidgets"){var k=w.getDocumentPosition().row,O=p.session.selection;if(w.getShiftKey())O.selectTo(k,0);else{if(w.domEvent.detail==2)return p.selectAll(),w.preventDefault();f.$clickSelection=p.selection.getLineRange(k)}return f.setState("selectByLines"),f.captureMouse(w),w.preventDefault()}}});var b,v;function E(){var w=v.getDocumentPosition().row,T=p.session.getLength();if(w==T){var k=p.renderer.pixelToScreenCoordinates(0,v.y).row,O=v.$pos;if(k>p.session.documentToScreenRow(O.row,O.column))return D()}if(y.showTooltip(w),!!y.isOpen)if(p.on("mousewheel",D),f.$tooltipFollowsMouse)C(v);else{var P=v.getGutterRow(),I=m.$lines.get(P);if(I){var F=I.element.querySelector(".ace_gutter_annotation"),L=F.getBoundingClientRect(),_=y.getElement().style;_.left=L.right+"px",_.top=L.bottom+"px"}else C(v)}}function D(){b&&(b=clearTimeout(b)),y.isOpen&&(y.hideTooltip(),p.off("mousewheel",D))}function C(w){y.setPosition(w.x,w.y)}f.editor.setDefaultHandler("guttermousemove",function(w){var T=w.domEvent.target||w.domEvent.srcElement;if(a.hasCssClass(T,"ace_fold-widget"))return D();y.isOpen&&f.$tooltipFollowsMouse&&C(w),v=w,!b&&(b=setTimeout(function(){b=null,v&&!f.isMousePressed?E():D()},50))}),l.addListener(p.renderer.$gutter,"mouseout",function(w){v=null,!(!y.isOpen||b)&&(b=setTimeout(function(){b=null,D()},50))},p),p.on("changeSession",D),p.on("input",D)}n.GutterHandler=h;var d=function(f){s(p,f);function p(m){var y=f.call(this,m.container)||this;return y.editor=m,y}return p.prototype.setPosition=function(m,y){var b=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),D=this.getHeight();m+=15,y+=15,m+E>b&&(m-=m+E-b),y+D>v&&(y-=20+D),u.prototype.setPosition.call(this,m,y)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(m){var y,b=this.editor.renderer.$gutterLayer,v=b.$annotations[m],E;v?E={displayText:Array.from(v.displayText),type:Array.from(v.type)}:E={displayText:[],type:[]};var D=b.session.getFoldLine(m);if(D&&b.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},w={error:1,security:2,warning:3,info:4,hint:5},T,k=m+1;k<=D.end.row;k++)if(b.$annotations[k])for(var O=0;Oc?F=null:Q-F>=u&&(p.renderer.scrollCursorIntoView(),F=null)}}function A(G,Y){var Q=Date.now(),X=p.renderer.layerConfig.lineHeight,le=p.renderer.layerConfig.characterWidth,be=p.renderer.scroller.getBoundingClientRect(),ce={x:{left:E-be.left,right:be.right-E},y:{top:D-be.top,bottom:be.bottom-D}},xe=Math.min(ce.x.left,ce.x.right),ke=Math.min(ce.y.top,ce.y.bottom),Re={row:G.row,column:G.column};xe/le<=2&&(Re.column+=ce.x.left=l&&p.renderer.scrollCursorIntoView(Re):I=Q:I=null}function M(){var G=T;T=p.renderer.screenToTextCoordinates(E,D),_(T,G),A(T,G)}function R(){w=p.selection.toOrientedRange(),v=p.session.addMarker(w,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),M(),C=setInterval(M,20),k=0,o.addListener(document,"mousemove",V)}function B(){clearInterval(C),p.session.removeMarker(v),v=null,p.selection.fromOrientedRange(w),p.isFocused()&&!P&&p.$resetCursorStyle(),w=null,T=null,k=0,I=null,F=null,o.removeListener(document,"mousemove",V)}var U=null;function V(){U==null&&(U=setTimeout(function(){U!=null&&v&&B()},20))}function K(G){var Y=G.types;return!Y||Array.prototype.some.call(Y,function(Q){return Q=="text/plain"||Q=="Text"})}function J(G){var Y=["copy","copymove","all","uninitialized"],Q=["move","copymove","linkmove","all","uninitialized"],X=a.isMac?G.altKey:G.ctrlKey,le="uninitialized";try{le=G.dataTransfer.effectAllowed.toLowerCase()}catch{}var be="none";return X&&Y.indexOf(le)>=0?be="copy":Q.indexOf(le)>=0?be="move":Y.indexOf(le)>=0&&(be="copy"),be}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var m=a.isWin?"default":"move";f.renderer.setCursorStyle(m),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(a.isIE&&this.state=="dragReady"){var m=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);m>3&&p.dragDrop()}if(this.state==="dragWait"){var m=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);m>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,m=f.inSelection(),y=f.getButton(),b=f.domEvent.detail||1;if(b===1&&y===0&&m){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),p.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var E=p.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(h.prototype);function d(f,p,m,y){return Math.sqrt(Math.pow(m-f,2)+Math.pow(y-p,2))}n.DragdropHandler=h}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(r,n,i){var s=r("./mouse_event").MouseEvent,o=r("../lib/event"),a=r("../lib/dom");n.addTouchListeners=function(l,u){var c="scroll",h,d,f,p,m,y,b=0,v,E=0,D=0,C=0,w,T;function k(){var _=window.navigator&&window.navigator.clipboard,A=!1,M=function(){var U=u.getCopyText(),V=u.session.getUndoManager().hasUndo();T.replaceChild(a.buildDom(A?["span",!U&&R("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],U&&R("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],U&&R("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&R("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],V&&R("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],R("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],R("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),T.firstChild)},R=function(U){return u.commands.canExecute(U,u)},B=function(U){var V=U.target.getAttribute("action");if(V=="more"||!A)return A=!A,M();V=="paste"?_.readText().then(function(K){u.execCommand(V,K)}):V&&((V=="cut"||V=="copy")&&(_?_.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(V)),T.firstChild.style.display="none",A=!1,V!="openCommandPalette"&&u.focus()};T=a.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(U){c="menu",U.stopPropagation(),U.preventDefault(),u.textInput.focus()},ontouchend:function(U){U.stopPropagation(),U.preventDefault(),B(U)},onclick:B},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function O(){if(!u.getOption("enableMobileMenu")){T&&P();return}T||k();var _=u.selection.cursor,A=u.renderer.textToScreenCoordinates(_.row,_.column),M=u.renderer.textToScreenCoordinates(0,0).pageX,R=u.renderer.scrollLeft,B=u.container.getBoundingClientRect();T.style.top=A.pageY-B.top-3+"px",A.pageX-B.left=2?u.selection.getLineRange(v.row):u.session.getBracketRange(v);_&&!_.isEmpty()?u.selection.setRange(_):u.selection.selectWord(),c="wait"}o.addListener(l,"contextmenu",function(_){if(w){var A=u.textInput.getElement();A.focus()}},u),o.addListener(l,"touchstart",function(_){var A=_.touches;if(m||A.length>1){clearTimeout(m),m=null,f=-1,c="zoom";return}w=u.$mouseHandler.isMousePressed=!0;var M=u.renderer.layerConfig.lineHeight,R=u.renderer.layerConfig.lineHeight,B=_.timeStamp;p=B;var U=A[0],V=U.clientX,K=U.clientY;Math.abs(h-V)+Math.abs(d-K)>M&&(f=-1),h=_.clientX=V,d=_.clientY=K,D=C=0;var J=new s(_,u);if(v=J.getDocumentPosition(),B-f<500&&A.length==1&&!b)E++,_.preventDefault(),_.button=0,F();else{E=0;var G=u.selection.cursor,Y=u.selection.isEmpty()?G:u.selection.anchor,Q=u.renderer.$cursorLayer.getPixelPosition(G,!0),X=u.renderer.$cursorLayer.getPixelPosition(Y,!0),le=u.renderer.scroller.getBoundingClientRect(),be=u.renderer.layerConfig.offset,ce=u.renderer.scrollLeft,xe=function(Pt,yt){return Pt=Pt/R,yt=yt/M-.75,Pt*Pt+yt*yt};if(_.clientXRe?"cursor":"anchor"),Re<3.5?c="anchor":ke<3.5?c="cursor":c="scroll",m=setTimeout(I,450)}f=B},u),o.addListener(l,"touchend",function(_){w=u.$mouseHandler.isMousePressed=!1,y&&clearInterval(y),c=="zoom"?(c="",b=0):m?(u.selection.moveToPosition(v),b=0,O()):c=="scroll"?(L(),P()):O(),clearTimeout(m),m=null},u),o.addListener(l,"touchmove",function(_){m&&(clearTimeout(m),m=null);var A=_.touches;if(!(A.length>1||c=="zoom")){var M=A[0],R=h-M.clientX,B=d-M.clientY;if(c=="wait")if(R*R+B*B>4)c="cursor";else return _.preventDefault();h=M.clientX,d=M.clientY,_.clientX=M.clientX,_.clientY=M.clientY;var U=_.timeStamp,V=U-p;if(p=U,c=="scroll"){var K=new s(_,u);K.speed=1,K.wheelX=R,K.wheelY=B,10*Math.abs(R)0)if(Re==16){for(W=yt;W-1){for(W=yt;W=0&&X[re]==w;re--)Y[re]=s}}}function V(G,Y,Q){if(!(o=G){for(be=le+1;be=G;)be++;for(ce=le,xe=be-1;ce=Y.length||(be=Q[X-1])!=y&&be!=b||(ce=Y[X+1])!=y&&ce!=b?v:(a&&(ce=b),ce==be?ce:v);case k:return be=X>0?Q[X-1]:E,be==y&&X+10&&Q[X-1]==y)return y;if(a)return v;for(ke=X+1,xe=Y.length;ke=1425&&Re<=2303||Re==64286;if(be=Y[ke],Pt&&(be==m||be==C))return m}return X<1||(be=Y[X-1])==E?v:Q[X-1];case E:return a=!1,l=!0,s;case D:return u=!0,v;case I:case F:case _:case A:case L:a=!1;case M:return v}}function J(G){var Y=G.charCodeAt(0),Q=Y>>8;return Q==0?Y>191?p:R[Y]:Q==5?/[\u0591-\u05f4]/.test(G)?m:p:Q==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(G)?P:/[\u0660-\u0669\u066b-\u066c]/.test(G)?b:Y==1642?O:/[\u06f0-\u06f9]/.test(G)?y:C:Q==32&&Y<=8287?B[Y&255]:Q==254&&Y>=65136?C:v}n.L=p,n.R=m,n.EN=y,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(G,Y,Q){if(G.length<2)return{};var X=G.split(""),le=new Array(X.length),be=new Array(X.length),ce=[];s=Q?f:d,U(X,ce,X.length,Y);for(var xe=0;xeC&&Y[xe]0&&X[xe-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(X[xe])&&(ce[xe-1]=ce[xe]=n.R_H,xe++);X[X.length-1]===n.DOT&&(ce[X.length-1]=n.B),X[0]==="‫"&&(ce[0]=n.RLE);for(var xe=0;xe=0&&(c=this.session.$docRowCache[d])}return c},u.prototype.getSplitIndex=function(){var c=0,h=this.session.$screenRowCache;if(h.length)for(var d,f=this.session.$getRowCacheIndex(h,this.currentRow);this.currentRow-c>0&&(d=this.session.$getRowCacheIndex(h,this.currentRow-c-1),d===f);)f=d,c++;else c=this.currentRow;return c},u.prototype.updateRowLine=function(c,h){c===void 0&&(c=this.getDocumentRow());var d=c===this.session.getLength()-1,f=d?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[c];p&&(h===void 0&&(h=this.getSplitIndex()),h>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=hh?this.session.getOverwrite()?c:c-1:h,f=s.getVisualFromLogicalIdx(d,this.bidiMap),p=this.bidiMap.bidiLevels,m=0;!this.session.getOverwrite()&&c<=h&&p[f]%2!==0&&f++;for(var y=0;yh&&p[f]%2===0&&(m+=this.charWidths[p[f]]),this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(m+=this.rtlLineOffset),m},u.prototype.getSelections=function(c,h){var d=this.bidiMap,f=d.bidiLevels,p,m=[],y=0,b=Math.min(c,h)-this.wrapIndent,v=Math.max(c,h)-this.wrapIndent,E=!1,D=!1,C=0;this.wrapIndent&&(y+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,T=0;T=b&&wf+y/2;){if(f+=y,p===m.length-1){y=0;break}y=this.charWidths[m[++p]]}return p>0&&m[p-1]%2!==0&&m[p]%2===0?(d0&&m[p-1]%2===0&&m[p]%2!==0?h=1+(d>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===m.length-1&&y===0&&m[p-1]%2===0||!this.isRtlDir&&p===0&&m[p]%2!==0?h=1+this.bidiMap.logicalFromVisual[p]:(p>0&&m[p-1]%2!==0&&y!==0&&p--,h=this.bidiMap.logicalFromVisual[p]),h===0&&this.isRtlDir&&h++,h+this.wrapIndent},u}();n.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/lang"),a=r("./lib/event_emitter").EventEmitter,l=r("./range").Range,u=function(){function c(h){this.session=h,this.doc=h.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var d=this;this.cursor.on("change",function(f){d.$cursorChanged=!0,d.$silent||d._emit("changeCursor"),!d.$isEmpty&&!d.$silent&&d._emit("changeSelection"),!d.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(d.$desiredColumn=null)}),this.anchor.on("change",function(){d.$anchorChanged=!0,!d.$isEmpty&&!d.$silent&&d._emit("changeSelection")})}return c.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},c.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},c.prototype.getCursor=function(){return this.lead.getPosition()},c.prototype.setAnchor=function(h,d){this.$isEmpty=!1,this.anchor.setPosition(h,d)},c.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},c.prototype.getSelectionLead=function(){return this.lead.getPosition()},c.prototype.isBackwards=function(){var h=this.anchor,d=this.lead;return h.row>d.row||h.row==d.row&&h.column>d.column},c.prototype.getRange=function(){var h=this.anchor,d=this.lead;return this.$isEmpty?l.fromPoints(d,d):this.isBackwards()?l.fromPoints(d,h):l.fromPoints(h,d)},c.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},c.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},c.prototype.setRange=function(h,d){var f=d?h.end:h.start,p=d?h.start:h.end;this.$setSelection(f.row,f.column,p.row,p.column)},c.prototype.$setSelection=function(h,d,f,p){if(!this.$silent){var m=this.$isEmpty,y=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(h,d),this.cursor.setPosition(f,p),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||m!=this.$isEmpty||y)&&this._emit("changeSelection")}},c.prototype.$moveSelection=function(h){var d=this.lead;this.$isEmpty&&this.setSelectionAnchor(d.row,d.column),h.call(this)},c.prototype.selectTo=function(h,d){this.$moveSelection(function(){this.moveCursorTo(h,d)})},c.prototype.selectToPosition=function(h){this.$moveSelection(function(){this.moveCursorToPosition(h)})},c.prototype.moveTo=function(h,d){this.clearSelection(),this.moveCursorTo(h,d)},c.prototype.moveToPosition=function(h){this.clearSelection(),this.moveCursorToPosition(h)},c.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},c.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},c.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},c.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},c.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},c.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},c.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},c.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},c.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},c.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},c.prototype.getWordRange=function(h,d){if(typeof d>"u"){var f=h||this.lead;h=f.row,d=f.column}return this.session.getWordRange(h,d)},c.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},c.prototype.selectAWord=function(){var h=this.getCursor(),d=this.session.getAWordRange(h.row,h.column);this.setSelectionRange(d)},c.prototype.getLineRange=function(h,d){var f=typeof h=="number"?h:this.lead.row,p,m=this.session.getFoldLine(f);return m?(f=m.start.row,p=m.end.row):p=f,d===!0?new l(f,0,p,this.session.getLine(p).length):new l(f,0,p+1,0)},c.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},c.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},c.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},c.prototype.wouldMoveIntoSoftTab=function(h,d,f){var p=h.column,m=h.column+d;return f<0&&(p=h.column-d,m=h.column),this.session.isTabStop(h)&&this.doc.getLine(h.row).slice(p,m).split(" ").length-1==d},c.prototype.moveCursorLeft=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,-1))this.moveCursorTo(d.start.row,d.start.column);else if(h.column===0)h.row>0&&this.moveCursorTo(h.row-1,this.doc.getLine(h.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(h,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},c.prototype.moveCursorRight=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,1))this.moveCursorTo(d.end.row,d.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(d.column=p)}}this.moveCursorTo(d.row,d.column)},c.prototype.moveCursorFileEnd=function(){var h=this.doc.getLength()-1,d=this.doc.getLine(h).length;this.moveCursorTo(h,d)},c.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},c.prototype.moveCursorLongWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var m=this.session.getFoldAt(h,d,1);if(m){this.moveCursorTo(m.end.row,m.end.column);return}if(this.session.nonTokenRe.exec(p)&&(d+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(d)),d>=f.length){this.moveCursorTo(h,f.length),this.moveCursorRight(),h0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(m)&&(d-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(h,d)},c.prototype.$shortWordEndIndex=function(h){var d=0,f,p=/\s/,m=this.session.tokenRe;if(m.lastIndex=0,this.session.tokenRe.exec(h))d=this.session.tokenRe.lastIndex;else{for(;(f=h[d])&&p.test(f);)d++;if(d<1){for(m.lastIndex=0;(f=h[d])&&!m.test(f);)if(m.lastIndex=0,d++,p.test(f))if(d>2){d--;break}else{for(;(f=h[d])&&p.test(f);)d++;if(d>2)break}}}return m.lastIndex=0,d},c.prototype.moveCursorShortWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d),m=this.session.getFoldAt(h,d,1);if(m)return this.moveCursorTo(m.end.row,m.end.column);if(d==f.length){var y=this.doc.getLength();do h++,p=this.doc.getLine(h);while(h0&&/^\s*$/.test(p));d=p.length,/\s+$/.test(p)||(p="")}var m=o.stringReverse(p),y=this.$shortWordEndIndex(m);return this.moveCursorTo(h,d-y)},c.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},c.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},c.prototype.moveCursorBy=function(h,d){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(d===0&&(h!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),h!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var m=this.session.lineWidgets[this.lead.row];h<0?h-=m.rowsAbove||0:h>0&&(h+=m.rowCount-(m.rowsAbove||0))}var y=this.session.screenToDocumentPosition(f.row+h,f.column,p);h!==0&&d===0&&y.row===this.lead.row&&(y.column,this.lead.column),this.moveCursorTo(y.row,y.column+d,d===0)},c.prototype.moveCursorToPosition=function(h){this.moveCursorTo(h.row,h.column)},c.prototype.moveCursorTo=function(h,d,f){var p=this.session.getFoldAt(h,d,1);p&&(h=p.start.row,d=p.start.column),this.$keepDesiredColumnOnChange=!0;var m=this.session.getLine(h);/[\uDC00-\uDFFF]/.test(m.charAt(d))&&m.charAt(d-1)&&(this.lead.row==h&&this.lead.column==d+1?d=d-1:d=d+1),this.lead.setPosition(h,d),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},c.prototype.moveCursorToScreen=function(h,d,f){var p=this.session.screenToDocumentPosition(h,d);this.moveCursorTo(p.row,p.column,f)},c.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},c.prototype.fromOrientedRange=function(h){this.setSelectionRange(h,h.cursor==h.start),this.$desiredColumn=h.desiredColumn||this.$desiredColumn},c.prototype.toOrientedRange=function(h){var d=this.getRange();return h?(h.start.column=d.start.column,h.start.row=d.start.row,h.end.column=d.end.column,h.end.row=d.end.row):h=d,h.cursor=this.isBackwards()?h.start:h.end,h.desiredColumn=this.$desiredColumn,h},c.prototype.getRangeOfMovements=function(h){var d=this.getCursor();try{h(this);var f=this.getCursor();return l.fromPoints(d,f)}catch{return l.fromPoints(d,d)}finally{this.moveCursorToPosition(d)}},c.prototype.toJSON=function(){if(this.rangeCount)var h=this.ranges.map(function(d){var f=d.clone();return f.isBackwards=d.cursor==d.start,f});else{var h=this.getRange();h.isBackwards=this.isBackwards()}return h},c.prototype.fromJSON=function(h){if(h.start==null)if(this.rangeList&&h.length>1){this.toSingleRange(h[0]);for(var d=h.length;d--;){var f=l.fromPoints(h[d].start,h[d].end);h[d].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else h=h[0];this.rangeList&&this.toSingleRange(h),this.setSelectionRange(h,h.isBackwards)},c.prototype.isEqual=function(h){if((h.length||this.rangeCount)&&h.length!=this.rangeCount)return!1;if(!h.length||!this.ranges)return this.getRange().isEqual(h);for(var d=this.ranges.length;d--;)if(!this.ranges[d].isEqual(h[d]))return!1;return!0},c}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,s.implement(u.prototype,a),n.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(r,n,i){var s=r("./lib/report_error").reportError,o=2e3,a=function(){function l(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var c in this.states){for(var h=this.states[c],d=[],f=0,p=this.matchMappings[c]={defaultToken:"text"},m="g",y=[],b=0;b1?v.onMatch=this.$applyToken:v.onMatch=v.token),D>1&&(/\\\d/.test(v.regex)?E=v.regex.replace(/\\([0-9]+)/g,function(C,w){return"\\"+(parseInt(w,10)+f+1)}):(D=1,E=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&y.push(v)),p[f]=b,f+=D,d.push(E),v.onMatch||(v.onMatch=null)}}d.length||(p[0]=0,d.push("$")),y.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,m)},this),this.regExps[c]=new RegExp("("+d.join(")|(")+")|($)",m)}}return l.prototype.$setMaxTokenCount=function(u){o=u|0},l.prototype.$applyToken=function(u){var c=this.splitRegex.exec(u).slice(1),h=this.token.apply(this,c);if(typeof h=="string")return[{type:h,value:u}];for(var d=[],f=0,p=h.length;fv){var O=u.substring(v,k-T.length);D.type==C?D.value+=O:(D.type&&b.push(D),D={type:C,value:O})}for(var P=0;Po){for(E>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:u});v1&&h[0]!==d&&h.unshift("#tmp",d),{tokens:b,state:h.length?h:d}},l}();a.prototype.reportError=s,n.Tokenizer=a}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(r,n,i){var s=r("../lib/deep_copy").deepCopy,o;o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,c){if(!c){for(var h in u)this.$rules[h]=u[h];return}for(var h in u){for(var d=u[h],f=0;f=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},a.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},a.prototype.getCurrentTokenRow=function(){return this.$row},a.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,u=this.$tokenIndex,c=l[u].start;if(c!==void 0)return c;for(c=0;u>0;)u-=1,c+=l[u].value.length;return c},a.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},a.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new s(this.$row,u,this.$row,u+l.value.length)},a}();n.TokenIterator=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,a=r("../../token_iterator").TokenIterator,l=r("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h,d={},f={'"':'"',"'":"'"},p=function(b){var v=-1;if(b.multiSelect&&(v=b.selection.index,d.rangeCount!=b.multiSelect.rangeCount&&(d={rangeCount:b.multiSelect.rangeCount})),d[v])return h=d[v];h=d[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(b,v,E,D){var C=b.end.row-b.start.row;return{text:E+v+D,selection:[0,b.start.column+1,C,b.end.column+(C?0:1)]}},y;y=function(b){b=b||{},this.add("braces","insertion",function(v,E,D,C,w){var T=D.getCursorPosition(),k=C.doc.getLine(T.row);if(w=="{"){p(D);var O=D.getSelectionRange(),P=C.doc.getTextRange(O),I=C.getTokenAt(T.row,T.column);if(P!==""&&P!=="{"&&D.getWrapBehavioursEnabled())return m(O,P,"{","}");if(I&&/(?:string)\.quasi|\.xml/.test(I.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(U){return U.test(I.type)})||/(string)\.quasi/.test(I.type)&&I.value[T.column-I.start-1]!=="$"?void 0:(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]})}else if(y.isSaneInsertion(D,C))return/[\]\}\)]/.test(k[T.column])||D.inMultiSelectMode||b.braces?(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(D,C,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){p(D);var L=k.substring(T.column,T.column+1);if(L=="}"){var _=C.$findOpeningBracket("}",{column:T.column+1,row:T.row});if(_!==null&&y.isAutoInsertedClosing(T,k,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==` `||w==`\r -`){p(D);var T="";y.isMaybeInsertedClosing(A,$)&&(T=l.stringRepeat("}",h.maybeInsertedBrackets),y.clearMaybeInsertedClosing());var L=$.substring(A.column,A.column+1);if(L==="}"){var M=C.findMatchingBracket({row:A.row,column:A.column+1},"}");if(!M)return null;var R=this.$getIndent(C.getLine(M.row))}else if(T)var R=this.$getIndent($);else{y.clearMaybeInsertedClosing();return}var B=R+C.getTabString();return{text:` +`){p(D);var A="";y.isMaybeInsertedClosing(T,k)&&(A=l.stringRepeat("}",h.maybeInsertedBrackets),y.clearMaybeInsertedClosing());var L=k.substring(T.column,T.column+1);if(L==="}"){var M=C.findMatchingBracket({row:T.row,column:T.column+1},"}");if(!M)return null;var R=this.$getIndent(C.getLine(M.row))}else if(A)var R=this.$getIndent(k);else{y.clearMaybeInsertedClosing();return}var B=R+C.getTabString();return{text:` `+B+` -`+R+T,selection:[1,B.length,1,B.length]}}else y.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,E,D,C,w){var A=C.doc.getTextRange(w);if(!w.isMultiLine()&&A=="{"){p(D);var $=C.doc.getLine(w.start.row),O=$.substring(w.end.column,w.end.column+1);if(O=="}")return w.end.column++,w;h.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,E,D,C,w){if(w=="("){p(D);var A=D.getSelectionRange(),$=C.doc.getTextRange(A);if($!==""&&D.getWrapBehavioursEnabled())return m(A,$,"(",")");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,")"),{text:"()",selection:[1,1]}}else if(w==")"){p(D);var O=D.getCursorPosition(),P=C.doc.getLine(O.row),N=P.substring(O.column,O.column+1);if(N==")"){var F=C.$findOpeningBracket(")",{column:O.column+1,row:O.row});if(F!==null&&y.isAutoInsertedClosing(O,P,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,E,D,C,w){var A=C.doc.getTextRange(w);if(!w.isMultiLine()&&A=="("){p(D);var $=C.doc.getLine(w.start.row),O=$.substring(w.start.column+1,w.start.column+2);if(O==")")return w.end.column++,w}}),this.add("brackets","insertion",function(v,E,D,C,w){if(w=="["){p(D);var A=D.getSelectionRange(),$=C.doc.getTextRange(A);if($!==""&&D.getWrapBehavioursEnabled())return m(A,$,"[","]");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){p(D);var O=D.getCursorPosition(),P=C.doc.getLine(O.row),N=P.substring(O.column,O.column+1);if(N=="]"){var F=C.$findOpeningBracket("]",{column:O.column+1,row:O.row});if(F!==null&&y.isAutoInsertedClosing(O,P,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,E,D,C,w){var A=C.doc.getTextRange(w);if(!w.isMultiLine()&&A=="["){p(D);var $=C.doc.getLine(w.start.row),O=$.substring(w.start.column+1,w.start.column+2);if(O=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(v,E,D,C,w){var A=C.$mode.$quotes||f;if(w.length==1&&A[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;p(D);var $=w,O=D.getSelectionRange(),P=C.doc.getTextRange(O);if(P!==""&&(P.length!=1||!A[P])&&D.getWrapBehavioursEnabled())return m(O,P,$,$);if(!P){var N=D.getCursorPosition(),F=C.doc.getLine(N.row),L=F.substring(N.column-1,N.column),k=F.substring(N.column,N.column+1),T=C.getTokenAt(N.row,N.column),M=C.getTokenAt(N.row,N.column+1);if(L=="\\"&&T&&/escape/.test(T.type))return null;var R=T&&/string|escape/.test(T.type),B=!M||/string|escape/.test(M.type),U;if(k==$)U=R!==B,U&&/string\.end/.test(M.type)&&(U=!1);else{if(R&&!B||R&&B)return null;var V=C.$mode.tokenRe;V.lastIndex=0;var K=V.test(L);V.lastIndex=0;var J=V.test(k),G=C.$mode.$pairQuotesAfter,Y=G&&G[$]&&G[$].test(L);if(!Y&&K||J||k&&!/[\s;,.})\]\\]/.test(k))return null;var Q=F[N.column-2];if(L==$&&(Q==$||V.test(Q)))return null;U=!0}return{text:U?$+$:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,E,D,C,w){var A=C.$mode.$quotes||f,$=C.doc.getTextRange(w);if(!w.isMultiLine()&&A.hasOwnProperty($)){p(D);var O=C.doc.getLine(w.start.row),P=O.substring(w.start.column+1,w.start.column+2);if(P==$)return w.end.column++,w}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,E,D,C,w){if(v==="doc-start"&&(w===` +`+R+A,selection:[1,B.length,1,B.length]}}else y.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="{"){p(D);var k=C.doc.getLine(w.start.row),O=k.substring(w.end.column,w.end.column+1);if(O=="}")return w.end.column++,w;h.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,E,D,C,w){if(w=="("){p(D);var T=D.getSelectionRange(),k=C.doc.getTextRange(T);if(k!==""&&D.getWrapBehavioursEnabled())return m(T,k,"(",")");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,")"),{text:"()",selection:[1,1]}}else if(w==")"){p(D);var O=D.getCursorPosition(),P=C.doc.getLine(O.row),I=P.substring(O.column,O.column+1);if(I==")"){var F=C.$findOpeningBracket(")",{column:O.column+1,row:O.row});if(F!==null&&y.isAutoInsertedClosing(O,P,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="("){p(D);var k=C.doc.getLine(w.start.row),O=k.substring(w.start.column+1,w.start.column+2);if(O==")")return w.end.column++,w}}),this.add("brackets","insertion",function(v,E,D,C,w){if(w=="["){p(D);var T=D.getSelectionRange(),k=C.doc.getTextRange(T);if(k!==""&&D.getWrapBehavioursEnabled())return m(T,k,"[","]");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){p(D);var O=D.getCursorPosition(),P=C.doc.getLine(O.row),I=P.substring(O.column,O.column+1);if(I=="]"){var F=C.$findOpeningBracket("]",{column:O.column+1,row:O.row});if(F!==null&&y.isAutoInsertedClosing(O,P,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="["){p(D);var k=C.doc.getLine(w.start.row),O=k.substring(w.start.column+1,w.start.column+2);if(O=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(v,E,D,C,w){var T=C.$mode.$quotes||f;if(w.length==1&&T[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;p(D);var k=w,O=D.getSelectionRange(),P=C.doc.getTextRange(O);if(P!==""&&(P.length!=1||!T[P])&&D.getWrapBehavioursEnabled())return m(O,P,k,k);if(!P){var I=D.getCursorPosition(),F=C.doc.getLine(I.row),L=F.substring(I.column-1,I.column),_=F.substring(I.column,I.column+1),A=C.getTokenAt(I.row,I.column),M=C.getTokenAt(I.row,I.column+1);if(L=="\\"&&A&&/escape/.test(A.type))return null;var R=A&&/string|escape/.test(A.type),B=!M||/string|escape/.test(M.type),U;if(_==k)U=R!==B,U&&/string\.end/.test(M.type)&&(U=!1);else{if(R&&!B||R&&B)return null;var V=C.$mode.tokenRe;V.lastIndex=0;var K=V.test(L);V.lastIndex=0;var J=V.test(_),G=C.$mode.$pairQuotesAfter,Y=G&&G[k]&&G[k].test(L);if(!Y&&K||J||_&&!/[\s;,.})\]\\]/.test(_))return null;var Q=F[I.column-2];if(L==k&&(Q==k||V.test(Q)))return null;U=!0}return{text:U?k+k:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,E,D,C,w){var T=C.$mode.$quotes||f,k=C.doc.getTextRange(w);if(!w.isMultiLine()&&T.hasOwnProperty(k)){p(D);var O=C.doc.getLine(w.start.row),P=O.substring(w.start.column+1,w.start.column+2);if(P==k)return w.end.column++,w}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,E,D,C,w){if(v==="doc-start"&&(w===` `||w===`\r -`)&&D.selection.isEmpty()){var A=D.getCursorPosition();if(A.column===0)return;for(var $=C.doc.getLine(A.row),O=C.doc.getLine(A.row+1),P=C.getTokens(A.row),N=0,F=0;F=A.column){if(N===A.column){if(!/\.doc/.test(L.type))return;if(/\*\//.test(L.value)){var k=P[F+1];if(!k||!/\.doc/.test(k.type))return}}var T=A.column-(N-L.value.length),M=L.value.indexOf("*/"),R=L.value.indexOf("/**",M>-1?M+2:0);if(R!==-1&&T>R&&T=M&&T<=R||!/\.doc/.test(L.type))return;break}}var B=this.$getIndent($);if(/\s*\*/.test(O))return/^\s*\*/.test($)?{text:w+B+"* ",selection:[1,2+B.length,1,2+B.length]}:{text:w+B+" * ",selection:[1,3+B.length,1,3+B.length]};if(/\/\*\*/.test($.substring(0,A.column)))return{text:w+B+" * "+w+" "+B+"*/",selection:[1,4+B.length,1,4+B.length]}}})},y.isSaneInsertion=function(b,v){var E=b.getCursorPosition(),D=new a(v,E.row,E.column);if(!this.$matchTokenType(D.getCurrentToken()||"text",u)){if(/[)}\]]/.test(b.session.getLine(E.row)[E.column]))return!0;var C=new a(v,E.row,E.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",u))return!1}return D.stepForward(),D.getCurrentTokenRow()!==E.row||this.$matchTokenType(D.getCurrentToken()||"text",c)},y.$matchTokenType=function(b,v){return v.indexOf(b.type||b)>-1},y.recordAutoInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isAutoInsertedClosing(D,C,h.autoInsertedLineEnd[0])||(h.autoInsertedBrackets=0),h.autoInsertedRow=D.row,h.autoInsertedLineEnd=E+C.substr(D.column),h.autoInsertedBrackets++},y.recordMaybeInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isMaybeInsertedClosing(D,C)||(h.maybeInsertedBrackets=0),h.maybeInsertedRow=D.row,h.maybeInsertedLineStart=C.substr(0,D.column)+E,h.maybeInsertedLineEnd=C.substr(D.column),h.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(b,v,E){return h.autoInsertedBrackets>0&&b.row===h.autoInsertedRow&&E===h.autoInsertedLineEnd[0]&&v.substr(b.column)===h.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(b,v){return h.maybeInsertedBrackets>0&&b.row===h.maybeInsertedRow&&v.substr(b.column)===h.maybeInsertedLineEnd&&v.substr(0,b.column)==h.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){h.autoInsertedLineEnd=h.autoInsertedLineEnd.substr(1),h.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){h&&(h.maybeInsertedBrackets=0,h.maybeInsertedRow=-1)},s.inherits(y,o),n.CstyleBehaviour=y}),ace.define("ace/unicode",["require","exports","module"],function(r,n,i){for(var s=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,a=[],l=0;l2?Q%w!=w-1:Q%w==0}}else{if(!this.blockComment)return!1;var $=this.blockComment.start,O=this.blockComment.end,P=new RegExp("^(\\s*)(?:"+c.escapeRegExp($)+")"),N=new RegExp("(?:"+c.escapeRegExp(O)+")\\s*$"),F=function(U,V){k(U,V)||(!E||/\S/.test(U))&&(v.insertInLine({row:V,column:U.length},O),v.insertInLine({row:V,column:C},$))},L=function(U,V){var K;(K=U.match(N))&&v.removeInLine(V,U.length-K[0].length,U.length),(K=U.match(P))&&v.removeInLine(V,K[1].length,K[0].length)},k=function(U,V){if(P.test(U))return!0;for(var K=m.getTokens(V),J=0;JU.length&&(B=U.length)}),C==1/0&&(C=B,E=!1,D=!1),A&&C%w!=0&&(C=Math.floor(C/w)*w),R(D?L:F)},this.toggleBlockComment=function(p,m,y,b){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var E=new h(m,b.row,b.column),D=E.getCurrentToken();m.selection;var C=m.selection.toOrientedRange(),w,A;if(D&&/comment/.test(D.type)){for(var $,O;D&&/comment/.test(D.type);){var P=D.value.indexOf(v.start);if(P!=-1){var N=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+P;$=new d(N,F,N,F+v.start.length);break}D=E.stepBackward()}for(var E=new h(m,b.row,b.column),D=E.getCurrentToken();D&&/comment/.test(D.type);){var P=D.value.indexOf(v.end);if(P!=-1){var N=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+P;O=new d(N,F,N,F+v.end.length);break}D=E.stepForward()}O&&m.remove(O),$&&(m.remove($),w=$.start.row,A=-v.start.length)}else A=v.start.length,w=y.start.row,m.insert(y.end,v.end),m.insert(y.start,v.start);C.start.row==w&&(C.start.column+=A),C.end.row==w&&(C.end.column+=A),m.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(p,m,y){return this.$getIndent(m)},this.checkOutdent=function(p,m,y){return!1},this.autoOutdent=function(p,m,y){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var m in p)if(p[m]){var y=p[m],b=y.prototype.$id,v=s.$modes[b];v||(s.$modes[b]=v=new y),s.$modes[m]||(s.$modes[m]=v),this.$embeds.push(m),this.$modes[m]=v}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],D=function(w){(function(A){var $=E[w],O=A[$];A[E[w]]=function(){return this.$delegator($,arguments,O)}})(C)},C=this,m=0;mthis.row)){var d=u(h,{row:this.row,column:this.column},this.$insertRight);this.setPosition(d.row,d.column,!0)}},c.prototype.setPosition=function(h,d,f){var p;if(f?p={row:h,column:d}:p=this.$clipPositionToDocument(h,d),!(this.row==p.row&&this.column==p.column)){var m={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:m,value:p})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(h){this.document=h||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(h,d){var f={};return h>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):h<0?(f.row=0,f.column=0):(f.row=h,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,d))),d<0&&(f.column=0),f},c}();a.prototype.$insertRight=!1,s.implement(a.prototype,o);function l(c,h,d){var f=d?c.column<=h.column:c.column=T.column){if(I===T.column){if(!/\.doc/.test(L.type))return;if(/\*\//.test(L.value)){var _=P[F+1];if(!_||!/\.doc/.test(_.type))return}}var A=T.column-(I-L.value.length),M=L.value.indexOf("*/"),R=L.value.indexOf("/**",M>-1?M+2:0);if(R!==-1&&A>R&&A=M&&A<=R||!/\.doc/.test(L.type))return;break}}var B=this.$getIndent(k);if(/\s*\*/.test(O))return/^\s*\*/.test(k)?{text:w+B+"* ",selection:[1,2+B.length,1,2+B.length]}:{text:w+B+" * ",selection:[1,3+B.length,1,3+B.length]};if(/\/\*\*/.test(k.substring(0,T.column)))return{text:w+B+" * "+w+" "+B+"*/",selection:[1,4+B.length,1,4+B.length]}}})},y.isSaneInsertion=function(b,v){var E=b.getCursorPosition(),D=new a(v,E.row,E.column);if(!this.$matchTokenType(D.getCurrentToken()||"text",u)){if(/[)}\]]/.test(b.session.getLine(E.row)[E.column]))return!0;var C=new a(v,E.row,E.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",u))return!1}return D.stepForward(),D.getCurrentTokenRow()!==E.row||this.$matchTokenType(D.getCurrentToken()||"text",c)},y.$matchTokenType=function(b,v){return v.indexOf(b.type||b)>-1},y.recordAutoInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isAutoInsertedClosing(D,C,h.autoInsertedLineEnd[0])||(h.autoInsertedBrackets=0),h.autoInsertedRow=D.row,h.autoInsertedLineEnd=E+C.substr(D.column),h.autoInsertedBrackets++},y.recordMaybeInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isMaybeInsertedClosing(D,C)||(h.maybeInsertedBrackets=0),h.maybeInsertedRow=D.row,h.maybeInsertedLineStart=C.substr(0,D.column)+E,h.maybeInsertedLineEnd=C.substr(D.column),h.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(b,v,E){return h.autoInsertedBrackets>0&&b.row===h.autoInsertedRow&&E===h.autoInsertedLineEnd[0]&&v.substr(b.column)===h.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(b,v){return h.maybeInsertedBrackets>0&&b.row===h.maybeInsertedRow&&v.substr(b.column)===h.maybeInsertedLineEnd&&v.substr(0,b.column)==h.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){h.autoInsertedLineEnd=h.autoInsertedLineEnd.substr(1),h.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){h&&(h.maybeInsertedBrackets=0,h.maybeInsertedRow=-1)},s.inherits(y,o),n.CstyleBehaviour=y}),ace.define("ace/unicode",["require","exports","module"],function(r,n,i){for(var s=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,a=[],l=0;l2?Q%w!=w-1:Q%w==0}}else{if(!this.blockComment)return!1;var k=this.blockComment.start,O=this.blockComment.end,P=new RegExp("^(\\s*)(?:"+c.escapeRegExp(k)+")"),I=new RegExp("(?:"+c.escapeRegExp(O)+")\\s*$"),F=function(U,V){_(U,V)||(!E||/\S/.test(U))&&(v.insertInLine({row:V,column:U.length},O),v.insertInLine({row:V,column:C},k))},L=function(U,V){var K;(K=U.match(I))&&v.removeInLine(V,U.length-K[0].length,U.length),(K=U.match(P))&&v.removeInLine(V,K[1].length,K[0].length)},_=function(U,V){if(P.test(U))return!0;for(var K=m.getTokens(V),J=0;JU.length&&(B=U.length)}),C==1/0&&(C=B,E=!1,D=!1),T&&C%w!=0&&(C=Math.floor(C/w)*w),R(D?L:F)},this.toggleBlockComment=function(p,m,y,b){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var E=new h(m,b.row,b.column),D=E.getCurrentToken();m.selection;var C=m.selection.toOrientedRange(),w,T;if(D&&/comment/.test(D.type)){for(var k,O;D&&/comment/.test(D.type);){var P=D.value.indexOf(v.start);if(P!=-1){var I=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+P;k=new d(I,F,I,F+v.start.length);break}D=E.stepBackward()}for(var E=new h(m,b.row,b.column),D=E.getCurrentToken();D&&/comment/.test(D.type);){var P=D.value.indexOf(v.end);if(P!=-1){var I=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+P;O=new d(I,F,I,F+v.end.length);break}D=E.stepForward()}O&&m.remove(O),k&&(m.remove(k),w=k.start.row,T=-v.start.length)}else T=v.start.length,w=y.start.row,m.insert(y.end,v.end),m.insert(y.start,v.start);C.start.row==w&&(C.start.column+=T),C.end.row==w&&(C.end.column+=T),m.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(p,m,y){return this.$getIndent(m)},this.checkOutdent=function(p,m,y){return!1},this.autoOutdent=function(p,m,y){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var m in p)if(p[m]){var y=p[m],b=y.prototype.$id,v=s.$modes[b];v||(s.$modes[b]=v=new y),s.$modes[m]||(s.$modes[m]=v),this.$embeds.push(m),this.$modes[m]=v}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],D=function(w){(function(T){var k=E[w],O=T[k];T[E[w]]=function(){return this.$delegator(k,arguments,O)}})(C)},C=this,m=0;mthis.row)){var d=u(h,{row:this.row,column:this.column},this.$insertRight);this.setPosition(d.row,d.column,!0)}},c.prototype.setPosition=function(h,d,f){var p;if(f?p={row:h,column:d}:p=this.$clipPositionToDocument(h,d),!(this.row==p.row&&this.column==p.column)){var m={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:m,value:p})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(h){this.document=h||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(h,d){var f={};return h>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):h<0?(f.row=0,f.column=0):(f.row=h,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,d))),d<0&&(f.column=0),f},c}();a.prototype.$insertRight=!1,s.implement(a.prototype,o);function l(c,h,d){var f=d?c.column<=h.column:c.column=p&&(d=p-1,f=void 0);var m=this.getLine(d);return f==null&&(f=m.length),f=Math.min(Math.max(f,0),m.length),{row:d,column:f}},h.prototype.clonePos=function(d){return{row:d.row,column:d.column}},h.prototype.pos=function(d,f){return{row:d,column:f}},h.prototype.$clipPosition=function(d){var f=this.getLength();return d.row>=f?(d.row=Math.max(0,f-1),d.column=this.getLine(f-1).length):(d.row=Math.max(0,d.row),d.column=Math.min(Math.max(d.column,0),this.getLine(d.row).length)),d},h.prototype.insertFullLines=function(d,f){d=Math.min(Math.max(d,0),this.getLength());var p=0;d0,m=f=0&&this.applyDelta({start:this.pos(d,this.getLine(d).length),end:this.pos(d+1,0),action:"remove",lines:["",""]})},h.prototype.replace=function(d,f){if(d instanceof l||(d=l.fromPoints(d.start,d.end)),f.length===0&&d.isEmpty())return d.start;if(f==this.getTextRange(d))return d.end;this.remove(d);var p;return f?p=this.insert(d.start,f):p=d.start,p},h.prototype.applyDeltas=function(d){for(var f=0;f=0;f--)this.revertDelta(d[f])},h.prototype.applyDelta=function(d,f){var p=d.action=="insert";(p?d.lines.length<=1&&!d.lines[0]:!l.comparePoints(d.start,d.end))||(p&&d.lines.length>2e4?this.$splitAndapplyLargeDelta(d,2e4):(o(this.$lines,d,f),this._signal("change",d)))},h.prototype.$safeApplyDelta=function(d){var f=this.$lines.length;(d.action=="remove"&&d.start.row20){h.running=setTimeout(h.$worker,20);break}}h.currentLine=f,p==-1&&(p=f),y<=p&&h.fireUpdateEvent(y,p)}}}return l.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(u,c){var h={first:u,last:c};this._signal("update",{data:h})},l.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(u){var c=u.start.row,h=u.end.row-c;if(h===0)this.lines[c]=null;else if(u.action=="remove")this.lines.splice(c,h+1,null),this.states.splice(c,h+1,null);else{var d=Array(h+1);d.unshift(c,1),this.lines.splice.apply(this.lines,d),this.states.splice.apply(this.states,d)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},l.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},l.prototype.$tokenizeRow=function(u){var c=this.doc.getLine(u),h=this.states[u-1],d=this.tokenizer.getLineTokens(c,h,u);return this.states[u]+""!=d.state+""?(this.states[u]=d.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=d.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();s.implement(a.prototype,o),n.BackgroundTokenizer=a}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./range").Range,a=function(){function l(u,c,h){h===void 0&&(h="text"),this.setRegexp(u),this.clazz=c,this.type=h}return l.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},l.prototype.update=function(u,c,h,d){if(this.regExp)for(var f=d.firstRow,p=d.lastRow,m={},y=f;y<=p;y++){var b=this.cache[y];b==null&&(b=s.getMatchOffsets(h.getLine(y),this.regExp),b.length>this.MAX_RANGES&&(b=b.slice(0,this.MAX_RANGES)),b=b.map(function(C){return new o(y,C.offset,y,C.offset+C.length)}),this.cache[y]=b.length?b:"");for(var v=b.length;v--;){var E=b[v].toScreenRange(h),D=E.toString();m[D]||(m[D]=!0,c.drawSingleLineMarker(u,E,this.clazz,d))}}},l}();a.prototype.MAX_RANGES=500,n.SearchHighlight=a}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(r,n,i){var s=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(w){this.$session=w},C.prototype.add=function(w,A,$){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),A===!1||!this.lastDeltas){this.lastDeltas=[];var O=this.$undoStack.length;O>this.$undoDepth-1&&this.$undoStack.splice(0,O-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},C.prototype.addSelection=function(w,A){this.selections.push({value:w,rev:A||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(w,A){A==null&&(A=this.$rev+1);for(var $=this.$undoStack,O=$.length;O--;){var P=$[O][0];if(P.id<=w)break;P.id0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},C.prototype.$prettyPrint=function(w){return w?h(w):h(this.$undoStack)+` +`},h.prototype.getLine=function(d){return this.$lines[d]||""},h.prototype.getLines=function(d,f){return this.$lines.slice(d,f+1)},h.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},h.prototype.getLength=function(){return this.$lines.length},h.prototype.getTextRange=function(d){return this.getLinesForRange(d).join(this.getNewLineCharacter())},h.prototype.getLinesForRange=function(d){var f;if(d.start.row===d.end.row)f=[this.getLine(d.start.row).substring(d.start.column,d.end.column)];else{f=this.getLines(d.start.row,d.end.row),f[0]=(f[0]||"").substring(d.start.column);var p=f.length-1;d.end.row-d.start.row==p&&(f[p]=f[p].substring(0,d.end.column))}return f},h.prototype.insertLines=function(d,f){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(d,f)},h.prototype.removeLines=function(d,f){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(d,f)},h.prototype.insertNewLine=function(d){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(d,["",""])},h.prototype.insert=function(d,f){return this.getLength()<=1&&this.$detectNewLine(f),this.insertMergedLines(d,this.$split(f))},h.prototype.insertInLine=function(d,f){var p=this.clippedPos(d.row,d.column),m=this.pos(d.row,d.column+f.length);return this.applyDelta({start:p,end:m,action:"insert",lines:[f]},!0),this.clonePos(m)},h.prototype.clippedPos=function(d,f){var p=this.getLength();d===void 0?d=p:d<0?d=0:d>=p&&(d=p-1,f=void 0);var m=this.getLine(d);return f==null&&(f=m.length),f=Math.min(Math.max(f,0),m.length),{row:d,column:f}},h.prototype.clonePos=function(d){return{row:d.row,column:d.column}},h.prototype.pos=function(d,f){return{row:d,column:f}},h.prototype.$clipPosition=function(d){var f=this.getLength();return d.row>=f?(d.row=Math.max(0,f-1),d.column=this.getLine(f-1).length):(d.row=Math.max(0,d.row),d.column=Math.min(Math.max(d.column,0),this.getLine(d.row).length)),d},h.prototype.insertFullLines=function(d,f){d=Math.min(Math.max(d,0),this.getLength());var p=0;d0,m=f=0&&this.applyDelta({start:this.pos(d,this.getLine(d).length),end:this.pos(d+1,0),action:"remove",lines:["",""]})},h.prototype.replace=function(d,f){if(d instanceof l||(d=l.fromPoints(d.start,d.end)),f.length===0&&d.isEmpty())return d.start;if(f==this.getTextRange(d))return d.end;this.remove(d);var p;return f?p=this.insert(d.start,f):p=d.start,p},h.prototype.applyDeltas=function(d){for(var f=0;f=0;f--)this.revertDelta(d[f])},h.prototype.applyDelta=function(d,f){var p=d.action=="insert";(p?d.lines.length<=1&&!d.lines[0]:!l.comparePoints(d.start,d.end))||(p&&d.lines.length>2e4?this.$splitAndapplyLargeDelta(d,2e4):(o(this.$lines,d,f),this._signal("change",d)))},h.prototype.$safeApplyDelta=function(d){var f=this.$lines.length;(d.action=="remove"&&d.start.row20){h.running=setTimeout(h.$worker,20);break}}h.currentLine=f,p==-1&&(p=f),y<=p&&h.fireUpdateEvent(y,p)}}}return l.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(u,c){var h={first:u,last:c};this._signal("update",{data:h})},l.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(u){var c=u.start.row,h=u.end.row-c;if(h===0)this.lines[c]=null;else if(u.action=="remove")this.lines.splice(c,h+1,null),this.states.splice(c,h+1,null);else{var d=Array(h+1);d.unshift(c,1),this.lines.splice.apply(this.lines,d),this.states.splice.apply(this.states,d)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},l.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},l.prototype.$tokenizeRow=function(u){var c=this.doc.getLine(u),h=this.states[u-1],d=this.tokenizer.getLineTokens(c,h,u);return this.states[u]+""!=d.state+""?(this.states[u]=d.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=d.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();s.implement(a.prototype,o),n.BackgroundTokenizer=a}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./range").Range,a=function(){function l(u,c,h){h===void 0&&(h="text"),this.setRegexp(u),this.clazz=c,this.type=h}return l.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},l.prototype.update=function(u,c,h,d){if(this.regExp)for(var f=d.firstRow,p=d.lastRow,m={},y=f;y<=p;y++){var b=this.cache[y];b==null&&(b=s.getMatchOffsets(h.getLine(y),this.regExp),b.length>this.MAX_RANGES&&(b=b.slice(0,this.MAX_RANGES)),b=b.map(function(C){return new o(y,C.offset,y,C.offset+C.length)}),this.cache[y]=b.length?b:"");for(var v=b.length;v--;){var E=b[v].toScreenRange(h),D=E.toString();m[D]||(m[D]=!0,c.drawSingleLineMarker(u,E,this.clazz,d))}}},l}();a.prototype.MAX_RANGES=500,n.SearchHighlight=a}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(r,n,i){var s=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(w){this.$session=w},C.prototype.add=function(w,T,k){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),T===!1||!this.lastDeltas){this.lastDeltas=[];var O=this.$undoStack.length;O>this.$undoDepth-1&&this.$undoStack.splice(0,O-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},C.prototype.addSelection=function(w,T){this.selections.push({value:w,rev:T||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(w,T){T==null&&(T=this.$rev+1);for(var k=this.$undoStack,O=k.length;O--;){var P=k[O][0];if(P.id<=w)break;P.id0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},C.prototype.$prettyPrint=function(w){return w?h(w):h(this.$undoStack)+` --- -`+h(this.$redoStack)},C}();s.prototype.hasUndo=s.prototype.canUndo,s.prototype.hasRedo=s.prototype.canRedo,s.prototype.isClean=s.prototype.isAtBookmark,s.prototype.markClean=s.prototype.bookmark;function o(C,w){for(var A=w;A--;){var $=C[A];if($&&!$[0].ignore){for(;A"+C.end.row+":"+C.end.column}function f(C,w){var A=C.action=="insert",$=w.action=="insert";if(A&&$)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.start,C.start)<=0)y(C,w,1);else return null;else if(A&&!$)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.end,C.start)<=0)y(C,w,-1);else return null;else if(!A&&$)if(l(w.start,C.start)>=0)y(w,C,1);else if(l(w.start,C.start)<=0)y(C,w,1);else return null;else if(!A&&!$)if(l(w.start,C.start)>=0)y(w,C,1);else if(l(w.end,C.start)<=0)y(C,w,-1);else return null;return[w,C]}function p(C,w){for(var A=C.length;A--;)for(var $=0;$=0?y(C,w,-1):(l(C.start,w.start)<=0||y(C,a.fromPoints(w.start,C.start),-1),y(w,C,1));else if(!A&&$)l(w.start,C.end)>=0?y(w,C,-1):(l(w.start,C.start)<=0||y(w,a.fromPoints(C.start,w.start),-1),y(C,w,1));else if(!A&&!$)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.end,C.start)<=0)y(C,w,-1);else{var O,P;return l(C.start,w.start)<0&&(O=C,C=v(C,w.start)),l(C.end,w.end)>0&&(P=v(C,w.end)),b(w.end,C.start,C.end,-1),P&&!O&&(C.lines=P.lines,C.start=P.start,C.end=P.end,P=C),[w,O,P].filter(Boolean)}return[w,C]}function y(C,w,A){b(C.start,w.start,w.end,A),b(C.end,w.start,w.end,A)}function b(C,w,A,$){C.row==($==1?w:A).row&&(C.column+=$*(A.column-w.column)),C.row+=$*(A.row-w.row)}function v(C,w){var A=C.lines,$=C.end;C.end=u(w);var O=C.end.row-C.start.row,P=A.splice(O,A.length),N=O?w.column:w.column-C.start.column;A.push(P[0].substring(0,N)),P[0]=P[0].substr(N);var F={start:u(w),end:$,lines:P,action:C.action};return F}function E(C,w){w=c(w);for(var A=C.length;A--;){for(var $=C[A],O=0;O<$.length;O++){var P=$[O],N=m(P,w);w=N[0],N.length!=2&&(N[2]?($.splice(O+1,1,N[1],N[2]),O++):N[1]||($.splice(O,1),O--))}$.length||C.splice(A,1)}return C}function D(C,w){for(var A=0;Athis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(u,c){return-u.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},a.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},a.prototype.walk=function(l,u,c){var h=0,d=this.folds,f,p,m,y=!0;u==null&&(u=this.end.row,c=this.end.column);for(var b=0;b0)){var y=o(u,p.start);return m===0?c&&y!==0?-f-2:f:y>0||y===0&&!c?f:-f-1}}return-f-1},l.prototype.add=function(u){var c=!u.isEmpty(),h=this.pointIndex(u.start,c);h<0&&(h=-h-1);var d=this.pointIndex(u.end,c,h);return d<0?d=-d-1:d++,this.ranges.splice(h,d-h,u)},l.prototype.addList=function(u){for(var c=[],h=u.length;h--;)c.push.apply(c,this.add(u[h]));return c},l.prototype.substractPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges.splice(c,1)},l.prototype.merge=function(){var u=[],c=this.ranges;c=c.sort(function(m,y){return o(m.start,y.start)});for(var h=c[0],d,f=1;f=0},l.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},l.prototype.rangeAtPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges[c]},l.prototype.clipRows=function(u,c){var h=this.ranges;if(h[0].start.row>c||h[h.length-1].start.row=d)break}if(u.action=="insert")for(var v=f-d,E=-c.column+h.column;md)break;if(b.start.row==d&&b.start.column>=c.column&&(b.start.column==c.column&&this.$bias<=0||(b.start.column+=E,b.start.row+=v)),b.end.row==d&&b.end.column>=c.column){if(b.end.column==c.column&&this.$bias<0)continue;b.end.column==c.column&&E>0&&mb.start.column&&b.end.column==p[m+1].start.column&&(b.end.column-=E),b.end.column+=E,b.end.row+=v}}else for(var v=d-f,E=c.column-h.column;mf)break;b.end.rowc.column)&&(b.end.column=c.column,b.end.row=c.row):(b.end.column+=E,b.end.row+=v):b.end.row>f&&(b.end.row+=v),b.start.rowc.column)&&(b.start.column=c.column,b.start.row=c.row):(b.start.column+=E,b.start.row+=v):b.start.row>f&&(b.start.row+=v)}if(v!=0&&m=h)return m;if(m.end.row>h)return null}return null},this.getNextFoldLine=function(h,d){var f=this.$foldData,p=0;for(d&&(p=f.indexOf(d)),p==-1&&(p=0),p;p=h)return m}return null},this.getFoldedRowCount=function(h,d){for(var f=this.$foldData,p=d-h+1,m=0;m=d){v=h?p-=d-v:p=0);break}else b>=h&&(v>=h?p-=b-v:p-=b-h+1)}return p},this.$addFoldLine=function(h){return this.$foldData.push(h),this.$foldData.sort(function(d,f){return d.start.row-f.start.row}),h},this.addFold=function(h,d){var f=this.$foldData,p=!1,m;h instanceof a?m=h:(m=new a(d,h),m.collapseChildren=d.collapseChildren),this.$clipRangeToDocument(m.range);var y=m.start.row,b=m.start.column,v=m.end.row,E=m.end.column,D=this.getFoldAt(y,b,1),C=this.getFoldAt(v,E,-1);if(D&&C==D)return D.addSubFold(m);D&&!D.range.isStart(y,b)&&this.removeFold(D),C&&!C.range.isEnd(v,E)&&this.removeFold(C);var w=this.getFoldsInRange(m.range);w.length>0&&(this.removeFolds(w),m.collapseChildren||w.forEach(function(P){m.addSubFold(P)}));for(var A=0;A0&&this.foldAll(h.start.row+1,h.end.row,h.collapseChildren-1),h.subFolds=[]},this.expandFolds=function(h){h.forEach(function(d){this.expandFold(d)},this)},this.unfold=function(h,d){var f,p;if(h==null)f=new s(0,0,this.getLength(),0),d==null&&(d=!0);else if(typeof h=="number")f=new s(h,0,h,this.getLine(h).length);else if("row"in h)f=s.fromPoints(h,h);else{if(Array.isArray(h))return p=[],h.forEach(function(y){p=p.concat(this.unfold(y))},this),p;f=h}p=this.getFoldsInRangeList(f);for(var m=p;p.length==1&&s.comparePoints(p[0].start,f.start)<0&&s.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(d!=!1?this.removeFolds(p):this.expandFolds(p),m.length)return m},this.isRowFolded=function(h,d){return!!this.getFoldLine(h,d)},this.getRowFoldEnd=function(h,d){var f=this.getFoldLine(h,d);return f?f.end.row:h},this.getRowFoldStart=function(h,d){var f=this.getFoldLine(h,d);return f?f.start.row:h},this.getFoldDisplayLine=function(h,d,f,p,m){p==null&&(p=h.start.row),m==null&&(m=0),d==null&&(d=h.end.row),f==null&&(f=this.getLine(d).length);var y=this.doc,b="";return h.walk(function(v,E,D,C){if(!(ED)break;while(m&&b.test(m.type));m=p.stepBackward()}else m=p.getCurrentToken();return v.end.row=p.getCurrentTokenRow(),v.end.column=p.getCurrentTokenColumn(),v}},this.foldAll=function(h,d,f,p){f==null&&(f=1e5);var m=this.foldWidgets;if(m){d=d||this.getLength(),h=h||0;for(var y=h;y=h&&(y=b.end.row,b.collapseChildren=f,this.addFold("...",b))}}},this.foldToLevel=function(h){for(this.foldAll();h-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var h=this;this.foldAll(null,null,null,function(d){for(var f=h.getTokens(d),p=0;p=0;){var y=f[p];if(y==null&&(y=f[p]=this.getFoldWidget(p)),y=="start"){var b=this.getFoldWidgetRange(p);if(m||(m=b),b&&b.end.row>=h)break}p--}return{range:p!==-1&&b,firstRange:m}},this.onFoldWidgetClick=function(h,d){d instanceof u&&(d=d.domEvent);var f={children:d.shiftKey,all:d.ctrlKey||d.metaKey,siblings:d.altKey},p=this.$toggleFoldWidget(h,f);if(!p){var m=d.target||d.srcElement;m&&/ace_fold-widget/.test(m.className)&&(m.className+=" ace_invalid")}},this.$toggleFoldWidget=function(h,d){if(this.getFoldWidget){var f=this.getFoldWidget(h),p=this.getLine(h),m=f==="end"?-1:1,y=this.getFoldAt(h,m===-1?0:p.length,m);if(y)return d.children||d.all?this.removeFold(y):this.expandFold(y),y;var b=this.getFoldWidgetRange(h,!0);if(b&&!b.isMultiLine()&&(y=this.getFoldAt(b.start.row,b.start.column,1),y&&b.isEqual(y.range)))return this.removeFold(y),y;if(d.siblings){var v=this.getParentFoldRangeData(h);if(v.range)var E=v.range.start.row+1,D=v.range.end.row;this.foldAll(E,D,d.all?1e4:0)}else d.children?(D=b?b.end.row:this.getLength(),this.foldAll(h+1,D,d.all?1e4:0)):b&&(d.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(h){var d=this.selection.getCursor().row;d=this.getRowFoldStart(d);var f=this.$toggleFoldWidget(d,{});if(!f){var p=this.getParentFoldRangeData(d,!0);if(f=p.range||p.firstRange,f){d=f.start.row;var m=this.getFoldAt(d,this.getLine(d).length,1);m?this.removeFold(m):this.addFold("...",f)}}},this.updateFoldWidgets=function(h){var d=h.start.row,f=h.end.row-d;if(f===0)this.foldWidgets[d]=null;else if(h.action=="remove")this.foldWidgets.splice(d,f+1,null);else{var p=Array(f+1);p.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(h){var d=h.data;d.first!=d.last&&this.foldWidgets.length>d.first&&this.foldWidgets.splice(d.first,this.foldWidgets.length)}}n.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=r("../range").Range;function a(){this.findMatchingBracket=function(l,u){if(l.column==0)return null;var c=u||this.getLine(l.row).charAt(l.column-1);if(c=="")return null;var h=c.match(/([\(\[\{])|([\)\]\}])/);return h?h[1]?this.$findClosingBracket(h[1],l):this.$findOpeningBracket(h[2],l):null},this.getBracketRange=function(l){var u=this.getLine(l.row),c=!0,h,d=u.charAt(l.column-1),f=d&&d.match(/([\(\[\{])|([\)\]\}])/);if(f||(d=u.charAt(l.column),l={row:l.row,column:l.column+1},f=d&&d.match(/([\(\[\{])|([\)\]\}])/),c=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],l);if(!p)return null;h=o.fromPoints(l,p),c||(h.end.column++,h.start.column--),h.cursor=h.end}else{var p=this.$findOpeningBracket(f[2],l);if(!p)return null;h=o.fromPoints(p,l),c||(h.start.column++,h.end.column--),h.cursor=h.start}return h},this.getMatchingBracketRanges=function(l,u){var c=this.getLine(l.row),h=/([\(\[\{])|([\)\]\}])/,d=!u&&c.charAt(l.column-1),f=d&&d.match(h);if(f||(d=(u===void 0||u)&&c.charAt(l.column),l={row:l.row,column:l.column+1},f=d&&d.match(h)),!f)return null;var p=new o(l.row,l.column-1,l.row,l.column),m=f[1]?this.$findClosingBracket(f[1],l):this.$findOpeningBracket(f[2],l);if(!m)return[p];var y=new o(m.row,m.column,m.row,m.column+1);return[p,y]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,u,c){var h=this.$brackets[l],d=1,f=new s(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var m=u.column-f.getCurrentTokenColumn()-2,y=p.value;;){for(;m>=0;){var b=y.charAt(m);if(b==h){if(d-=1,d==0)return{row:f.getCurrentTokenRow(),column:m+f.getCurrentTokenColumn()}}else b==l&&(d+=1);m-=1}do p=f.stepBackward();while(p&&!c.test(p.type));if(p==null)break;y=p.value,m=y.length-1}return null}},this.$findClosingBracket=function(l,u,c){var h=this.$brackets[l],d=1,f=new s(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var m=u.column-f.getCurrentTokenColumn();;){for(var y=p.value,b=y.length;m"?h=!0:u.type.indexOf("tag-name")!==-1&&(c=!0));while(u&&!c);return u},this.$findClosingTag=function(l,u){var c,h=u.value,d=u.value,f=0,p=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);u=l.stepForward();var m=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length),y=!1;do{if(c=u,c.type.indexOf("tag-close")!==-1&&!y){var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(u=l.stepForward(),u){if(u.value===">"&&!y){var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(u.type.indexOf("tag-name")!==-1){if(h=u.value,d===h){if(c.value==="<")f++;else if(c.value==="")var D=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(d===h&&u.value==="/>"&&(f--,f<0))var v=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),E=v,D=E,b=new o(m.end.row,m.end.column,m.end.row,m.end.column+1)}}while(u&&f>=0);if(p&&b&&v&&D&&m&&E)return{openTag:new o(p.start.row,p.start.column,b.end.row,b.end.column),closeTag:new o(v.start.row,v.start.column,D.end.row,D.end.column),openTagName:m,closeTagName:E}},this.$findOpeningTag=function(l,u){var c=l.getCurrentToken(),h=u.value,d=0,f=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn(),m=p+2,y=new o(f,p,f,m);l.stepForward();var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=l.stepForward()),!(!u||u.value!==">")){var v=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(u=c,f=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn(),m=p+u.value.length,c=l.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(h===u.value)if(c.value==="<"){if(d++,d>0){var E=new o(f,p,f,m),D=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do u=l.stepForward();while(u&&u.value!==">");var C=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else c.value===""){for(var w=0,A=c;A;){if(A.type.indexOf("tag-name")!==-1&&A.value===h){d--;break}else if(A.value==="<")break;A=l.stepBackward(),w++}for(var $=0;$k&&(this.$docRowCache.splice(k,L),this.$screenRowCache.splice(k,L))},N.prototype.$getRowCacheIndex=function(F,L){for(var k=0,T=F.length-1;k<=T;){var M=k+T>>1,R=F[M];if(L>R)k=M+1;else if(L=L));R++);return T=k[R],T?(T.index=R,T.start=M-T.value.length,T):null},N.prototype.setUndoManager=function(F){if(this.$undoManager=F,this.$informUndoManager&&this.$informUndoManager.cancel(),F){var L=this;F.addSession(this),this.$syncInformUndoManager=function(){L.$informUndoManager.cancel(),L.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},N.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},N.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},N.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):" "},N.prototype.setUseSoftTabs=function(F){this.setOption("useSoftTabs",F)},N.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},N.prototype.setTabSize=function(F){this.setOption("tabSize",F)},N.prototype.getTabSize=function(){return this.$tabSize},N.prototype.isTabStop=function(F){return this.$useSoftTabs&&F.column%this.$tabSize===0},N.prototype.setNavigateWithinSoftTabs=function(F){this.setOption("navigateWithinSoftTabs",F)},N.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},N.prototype.setOverwrite=function(F){this.setOption("overwrite",F)},N.prototype.getOverwrite=function(){return this.$overwrite},N.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},N.prototype.addGutterDecoration=function(F,L){this.$decorations[F]||(this.$decorations[F]=""),this.$decorations[F]+=" "+L,this._signal("changeBreakpoint",{})},N.prototype.removeGutterDecoration=function(F,L){this.$decorations[F]=(this.$decorations[F]||"").replace(" "+L,""),this._signal("changeBreakpoint",{})},N.prototype.getBreakpoints=function(){return this.$breakpoints},N.prototype.setBreakpoints=function(F){this.$breakpoints=[];for(var L=0;L0&&(T=!!k.charAt(L-1).match(this.tokenRe)),T||(T=!!k.charAt(L).match(this.tokenRe)),T)var M=this.tokenRe;else if(/^\s+$/.test(k.slice(L-1,L+1)))var M=/\s/;else var M=this.nonTokenRe;var R=L;if(R>0){do R--;while(R>=0&&k.charAt(R).match(M));R++}for(var B=L;BF&&(F=L.screenWidth)}),this.lineWidgetWidth=F},N.prototype.$computeWidth=function(F){if(this.$modified||F){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var L=this.doc.getAllLines(),k=this.$rowLengthCache,T=0,M=0,R=this.$foldData[M],B=R?R.start.row:1/0,U=L.length,V=0;VB){if(V=R.end.row+1,V>=U)break;R=this.$foldData[M++],B=R?R.start.row:1/0}k[V]==null&&(k[V]=this.$getStringScreenWidth(L[V])[0]),k[V]>T&&(T=k[V])}this.screenWidth=T}},N.prototype.getLine=function(F){return this.doc.getLine(F)},N.prototype.getLines=function(F,L){return this.doc.getLines(F,L)},N.prototype.getLength=function(){return this.doc.getLength()},N.prototype.getTextRange=function(F){return this.doc.getTextRange(F||this.selection.getRange())},N.prototype.insert=function(F,L){return this.doc.insert(F,L)},N.prototype.remove=function(F){return this.doc.remove(F)},N.prototype.removeFullLines=function(F,L){return this.doc.removeFullLines(F,L)},N.prototype.undoChanges=function(F,L){if(F.length){this.$fromUndo=!0;for(var k=F.length-1;k!=-1;k--){var T=F[k];T.action=="insert"||T.action=="remove"?this.doc.revertDelta(T):T.folds&&this.addFolds(T.folds)}!L&&this.$undoSelect&&(F.selectionBefore?this.selection.fromJSON(F.selectionBefore):this.selection.setRange(this.$getUndoSelection(F,!0))),this.$fromUndo=!1}},N.prototype.redoChanges=function(F,L){if(F.length){this.$fromUndo=!0;for(var k=0;kF.end.column&&(R.start.column+=U),R.end.row==F.end.row&&R.end.column>F.end.column&&(R.end.column+=U)),B&&R.start.row>=F.end.row&&(R.start.row+=B,R.end.row+=B)}if(R.end=this.insert(R.start,T),M.length){var V=F.start,K=R.start,B=K.row-V.row,U=K.column-V.column;this.addFolds(M.map(function(Y){return Y=Y.clone(),Y.start.row==V.row&&(Y.start.column+=U),Y.end.row==V.row&&(Y.end.column+=U),Y.start.row+=B,Y.end.row+=B,Y}))}return R},N.prototype.indentRows=function(F,L,k){k=k.replace(/\t/g,this.getTabString());for(var T=F;T<=L;T++)this.doc.insertInLine({row:T,column:0},k)},N.prototype.outdentRows=function(F){for(var L=F.collapseRows(),k=new d(0,0,0,0),T=this.getTabSize(),M=L.start.row;M<=L.end.row;++M){var R=this.getLine(M);k.start.row=M,k.end.row=M;for(var B=0;B0){var T=this.getRowFoldEnd(L+k);if(T>this.doc.getLength()-1)return 0;var M=T-L}else{F=this.$clipRowToDocument(F),L=this.$clipRowToDocument(L);var M=L-F+1}var R=new d(F,0,L,Number.MAX_VALUE),B=this.getFoldsInRange(R).map(function(V){return V=V.clone(),V.start.row+=M,V.end.row+=M,V}),U=k==0?this.doc.getLines(F,L):this.doc.removeFullLines(F,L);return this.doc.insertFullLines(F+M,U),B.length&&this.addFolds(B),M},N.prototype.moveLinesUp=function(F,L){return this.$moveLines(F,L,-1)},N.prototype.moveLinesDown=function(F,L){return this.$moveLines(F,L,1)},N.prototype.duplicateLines=function(F,L){return this.$moveLines(F,L,0)},N.prototype.$clipRowToDocument=function(F){return Math.max(0,Math.min(F,this.doc.getLength()-1))},N.prototype.$clipColumnToRow=function(F,L){return L<0?0:Math.min(this.doc.getLine(F).length,L)},N.prototype.$clipPositionToDocument=function(F,L){if(L=Math.max(0,L),F<0)F=0,L=0;else{var k=this.doc.getLength();F>=k?(F=k-1,L=this.doc.getLine(k-1).length):L=Math.min(this.doc.getLine(F).length,L)}return{row:F,column:L}},N.prototype.$clipRangeToDocument=function(F){F.start.row<0?(F.start.row=0,F.start.column=0):F.start.column=this.$clipColumnToRow(F.start.row,F.start.column);var L=this.doc.getLength()-1;return F.end.row>L?(F.end.row=L,F.end.column=this.doc.getLine(L).length):F.end.column=this.$clipColumnToRow(F.end.row,F.end.column),F},N.prototype.setUseWrapMode=function(F){if(F!=this.$useWrapMode){if(this.$useWrapMode=F,this.$modified=!0,this.$resetRowCache(0),F){var L=this.getLength();this.$wrapData=Array(L),this.$updateWrapData(0,L-1)}this._signal("changeWrapMode")}},N.prototype.getUseWrapMode=function(){return this.$useWrapMode},N.prototype.setWrapLimitRange=function(F,L){(this.$wrapLimitRange.min!==F||this.$wrapLimitRange.max!==L)&&(this.$wrapLimitRange={min:F,max:L},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},N.prototype.adjustWrapLimit=function(F,L){var k=this.$wrapLimitRange;k.max<0&&(k={min:L,max:L});var T=this.$constrainWrapLimit(F,k.min,k.max);return T!=this.$wrapLimit&&T>1?(this.$wrapLimit=T,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},N.prototype.$constrainWrapLimit=function(F,L,k){return L&&(F=Math.max(L,F)),k&&(F=Math.min(k,F)),F},N.prototype.getWrapLimit=function(){return this.$wrapLimit},N.prototype.setWrapLimit=function(F){this.setWrapLimitRange(F,F)},N.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},N.prototype.$updateInternalDataOnChange=function(F){var L=this.$useWrapMode,k=F.action,T=F.start,M=F.end,R=T.row,B=M.row,U=B-R,V=null;if(this.$updating=!0,U!=0)if(k==="remove"){this[L?"$wrapData":"$rowLengthCache"].splice(R,U);var K=this.$foldData;V=this.getFoldsInRange(F),this.removeFolds(V);var J=this.getFoldLine(M.row),G=0;if(J){J.addRemoveChars(M.row,M.column,T.column-M.column),J.shiftRow(-U);var Y=this.getFoldLine(R);Y&&Y!==J&&(Y.merge(J),J=Y),G=K.indexOf(J)+1}for(G;G=M.row&&J.shiftRow(-U)}B=R}else{var Q=Array(U);Q.unshift(R,0);var X=L?this.$wrapData:this.$rowLengthCache;X.splice.apply(X,Q);var K=this.$foldData,J=this.getFoldLine(R),G=0;if(J){var le=J.range.compareInside(T.row,T.column);le==0?(J=J.split(T.row,T.column),J&&(J.shiftRow(U),J.addRemoveChars(B,0,M.column-T.column))):le==-1&&(J.addRemoveChars(R,0,M.column-T.column),J.shiftRow(U)),G=K.indexOf(J)+1}for(G;G=R&&J.shiftRow(U)}}else{U=Math.abs(F.start.column-F.end.column),k==="remove"&&(V=this.getFoldsInRange(F),this.removeFolds(V),U=-U);var J=this.getFoldLine(R);J&&J.addRemoveChars(R,T.column,U)}return L&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,L?this.$updateWrapData(R,B):this.$updateRowLengthCache(R,B),V},N.prototype.$updateRowLengthCache=function(F,L){this.$rowLengthCache[F]=null,this.$rowLengthCache[L]=null},N.prototype.$updateWrapData=function(F,L){var k=this.doc.getAllLines(),T=this.getTabSize(),M=this.$wrapData,R=this.$wrapLimit,B,U,V=F;for(L=Math.min(L,k.length-1);V<=L;)U=this.getFoldLine(V,U),U?(B=[],U.walk((function(K,J,G,Y){var Q;if(K!=null){Q=this.$getDisplayTokens(K,B.length),Q[0]=D;for(var X=1;XL-Y;){var Q=R+L-Y;if(F[Q-1]>=A&&F[Q]>=A){G(Q);continue}if(F[Q]==D||F[Q]==C){for(Q;Q!=R-1&&F[Q]!=D;Q--);if(Q>R){G(Q);continue}for(Q=R+L,Q;Q>2)),R-1);Q>X&&F[Q]X&&F[Q]X&&F[Q]==w;)Q--}else for(;Q>X&&F[Q]X){G(++Q);continue}Q=R+L,F[Q]==E&&Q--,G(Q-Y)}return T},N.prototype.$getDisplayTokens=function(F,L){var k=[],T;L=L||0;for(var M=0;M39&&R<48||R>57&&R<64?k.push(w):R>=4352&&P(R)?k.push(v,E):k.push(v)}return k},N.prototype.$getStringScreenWidth=function(F,L,k){if(L==0)return[0,0];L==null&&(L=1/0),k=k||0;var T,M;for(M=0;M=4352&&P(T)?k+=2:k+=1,!(k>L));M++);return[k,M]},N.prototype.getRowLength=function(F){var L=1;return this.lineWidgets&&(L+=this.lineWidgets[F]&&this.lineWidgets[F].rowCount||0),!this.$useWrapMode||!this.$wrapData[F]?L:this.$wrapData[F].length+L},N.prototype.getRowLineCount=function(F){return!this.$useWrapMode||!this.$wrapData[F]?1:this.$wrapData[F].length+1},N.prototype.getRowWrapIndent=function(F){if(this.$useWrapMode){var L=this.screenToDocumentPosition(F,Number.MAX_VALUE),k=this.$wrapData[L.row];return k.length&&k[0]=0)var U=K[J],M=this.$docRowCache[J],Y=F>K[G-1];else var Y=!G;for(var Q=this.getLength()-1,X=this.getNextFoldLine(M),le=X?X.start.row:1/0;U<=F&&(V=this.getRowLength(M),!(U+V>F||M>=Q));)U+=V,M++,M>le&&(M=X.end.row+1,X=this.getNextFoldLine(M,X),le=X?X.start.row:1/0),Y&&(this.$docRowCache.push(M),this.$screenRowCache.push(U));if(X&&X.start.row<=M)T=this.getFoldDisplayLine(X),M=X.start.row;else{if(U+V<=F||M>Q)return{row:Q,column:this.getLine(Q).length};T=this.getLine(M),X=null}var be=0,ce=Math.floor(F-U);if(this.$useWrapMode){var xe=this.$wrapData[M];xe&&(B=xe[ce],ce>0&&xe.length&&(be=xe.indent,R=xe[ce-1]||xe[xe.length-1],T=T.substring(R)))}return k!==void 0&&this.$bidiHandler.isBidiRow(U+ce,M,ce)&&(L=this.$bidiHandler.offsetToCol(k)),R+=this.$getStringScreenWidth(T,L-be)[1],this.$useWrapMode&&R>=B&&(R=B-1),X?X.idxToPosition(R):{row:M,column:R}},N.prototype.documentToScreenPosition=function(F,L){if(typeof L>"u")var k=this.$clipPositionToDocument(F.row,F.column);else k=this.$clipPositionToDocument(F,L);F=k.row,L=k.column;var T=0,M=null,R=null;R=this.getFoldAt(F,L,1),R&&(F=R.start.row,L=R.start.column);var B,U=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,F),J=V.length;if(J&&K>=0)var U=V[K],T=this.$screenRowCache[K],G=F>V[J-1];else var G=!J;for(var Y=this.getNextFoldLine(U),Q=Y?Y.start.row:1/0;U=Q){if(B=Y.end.row+1,B>F)break;Y=this.getNextFoldLine(B,Y),Q=Y?Y.start.row:1/0}else B=U+1;T+=this.getRowLength(U),U=B,G&&(this.$docRowCache.push(U),this.$screenRowCache.push(T))}var X="";Y&&U>=Q?(X=this.getFoldDisplayLine(Y,F,L),M=Y.start.row):(X=this.getLine(F).substring(0,L),M=F);var le=0;if(this.$useWrapMode){var be=this.$wrapData[M];if(be){for(var ce=0;X.length>=be[ce];)T++,ce++;X=X.substring(be[ce-1]||0,X.length),le=ce>0?be.indent:0}}return this.lineWidgets&&this.lineWidgets[U]&&this.lineWidgets[U].rowsAbove&&(T+=this.lineWidgets[U].rowsAbove),{row:T,column:le+this.$getStringScreenWidth(X)[0]}},N.prototype.documentToScreenColumn=function(F,L){return this.documentToScreenPosition(F,L).column},N.prototype.documentToScreenRow=function(F,L){return this.documentToScreenPosition(F,L).row},N.prototype.getScreenLength=function(){var F=0,L=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,R=0,T=0,L=this.$foldData[T++],B=L?L.start.row:1/0;RB&&(R=L.end.row+1,L=this.$foldData[T++],B=L?L.start.row:1/0)}else{F=this.getLength();for(var k=this.$foldData,T=0;Tk));R++);return[T,R]})},N.prototype.getPrecedingCharacter=function(){var F=this.selection.getCursor();if(F.column===0)return F.row===0?"":this.doc.getNewLineCharacter();var L=this.getLine(F.row);return L[F.column-1]},N.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},N}();b.$uid=0,b.prototype.$modes=l.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=P,s.implement(b.prototype,u);var v=1,E=2,D=3,C=4,w=9,A=10,$=11,O=12;function P(N){return N<4352?!1:N>=4352&&N<=4447||N>=4515&&N<=4519||N>=4602&&N<=4607||N>=9001&&N<=9002||N>=11904&&N<=11929||N>=11931&&N<=12019||N>=12032&&N<=12245||N>=12272&&N<=12283||N>=12288&&N<=12350||N>=12353&&N<=12438||N>=12441&&N<=12543||N>=12549&&N<=12589||N>=12593&&N<=12686||N>=12688&&N<=12730||N>=12736&&N<=12771||N>=12784&&N<=12830||N>=12832&&N<=12871||N>=12880&&N<=13054||N>=13056&&N<=19903||N>=19968&&N<=42124||N>=42128&&N<=42182||N>=43360&&N<=43388||N>=44032&&N<=55203||N>=55216&&N<=55238||N>=55243&&N<=55291||N>=63744&&N<=64255||N>=65040&&N<=65049||N>=65072&&N<=65106||N>=65108&&N<=65126||N>=65128&&N<=65131||N>=65281&&N<=65376||N>=65504&&N<=65510}r("./edit_session/folding").Folding.call(b.prototype),r("./edit_session/bracket_match").BracketMatch.call(b.prototype),l.defineOptions(b.prototype,"session",{wrap:{set:function(N){if(!N||N=="off"?N=!1:N=="free"?N=!0:N=="printMargin"?N=-1:typeof N=="string"&&(N=parseInt(N,10)||!1),this.$wrap!=N)if(this.$wrap=N,!N)this.setUseWrapMode(!1);else{var F=typeof N=="number"?N:null;this.setWrapLimitRange(F,F),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(N){N=N=="auto"?this.$mode.type!="text":N!="text",N!=this.$wrapAsCode&&(this.$wrapAsCode=N,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(N){this.$useWorker=N,this.$stopWorker(),N&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(N){N=parseInt(N),N>0&&this.$tabSize!==N&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=N,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(N){this.setFoldStyle(N)},handlesSet:!0},overwrite:{set:function(N){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(N){this.doc.setNewLineMode(N)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(N){this.setMode(N)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./lib/oop"),a=r("./range").Range,l=function(){function c(){this.$options={}}return c.prototype.set=function(h){return o.mixin(this.$options,h),this},c.prototype.getOptions=function(){return s.copyObject(this.$options)},c.prototype.setOptions=function(h){this.$options=h},c.prototype.find=function(h){var d=this.$options,f=this.$matchIterator(h,d);if(!f)return!1;var p=null;return f.forEach(function(m,y,b,v){return p=new a(m,y,b,v),y==v&&d.start&&d.start.start&&d.skipCurrent!=!1&&p.isEqual(d.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(h){var d=this.$options;if(!d.needle)return[];this.$assembleRegExp(d);var f=d.range,p=f?h.getLines(f.start.row,f.end.row):h.doc.getAllLines(),m=[],y=d.re;if(d.$isMultiLine){var b=y.length,v=p.length-b,E;e:for(var D=y.offset||0;D<=v;D++){for(var C=0;C$||(m.push(E=new a(D,$,D+b-1,O)),b>2&&(D=D+b-2))}}else for(var P=0;Pk&&m[C].end.row==T;)C--;for(m=m.slice(P,C+1),P=0,C=m.length;P"+C.end.row+":"+C.end.column}function f(C,w){var T=C.action=="insert",k=w.action=="insert";if(T&&k)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.start,C.start)<=0)y(C,w,1);else return null;else if(T&&!k)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.end,C.start)<=0)y(C,w,-1);else return null;else if(!T&&k)if(l(w.start,C.start)>=0)y(w,C,1);else if(l(w.start,C.start)<=0)y(C,w,1);else return null;else if(!T&&!k)if(l(w.start,C.start)>=0)y(w,C,1);else if(l(w.end,C.start)<=0)y(C,w,-1);else return null;return[w,C]}function p(C,w){for(var T=C.length;T--;)for(var k=0;k=0?y(C,w,-1):(l(C.start,w.start)<=0||y(C,a.fromPoints(w.start,C.start),-1),y(w,C,1));else if(!T&&k)l(w.start,C.end)>=0?y(w,C,-1):(l(w.start,C.start)<=0||y(w,a.fromPoints(C.start,w.start),-1),y(C,w,1));else if(!T&&!k)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.end,C.start)<=0)y(C,w,-1);else{var O,P;return l(C.start,w.start)<0&&(O=C,C=v(C,w.start)),l(C.end,w.end)>0&&(P=v(C,w.end)),b(w.end,C.start,C.end,-1),P&&!O&&(C.lines=P.lines,C.start=P.start,C.end=P.end,P=C),[w,O,P].filter(Boolean)}return[w,C]}function y(C,w,T){b(C.start,w.start,w.end,T),b(C.end,w.start,w.end,T)}function b(C,w,T,k){C.row==(k==1?w:T).row&&(C.column+=k*(T.column-w.column)),C.row+=k*(T.row-w.row)}function v(C,w){var T=C.lines,k=C.end;C.end=u(w);var O=C.end.row-C.start.row,P=T.splice(O,T.length),I=O?w.column:w.column-C.start.column;T.push(P[0].substring(0,I)),P[0]=P[0].substr(I);var F={start:u(w),end:k,lines:P,action:C.action};return F}function E(C,w){w=c(w);for(var T=C.length;T--;){for(var k=C[T],O=0;Othis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(u,c){return-u.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},a.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},a.prototype.walk=function(l,u,c){var h=0,d=this.folds,f,p,m,y=!0;u==null&&(u=this.end.row,c=this.end.column);for(var b=0;b0)){var y=o(u,p.start);return m===0?c&&y!==0?-f-2:f:y>0||y===0&&!c?f:-f-1}}return-f-1},l.prototype.add=function(u){var c=!u.isEmpty(),h=this.pointIndex(u.start,c);h<0&&(h=-h-1);var d=this.pointIndex(u.end,c,h);return d<0?d=-d-1:d++,this.ranges.splice(h,d-h,u)},l.prototype.addList=function(u){for(var c=[],h=u.length;h--;)c.push.apply(c,this.add(u[h]));return c},l.prototype.substractPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges.splice(c,1)},l.prototype.merge=function(){var u=[],c=this.ranges;c=c.sort(function(m,y){return o(m.start,y.start)});for(var h=c[0],d,f=1;f=0},l.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},l.prototype.rangeAtPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges[c]},l.prototype.clipRows=function(u,c){var h=this.ranges;if(h[0].start.row>c||h[h.length-1].start.row=d)break}if(u.action=="insert")for(var v=f-d,E=-c.column+h.column;md)break;if(b.start.row==d&&b.start.column>=c.column&&(b.start.column==c.column&&this.$bias<=0||(b.start.column+=E,b.start.row+=v)),b.end.row==d&&b.end.column>=c.column){if(b.end.column==c.column&&this.$bias<0)continue;b.end.column==c.column&&E>0&&mb.start.column&&b.end.column==p[m+1].start.column&&(b.end.column-=E),b.end.column+=E,b.end.row+=v}}else for(var v=d-f,E=c.column-h.column;mf)break;b.end.rowc.column)&&(b.end.column=c.column,b.end.row=c.row):(b.end.column+=E,b.end.row+=v):b.end.row>f&&(b.end.row+=v),b.start.rowc.column)&&(b.start.column=c.column,b.start.row=c.row):(b.start.column+=E,b.start.row+=v):b.start.row>f&&(b.start.row+=v)}if(v!=0&&m=h)return m;if(m.end.row>h)return null}return null},this.getNextFoldLine=function(h,d){var f=this.$foldData,p=0;for(d&&(p=f.indexOf(d)),p==-1&&(p=0),p;p=h)return m}return null},this.getFoldedRowCount=function(h,d){for(var f=this.$foldData,p=d-h+1,m=0;m=d){v=h?p-=d-v:p=0);break}else b>=h&&(v>=h?p-=b-v:p-=b-h+1)}return p},this.$addFoldLine=function(h){return this.$foldData.push(h),this.$foldData.sort(function(d,f){return d.start.row-f.start.row}),h},this.addFold=function(h,d){var f=this.$foldData,p=!1,m;h instanceof a?m=h:(m=new a(d,h),m.collapseChildren=d.collapseChildren),this.$clipRangeToDocument(m.range);var y=m.start.row,b=m.start.column,v=m.end.row,E=m.end.column,D=this.getFoldAt(y,b,1),C=this.getFoldAt(v,E,-1);if(D&&C==D)return D.addSubFold(m);D&&!D.range.isStart(y,b)&&this.removeFold(D),C&&!C.range.isEnd(v,E)&&this.removeFold(C);var w=this.getFoldsInRange(m.range);w.length>0&&(this.removeFolds(w),m.collapseChildren||w.forEach(function(P){m.addSubFold(P)}));for(var T=0;T0&&this.foldAll(h.start.row+1,h.end.row,h.collapseChildren-1),h.subFolds=[]},this.expandFolds=function(h){h.forEach(function(d){this.expandFold(d)},this)},this.unfold=function(h,d){var f,p;if(h==null)f=new s(0,0,this.getLength(),0),d==null&&(d=!0);else if(typeof h=="number")f=new s(h,0,h,this.getLine(h).length);else if("row"in h)f=s.fromPoints(h,h);else{if(Array.isArray(h))return p=[],h.forEach(function(y){p=p.concat(this.unfold(y))},this),p;f=h}p=this.getFoldsInRangeList(f);for(var m=p;p.length==1&&s.comparePoints(p[0].start,f.start)<0&&s.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(d!=!1?this.removeFolds(p):this.expandFolds(p),m.length)return m},this.isRowFolded=function(h,d){return!!this.getFoldLine(h,d)},this.getRowFoldEnd=function(h,d){var f=this.getFoldLine(h,d);return f?f.end.row:h},this.getRowFoldStart=function(h,d){var f=this.getFoldLine(h,d);return f?f.start.row:h},this.getFoldDisplayLine=function(h,d,f,p,m){p==null&&(p=h.start.row),m==null&&(m=0),d==null&&(d=h.end.row),f==null&&(f=this.getLine(d).length);var y=this.doc,b="";return h.walk(function(v,E,D,C){if(!(ED)break;while(m&&b.test(m.type));m=p.stepBackward()}else m=p.getCurrentToken();return v.end.row=p.getCurrentTokenRow(),v.end.column=p.getCurrentTokenColumn(),v}},this.foldAll=function(h,d,f,p){f==null&&(f=1e5);var m=this.foldWidgets;if(m){d=d||this.getLength(),h=h||0;for(var y=h;y=h&&(y=b.end.row,b.collapseChildren=f,this.addFold("...",b))}}},this.foldToLevel=function(h){for(this.foldAll();h-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var h=this;this.foldAll(null,null,null,function(d){for(var f=h.getTokens(d),p=0;p=0;){var y=f[p];if(y==null&&(y=f[p]=this.getFoldWidget(p)),y=="start"){var b=this.getFoldWidgetRange(p);if(m||(m=b),b&&b.end.row>=h)break}p--}return{range:p!==-1&&b,firstRange:m}},this.onFoldWidgetClick=function(h,d){d instanceof u&&(d=d.domEvent);var f={children:d.shiftKey,all:d.ctrlKey||d.metaKey,siblings:d.altKey},p=this.$toggleFoldWidget(h,f);if(!p){var m=d.target||d.srcElement;m&&/ace_fold-widget/.test(m.className)&&(m.className+=" ace_invalid")}},this.$toggleFoldWidget=function(h,d){if(this.getFoldWidget){var f=this.getFoldWidget(h),p=this.getLine(h),m=f==="end"?-1:1,y=this.getFoldAt(h,m===-1?0:p.length,m);if(y)return d.children||d.all?this.removeFold(y):this.expandFold(y),y;var b=this.getFoldWidgetRange(h,!0);if(b&&!b.isMultiLine()&&(y=this.getFoldAt(b.start.row,b.start.column,1),y&&b.isEqual(y.range)))return this.removeFold(y),y;if(d.siblings){var v=this.getParentFoldRangeData(h);if(v.range)var E=v.range.start.row+1,D=v.range.end.row;this.foldAll(E,D,d.all?1e4:0)}else d.children?(D=b?b.end.row:this.getLength(),this.foldAll(h+1,D,d.all?1e4:0)):b&&(d.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(h){var d=this.selection.getCursor().row;d=this.getRowFoldStart(d);var f=this.$toggleFoldWidget(d,{});if(!f){var p=this.getParentFoldRangeData(d,!0);if(f=p.range||p.firstRange,f){d=f.start.row;var m=this.getFoldAt(d,this.getLine(d).length,1);m?this.removeFold(m):this.addFold("...",f)}}},this.updateFoldWidgets=function(h){var d=h.start.row,f=h.end.row-d;if(f===0)this.foldWidgets[d]=null;else if(h.action=="remove")this.foldWidgets.splice(d,f+1,null);else{var p=Array(f+1);p.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(h){var d=h.data;d.first!=d.last&&this.foldWidgets.length>d.first&&this.foldWidgets.splice(d.first,this.foldWidgets.length)}}n.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=r("../range").Range;function a(){this.findMatchingBracket=function(l,u){if(l.column==0)return null;var c=u||this.getLine(l.row).charAt(l.column-1);if(c=="")return null;var h=c.match(/([\(\[\{])|([\)\]\}])/);return h?h[1]?this.$findClosingBracket(h[1],l):this.$findOpeningBracket(h[2],l):null},this.getBracketRange=function(l){var u=this.getLine(l.row),c=!0,h,d=u.charAt(l.column-1),f=d&&d.match(/([\(\[\{])|([\)\]\}])/);if(f||(d=u.charAt(l.column),l={row:l.row,column:l.column+1},f=d&&d.match(/([\(\[\{])|([\)\]\}])/),c=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],l);if(!p)return null;h=o.fromPoints(l,p),c||(h.end.column++,h.start.column--),h.cursor=h.end}else{var p=this.$findOpeningBracket(f[2],l);if(!p)return null;h=o.fromPoints(p,l),c||(h.start.column++,h.end.column--),h.cursor=h.start}return h},this.getMatchingBracketRanges=function(l,u){var c=this.getLine(l.row),h=/([\(\[\{])|([\)\]\}])/,d=!u&&c.charAt(l.column-1),f=d&&d.match(h);if(f||(d=(u===void 0||u)&&c.charAt(l.column),l={row:l.row,column:l.column+1},f=d&&d.match(h)),!f)return null;var p=new o(l.row,l.column-1,l.row,l.column),m=f[1]?this.$findClosingBracket(f[1],l):this.$findOpeningBracket(f[2],l);if(!m)return[p];var y=new o(m.row,m.column,m.row,m.column+1);return[p,y]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,u,c){var h=this.$brackets[l],d=1,f=new s(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var m=u.column-f.getCurrentTokenColumn()-2,y=p.value;;){for(;m>=0;){var b=y.charAt(m);if(b==h){if(d-=1,d==0)return{row:f.getCurrentTokenRow(),column:m+f.getCurrentTokenColumn()}}else b==l&&(d+=1);m-=1}do p=f.stepBackward();while(p&&!c.test(p.type));if(p==null)break;y=p.value,m=y.length-1}return null}},this.$findClosingBracket=function(l,u,c){var h=this.$brackets[l],d=1,f=new s(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var m=u.column-f.getCurrentTokenColumn();;){for(var y=p.value,b=y.length;m"?h=!0:u.type.indexOf("tag-name")!==-1&&(c=!0));while(u&&!c);return u},this.$findClosingTag=function(l,u){var c,h=u.value,d=u.value,f=0,p=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);u=l.stepForward();var m=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length),y=!1;do{if(c=u,c.type.indexOf("tag-close")!==-1&&!y){var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(u=l.stepForward(),u){if(u.value===">"&&!y){var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(u.type.indexOf("tag-name")!==-1){if(h=u.value,d===h){if(c.value==="<")f++;else if(c.value==="")var D=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(d===h&&u.value==="/>"&&(f--,f<0))var v=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),E=v,D=E,b=new o(m.end.row,m.end.column,m.end.row,m.end.column+1)}}while(u&&f>=0);if(p&&b&&v&&D&&m&&E)return{openTag:new o(p.start.row,p.start.column,b.end.row,b.end.column),closeTag:new o(v.start.row,v.start.column,D.end.row,D.end.column),openTagName:m,closeTagName:E}},this.$findOpeningTag=function(l,u){var c=l.getCurrentToken(),h=u.value,d=0,f=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn(),m=p+2,y=new o(f,p,f,m);l.stepForward();var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=l.stepForward()),!(!u||u.value!==">")){var v=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(u=c,f=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn(),m=p+u.value.length,c=l.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(h===u.value)if(c.value==="<"){if(d++,d>0){var E=new o(f,p,f,m),D=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do u=l.stepForward();while(u&&u.value!==">");var C=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else c.value===""){for(var w=0,T=c;T;){if(T.type.indexOf("tag-name")!==-1&&T.value===h){d--;break}else if(T.value==="<")break;T=l.stepBackward(),w++}for(var k=0;k_&&(this.$docRowCache.splice(_,L),this.$screenRowCache.splice(_,L))},I.prototype.$getRowCacheIndex=function(F,L){for(var _=0,A=F.length-1;_<=A;){var M=_+A>>1,R=F[M];if(L>R)_=M+1;else if(L=L));R++);return A=_[R],A?(A.index=R,A.start=M-A.value.length,A):null},I.prototype.setUndoManager=function(F){if(this.$undoManager=F,this.$informUndoManager&&this.$informUndoManager.cancel(),F){var L=this;F.addSession(this),this.$syncInformUndoManager=function(){L.$informUndoManager.cancel(),L.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},I.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},I.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},I.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):" "},I.prototype.setUseSoftTabs=function(F){this.setOption("useSoftTabs",F)},I.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},I.prototype.setTabSize=function(F){this.setOption("tabSize",F)},I.prototype.getTabSize=function(){return this.$tabSize},I.prototype.isTabStop=function(F){return this.$useSoftTabs&&F.column%this.$tabSize===0},I.prototype.setNavigateWithinSoftTabs=function(F){this.setOption("navigateWithinSoftTabs",F)},I.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},I.prototype.setOverwrite=function(F){this.setOption("overwrite",F)},I.prototype.getOverwrite=function(){return this.$overwrite},I.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},I.prototype.addGutterDecoration=function(F,L){this.$decorations[F]||(this.$decorations[F]=""),this.$decorations[F]+=" "+L,this._signal("changeBreakpoint",{})},I.prototype.removeGutterDecoration=function(F,L){this.$decorations[F]=(this.$decorations[F]||"").replace(" "+L,""),this._signal("changeBreakpoint",{})},I.prototype.getBreakpoints=function(){return this.$breakpoints},I.prototype.setBreakpoints=function(F){this.$breakpoints=[];for(var L=0;L0&&(A=!!_.charAt(L-1).match(this.tokenRe)),A||(A=!!_.charAt(L).match(this.tokenRe)),A)var M=this.tokenRe;else if(/^\s+$/.test(_.slice(L-1,L+1)))var M=/\s/;else var M=this.nonTokenRe;var R=L;if(R>0){do R--;while(R>=0&&_.charAt(R).match(M));R++}for(var B=L;B<_.length&&_.charAt(B).match(M);)B++;return new d(F,R,F,B)},I.prototype.getAWordRange=function(F,L){for(var _=this.getWordRange(F,L),A=this.getLine(_.end.row);A.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},I.prototype.setNewLineMode=function(F){this.doc.setNewLineMode(F)},I.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},I.prototype.setUseWorker=function(F){this.setOption("useWorker",F)},I.prototype.getUseWorker=function(){return this.$useWorker},I.prototype.onReloadTokenizer=function(F){var L=F.data;this.bgTokenizer.start(L.first),this._signal("tokenizerUpdate",F)},I.prototype.setMode=function(F,L){if(F&&typeof F=="object"){if(F.getTokenizer)return this.$onChangeMode(F);var _=F,A=_.path}else A=F||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[A]&&!_){this.$onChangeMode(this.$modes[A]),L&&L();return}this.$modeId=A,l.loadModule(["mode",A],(function(M){if(this.$modeId!==A)return L&&L();this.$modes[A]&&!_?this.$onChangeMode(this.$modes[A]):M&&M.Mode&&(M=new M.Mode(_),_||(this.$modes[A]=M,M.$id=A),this.$onChangeMode(M)),L&&L()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},I.prototype.$onChangeMode=function(F,L){if(L||(this.$modeId=F.$id),this.$mode!==F){var _=this.$mode;this.$mode=F,this.$stopWorker(),this.$useWorker&&this.$startWorker();var A=F.getTokenizer();if(A.on!==void 0){var M=this.onReloadTokenizer.bind(this);A.on("update",M)}this.bgTokenizer.setTokenizer(A),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=F.tokenRe,this.nonTokenRe=F.nonTokenRe,L||(F.attachToSession&&F.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(F.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:F}))}},I.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},I.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(F){l.warn("Could not load worker",F),this.$worker=null}},I.prototype.getMode=function(){return this.$mode},I.prototype.setScrollTop=function(F){this.$scrollTop===F||isNaN(F)||(this.$scrollTop=F,this._signal("changeScrollTop",F))},I.prototype.getScrollTop=function(){return this.$scrollTop},I.prototype.setScrollLeft=function(F){this.$scrollLeft===F||isNaN(F)||(this.$scrollLeft=F,this._signal("changeScrollLeft",F))},I.prototype.getScrollLeft=function(){return this.$scrollLeft},I.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},I.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var F=0;return this.lineWidgets.forEach(function(L){L&&L.screenWidth>F&&(F=L.screenWidth)}),this.lineWidgetWidth=F},I.prototype.$computeWidth=function(F){if(this.$modified||F){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var L=this.doc.getAllLines(),_=this.$rowLengthCache,A=0,M=0,R=this.$foldData[M],B=R?R.start.row:1/0,U=L.length,V=0;VB){if(V=R.end.row+1,V>=U)break;R=this.$foldData[M++],B=R?R.start.row:1/0}_[V]==null&&(_[V]=this.$getStringScreenWidth(L[V])[0]),_[V]>A&&(A=_[V])}this.screenWidth=A}},I.prototype.getLine=function(F){return this.doc.getLine(F)},I.prototype.getLines=function(F,L){return this.doc.getLines(F,L)},I.prototype.getLength=function(){return this.doc.getLength()},I.prototype.getTextRange=function(F){return this.doc.getTextRange(F||this.selection.getRange())},I.prototype.insert=function(F,L){return this.doc.insert(F,L)},I.prototype.remove=function(F){return this.doc.remove(F)},I.prototype.removeFullLines=function(F,L){return this.doc.removeFullLines(F,L)},I.prototype.undoChanges=function(F,L){if(F.length){this.$fromUndo=!0;for(var _=F.length-1;_!=-1;_--){var A=F[_];A.action=="insert"||A.action=="remove"?this.doc.revertDelta(A):A.folds&&this.addFolds(A.folds)}!L&&this.$undoSelect&&(F.selectionBefore?this.selection.fromJSON(F.selectionBefore):this.selection.setRange(this.$getUndoSelection(F,!0))),this.$fromUndo=!1}},I.prototype.redoChanges=function(F,L){if(F.length){this.$fromUndo=!0;for(var _=0;_F.end.column&&(R.start.column+=U),R.end.row==F.end.row&&R.end.column>F.end.column&&(R.end.column+=U)),B&&R.start.row>=F.end.row&&(R.start.row+=B,R.end.row+=B)}if(R.end=this.insert(R.start,A),M.length){var V=F.start,K=R.start,B=K.row-V.row,U=K.column-V.column;this.addFolds(M.map(function(Y){return Y=Y.clone(),Y.start.row==V.row&&(Y.start.column+=U),Y.end.row==V.row&&(Y.end.column+=U),Y.start.row+=B,Y.end.row+=B,Y}))}return R},I.prototype.indentRows=function(F,L,_){_=_.replace(/\t/g,this.getTabString());for(var A=F;A<=L;A++)this.doc.insertInLine({row:A,column:0},_)},I.prototype.outdentRows=function(F){for(var L=F.collapseRows(),_=new d(0,0,0,0),A=this.getTabSize(),M=L.start.row;M<=L.end.row;++M){var R=this.getLine(M);_.start.row=M,_.end.row=M;for(var B=0;B0){var A=this.getRowFoldEnd(L+_);if(A>this.doc.getLength()-1)return 0;var M=A-L}else{F=this.$clipRowToDocument(F),L=this.$clipRowToDocument(L);var M=L-F+1}var R=new d(F,0,L,Number.MAX_VALUE),B=this.getFoldsInRange(R).map(function(V){return V=V.clone(),V.start.row+=M,V.end.row+=M,V}),U=_==0?this.doc.getLines(F,L):this.doc.removeFullLines(F,L);return this.doc.insertFullLines(F+M,U),B.length&&this.addFolds(B),M},I.prototype.moveLinesUp=function(F,L){return this.$moveLines(F,L,-1)},I.prototype.moveLinesDown=function(F,L){return this.$moveLines(F,L,1)},I.prototype.duplicateLines=function(F,L){return this.$moveLines(F,L,0)},I.prototype.$clipRowToDocument=function(F){return Math.max(0,Math.min(F,this.doc.getLength()-1))},I.prototype.$clipColumnToRow=function(F,L){return L<0?0:Math.min(this.doc.getLine(F).length,L)},I.prototype.$clipPositionToDocument=function(F,L){if(L=Math.max(0,L),F<0)F=0,L=0;else{var _=this.doc.getLength();F>=_?(F=_-1,L=this.doc.getLine(_-1).length):L=Math.min(this.doc.getLine(F).length,L)}return{row:F,column:L}},I.prototype.$clipRangeToDocument=function(F){F.start.row<0?(F.start.row=0,F.start.column=0):F.start.column=this.$clipColumnToRow(F.start.row,F.start.column);var L=this.doc.getLength()-1;return F.end.row>L?(F.end.row=L,F.end.column=this.doc.getLine(L).length):F.end.column=this.$clipColumnToRow(F.end.row,F.end.column),F},I.prototype.setUseWrapMode=function(F){if(F!=this.$useWrapMode){if(this.$useWrapMode=F,this.$modified=!0,this.$resetRowCache(0),F){var L=this.getLength();this.$wrapData=Array(L),this.$updateWrapData(0,L-1)}this._signal("changeWrapMode")}},I.prototype.getUseWrapMode=function(){return this.$useWrapMode},I.prototype.setWrapLimitRange=function(F,L){(this.$wrapLimitRange.min!==F||this.$wrapLimitRange.max!==L)&&(this.$wrapLimitRange={min:F,max:L},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},I.prototype.adjustWrapLimit=function(F,L){var _=this.$wrapLimitRange;_.max<0&&(_={min:L,max:L});var A=this.$constrainWrapLimit(F,_.min,_.max);return A!=this.$wrapLimit&&A>1?(this.$wrapLimit=A,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},I.prototype.$constrainWrapLimit=function(F,L,_){return L&&(F=Math.max(L,F)),_&&(F=Math.min(_,F)),F},I.prototype.getWrapLimit=function(){return this.$wrapLimit},I.prototype.setWrapLimit=function(F){this.setWrapLimitRange(F,F)},I.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},I.prototype.$updateInternalDataOnChange=function(F){var L=this.$useWrapMode,_=F.action,A=F.start,M=F.end,R=A.row,B=M.row,U=B-R,V=null;if(this.$updating=!0,U!=0)if(_==="remove"){this[L?"$wrapData":"$rowLengthCache"].splice(R,U);var K=this.$foldData;V=this.getFoldsInRange(F),this.removeFolds(V);var J=this.getFoldLine(M.row),G=0;if(J){J.addRemoveChars(M.row,M.column,A.column-M.column),J.shiftRow(-U);var Y=this.getFoldLine(R);Y&&Y!==J&&(Y.merge(J),J=Y),G=K.indexOf(J)+1}for(G;G=M.row&&J.shiftRow(-U)}B=R}else{var Q=Array(U);Q.unshift(R,0);var X=L?this.$wrapData:this.$rowLengthCache;X.splice.apply(X,Q);var K=this.$foldData,J=this.getFoldLine(R),G=0;if(J){var le=J.range.compareInside(A.row,A.column);le==0?(J=J.split(A.row,A.column),J&&(J.shiftRow(U),J.addRemoveChars(B,0,M.column-A.column))):le==-1&&(J.addRemoveChars(R,0,M.column-A.column),J.shiftRow(U)),G=K.indexOf(J)+1}for(G;G=R&&J.shiftRow(U)}}else{U=Math.abs(F.start.column-F.end.column),_==="remove"&&(V=this.getFoldsInRange(F),this.removeFolds(V),U=-U);var J=this.getFoldLine(R);J&&J.addRemoveChars(R,A.column,U)}return L&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,L?this.$updateWrapData(R,B):this.$updateRowLengthCache(R,B),V},I.prototype.$updateRowLengthCache=function(F,L){this.$rowLengthCache[F]=null,this.$rowLengthCache[L]=null},I.prototype.$updateWrapData=function(F,L){var _=this.doc.getAllLines(),A=this.getTabSize(),M=this.$wrapData,R=this.$wrapLimit,B,U,V=F;for(L=Math.min(L,_.length-1);V<=L;)U=this.getFoldLine(V,U),U?(B=[],U.walk((function(K,J,G,Y){var Q;if(K!=null){Q=this.$getDisplayTokens(K,B.length),Q[0]=D;for(var X=1;XL-Y;){var Q=R+L-Y;if(F[Q-1]>=T&&F[Q]>=T){G(Q);continue}if(F[Q]==D||F[Q]==C){for(Q;Q!=R-1&&F[Q]!=D;Q--);if(Q>R){G(Q);continue}for(Q=R+L,Q;Q>2)),R-1);Q>X&&F[Q]X&&F[Q]X&&F[Q]==w;)Q--}else for(;Q>X&&F[Q]X){G(++Q);continue}Q=R+L,F[Q]==E&&Q--,G(Q-Y)}return A},I.prototype.$getDisplayTokens=function(F,L){var _=[],A;L=L||0;for(var M=0;M39&&R<48||R>57&&R<64?_.push(w):R>=4352&&P(R)?_.push(v,E):_.push(v)}return _},I.prototype.$getStringScreenWidth=function(F,L,_){if(L==0)return[0,0];L==null&&(L=1/0),_=_||0;var A,M;for(M=0;M=4352&&P(A)?_+=2:_+=1,!(_>L));M++);return[_,M]},I.prototype.getRowLength=function(F){var L=1;return this.lineWidgets&&(L+=this.lineWidgets[F]&&this.lineWidgets[F].rowCount||0),!this.$useWrapMode||!this.$wrapData[F]?L:this.$wrapData[F].length+L},I.prototype.getRowLineCount=function(F){return!this.$useWrapMode||!this.$wrapData[F]?1:this.$wrapData[F].length+1},I.prototype.getRowWrapIndent=function(F){if(this.$useWrapMode){var L=this.screenToDocumentPosition(F,Number.MAX_VALUE),_=this.$wrapData[L.row];return _.length&&_[0]=0)var U=K[J],M=this.$docRowCache[J],Y=F>K[G-1];else var Y=!G;for(var Q=this.getLength()-1,X=this.getNextFoldLine(M),le=X?X.start.row:1/0;U<=F&&(V=this.getRowLength(M),!(U+V>F||M>=Q));)U+=V,M++,M>le&&(M=X.end.row+1,X=this.getNextFoldLine(M,X),le=X?X.start.row:1/0),Y&&(this.$docRowCache.push(M),this.$screenRowCache.push(U));if(X&&X.start.row<=M)A=this.getFoldDisplayLine(X),M=X.start.row;else{if(U+V<=F||M>Q)return{row:Q,column:this.getLine(Q).length};A=this.getLine(M),X=null}var be=0,ce=Math.floor(F-U);if(this.$useWrapMode){var xe=this.$wrapData[M];xe&&(B=xe[ce],ce>0&&xe.length&&(be=xe.indent,R=xe[ce-1]||xe[xe.length-1],A=A.substring(R)))}return _!==void 0&&this.$bidiHandler.isBidiRow(U+ce,M,ce)&&(L=this.$bidiHandler.offsetToCol(_)),R+=this.$getStringScreenWidth(A,L-be)[1],this.$useWrapMode&&R>=B&&(R=B-1),X?X.idxToPosition(R):{row:M,column:R}},I.prototype.documentToScreenPosition=function(F,L){if(typeof L>"u")var _=this.$clipPositionToDocument(F.row,F.column);else _=this.$clipPositionToDocument(F,L);F=_.row,L=_.column;var A=0,M=null,R=null;R=this.getFoldAt(F,L,1),R&&(F=R.start.row,L=R.start.column);var B,U=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,F),J=V.length;if(J&&K>=0)var U=V[K],A=this.$screenRowCache[K],G=F>V[J-1];else var G=!J;for(var Y=this.getNextFoldLine(U),Q=Y?Y.start.row:1/0;U=Q){if(B=Y.end.row+1,B>F)break;Y=this.getNextFoldLine(B,Y),Q=Y?Y.start.row:1/0}else B=U+1;A+=this.getRowLength(U),U=B,G&&(this.$docRowCache.push(U),this.$screenRowCache.push(A))}var X="";Y&&U>=Q?(X=this.getFoldDisplayLine(Y,F,L),M=Y.start.row):(X=this.getLine(F).substring(0,L),M=F);var le=0;if(this.$useWrapMode){var be=this.$wrapData[M];if(be){for(var ce=0;X.length>=be[ce];)A++,ce++;X=X.substring(be[ce-1]||0,X.length),le=ce>0?be.indent:0}}return this.lineWidgets&&this.lineWidgets[U]&&this.lineWidgets[U].rowsAbove&&(A+=this.lineWidgets[U].rowsAbove),{row:A,column:le+this.$getStringScreenWidth(X)[0]}},I.prototype.documentToScreenColumn=function(F,L){return this.documentToScreenPosition(F,L).column},I.prototype.documentToScreenRow=function(F,L){return this.documentToScreenPosition(F,L).row},I.prototype.getScreenLength=function(){var F=0,L=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,R=0,A=0,L=this.$foldData[A++],B=L?L.start.row:1/0;RB&&(R=L.end.row+1,L=this.$foldData[A++],B=L?L.start.row:1/0)}else{F=this.getLength();for(var _=this.$foldData,A=0;A<_.length;A++)L=_[A],F-=L.end.row-L.start.row}return this.lineWidgets&&(F+=this.$getWidgetScreenLength()),F},I.prototype.$setFontMetrics=function(F){this.$enableVarChar&&(this.$getStringScreenWidth=function(L,_,A){if(_===0)return[0,0];_||(_=1/0),A=A||0;var M,R;for(R=0;R_));R++);return[A,R]})},I.prototype.getPrecedingCharacter=function(){var F=this.selection.getCursor();if(F.column===0)return F.row===0?"":this.doc.getNewLineCharacter();var L=this.getLine(F.row);return L[F.column-1]},I.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},I}();b.$uid=0,b.prototype.$modes=l.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=P,s.implement(b.prototype,u);var v=1,E=2,D=3,C=4,w=9,T=10,k=11,O=12;function P(I){return I<4352?!1:I>=4352&&I<=4447||I>=4515&&I<=4519||I>=4602&&I<=4607||I>=9001&&I<=9002||I>=11904&&I<=11929||I>=11931&&I<=12019||I>=12032&&I<=12245||I>=12272&&I<=12283||I>=12288&&I<=12350||I>=12353&&I<=12438||I>=12441&&I<=12543||I>=12549&&I<=12589||I>=12593&&I<=12686||I>=12688&&I<=12730||I>=12736&&I<=12771||I>=12784&&I<=12830||I>=12832&&I<=12871||I>=12880&&I<=13054||I>=13056&&I<=19903||I>=19968&&I<=42124||I>=42128&&I<=42182||I>=43360&&I<=43388||I>=44032&&I<=55203||I>=55216&&I<=55238||I>=55243&&I<=55291||I>=63744&&I<=64255||I>=65040&&I<=65049||I>=65072&&I<=65106||I>=65108&&I<=65126||I>=65128&&I<=65131||I>=65281&&I<=65376||I>=65504&&I<=65510}r("./edit_session/folding").Folding.call(b.prototype),r("./edit_session/bracket_match").BracketMatch.call(b.prototype),l.defineOptions(b.prototype,"session",{wrap:{set:function(I){if(!I||I=="off"?I=!1:I=="free"?I=!0:I=="printMargin"?I=-1:typeof I=="string"&&(I=parseInt(I,10)||!1),this.$wrap!=I)if(this.$wrap=I,!I)this.setUseWrapMode(!1);else{var F=typeof I=="number"?I:null;this.setWrapLimitRange(F,F),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(I){I=I=="auto"?this.$mode.type!="text":I!="text",I!=this.$wrapAsCode&&(this.$wrapAsCode=I,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(I){this.$useWorker=I,this.$stopWorker(),I&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(I){I=parseInt(I),I>0&&this.$tabSize!==I&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=I,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(I){this.setFoldStyle(I)},handlesSet:!0},overwrite:{set:function(I){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(I){this.doc.setNewLineMode(I)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(I){this.setMode(I)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./lib/oop"),a=r("./range").Range,l=function(){function c(){this.$options={}}return c.prototype.set=function(h){return o.mixin(this.$options,h),this},c.prototype.getOptions=function(){return s.copyObject(this.$options)},c.prototype.setOptions=function(h){this.$options=h},c.prototype.find=function(h){var d=this.$options,f=this.$matchIterator(h,d);if(!f)return!1;var p=null;return f.forEach(function(m,y,b,v){return p=new a(m,y,b,v),y==v&&d.start&&d.start.start&&d.skipCurrent!=!1&&p.isEqual(d.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(h){var d=this.$options;if(!d.needle)return[];this.$assembleRegExp(d);var f=d.range,p=f?h.getLines(f.start.row,f.end.row):h.doc.getAllLines(),m=[],y=d.re;if(d.$isMultiLine){var b=y.length,v=p.length-b,E;e:for(var D=y.offset||0;D<=v;D++){for(var C=0;Ck||(m.push(E=new a(D,k,D+b-1,O)),b>2&&(D=D+b-2))}}else for(var P=0;P_&&m[C].end.row==A;)C--;for(m=m.slice(P,C+1),P=0,C=m.length;P=E;O--)if(A(O,Number.MAX_VALUE,$))return;if(d.wrap!=!1){for(O=D,E=v.row;O>=E;O--)if(A(O,Number.MAX_VALUE,$))return}}};else var C=function(O){var P=v.row;if(!A(P,v.column,O)){for(P=P+1;P<=D;P++)if(A(P,0,O))return;if(d.wrap!=!1){for(P=E,D=v.row;P<=D;P++)if(A(P,0,O))return}}};if(d.$isMultiLine)var w=f.length,A=function($,O,P){var N=p?$-w+1:$;if(!(N<0||N+w>h.getLength())){var F=h.getLine(N),L=F.search(f[0]);if(!(!p&&LO)&&P(N,L,N+w-1,T))return!0}}};else if(p)var A=function(O,P,N){var F=h.getLine(O),L=[],k,T=0;for(f.lastIndex=0;k=f.exec(F);){var M=k[0].length;if(T=k.index,!M){if(T>=F.length)break;f.lastIndex=T+=s.skipEmptyMatch(F,T,y)}if(k.index+M>P)break;L.push(k.index,M)}for(var R=L.length-1;R>=0;R-=2){var B=L[R-1],M=L[R];if(N(O,B,O,B+M))return!0}};else var A=function(O,P,N){var F=h.getLine(O),L,k;for(f.lastIndex=P;k=f.exec(F);){var T=k[0].length;if(L=k.index,N(O,L,O,L+T))return!0;if(!T&&(f.lastIndex=L+=s.skipEmptyMatch(F,L,y),L>=F.length))return!1}};return{forEach:C}},c}();function u(c,h){var d=s.supportsLookbehind();function f(b,v){v===void 0&&(v=!0);var E=d&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(b)||h.regExp?d&&h.$supportsUnicodeFlag?v?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),m=p[0],y=p[p.length-1];return f(m)+c+f(y,!1)}n.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(r,n,i){var s=this&&this.__extends||function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(m[b]=y[b])},d(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(f,p);function m(){this.constructor=f}f.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}}(),o=r("../lib/keys"),a=r("../lib/useragent"),l=o.KEY_MODS,u=function(){function d(f,p){this.$init(f,p,!1)}return d.prototype.$init=function(f,p,m){this.platform=p||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=m},d.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},d.prototype.removeCommand=function(f,p){var m=f&&(typeof f=="string"?f:f.name);f=this.commands[m],p||delete this.commands[m];var y=this.commandKeyBinding;for(var b in y){var v=y[b];if(v==f)delete y[b];else if(Array.isArray(v)){var E=v.indexOf(f);E!=-1&&(v.splice(E,1),v.length==1&&(y[b]=v[0]))}}},d.prototype.bindKey=function(f,p,m){if(typeof f=="object"&&f&&(m==null&&(m=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(y){var b="";if(y.indexOf(" ")!=-1){var v=y.split(/\s+/);y=v.pop(),v.forEach(function(C){var w=this.parseKeys(C),A=l[w.hashId]+w.key;b+=(b?" ":"")+A,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var E=this.parseKeys(y),D=l[E.hashId]+E.key;this._addCommandToBinding(b+D,p,m)},this)}},d.prototype._addCommandToBinding=function(f,p,m){var y=this.commandKeyBinding,b;if(!p)delete y[f];else if(!y[f]||this.$singleCommand)y[f]=p;else{Array.isArray(y[f])?(b=y[f].indexOf(p))!=-1&&y[f].splice(b,1):y[f]=[y[f]],typeof m!="number"&&(m=c(p));var v=y[f];for(b=0;bm)break}v.splice(b,0,p)}},d.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var m=f[p];if(m){if(typeof m=="string")return this.bindKey(m,p);typeof m=="function"&&(m={exec:m}),typeof m=="object"&&(m.name||(m.name=p),this.addCommand(m))}},this)},d.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},d.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},d.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},d.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(D){return D}),m=p.pop(),y=o[m];if(o.FUNCTION_KEYS[y])m=o.FUNCTION_KEYS[y].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:m.toUpperCase(),hashId:-1}}else return{key:m,hashId:-1};for(var b=0,v=p.length;v--;){var E=o.KEY_MODS[p[v]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+p[v]+" in "+f),!1;b|=E}return{key:m,hashId:b}},d.prototype.findKeyCommand=function(f,p){var m=l[f]+p;return this.commandKeyBinding[m]},d.prototype.handleKeyboard=function(f,p,m,y){if(!(y<0)){var b=l[p]+m,v=this.commandKeyBinding[b];return f.$keyChain&&(f.$keyChain+=" "+b,v=this.commandKeyBinding[f.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||b,{command:"null"}):(f.$keyChain&&((!p||p==4)&&m.length==1?f.$keyChain=f.$keyChain.slice(0,-b.length-1):(p==-1||y>0)&&(f.$keyChain="")),{command:v})}},d.prototype.getStatusText=function(f,p){return p.$keyChain||""},d}();function c(d){return typeof d=="object"&&d.bindKey&&d.bindKey.position||(d.isDefault?-100:0)}var h=function(d){s(f,d);function f(p,m){var y=d.call(this,p,m)||this;return y.$singleCommand=!0,y}return f}(u);h.call=function(d,f,p){u.prototype.$init.call(d,f,p,!0)},u.call=function(d,f,p){u.prototype.$init.call(d,f,p,!1)},n.HashHandler=h,n.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(f[m]=p[m])},c(h,d)};return function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(h,d);function f(){this.constructor=h}h.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),o=r("../lib/oop"),a=r("../keyboard/hash_handler").MultiHashHandler,l=r("../lib/event_emitter").EventEmitter,u=function(c){s(h,c);function h(d,f){var p=c.call(this,f,d)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(m){return m.args?m.command.exec(m.editor,m.args,m.event,!1):m.command.exec(m.editor,{},m.event,!0)}),p}return h.prototype.exec=function(d,f,p){if(Array.isArray(d)){for(var m=d.length;m--;)if(this.exec(d[m],f,p))return!0;return!1}if(typeof d=="string"&&(d=this.commands[d]),!this.canExecute(d,f))return!1;var y={editor:f,command:d,args:p};return y.returnValue=this._emit("exec",y),this._signal("afterExec",y),y.returnValue!==!1},h.prototype.canExecute=function(d,f){return typeof d=="string"&&(d=this.commands[d]),!(!d||f&&f.$readOnly&&!d.readOnly||this.$checkCommandState!=!1&&d.isAvailable&&!d.isAvailable(f))},h.prototype.toggleRecording=function(d){if(!this.$inReplay)return d&&d._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},h.prototype.replay=function(d){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(d);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,d):this.exec(f[0],d,f[1])},this)}finally{this.$inReplay=!1}}},h.prototype.trimMacro=function(d){return d.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},h}(a);o.implement(u.prototype,l),n.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(r,n,i){var s=r("../lib/lang"),o=r("../config"),a=r("../range").Range;function l(c,h){return{win:c,mac:h}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(c){o.loadModule("ace/ext/settings_menu",function(h){h.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(c){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(c){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(c,h){typeof h=="number"&&!isNaN(h)&&c.gotoLine(h),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(c){o.loadModule("ace/ext/searchbox",function(h){h.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(c,h){c.navigateUp(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(c,h){c.navigateDown(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(c,h){c.navigateLeft(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(c,h){c.navigateRight(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var h=c.$copyWithEmptySelection&&c.selection.isEmpty(),d=h?c.selection.getLineRange():c.selection.getRange();c._emit("cut",d),d.isEmpty()||c.session.remove(d),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,h){c.$handlePaste(h)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(c){o.loadModule("ace/ext/searchbox",function(h){h.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(c){var h=c.selection.getRange();h.start.column=0,c.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(c){var h=c.selection.getRange();h.end.column=Number.MAX_VALUE,c.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,h){c.insert(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,h){c.insert(s.stringRepeat(h.text||"",h.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(c){c.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var h=c.selection.getRange();h.start.column=h.end.column=0,h.end.row++,c.selection.setRange(h,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(c){for(var h=c.selection.isBackwards(),d=h?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),f=h?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),p=c.session.doc.getLine(d.row).length,m=c.session.doc.getTextRange(c.selection.getRange()),y=m.replace(/\n\s*/," ").length,b=c.session.doc.getLine(d.row),v=d.row+1;v<=f.row+1;v++){var E=s.stringTrimLeft(s.stringTrimRight(c.session.doc.getLine(v)));E.length!==0&&(E=" "+E),b+=E}f.row+10?(c.selection.moveCursorTo(d.row,d.column),c.selection.selectTo(d.row,d.column+y)):(p=c.session.doc.getLine(d.row).length>p?p+1:p,c.selection.moveCursorTo(d.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(c){var h=c.session.doc.getLength()-1,d=c.session.doc.getLine(h).length,f=c.selection.rangeList.ranges,p=[];f.length<1&&(f=[c.selection.getRange()]);for(var m=0;m=E;O--)if(T(O,Number.MAX_VALUE,k))return;if(d.wrap!=!1){for(O=D,E=v.row;O>=E;O--)if(T(O,Number.MAX_VALUE,k))return}}};else var C=function(O){var P=v.row;if(!T(P,v.column,O)){for(P=P+1;P<=D;P++)if(T(P,0,O))return;if(d.wrap!=!1){for(P=E,D=v.row;P<=D;P++)if(T(P,0,O))return}}};if(d.$isMultiLine)var w=f.length,T=function(k,O,P){var I=p?k-w+1:k;if(!(I<0||I+w>h.getLength())){var F=h.getLine(I),L=F.search(f[0]);if(!(!p&&LO)&&P(I,L,I+w-1,A))return!0}}};else if(p)var T=function(O,P,I){var F=h.getLine(O),L=[],_,A=0;for(f.lastIndex=0;_=f.exec(F);){var M=_[0].length;if(A=_.index,!M){if(A>=F.length)break;f.lastIndex=A+=s.skipEmptyMatch(F,A,y)}if(_.index+M>P)break;L.push(_.index,M)}for(var R=L.length-1;R>=0;R-=2){var B=L[R-1],M=L[R];if(I(O,B,O,B+M))return!0}};else var T=function(O,P,I){var F=h.getLine(O),L,_;for(f.lastIndex=P;_=f.exec(F);){var A=_[0].length;if(L=_.index,I(O,L,O,L+A))return!0;if(!A&&(f.lastIndex=L+=s.skipEmptyMatch(F,L,y),L>=F.length))return!1}};return{forEach:C}},c}();function u(c,h){var d=s.supportsLookbehind();function f(b,v){v===void 0&&(v=!0);var E=d&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(b)||h.regExp?d&&h.$supportsUnicodeFlag?v?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),m=p[0],y=p[p.length-1];return f(m)+c+f(y,!1)}n.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(r,n,i){var s=this&&this.__extends||function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(m[b]=y[b])},d(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(f,p);function m(){this.constructor=f}f.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}}(),o=r("../lib/keys"),a=r("../lib/useragent"),l=o.KEY_MODS,u=function(){function d(f,p){this.$init(f,p,!1)}return d.prototype.$init=function(f,p,m){this.platform=p||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=m},d.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},d.prototype.removeCommand=function(f,p){var m=f&&(typeof f=="string"?f:f.name);f=this.commands[m],p||delete this.commands[m];var y=this.commandKeyBinding;for(var b in y){var v=y[b];if(v==f)delete y[b];else if(Array.isArray(v)){var E=v.indexOf(f);E!=-1&&(v.splice(E,1),v.length==1&&(y[b]=v[0]))}}},d.prototype.bindKey=function(f,p,m){if(typeof f=="object"&&f&&(m==null&&(m=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(y){var b="";if(y.indexOf(" ")!=-1){var v=y.split(/\s+/);y=v.pop(),v.forEach(function(C){var w=this.parseKeys(C),T=l[w.hashId]+w.key;b+=(b?" ":"")+T,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var E=this.parseKeys(y),D=l[E.hashId]+E.key;this._addCommandToBinding(b+D,p,m)},this)}},d.prototype._addCommandToBinding=function(f,p,m){var y=this.commandKeyBinding,b;if(!p)delete y[f];else if(!y[f]||this.$singleCommand)y[f]=p;else{Array.isArray(y[f])?(b=y[f].indexOf(p))!=-1&&y[f].splice(b,1):y[f]=[y[f]],typeof m!="number"&&(m=c(p));var v=y[f];for(b=0;bm)break}v.splice(b,0,p)}},d.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var m=f[p];if(m){if(typeof m=="string")return this.bindKey(m,p);typeof m=="function"&&(m={exec:m}),typeof m=="object"&&(m.name||(m.name=p),this.addCommand(m))}},this)},d.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},d.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},d.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},d.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(D){return D}),m=p.pop(),y=o[m];if(o.FUNCTION_KEYS[y])m=o.FUNCTION_KEYS[y].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:m.toUpperCase(),hashId:-1}}else return{key:m,hashId:-1};for(var b=0,v=p.length;v--;){var E=o.KEY_MODS[p[v]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+p[v]+" in "+f),!1;b|=E}return{key:m,hashId:b}},d.prototype.findKeyCommand=function(f,p){var m=l[f]+p;return this.commandKeyBinding[m]},d.prototype.handleKeyboard=function(f,p,m,y){if(!(y<0)){var b=l[p]+m,v=this.commandKeyBinding[b];return f.$keyChain&&(f.$keyChain+=" "+b,v=this.commandKeyBinding[f.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||b,{command:"null"}):(f.$keyChain&&((!p||p==4)&&m.length==1?f.$keyChain=f.$keyChain.slice(0,-b.length-1):(p==-1||y>0)&&(f.$keyChain="")),{command:v})}},d.prototype.getStatusText=function(f,p){return p.$keyChain||""},d}();function c(d){return typeof d=="object"&&d.bindKey&&d.bindKey.position||(d.isDefault?-100:0)}var h=function(d){s(f,d);function f(p,m){var y=d.call(this,p,m)||this;return y.$singleCommand=!0,y}return f}(u);h.call=function(d,f,p){u.prototype.$init.call(d,f,p,!0)},u.call=function(d,f,p){u.prototype.$init.call(d,f,p,!1)},n.HashHandler=h,n.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(f[m]=p[m])},c(h,d)};return function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(h,d);function f(){this.constructor=h}h.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),o=r("../lib/oop"),a=r("../keyboard/hash_handler").MultiHashHandler,l=r("../lib/event_emitter").EventEmitter,u=function(c){s(h,c);function h(d,f){var p=c.call(this,f,d)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(m){return m.args?m.command.exec(m.editor,m.args,m.event,!1):m.command.exec(m.editor,{},m.event,!0)}),p}return h.prototype.exec=function(d,f,p){if(Array.isArray(d)){for(var m=d.length;m--;)if(this.exec(d[m],f,p))return!0;return!1}if(typeof d=="string"&&(d=this.commands[d]),!this.canExecute(d,f))return!1;var y={editor:f,command:d,args:p};return y.returnValue=this._emit("exec",y),this._signal("afterExec",y),y.returnValue!==!1},h.prototype.canExecute=function(d,f){return typeof d=="string"&&(d=this.commands[d]),!(!d||f&&f.$readOnly&&!d.readOnly||this.$checkCommandState!=!1&&d.isAvailable&&!d.isAvailable(f))},h.prototype.toggleRecording=function(d){if(!this.$inReplay)return d&&d._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},h.prototype.replay=function(d){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(d);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,d):this.exec(f[0],d,f[1])},this)}finally{this.$inReplay=!1}}},h.prototype.trimMacro=function(d){return d.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},h}(a);o.implement(u.prototype,l),n.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(r,n,i){var s=r("../lib/lang"),o=r("../config"),a=r("../range").Range;function l(c,h){return{win:c,mac:h}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(c){o.loadModule("ace/ext/settings_menu",function(h){h.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(c){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(c){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(c,h){typeof h=="number"&&!isNaN(h)&&c.gotoLine(h),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(c){o.loadModule("ace/ext/searchbox",function(h){h.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(c,h){c.navigateUp(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(c,h){c.navigateDown(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(c,h){c.navigateLeft(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(c,h){c.navigateRight(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var h=c.$copyWithEmptySelection&&c.selection.isEmpty(),d=h?c.selection.getLineRange():c.selection.getRange();c._emit("cut",d),d.isEmpty()||c.session.remove(d),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,h){c.$handlePaste(h)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(c){o.loadModule("ace/ext/searchbox",function(h){h.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(c){var h=c.selection.getRange();h.start.column=0,c.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(c){var h=c.selection.getRange();h.end.column=Number.MAX_VALUE,c.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,h){c.insert(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,h){c.insert(s.stringRepeat(h.text||"",h.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(c){c.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var h=c.selection.getRange();h.start.column=h.end.column=0,h.end.row++,c.selection.setRange(h,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(c){for(var h=c.selection.isBackwards(),d=h?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),f=h?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),p=c.session.doc.getLine(d.row).length,m=c.session.doc.getTextRange(c.selection.getRange()),y=m.replace(/\n\s*/," ").length,b=c.session.doc.getLine(d.row),v=d.row+1;v<=f.row+1;v++){var E=s.stringTrimLeft(s.stringTrimRight(c.session.doc.getLine(v)));E.length!==0&&(E=" "+E),b+=E}f.row+10?(c.selection.moveCursorTo(d.row,d.column),c.selection.selectTo(d.row,d.column+y)):(p=c.session.doc.getLine(d.row).length>p?p+1:p,c.selection.moveCursorTo(d.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(c){var h=c.session.doc.getLength()-1,d=c.session.doc.getLine(h).length,f=c.selection.rangeList.ranges,p=[];f.length<1&&(f=[c.selection.getRange()]);for(var m=0;mu[c].column&&c++,f.unshift(c,0),u.splice.apply(u,f),this.$updateRows()}}},a.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var u=!0;l.forEach(function(c,h){if(c)for(u=!1,c.row=h;c.$oldWidget;)c.$oldWidget.row=h,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},a.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[l.row];return u&&(l.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},a.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var u=this.editor.renderer;l.html&&!l.el&&(l.el=s.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=s.createElement("div"),l.el.textContent=l.text),l.el&&(s.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&s.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",u.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(l.row,0);if(l.$fold=c,c){var h=this.session.lineWidgets;l.row==c.end.row&&!h[c.start.row]?h[c.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(l),l},a.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[l.row];if(u==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;u;){if(u.$oldWidget==l){u.$oldWidget=l.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},a.prototype.getWidgetsAtRow=function(l){for(var u=this.session.lineWidgets,c=u&&u[l],h=[];c;)h.push(c),c=c.$oldWidget;return h},a.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},a.prototype.measureWidgets=function(l,u){var c=this.session._changedWidgets,h=u.layerConfig;if(!(!c||!c.length)){for(var d=1/0,f=0;f0&&!h[d];)d--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var p=d;p<=f;p++){var m=h[p];if(!(!m||!m.el)){if(m.hidden){m.el.style.top=-100-(m.pixelHeight||0)+"px";continue}m._inDocument||(m._inDocument=!0,u.container.appendChild(m.el));var y=u.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;m.coverLine||(y+=c.lineHeight*this.session.getRowLineCount(m.row)),m.el.style.top=y-c.offset+"px";var b=m.coverGutter?0:u.gutterWidth;m.fixedWidth||(b-=u.scrollLeft),m.el.style.left=b+"px",m.fullWidth&&m.screenWidth&&(m.el.style.minWidth=c.width+2*c.padding+"px"),m.fixedWidth?m.el.style.right=u.scrollBar.getWidth()+"px":m.el.style.right=""}}}},a}();n.LineWidgets=o}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(r,n,i){var s=r("../lib/keys"),o=r("../mouse/default_gutter_handler").GutterTooltip,a=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===s.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=s.enter)return;c.preventDefault();var h=this.editor.getCursorPosition().row;this.editor.isRowVisible(h)||this.editor.scrollToLine(h,!0,!0),setTimeout((function(){var d=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(d),p=this.$findNearestAnnotation(d);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-d)0||c+h=0&&this.$isFoldWidgetVisible(c-h))return c-h;if(c+h<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+h))return c+h}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var h=0;c-h>0||c+h=0&&this.$isAnnotationVisible(c-h))return c-h;if(c+h<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+h))return c+h}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var h=this.$getFoldWidget(c);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var h=this.$getAnnotation(c);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},u.prototype.$blurFoldWidget=function(c){var h=this.$getFoldWidget(c);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},u.prototype.$blurAnnotation=function(c){var h=this.$getAnnotation(c);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=L.length&&(L=void 0),{value:L&&L[M++],done:!L}}};throw new TypeError(k?"Object is not iterable.":"Symbol.iterator is not defined.")},o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/lang"),u=r("./lib/useragent"),c=r("./keyboard/textinput").TextInput,h=r("./mouse/mouse_handler").MouseHandler,d=r("./mouse/fold_handler").FoldHandler,f=r("./keyboard/keybinding").KeyBinding,p=r("./edit_session").EditSession,m=r("./search").Search,y=r("./range").Range,b=r("./lib/event_emitter").EventEmitter,v=r("./commands/command_manager").CommandManager,E=r("./commands/default_commands").commands,D=r("./config"),C=r("./token_iterator").TokenIterator,w=r("./line_widgets").LineWidgets,A=r("./keyboard/gutter_handler").GutterKeyboardHandler,$=r("./config").nls,O=r("./clipboard"),P=r("./lib/keys"),N=function(){function L(k,T,M){this.session,this.$toDestroy=[];var R=k.getContainerElement();this.container=R,this.renderer=k,this.id="editor"+ ++L.$uid,this.commands=new v(u.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new c(k.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new h(this),new d(this)),this.keyBinding=new f(this),this.$search=new m().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(B,U){U._$emitInputEvent.schedule(31)}),this.setSession(T||M&&M.session||new p("")),D.resetOptions(this),M&&this.setOptions(M),D._signal("editor",this)}return L.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},L.prototype.startOperation=function(k){this.session.startOperation(k)},L.prototype.endOperation=function(k){this.session.endOperation(k)},L.prototype.onStartOperation=function(k){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,k||(this.previousCommand=null)},L.prototype.onEndOperation=function(k){if(this.curOp&&this.session){if(k&&k.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var T=this.curOp.command,M=T&&T.scrollIntoView;if(M){switch(M){case"center-animate":M="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var R=this.selection.getRange(),B=this.renderer.layerConfig;(R.start.row>=B.lastRow||R.end.row<=B.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}M=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},L.prototype.$historyTracker=function(k){if(this.$mergeUndoDeltas){var T=this.prevOp,M=this.$mergeableCommands,R=T.command&&k.command.name==T.command.name;if(k.command.name=="insertstring"){var B=k.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),R=R&&this.mergeNextCommand&&(!/\s/.test(B)||/\s/.test(T.args)),this.mergeNextCommand=!0}else R=R&&M.indexOf(k.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(R=!1),R?this.session.mergeUndoDeltas=!0:M.indexOf(k.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},L.prototype.setKeyboardHandler=function(k,T){if(k&&typeof k=="string"&&k!="ace"){this.$keybindingId=k;var M=this;D.loadModule(["keybinding",k],function(R){M.$keybindingId==k&&M.keyBinding.setKeyboardHandler(R&&R.handler),T&&T()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(k),T&&T()},L.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},L.prototype.setSession=function(k){if(this.session!=k){this.curOp&&this.endOperation(),this.curOp={};var T=this.session;if(T){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var M=this.session.getSelection();M.off("changeCursor",this.$onCursorChange),M.off("changeSelection",this.$onSelectionChange)}this.session=k,k?(this.$onDocumentChange=this.onDocumentChange.bind(this),k.on("change",this.$onDocumentChange),this.renderer.setSession(k),this.$onChangeMode=this.onChangeMode.bind(this),k.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),k.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),k.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),k.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),k.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),k.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=k.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(k)),this._signal("changeSession",{session:k,oldSession:T}),this.curOp=null,T&&T._signal("changeEditor",{oldEditor:this}),k&&k._signal("changeEditor",{editor:this}),k&&!k.destroyed&&k.bgTokenizer.scheduleStart()}},L.prototype.getSession=function(){return this.session},L.prototype.setValue=function(k,T){return this.session.doc.setValue(k),T?T==1?this.navigateFileEnd():T==-1&&this.navigateFileStart():this.selectAll(),k},L.prototype.getValue=function(){return this.session.getValue()},L.prototype.getSelection=function(){return this.selection},L.prototype.resize=function(k){this.renderer.onResize(k)},L.prototype.setTheme=function(k,T){this.renderer.setTheme(k,T)},L.prototype.getTheme=function(){return this.renderer.getTheme()},L.prototype.setStyle=function(k){this.renderer.setStyle(k)},L.prototype.unsetStyle=function(k){this.renderer.unsetStyle(k)},L.prototype.getFontSize=function(){return this.getOption("fontSize")||a.computedStyle(this.container).fontSize},L.prototype.setFontSize=function(k){this.setOption("fontSize",k)},L.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var k=this;this.$highlightPending=!0,setTimeout(function(){k.$highlightPending=!1;var T=k.session;if(!(!T||T.destroyed)){T.$bracketHighlight&&(T.$bracketHighlight.markerIds.forEach(function(Y){T.removeMarker(Y)}),T.$bracketHighlight=null);var M=k.getCursorPosition(),R=k.getKeyboardHandler(),B=R&&R.$getDirectionForHighlight&&R.$getDirectionForHighlight(k),U=T.getMatchingBracketRanges(M,B);if(!U){var V=new C(T,M.row,M.column),K=V.getCurrentToken();if(K&&/\b(?:tag-open|tag-name)/.test(K.type)){var J=T.getMatchingTags(M);J&&(U=[J.openTagName.isEmpty()?J.openTag:J.openTagName,J.closeTagName.isEmpty()?J.closeTag:J.closeTagName])}}if(!U&&T.$mode.getMatching&&(U=T.$mode.getMatching(k.session)),!U){k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide();return}var G="ace_bracket";Array.isArray(U)?U.length==1&&(G="ace_error_bracket"):U=[U],U.length==2&&(y.comparePoints(U[0].end,U[1].start)==0?U=[y.fromPoints(U[0].start,U[1].end)]:y.comparePoints(U[0].start,U[1].end)==0&&(U=[y.fromPoints(U[1].start,U[0].end)])),T.$bracketHighlight={ranges:U,markerIds:U.map(function(Y){return T.addMarker(Y,G,"text")})},k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide()}},50)}},L.prototype.focus=function(){this.textInput.focus()},L.prototype.isFocused=function(){return this.textInput.isFocused()},L.prototype.blur=function(){this.textInput.blur()},L.prototype.onFocus=function(k){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",k))},L.prototype.onBlur=function(k){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",k))},L.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},L.prototype.onDocumentChange=function(k){var T=this.session.$useWrapMode,M=k.start.row==k.end.row?k.end.row:1/0;this.renderer.updateLines(k.start.row,M,T),this._signal("change",k),this.$cursorChange()},L.prototype.onTokenizerUpdate=function(k){var T=k.data;this.renderer.updateLines(T.first,T.last)},L.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},L.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},L.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},L.prototype.$updateHighlightActiveLine=function(){var k=this.getSession(),T;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(T=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(T=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(T=!1)),k.$highlightLineMarker&&!T)k.removeMarker(k.$highlightLineMarker.id),k.$highlightLineMarker=null;else if(!k.$highlightLineMarker&&T){var M=new y(T.row,T.column,T.row,1/0);M.id=k.addMarker(M,"ace_active-line","screenLine"),k.$highlightLineMarker=M}else T&&(k.$highlightLineMarker.start.row=T.row,k.$highlightLineMarker.end.row=T.row,k.$highlightLineMarker.start.column=T.column,k._signal("changeBackMarker"))},L.prototype.onSelectionChange=function(k){var T=this.session;if(T.$selectionMarker&&T.removeMarker(T.$selectionMarker),T.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var M=this.selection.getRange(),R=this.getSelectionStyle();T.$selectionMarker=T.addMarker(M,"ace_selection",R)}var B=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(B),this._signal("changeSelection")},L.prototype.$getSelectionHighLightRegexp=function(){var k=this.session,T=this.getSelectionRange();if(!(T.isEmpty()||T.isMultiLine())){var M=T.start.column,R=T.end.column,B=k.getLine(T.start.row),U=B.substring(M,R);if(!(U.length>5e3||!/[\w\d]/.test(U))){var V=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:U}),K=B.substring(M-1,R+1);if(V.test(K))return V}}},L.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},L.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},L.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},L.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},L.prototype.onChangeMode=function(k){this.renderer.updateText(),this._emit("changeMode",k)},L.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},L.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},L.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},L.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},L.prototype.getCopyText=function(){var k=this.getSelectedText(),T=this.session.doc.getNewLineCharacter(),M=!1;if(!k&&this.$copyWithEmptySelection){M=!0;for(var R=this.selection.getAllRanges(),B=0;BY.search(/\S|$/)){var K=Y.substr(B.column).search(/\S|$/);M.doc.removeInLine(B.row,B.column,B.column+K)}}this.clearSelection();var J=B.column,G=M.getState(B.row),Y=M.getLine(B.row),Q=R.checkOutdent(G,Y,k);if(M.insert(B,k),U&&U.selection&&(U.selection.length==2?this.selection.setSelectionRange(new y(B.row,J+U.selection[0],B.row,J+U.selection[1])):this.selection.setSelectionRange(new y(B.row+U.selection[0],U.selection[1],B.row+U.selection[2],U.selection[3]))),this.$enableAutoIndent){if(M.getDocument().isNewLine(k)){var X=R.getNextLineIndent(G,Y.slice(0,B.column),M.getTabString());M.insert({row:B.row+1,column:0},X)}Q&&R.autoOutdent(G,M,B.row)}},L.prototype.autoIndent=function(){for(var k=this.session,T=k.getMode(),M=this.selection.isEmpty()?[new y(0,0,k.doc.getLength()-1,0)]:this.selection.getAllRanges(),R="",B="",U="",V=k.getTabString(),K=0;K0&&(R=k.getState(Y-1),B=k.getLine(Y-1),U=T.getNextLineIndent(R,B,V));var Q=k.getLine(Y),X=T.$getIndent(Q);if(U!==X){if(X.length>0){var le=new y(Y,0,Y,X.length);k.remove(le)}U.length>0&&k.insert({row:Y,column:0},U)}T.autoOutdent(R,k,Y)}},L.prototype.onTextInput=function(k,T){if(!T)return this.keyBinding.onTextInput(k);this.startOperation({command:{name:"insertstring"}});var M=this.applyComposition.bind(this,k,T);this.selection.rangeCount?this.forEachSelection(M):M(),this.endOperation()},L.prototype.applyComposition=function(k,T){if(T.extendLeft||T.extendRight){var M=this.selection.getRange();M.start.column-=T.extendLeft,M.end.column+=T.extendRight,M.start.column<0&&(M.start.row--,M.start.column+=this.session.getLine(M.start.row).length+1),this.selection.setRange(M),!k&&!M.isEmpty()&&this.remove()}if((k||!this.selection.isEmpty())&&this.insert(k,!0),T.restoreStart||T.restoreEnd){var M=this.selection.getRange();M.start.column-=T.restoreStart,M.end.column-=T.restoreEnd,this.selection.setRange(M)}},L.prototype.onCommandKey=function(k,T,M){return this.keyBinding.onCommandKey(k,T,M)},L.prototype.setOverwrite=function(k){this.session.setOverwrite(k)},L.prototype.getOverwrite=function(){return this.session.getOverwrite()},L.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},L.prototype.setScrollSpeed=function(k){this.setOption("scrollSpeed",k)},L.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},L.prototype.setDragDelay=function(k){this.setOption("dragDelay",k)},L.prototype.getDragDelay=function(){return this.getOption("dragDelay")},L.prototype.setSelectionStyle=function(k){this.setOption("selectionStyle",k)},L.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},L.prototype.setHighlightActiveLine=function(k){this.setOption("highlightActiveLine",k)},L.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},L.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.setHighlightSelectedWord=function(k){this.setOption("highlightSelectedWord",k)},L.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},L.prototype.setAnimatedScroll=function(k){this.renderer.setAnimatedScroll(k)},L.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},L.prototype.setShowInvisibles=function(k){this.renderer.setShowInvisibles(k)},L.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},L.prototype.setDisplayIndentGuides=function(k){this.renderer.setDisplayIndentGuides(k)},L.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},L.prototype.setHighlightIndentGuides=function(k){this.renderer.setHighlightIndentGuides(k)},L.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},L.prototype.setShowPrintMargin=function(k){this.renderer.setShowPrintMargin(k)},L.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},L.prototype.setPrintMarginColumn=function(k){this.renderer.setPrintMarginColumn(k)},L.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},L.prototype.setReadOnly=function(k){this.setOption("readOnly",k)},L.prototype.getReadOnly=function(){return this.getOption("readOnly")},L.prototype.setBehavioursEnabled=function(k){this.setOption("behavioursEnabled",k)},L.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},L.prototype.setWrapBehavioursEnabled=function(k){this.setOption("wrapBehavioursEnabled",k)},L.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},L.prototype.setShowFoldWidgets=function(k){this.setOption("showFoldWidgets",k)},L.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},L.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.remove=function(k){this.selection.isEmpty()&&(k=="left"?this.selection.selectLeft():this.selection.selectRight());var T=this.getSelectionRange();if(this.getBehavioursEnabled()){var M=this.session,R=M.getState(T.start.row),B=M.getMode().transformAction(R,"deletion",this,M,T);if(T.end.column===0){var U=M.getTextRange(T);if(U[U.length-1]==` -`){var V=M.getLine(T.end.row);/^\s+$/.test(V)&&(T.end.column=V.length)}}B&&(T=B)}this.session.remove(T),this.clearSelection()},L.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var k=this.getSelectionRange();k.start.column==k.end.column&&k.start.row==k.end.row&&(k.end.column=0,k.end.row++),this.session.remove(k),this.clearSelection()},L.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var k=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(k)},L.prototype.setGhostText=function(k,T){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(k,T)},L.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},L.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var k=this.getCursorPosition(),T=k.column;if(T!==0){var M=this.session.getLine(k.row),R,B;TK.toLowerCase()?1:0});for(var B=new y(0,0,0,0),R=k.first;R<=k.last;R++){var U=T.getLine(R);B.start.row=R,B.end.row=R,B.end.column=U.length,T.replace(B,M[R-k.first])}},L.prototype.toggleCommentLines=function(){var k=this.session.getState(this.getCursorPosition().row),T=this.$getSelectedRows();this.session.getMode().toggleCommentLines(k,this.session,T.first,T.last)},L.prototype.toggleBlockComment=function(){var k=this.getCursorPosition(),T=this.session.getState(k.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(T,this.session,M,k)},L.prototype.getNumberAt=function(k,T){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var R=this.session.getLine(k);M.lastIndex=T){var U={value:B[0],start:B.index,end:B.index+B[0].length};return U}}return null},L.prototype.modifyNumber=function(k){var T=this.selection.getCursor().row,M=this.selection.getCursor().column,R=new y(T,M-1,T,M),B=this.session.getTextRange(R);if(!isNaN(parseFloat(B))&&isFinite(B)){var U=this.getNumberAt(T,M);if(U){var V=U.value.indexOf(".")>=0?U.start+U.value.indexOf(".")+1:U.end,K=U.start+U.value.length-V,J=parseFloat(U.value);J*=Math.pow(10,K),V!==U.end&&M=V&&U<=K&&(M=ke,J.selection.clearSelection(),J.moveCursorTo(k,V+R),J.selection.selectTo(k,K+R)),V=K});for(var G=this.$toggleWordPairs,Y,Q=0;Q=K&&V<=J&&X.match(/((?:https?|ftp):\/\/[\S]+)/)){G=X.replace(/[\s:.,'";}\]]+$/,"");break}K=J}}catch(le){M={error:le}}finally{try{Q&&!Q.done&&(R=Y.return)&&R.call(Y)}finally{if(M)throw M.error}}return G},L.prototype.openLink=function(){var k=this.selection.getCursor(),T=this.findLinkAt(k.row,k.column);return T&&window.open(T,"_blank"),T!=null},L.prototype.removeLines=function(){var k=this.$getSelectedRows();this.session.removeFullLines(k.first,k.last),this.clearSelection()},L.prototype.duplicateSelection=function(){var k=this.selection,T=this.session,M=k.getRange(),R=k.isBackwards();if(M.isEmpty()){var B=M.start.row;T.duplicateLines(B,B)}else{var U=R?M.start:M.end,V=T.insert(U,T.getTextRange(M));M.start=U,M.end=V,k.setSelectionRange(M,R)}},L.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},L.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},L.prototype.moveText=function(k,T,M){return this.session.moveText(k,T,M)},L.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},L.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},L.prototype.$moveLines=function(k,T){var M,R,B=this.selection;if(!B.inMultiSelectMode||this.inVirtualSelectionMode){var U=B.toOrientedRange();M=this.$getSelectedRows(U),R=this.session.$moveLines(M.first,M.last,T?0:k),T&&k==-1&&(R=0),U.moveBy(R,0),B.fromOrientedRange(U)}else{var V=B.rangeList.ranges;B.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var K=0,J=0,G=V.length,Y=0;Yle+1)break;le=be.last}for(Y--,K=this.session.$moveLines(X,le,T?0:k),T&&k==-1&&(Q=Y+1);Q<=Y;)V[Q].moveBy(K,0),Q++;T||(K=0),J+=K}B.fromOrientedRange(B.ranges[0]),B.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},L.prototype.$getSelectedRows=function(k){return k=(k||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(k.start.row),last:this.session.getRowFoldEnd(k.end.row)}},L.prototype.onCompositionStart=function(k){this.renderer.showComposition(k)},L.prototype.onCompositionUpdate=function(k){this.renderer.setCompositionText(k)},L.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},L.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},L.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},L.prototype.isRowVisible=function(k){return k>=this.getFirstVisibleRow()&&k<=this.getLastVisibleRow()},L.prototype.isRowFullyVisible=function(k){return k>=this.renderer.getFirstFullyVisibleRow()&&k<=this.renderer.getLastFullyVisibleRow()},L.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},L.prototype.$moveByPage=function(k,T){var M=this.renderer,R=this.renderer.layerConfig,B=k*Math.floor(R.height/R.lineHeight);T===!0?this.selection.$moveSelection(function(){this.moveCursorBy(B,0)}):T===!1&&(this.selection.moveCursorBy(B,0),this.selection.clearSelection());var U=M.scrollTop;M.scrollBy(0,B*R.lineHeight),T!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(U)},L.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},L.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},L.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},L.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},L.prototype.scrollPageDown=function(){this.$moveByPage(1)},L.prototype.scrollPageUp=function(){this.$moveByPage(-1)},L.prototype.scrollToRow=function(k){this.renderer.scrollToRow(k)},L.prototype.scrollToLine=function(k,T,M,R){this.renderer.scrollToLine(k,T,M,R)},L.prototype.centerSelection=function(){var k=this.getSelectionRange(),T={row:Math.floor(k.start.row+(k.end.row-k.start.row)/2),column:Math.floor(k.start.column+(k.end.column-k.start.column)/2)};this.renderer.alignCursor(T,.5)},L.prototype.getCursorPosition=function(){return this.selection.getCursor()},L.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},L.prototype.getSelectionRange=function(){return this.selection.getRange()},L.prototype.selectAll=function(){this.selection.selectAll()},L.prototype.clearSelection=function(){this.selection.clearSelection()},L.prototype.moveCursorTo=function(k,T){this.selection.moveCursorTo(k,T)},L.prototype.moveCursorToPosition=function(k){this.selection.moveCursorToPosition(k)},L.prototype.jumpToMatching=function(k,T){var M=this.getCursorPosition(),R=new C(this.session,M.row,M.column),B=R.getCurrentToken(),U=0;B&&B.type.indexOf("tag-name")!==-1&&(B=R.stepBackward());var V=B||R.stepForward();if(V){var K,J=!1,G={},Y=M.column-V.start,Q,X={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(V.value.match(/[{}()\[\]]/g)){for(;Y1?G[V.value]++:B.value==="=0;--U)this.$tryReplace(M[U],k)&&R++;return this.selection.setSelectionRange(B),R},L.prototype.$tryReplace=function(k,T){var M=this.session.getTextRange(k);return T=this.$search.replace(M,T),T!==null?(k.end=this.session.replace(k,T),k):null},L.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},L.prototype.find=function(k,T,M){T||(T={}),typeof k=="string"||k instanceof RegExp?T.needle=k:typeof k=="object"&&o.mixin(T,k);var R=this.selection.getRange();T.needle==null&&(k=this.session.getTextRange(R)||this.$search.$options.needle,k||(R=this.session.getWordRange(R.start.row,R.start.column),k=this.session.getTextRange(R)),this.$search.set({needle:k})),this.$search.set(T),T.start||this.$search.set({start:R});var B=this.$search.find(this.session);if(T.preventScroll)return B;if(B)return this.revealRange(B,M),B;T.backwards?R.start=R.end:R.end=R.start,this.selection.setRange(R)},L.prototype.findNext=function(k,T){this.find({skipCurrent:!0,backwards:!1},k,T)},L.prototype.findPrevious=function(k,T){this.find(k,{skipCurrent:!0,backwards:!0},T)},L.prototype.revealRange=function(k,T){this.session.unfold(k),this.selection.setSelectionRange(k);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(k.start,k.end,.5),T!==!1&&this.renderer.animateScrolling(M)},L.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},L.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},L.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(k){k.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},L.prototype.setAutoScrollEditorIntoView=function(k){if(k){var T,M=this,R=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var B=this.$scrollAnchor;B.style.cssText="position:absolute",this.container.insertBefore(B,this.container.firstChild);var U=this.on("changeSelection",function(){R=!0}),V=this.renderer.on("beforeRender",function(){R&&(T=M.renderer.container.getBoundingClientRect())}),K=this.renderer.on("afterRender",function(){if(R&&T&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var J=M.renderer,G=J.$cursorLayer.$pixelPos,Y=J.layerConfig,Q=G.top-Y.offset;G.top>=0&&Q+T.top<0?R=!0:G.topwindow.innerHeight?R=!1:R=null,R!=null&&(B.style.top=Q+"px",B.style.left=G.left+"px",B.style.height=Y.lineHeight+"px",B.scrollIntoView(R)),R=T=null}});this.setAutoScrollEditorIntoView=function(J){J||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",U),this.renderer.off("afterRender",K),this.renderer.off("beforeRender",V))}}},L.prototype.$resetCursorStyle=function(){var k=this.$cursorStyle||"ace",T=this.renderer.$cursorLayer;T&&(T.setSmoothBlinking(/smooth/.test(k)),T.isBlinking=!this.$readOnly&&k!="wide",a.setCssClass(T.element,"ace_slim-cursors",/slim/.test(k)))},L.prototype.prompt=function(k,T,M){var R=this;D.loadModule("ace/ext/prompt",function(B){B.prompt(R,k,T,M)})},L}();N.$uid=0,N.prototype.curOp=null,N.prototype.prevOp={},N.prototype.$mergeableCommands=["backspace","del","insertstring"],N.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(N.prototype,b),D.defineOptions(N.prototype,"editor",{selectionStyle:{set:function(L){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:L})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(L){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(L){this.textInput.setReadOnly(L),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(L){this.textInput.setCopyWithEmptySelection(L)},initialValue:!1},cursorStyle:{set:function(L){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(L){this.setAutoScrollEditorIntoView(L)}},keyboardHandler:{set:function(L){this.setKeyboardHandler(L)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(L){this.session.setValue(L)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(L){this.setSession(L)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(L){this.renderer.$gutterLayer.setShowLineNumbers(L),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),L&&this.$relativeLineNumbers?F.attach(this):F.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(L){this.$showLineNumbers&&L?F.attach(this):F.detach(this)}},placeholder:{set:function(L){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var k=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(k&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),a.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!k&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),a.addCssClass(this.container,"ace_hasPlaceholder");var T=a.createElement("div");T.className="ace_placeholder",T.textContent=this.$placeholder||"",this.renderer.placeholderNode=T,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!k&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(L){var k={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(R){R.blur(),R.renderer.scroller.focus()},readOnly:!0},T=function(R){if(R.target==this.renderer.scroller&&R.keyCode===P.enter){R.preventDefault();var B=this.getCursorPosition().row;this.isRowVisible(B)||this.scrollToLine(B,!0,!0),this.focus()}},M;L?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",$("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",$("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",T.bind(this)),this.commands.addCommand(k),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",$("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",$("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),M||(M=new A(this)),M.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",T.bind(this)),this.commands.removeCommand(k),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),M&&M.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(L){this.$textInputAriaLabel=L},initialValue:""},enableMobileMenu:{set:function(L){this.$enableMobileMenu=L},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var F={getText:function(L,k){return(Math.abs(L.selection.lead.row-k)||k+1+(k<9?"·":""))+""},getWidth:function(L,k,T){return Math.max(k.toString().length,(T.lastRow+1).toString().length,2)*T.characterWidth},update:function(L,k){k.renderer.$loop.schedule(k.renderer.CHANGE_GUTTER)},attach:function(L){L.renderer.$gutterLayer.$renderer=this,L.on("changeSelection",this.update),this.update(null,L)},detach:function(L){L.renderer.$gutterLayer.$renderer==this&&(L.renderer.$gutterLayer.$renderer=null),L.off("changeSelection",this.update),this.update(null,L)}};n.Editor=N}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function a(l,u){this.element=l,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return a.prototype.moveContainer=function(l){s.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},a.prototype.pageChanged=function(l,u){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},a.prototype.computeLineTop=function(l,u,c){var h=u.firstRowScreen*u.lineHeight,d=Math.floor(h/this.canvasHeight),f=c.documentToScreenRow(l,0)*u.lineHeight;return f-d*this.canvasHeight},a.prototype.computeLineHeight=function(l,u,c){return u.lineHeight*c.getRowLineCount(l)},a.prototype.getLength=function(){return this.cells.length},a.prototype.get=function(l){return this.cells[l]},a.prototype.shift=function(){this.$cacheCell(this.cells.shift())},a.prototype.pop=function(){this.$cacheCell(this.cells.pop())},a.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var u=s.createFragment(this.element),c=0;cE&&(w=v.end.row+1,v=m.getNextFoldLine(w,v),E=v?v.start.row:1/0),w>b){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}D=this.$lines.get(++C),D?D.row=w:(D=this.$lines.createCell(w,p,this.session,d),this.$lines.push(D)),this.$renderCell(D,p,v,w),w++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var m=this.session,y=m.gutterRenderer||this.$renderer,b=m.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||m.$useWrapMode)&&(v=m.getLength()+b-1);var E=y?y.getWidth(m,v,p):v.toString().length*p.characterWidth,D=this.$padding||this.$computePadding();E+=D.left+D.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var m=this.$lines.cells;this.$cursorCell=null;for(var y=0;y=this.$cursorRow){if(b.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(y>0&&v&&v.start.row==m[y-1].row)b=m[y-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},f.prototype.scrollLines=function(p){var m=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(m,p))return this.update(p);this.$lines.moveContainer(p);var y=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=y,!m||b0;v--)this.$lines.shift();if(b>y)for(var v=this.session.getFoldedRowCount(y+1,b);v>0;v--)this.$lines.pop();p.firstRowb&&this.$lines.push(this.$renderLines(p,b+1,y)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,m,y){for(var b=[],v=m,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session,d);this.$renderCell(C,p,E,v),b.push(C),v++}return b},f.prototype.$renderCell=function(p,m,y,b){var v=p.element,E=this.session,D=v.childNodes[0],C=v.childNodes[1],w=v.childNodes[2],A=w.firstChild,$=E.$firstLineNumber,O=E.$breakpoints,P=E.$decorations,N=E.gutterRenderer||this.$renderer,F=this.$showFoldWidgets&&E.foldWidgets,L=y?y.start.row:Number.MAX_VALUE,k=m.lineHeight+"px",T=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=(N?N.getText(E,b):b+$).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||y&&b=L&&this.$cursorRow<=y.end.row)&&(T+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),O[b]&&(T+=O[b]),P[b]&&(T+=P[b]),this.$annotations[b]&&b!==L&&(T+=this.$annotations[b].className),F){var B=F[b];B==null&&(B=F[b]=E.getFoldWidget(b))}if(B){var U="ace_fold-widget ace_"+B,V=B=="start"&&b==L&&by.right-m.right)return"foldWidgets"},f}();h.prototype.$fixedWidth=!1,h.prototype.$highlightGutterLine=!0,h.prototype.$renderer="",h.prototype.$showLineNumbers=!0,h.prototype.$showFoldWidgets=!0,o.implement(h.prototype,l);function d(f){var p=document.createTextNode("");f.appendChild(p);var m=s.createElement("span");f.appendChild(m);var y=s.createElement("span");f.appendChild(y);var b=s.createElement("span");return y.appendChild(b),f}n.Gutter=h}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(r,n,i){var s=r("../range").Range,o=r("../lib/dom"),a=function(){function u(c){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,h){var d=this.i!=-1&&this.element.childNodes[this.i];d?this.i++:(d=document.createElement("div"),this.element.appendChild(d),this.i=-1),d.style.cssText=h,d.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var h;for(var d in this.markers){var f=this.markers[d];if(!f.range){f.update(h,this,this.session,c);continue}var p=f.range.clipRows(c.firstRow,c.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var m=this.$getTop(p.start.row,c),y=this.$padding+p.start.column*c.characterWidth;f.renderer(h,p,y,m,c)}else f.type=="fullLine"?this.drawFullLineMarker(h,p,f.clazz,c):f.type=="screenLine"?this.drawScreenLineMarker(h,p,f.clazz,c):p.isMultiLine()?f.type=="text"?this.drawTextMarker(h,p,f.clazz,c):this.drawMultiLineMarker(h,p,f.clazz,c):this.drawSingleLineMarker(h,p,f.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.iC,v==b),f,v==b?0:1,p)},u.prototype.drawMultiLineMarker=function(c,h,d,f,p){var m=this.$padding,y=f.lineHeight,b=this.$getTop(h.start.row,f),v=m+h.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(h.start.row)){var E=h.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(c,E,d+" ace_br1 ace_start",f,null,p)}else this.elt(d+" ace_br1 ace_start","height:"+y+"px;right:"+m+"px;top:"+b+"px;left:"+v+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(h.end.row)){var E=h.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(c,E,d+" ace_br12",f,null,p)}else{b=this.$getTop(h.end.row,f);var D=h.end.column*f.characterWidth;this.elt(d+" ace_br12","height:"+y+"px;width:"+D+"px;top:"+b+"px;left:"+m+"px;"+(p||""))}if(y=(h.end.row-h.start.row-1)*f.lineHeight,!(y<=0)){b=this.$getTop(h.start.row+1,f);var C=(h.start.column?1:0)|(h.end.column?0:8);this.elt(d+(C?" ace_br"+C:""),"height:"+y+"px;right:"+m+"px;top:"+b+"px;left:"+m+"px;"+(p||""))}},u.prototype.drawSingleLineMarker=function(c,h,d,f,p,m){if(this.session.$bidiHandler.isBidiRow(h.start.row))return this.drawBidiSingleLineMarker(c,h,d,f,p,m);var y=f.lineHeight,b=(h.end.column+(p||0)-h.start.column)*f.characterWidth,v=this.$getTop(h.start.row,f),E=this.$padding+h.start.column*f.characterWidth;this.elt(d,"height:"+y+"px;width:"+b+"px;top:"+v+"px;left:"+E+"px;"+(m||""))},u.prototype.drawBidiSingleLineMarker=function(c,h,d,f,p,m){var y=f.lineHeight,b=this.$getTop(h.start.row,f),v=this.$padding,E=this.session.$bidiHandler.getSelections(h.start.column,h.end.column);E.forEach(function(D){this.elt(d,"height:"+y+"px;width:"+(D.width+(p||0))+"px;top:"+b+"px;left:"+(v+D.left)+"px;"+(m||""))},this)},u.prototype.drawFullLineMarker=function(c,h,d,f,p){var m=this.$getTop(h.start.row,f),y=f.lineHeight;h.start.row!=h.end.row&&(y+=this.$getTop(h.end.row,f)-m),this.elt(d,"height:"+y+"px;top:"+m+"px;left:0;right:0;"+(p||""))},u.prototype.drawScreenLineMarker=function(c,h,d,f,p){var m=this.$getTop(h.start.row,f),y=f.lineHeight;this.elt(d,"height:"+y+"px;top:"+m+"px;left:0;right:0;"+(p||""))},u}();a.prototype.$padding=0;function l(u,c,h,d){return(u?1:0)|(c?2:0)|(h?4:0)|(d?8:0)}n.Marker=a}),ace.define("ace/layer/text_util",["require","exports","module"],function(r,n,i){var s=new Set(["text","rparen","lparen"]);n.isTextToken=function(o){return s.has(o)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),a=r("../lib/lang"),l=r("./lines").Lines,u=r("../lib/event_emitter").EventEmitter,c=r("../config").nls,h=r("./text_util").isTextToken,d=function(){function f(p){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,m=p.getNewLineCharacter()==` -`&&p.getNewLineMode()!="windows",y=m?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=y)return this.EOL_CHAR=y,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(m){this._signal("changeCharacterSize",m)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var m=this.$tabStrings=[0],y=1;y$&&(w=A.end.row+1,A=this.session.getNextFoldLine(w,A),$=A?A.start.row:1/0),!(w>v);){var O=E[D++];if(O){this.dom.removeChildren(O),this.$renderLine(O,w,w==$?A:!1),C&&(O.style.top=this.$lines.computeLineTop(w,p,this.session)+"px");var P=p.lineHeight*this.session.getRowLength(w)+"px";O.style.height!=P&&(C=!0,O.style.height=P)}w++}if(C)for(;D0;v--)this.$lines.shift();if(m.lastRow>p.lastRow)for(var v=this.session.getFoldedRowCount(p.lastRow+1,m.lastRow);v>0;v--)this.$lines.pop();p.firstRowm.lastRow&&this.$lines.push(this.$renderLinesFragment(p,m.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,m,y){for(var b=[],v=m,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session),w=C.element;this.dom.removeChildren(w),o.setStyle(w.style,"height",this.$lines.computeLineHeight(v,p,this.session)+"px"),o.setStyle(w.style,"top",this.$lines.computeLineTop(v,p,this.session)+"px"),this.$renderLine(w,v,v==D?E:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",b.push(C),v++}return b},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var m=p.firstRow,y=p.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(p,m,y))},f.prototype.$renderToken=function(p,m,y,b){for(var v=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,D=this.dom.createFragment(this.element),C,w=0;C=E.exec(b);){var A=C[1],$=C[2],O=C[3],P=C[4],N=C[5];if(!(!v.showSpaces&&$)){var F=w!=C.index?b.slice(w,C.index):"";if(w=C.index+C[0].length,F&&D.appendChild(this.dom.createTextNode(F,this.element)),A){var L=v.session.getScreenTabSize(m+C.index);D.appendChild(v.$tabStrings[L].cloneNode(!0)),m+=L-1}else if($)if(v.showSpaces){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space",k.textContent=a.stringRepeat(v.SPACE_CHAR,$.length),D.appendChild(k)}else D.appendChild(this.dom.createTextNode($,this.element));else if(O){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space ace_invalid",k.textContent=a.stringRepeat(v.SPACE_CHAR,O.length),D.appendChild(k)}else if(P){m+=1;var k=this.dom.createElement("span");k.style.width=v.config.characterWidth*2+"px",k.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k.textContent=v.showSpaces?v.SPACE_CHAR:P,D.appendChild(k)}else if(N){m+=1;var k=this.dom.createElement("span");k.style.width=v.config.characterWidth*2+"px",k.className="ace_cjk",k.textContent=N,D.appendChild(k)}}}if(D.appendChild(this.dom.createTextNode(w?b.slice(w):b,this.element)),h(y.type))p.appendChild(D);else{var T="ace_"+y.type.replace(/\./g," ace_"),k=this.dom.createElement("span");y.type=="fold"&&(k.style.width=y.value.length*this.config.characterWidth+"px",k.setAttribute("title",c("inline-fold.closed.title","Unfold code"))),k.className=T,k.appendChild(D),p.appendChild(k)}return m+b.length},f.prototype.renderIndentGuide=function(p,m,y){var b=m.search(this.$indentGuideRe);if(b<=0||b>=y)return m;if(m[0]==" "){b-=b%this.tabSize;for(var v=b/this.tabSize,E=0;EE[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[m.row]!==""&&m.column===p[m.row].length){this.$highlightIndentGuideMarker.dir=1;for(var D=m.row+1;D0){for(var v=0;v=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,m)}}else for(var y=p.length-1;y>=0;y--){var b=p[y];if(this.$highlightIndentGuideMarker.end&&b.row=E;)D=this.$renderToken(C,D,A,$.substring(0,E-b)),$=$.substring(E-b),b=E,C=this.$createLineElement(),p.appendChild(C),C.appendChild(this.dom.createTextNode(a.stringRepeat(" ",y.indent),this.element)),v++,D=0,E=y[v]||Number.MAX_VALUE;$.length!=0&&(b+=$.length,D=this.$renderToken(C,D,A,$))}}y[y.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,D,null,"",!0)},f.prototype.$renderSimpleLine=function(p,m){for(var y=0,b=0;bthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,y,v,E);y=this.$renderToken(p,y,v,E)}}},f.prototype.$renderOverflowMessage=function(p,m,y,b,v){y&&this.$renderToken(p,m,y,b.slice(0,this.MAX_LINE_LENGTH-m));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=v?"":"",p.appendChild(E)},f.prototype.$renderLine=function(p,m,y){if(!y&&y!=!1&&(y=this.session.getFoldLine(m)),y)var b=this.$getFoldLineTokens(m,y);else var b=this.session.getTokens(m);var v=p;if(b.length){var E=this.session.getRowSplitData(m);if(E&&E.length){this.$renderWrappedLine(p,b,E);var v=p.lastChild}else{var v=p;this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v)),this.$renderSimpleLine(v,b)}}else this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v));if(this.showEOL&&v){y&&(m=y.end.row);var D=this.dom.createElement("span");D.className="ace_invisible ace_invisible_eol",D.textContent=m==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(D)}},f.prototype.$getFoldLineTokens=function(p,m){var y=this.session,b=[];function v(D,C,w){for(var A=0,$=0;$+D[A].value.lengthw-C&&(O=O.substring(0,w-C)),b.push({type:D[A].type,value:O}),$=C+O.length,A+=1}for(;$w?b.push({type:D[A].type,value:O.substring(0,w-$)}):b.push(D[A]),$+=O.length,A+=1}}var E=y.getTokens(p);return m.walk(function(D,C,w,A,$){D!=null?b.push({type:"fold",value:D}):($&&(E=y.getTokens(C)),E.length&&v(E,A,w))},m.end.row,this.session.getLine(m.end.row).length),b},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,s.implement(d.prototype,u),n.Text=d}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function a(l){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return a.prototype.$updateOpacity=function(l){for(var u=this.cursors,c=u.length;c--;)s.setStyle(u[c].style,"opacity",l?"":"0")},a.prototype.$startCssAnimation=function(){for(var l=this.cursors,u=l.length;u--;)l[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},a.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},a.prototype.setPadding=function(l){this.$padding=l},a.prototype.setSession=function(l){this.session=l},a.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},a.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},a.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,s.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},a.prototype.addCursor=function(){var l=s.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},a.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},a.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},a.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},a.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),u()},this.blinkInterval),u()}},a.prototype.getPixelPosition=function(l,u){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(l),h=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,l.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),d=(c.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:h,top:d}},a.prototype.isCursorInView=function(l,u){return l.top>=0&&l.topl.height+l.offset||f.top<0)&&c>1)){var p=this.cursors[h++]||this.addCursor(),m=p.style;this.drawCursor?this.drawCursor(p,f,l,u[c],this.session):this.isCursorInView(f,l)?(s.setStyle(m,"display","block"),s.translate(p,f.left,f.top),s.setStyle(m,"width",Math.round(l.characterWidth)+"px"),s.setStyle(m,"height",l.lineHeight+"px")):s.setStyle(m,"display","none")}}for(;this.cursors.length>h;)this.removeCursor();var y=this.session.getOverwrite();this.$setOverwrite(y),this.$pixelPos=f,this.restartTimer()},a.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},a.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},a}();o.prototype.$padding=0,o.prototype.drawCursor=null,n.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var p=function(m,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,v){b.__proto__=v}||function(b,v){for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&(b[E]=v[E])},p(m,y)};return function(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");p(m,y);function b(){this.constructor=m}m.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}}(),o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/event"),u=r("./lib/event_emitter").EventEmitter,c=32768,h=function(){function p(m,y){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+y,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),m.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return p.prototype.setVisible=function(m){this.element.style.display=m?"":"none",this.isVisible=m,this.coeff=1},p}();o.implement(h.prototype,u);var d=function(p){s(m,p);function m(y,b){var v=p.call(this,y,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,b.$scrollbarWidth=v.width=a.scrollbarWidth(y.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return m.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var y=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-y)/(this.coeff-y)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},m.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},m.prototype.setHeight=function(y){this.element.style.height=y+"px"},m.prototype.setScrollHeight=function(y){this.scrollHeight=y,y>c?(this.coeff=c/y,y=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=y+"px"},m.prototype.setScrollTop=function(y){this.scrollTop!=y&&(this.skipEvent=!0,this.scrollTop=y,this.element.scrollTop=y*this.coeff)},m}(h);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var f=function(p){s(m,p);function m(y,b){var v=p.call(this,y,"-h")||this;return v.scrollLeft=0,v.height=b.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return m.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},m.prototype.getHeight=function(){return this.isVisible?this.height:0},m.prototype.setWidth=function(y){this.element.style.width=y+"px"},m.prototype.setInnerWidth=function(y){this.inner.style.width=y+"px"},m.prototype.setScrollWidth=function(y){this.inner.style.width=y+"px"},m.prototype.setScrollLeft=function(y){this.scrollLeft!=y&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=y)},m}(h);n.ScrollBar=d,n.ScrollBarV=d,n.ScrollBarH=f,n.VScrollBar=d,n.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var f=function(p,m){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(y[v]=b[v])},f(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");f(p,m);function y(){this.constructor=p}p.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/event"),u=r("./lib/event_emitter").EventEmitter;a.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ +`),h.row===0&&c.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(c){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),c.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:l("F1","F1"),exec:function(c){c.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:l(null,null),exec:function(c){c.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)n.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(c){c.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("./lib/dom"),o=function(){function a(l){this.session=l,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return a.prototype.getRowLength=function(l){var u;return this.lineWidgets?u=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[l]?1+u:this.$wrapData[l].length+1+u},a.prototype.$getWidgetScreenLength=function(){var l=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(l+=u.rowCount)}),l},a.prototype.$onChangeEditor=function(l){this.attach(l.editor)},a.prototype.attach=function(l){l&&l.widgetManager&&l.widgetManager!=this&&l.widgetManager.detach(),this.editor!=l&&(this.detach(),this.editor=l,l&&(l.widgetManager=this,l.renderer.on("beforeRender",this.measureWidgets),l.renderer.on("afterRender",this.renderWidgets)))},a.prototype.detach=function(l){var u=this.editor;if(u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var c=this.session.lineWidgets;c&&c.forEach(function(h){h&&h.el&&h.el.parentNode&&(h._inDocument=!1,h.el.parentNode.removeChild(h.el))})}},a.prototype.updateOnFold=function(l,u){var c=u.lineWidgets;if(!(!c||!l.action)){for(var h=l.data,d=h.start.row,f=h.end.row,p=l.action=="add",m=d+1;mu[c].column&&c++,f.unshift(c,0),u.splice.apply(u,f),this.$updateRows()}}},a.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var u=!0;l.forEach(function(c,h){if(c)for(u=!1,c.row=h;c.$oldWidget;)c.$oldWidget.row=h,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},a.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[l.row];return u&&(l.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},a.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var u=this.editor.renderer;l.html&&!l.el&&(l.el=s.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=s.createElement("div"),l.el.textContent=l.text),l.el&&(s.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&s.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",u.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(l.row,0);if(l.$fold=c,c){var h=this.session.lineWidgets;l.row==c.end.row&&!h[c.start.row]?h[c.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(l),l},a.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[l.row];if(u==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;u;){if(u.$oldWidget==l){u.$oldWidget=l.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},a.prototype.getWidgetsAtRow=function(l){for(var u=this.session.lineWidgets,c=u&&u[l],h=[];c;)h.push(c),c=c.$oldWidget;return h},a.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},a.prototype.measureWidgets=function(l,u){var c=this.session._changedWidgets,h=u.layerConfig;if(!(!c||!c.length)){for(var d=1/0,f=0;f0&&!h[d];)d--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var p=d;p<=f;p++){var m=h[p];if(!(!m||!m.el)){if(m.hidden){m.el.style.top=-100-(m.pixelHeight||0)+"px";continue}m._inDocument||(m._inDocument=!0,u.container.appendChild(m.el));var y=u.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;m.coverLine||(y+=c.lineHeight*this.session.getRowLineCount(m.row)),m.el.style.top=y-c.offset+"px";var b=m.coverGutter?0:u.gutterWidth;m.fixedWidth||(b-=u.scrollLeft),m.el.style.left=b+"px",m.fullWidth&&m.screenWidth&&(m.el.style.minWidth=c.width+2*c.padding+"px"),m.fixedWidth?m.el.style.right=u.scrollBar.getWidth()+"px":m.el.style.right=""}}}},a}();n.LineWidgets=o}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(r,n,i){var s=r("../lib/keys"),o=r("../mouse/default_gutter_handler").GutterTooltip,a=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===s.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=s.enter)return;c.preventDefault();var h=this.editor.getCursorPosition().row;this.editor.isRowVisible(h)||this.editor.scrollToLine(h,!0,!0),setTimeout((function(){var d=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(d),p=this.$findNearestAnnotation(d);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-d)0||c+h=0&&this.$isFoldWidgetVisible(c-h))return c-h;if(c+h<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+h))return c+h}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var h=0;c-h>0||c+h=0&&this.$isAnnotationVisible(c-h))return c-h;if(c+h<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+h))return c+h}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var h=this.$getFoldWidget(c);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var h=this.$getAnnotation(c);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},u.prototype.$blurFoldWidget=function(c){var h=this.$getFoldWidget(c);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},u.prototype.$blurAnnotation=function(c){var h=this.$getAnnotation(c);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=L.length&&(L=void 0),{value:L&&L[M++],done:!L}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/lang"),u=r("./lib/useragent"),c=r("./keyboard/textinput").TextInput,h=r("./mouse/mouse_handler").MouseHandler,d=r("./mouse/fold_handler").FoldHandler,f=r("./keyboard/keybinding").KeyBinding,p=r("./edit_session").EditSession,m=r("./search").Search,y=r("./range").Range,b=r("./lib/event_emitter").EventEmitter,v=r("./commands/command_manager").CommandManager,E=r("./commands/default_commands").commands,D=r("./config"),C=r("./token_iterator").TokenIterator,w=r("./line_widgets").LineWidgets,T=r("./keyboard/gutter_handler").GutterKeyboardHandler,k=r("./config").nls,O=r("./clipboard"),P=r("./lib/keys"),I=function(){function L(_,A,M){this.session,this.$toDestroy=[];var R=_.getContainerElement();this.container=R,this.renderer=_,this.id="editor"+ ++L.$uid,this.commands=new v(u.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new c(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new h(this),new d(this)),this.keyBinding=new f(this),this.$search=new m().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(B,U){U._$emitInputEvent.schedule(31)}),this.setSession(A||M&&M.session||new p("")),D.resetOptions(this),M&&this.setOptions(M),D._signal("editor",this)}return L.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},L.prototype.startOperation=function(_){this.session.startOperation(_)},L.prototype.endOperation=function(_){this.session.endOperation(_)},L.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},L.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var A=this.curOp.command,M=A&&A.scrollIntoView;if(M){switch(M){case"center-animate":M="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var R=this.selection.getRange(),B=this.renderer.layerConfig;(R.start.row>=B.lastRow||R.end.row<=B.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}M=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},L.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var A=this.prevOp,M=this.$mergeableCommands,R=A.command&&_.command.name==A.command.name;if(_.command.name=="insertstring"){var B=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),R=R&&this.mergeNextCommand&&(!/\s/.test(B)||/\s/.test(A.args)),this.mergeNextCommand=!0}else R=R&&M.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(R=!1),R?this.session.mergeUndoDeltas=!0:M.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},L.prototype.setKeyboardHandler=function(_,A){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var M=this;D.loadModule(["keybinding",_],function(R){M.$keybindingId==_&&M.keyBinding.setKeyboardHandler(R&&R.handler),A&&A()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),A&&A()},L.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},L.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var A=this.session;if(A){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var M=this.session.getSelection();M.off("changeCursor",this.$onCursorChange),M.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=_.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(_)),this._signal("changeSession",{session:_,oldSession:A}),this.curOp=null,A&&A._signal("changeEditor",{oldEditor:this}),_&&_._signal("changeEditor",{editor:this}),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},L.prototype.getSession=function(){return this.session},L.prototype.setValue=function(_,A){return this.session.doc.setValue(_),A?A==1?this.navigateFileEnd():A==-1&&this.navigateFileStart():this.selectAll(),_},L.prototype.getValue=function(){return this.session.getValue()},L.prototype.getSelection=function(){return this.selection},L.prototype.resize=function(_){this.renderer.onResize(_)},L.prototype.setTheme=function(_,A){this.renderer.setTheme(_,A)},L.prototype.getTheme=function(){return this.renderer.getTheme()},L.prototype.setStyle=function(_){this.renderer.setStyle(_)},L.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},L.prototype.getFontSize=function(){return this.getOption("fontSize")||a.computedStyle(this.container).fontSize},L.prototype.setFontSize=function(_){this.setOption("fontSize",_)},L.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var A=_.session;if(!(!A||A.destroyed)){A.$bracketHighlight&&(A.$bracketHighlight.markerIds.forEach(function(Y){A.removeMarker(Y)}),A.$bracketHighlight=null);var M=_.getCursorPosition(),R=_.getKeyboardHandler(),B=R&&R.$getDirectionForHighlight&&R.$getDirectionForHighlight(_),U=A.getMatchingBracketRanges(M,B);if(!U){var V=new C(A,M.row,M.column),K=V.getCurrentToken();if(K&&/\b(?:tag-open|tag-name)/.test(K.type)){var J=A.getMatchingTags(M);J&&(U=[J.openTagName.isEmpty()?J.openTag:J.openTagName,J.closeTagName.isEmpty()?J.closeTag:J.closeTagName])}}if(!U&&A.$mode.getMatching&&(U=A.$mode.getMatching(_.session)),!U){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var G="ace_bracket";Array.isArray(U)?U.length==1&&(G="ace_error_bracket"):U=[U],U.length==2&&(y.comparePoints(U[0].end,U[1].start)==0?U=[y.fromPoints(U[0].start,U[1].end)]:y.comparePoints(U[0].start,U[1].end)==0&&(U=[y.fromPoints(U[1].start,U[0].end)])),A.$bracketHighlight={ranges:U,markerIds:U.map(function(Y){return A.addMarker(Y,G,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},L.prototype.focus=function(){this.textInput.focus()},L.prototype.isFocused=function(){return this.textInput.isFocused()},L.prototype.blur=function(){this.textInput.blur()},L.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},L.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},L.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},L.prototype.onDocumentChange=function(_){var A=this.session.$useWrapMode,M=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,M,A),this._signal("change",_),this.$cursorChange()},L.prototype.onTokenizerUpdate=function(_){var A=_.data;this.renderer.updateLines(A.first,A.last)},L.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},L.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},L.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},L.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),A;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(A=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(A=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(A=!1)),_.$highlightLineMarker&&!A)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&A){var M=new y(A.row,A.column,A.row,1/0);M.id=_.addMarker(M,"ace_active-line","screenLine"),_.$highlightLineMarker=M}else A&&(_.$highlightLineMarker.start.row=A.row,_.$highlightLineMarker.end.row=A.row,_.$highlightLineMarker.start.column=A.column,_._signal("changeBackMarker"))},L.prototype.onSelectionChange=function(_){var A=this.session;if(A.$selectionMarker&&A.removeMarker(A.$selectionMarker),A.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var M=this.selection.getRange(),R=this.getSelectionStyle();A.$selectionMarker=A.addMarker(M,"ace_selection",R)}var B=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(B),this._signal("changeSelection")},L.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,A=this.getSelectionRange();if(!(A.isEmpty()||A.isMultiLine())){var M=A.start.column,R=A.end.column,B=_.getLine(A.start.row),U=B.substring(M,R);if(!(U.length>5e3||!/[\w\d]/.test(U))){var V=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:U}),K=B.substring(M-1,R+1);if(V.test(K))return V}}},L.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},L.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},L.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},L.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},L.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},L.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},L.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},L.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},L.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},L.prototype.getCopyText=function(){var _=this.getSelectedText(),A=this.session.doc.getNewLineCharacter(),M=!1;if(!_&&this.$copyWithEmptySelection){M=!0;for(var R=this.selection.getAllRanges(),B=0;BY.search(/\S|$/)){var K=Y.substr(B.column).search(/\S|$/);M.doc.removeInLine(B.row,B.column,B.column+K)}}this.clearSelection();var J=B.column,G=M.getState(B.row),Y=M.getLine(B.row),Q=R.checkOutdent(G,Y,_);if(M.insert(B,_),U&&U.selection&&(U.selection.length==2?this.selection.setSelectionRange(new y(B.row,J+U.selection[0],B.row,J+U.selection[1])):this.selection.setSelectionRange(new y(B.row+U.selection[0],U.selection[1],B.row+U.selection[2],U.selection[3]))),this.$enableAutoIndent){if(M.getDocument().isNewLine(_)){var X=R.getNextLineIndent(G,Y.slice(0,B.column),M.getTabString());M.insert({row:B.row+1,column:0},X)}Q&&R.autoOutdent(G,M,B.row)}},L.prototype.autoIndent=function(){for(var _=this.session,A=_.getMode(),M=this.selection.isEmpty()?[new y(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),R="",B="",U="",V=_.getTabString(),K=0;K0&&(R=_.getState(Y-1),B=_.getLine(Y-1),U=A.getNextLineIndent(R,B,V));var Q=_.getLine(Y),X=A.$getIndent(Q);if(U!==X){if(X.length>0){var le=new y(Y,0,Y,X.length);_.remove(le)}U.length>0&&_.insert({row:Y,column:0},U)}A.autoOutdent(R,_,Y)}},L.prototype.onTextInput=function(_,A){if(!A)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var M=this.applyComposition.bind(this,_,A);this.selection.rangeCount?this.forEachSelection(M):M(),this.endOperation()},L.prototype.applyComposition=function(_,A){if(A.extendLeft||A.extendRight){var M=this.selection.getRange();M.start.column-=A.extendLeft,M.end.column+=A.extendRight,M.start.column<0&&(M.start.row--,M.start.column+=this.session.getLine(M.start.row).length+1),this.selection.setRange(M),!_&&!M.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),A.restoreStart||A.restoreEnd){var M=this.selection.getRange();M.start.column-=A.restoreStart,M.end.column-=A.restoreEnd,this.selection.setRange(M)}},L.prototype.onCommandKey=function(_,A,M){return this.keyBinding.onCommandKey(_,A,M)},L.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},L.prototype.getOverwrite=function(){return this.session.getOverwrite()},L.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},L.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},L.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},L.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},L.prototype.getDragDelay=function(){return this.getOption("dragDelay")},L.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},L.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},L.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},L.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},L.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},L.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},L.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},L.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},L.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},L.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},L.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},L.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},L.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},L.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},L.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},L.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},L.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},L.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},L.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},L.prototype.getReadOnly=function(){return this.getOption("readOnly")},L.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},L.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},L.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},L.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},L.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},L.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},L.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var A=this.getSelectionRange();if(this.getBehavioursEnabled()){var M=this.session,R=M.getState(A.start.row),B=M.getMode().transformAction(R,"deletion",this,M,A);if(A.end.column===0){var U=M.getTextRange(A);if(U[U.length-1]==` +`){var V=M.getLine(A.end.row);/^\s+$/.test(V)&&(A.end.column=V.length)}}B&&(A=B)}this.session.remove(A),this.clearSelection()},L.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},L.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(_)},L.prototype.setGhostText=function(_,A){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(_,A)},L.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},L.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),A=_.column;if(A!==0){var M=this.session.getLine(_.row),R,B;AK.toLowerCase()?1:0});for(var B=new y(0,0,0,0),R=_.first;R<=_.last;R++){var U=A.getLine(R);B.start.row=R,B.end.row=R,B.end.column=U.length,A.replace(B,M[R-_.first])}},L.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),A=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,A.first,A.last)},L.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),A=this.session.getState(_.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(A,this.session,M,_)},L.prototype.getNumberAt=function(_,A){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var R=this.session.getLine(_);M.lastIndex=A){var U={value:B[0],start:B.index,end:B.index+B[0].length};return U}}return null},L.prototype.modifyNumber=function(_){var A=this.selection.getCursor().row,M=this.selection.getCursor().column,R=new y(A,M-1,A,M),B=this.session.getTextRange(R);if(!isNaN(parseFloat(B))&&isFinite(B)){var U=this.getNumberAt(A,M);if(U){var V=U.value.indexOf(".")>=0?U.start+U.value.indexOf(".")+1:U.end,K=U.start+U.value.length-V,J=parseFloat(U.value);J*=Math.pow(10,K),V!==U.end&&M=V&&U<=K&&(M=ke,J.selection.clearSelection(),J.moveCursorTo(_,V+R),J.selection.selectTo(_,K+R)),V=K});for(var G=this.$toggleWordPairs,Y,Q=0;Q=K&&V<=J&&X.match(/((?:https?|ftp):\/\/[\S]+)/)){G=X.replace(/[\s:.,'";}\]]+$/,"");break}K=J}}catch(le){M={error:le}}finally{try{Q&&!Q.done&&(R=Y.return)&&R.call(Y)}finally{if(M)throw M.error}}return G},L.prototype.openLink=function(){var _=this.selection.getCursor(),A=this.findLinkAt(_.row,_.column);return A&&window.open(A,"_blank"),A!=null},L.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},L.prototype.duplicateSelection=function(){var _=this.selection,A=this.session,M=_.getRange(),R=_.isBackwards();if(M.isEmpty()){var B=M.start.row;A.duplicateLines(B,B)}else{var U=R?M.start:M.end,V=A.insert(U,A.getTextRange(M));M.start=U,M.end=V,_.setSelectionRange(M,R)}},L.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},L.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},L.prototype.moveText=function(_,A,M){return this.session.moveText(_,A,M)},L.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},L.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},L.prototype.$moveLines=function(_,A){var M,R,B=this.selection;if(!B.inMultiSelectMode||this.inVirtualSelectionMode){var U=B.toOrientedRange();M=this.$getSelectedRows(U),R=this.session.$moveLines(M.first,M.last,A?0:_),A&&_==-1&&(R=0),U.moveBy(R,0),B.fromOrientedRange(U)}else{var V=B.rangeList.ranges;B.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var K=0,J=0,G=V.length,Y=0;Yle+1)break;le=be.last}for(Y--,K=this.session.$moveLines(X,le,A?0:_),A&&_==-1&&(Q=Y+1);Q<=Y;)V[Q].moveBy(K,0),Q++;A||(K=0),J+=K}B.fromOrientedRange(B.ranges[0]),B.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},L.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},L.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},L.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},L.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},L.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},L.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},L.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},L.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},L.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},L.prototype.$moveByPage=function(_,A){var M=this.renderer,R=this.renderer.layerConfig,B=_*Math.floor(R.height/R.lineHeight);A===!0?this.selection.$moveSelection(function(){this.moveCursorBy(B,0)}):A===!1&&(this.selection.moveCursorBy(B,0),this.selection.clearSelection());var U=M.scrollTop;M.scrollBy(0,B*R.lineHeight),A!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(U)},L.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},L.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},L.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},L.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},L.prototype.scrollPageDown=function(){this.$moveByPage(1)},L.prototype.scrollPageUp=function(){this.$moveByPage(-1)},L.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},L.prototype.scrollToLine=function(_,A,M,R){this.renderer.scrollToLine(_,A,M,R)},L.prototype.centerSelection=function(){var _=this.getSelectionRange(),A={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(A,.5)},L.prototype.getCursorPosition=function(){return this.selection.getCursor()},L.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},L.prototype.getSelectionRange=function(){return this.selection.getRange()},L.prototype.selectAll=function(){this.selection.selectAll()},L.prototype.clearSelection=function(){this.selection.clearSelection()},L.prototype.moveCursorTo=function(_,A){this.selection.moveCursorTo(_,A)},L.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},L.prototype.jumpToMatching=function(_,A){var M=this.getCursorPosition(),R=new C(this.session,M.row,M.column),B=R.getCurrentToken(),U=0;B&&B.type.indexOf("tag-name")!==-1&&(B=R.stepBackward());var V=B||R.stepForward();if(V){var K,J=!1,G={},Y=M.column-V.start,Q,X={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(V.value.match(/[{}()\[\]]/g)){for(;Y1?G[V.value]++:B.value==="=0;--U)this.$tryReplace(M[U],_)&&R++;return this.selection.setSelectionRange(B),R},L.prototype.$tryReplace=function(_,A){var M=this.session.getTextRange(_);return A=this.$search.replace(M,A),A!==null?(_.end=this.session.replace(_,A),_):null},L.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},L.prototype.find=function(_,A,M){A||(A={}),typeof _=="string"||_ instanceof RegExp?A.needle=_:typeof _=="object"&&o.mixin(A,_);var R=this.selection.getRange();A.needle==null&&(_=this.session.getTextRange(R)||this.$search.$options.needle,_||(R=this.session.getWordRange(R.start.row,R.start.column),_=this.session.getTextRange(R)),this.$search.set({needle:_})),this.$search.set(A),A.start||this.$search.set({start:R});var B=this.$search.find(this.session);if(A.preventScroll)return B;if(B)return this.revealRange(B,M),B;A.backwards?R.start=R.end:R.end=R.start,this.selection.setRange(R)},L.prototype.findNext=function(_,A){this.find({skipCurrent:!0,backwards:!1},_,A)},L.prototype.findPrevious=function(_,A){this.find(_,{skipCurrent:!0,backwards:!0},A)},L.prototype.revealRange=function(_,A){this.session.unfold(_),this.selection.setSelectionRange(_);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),A!==!1&&this.renderer.animateScrolling(M)},L.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},L.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},L.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},L.prototype.setAutoScrollEditorIntoView=function(_){if(_){var A,M=this,R=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var B=this.$scrollAnchor;B.style.cssText="position:absolute",this.container.insertBefore(B,this.container.firstChild);var U=this.on("changeSelection",function(){R=!0}),V=this.renderer.on("beforeRender",function(){R&&(A=M.renderer.container.getBoundingClientRect())}),K=this.renderer.on("afterRender",function(){if(R&&A&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var J=M.renderer,G=J.$cursorLayer.$pixelPos,Y=J.layerConfig,Q=G.top-Y.offset;G.top>=0&&Q+A.top<0?R=!0:G.topwindow.innerHeight?R=!1:R=null,R!=null&&(B.style.top=Q+"px",B.style.left=G.left+"px",B.style.height=Y.lineHeight+"px",B.scrollIntoView(R)),R=A=null}});this.setAutoScrollEditorIntoView=function(J){J||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",U),this.renderer.off("afterRender",K),this.renderer.off("beforeRender",V))}}},L.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",A=this.renderer.$cursorLayer;A&&(A.setSmoothBlinking(/smooth/.test(_)),A.isBlinking=!this.$readOnly&&_!="wide",a.setCssClass(A.element,"ace_slim-cursors",/slim/.test(_)))},L.prototype.prompt=function(_,A,M){var R=this;D.loadModule("ace/ext/prompt",function(B){B.prompt(R,_,A,M)})},L}();I.$uid=0,I.prototype.curOp=null,I.prototype.prevOp={},I.prototype.$mergeableCommands=["backspace","del","insertstring"],I.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(I.prototype,b),D.defineOptions(I.prototype,"editor",{selectionStyle:{set:function(L){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:L})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(L){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(L){this.textInput.setReadOnly(L),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(L){this.textInput.setCopyWithEmptySelection(L)},initialValue:!1},cursorStyle:{set:function(L){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(L){this.setAutoScrollEditorIntoView(L)}},keyboardHandler:{set:function(L){this.setKeyboardHandler(L)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(L){this.session.setValue(L)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(L){this.setSession(L)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(L){this.renderer.$gutterLayer.setShowLineNumbers(L),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),L&&this.$relativeLineNumbers?F.attach(this):F.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(L){this.$showLineNumbers&&L?F.attach(this):F.detach(this)}},placeholder:{set:function(L){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var _=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(_&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),a.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),a.addCssClass(this.container,"ace_hasPlaceholder");var A=a.createElement("div");A.className="ace_placeholder",A.textContent=this.$placeholder||"",this.renderer.placeholderNode=A,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(L){var _={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(R){R.blur(),R.renderer.scroller.focus()},readOnly:!0},A=function(R){if(R.target==this.renderer.scroller&&R.keyCode===P.enter){R.preventDefault();var B=this.getCursorPosition().row;this.isRowVisible(B)||this.scrollToLine(B,!0,!0),this.focus()}},M;L?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",k("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",k("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",A.bind(this)),this.commands.addCommand(_),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",k("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",k("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),M||(M=new T(this)),M.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",A.bind(this)),this.commands.removeCommand(_),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),M&&M.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(L){this.$textInputAriaLabel=L},initialValue:""},enableMobileMenu:{set:function(L){this.$enableMobileMenu=L},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var F={getText:function(L,_){return(Math.abs(L.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function(L,_,A){return Math.max(_.toString().length,(A.lastRow+1).toString().length,2)*A.characterWidth},update:function(L,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function(L){L.renderer.$gutterLayer.$renderer=this,L.on("changeSelection",this.update),this.update(null,L)},detach:function(L){L.renderer.$gutterLayer.$renderer==this&&(L.renderer.$gutterLayer.$renderer=null),L.off("changeSelection",this.update),this.update(null,L)}};n.Editor=I}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function a(l,u){this.element=l,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return a.prototype.moveContainer=function(l){s.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},a.prototype.pageChanged=function(l,u){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},a.prototype.computeLineTop=function(l,u,c){var h=u.firstRowScreen*u.lineHeight,d=Math.floor(h/this.canvasHeight),f=c.documentToScreenRow(l,0)*u.lineHeight;return f-d*this.canvasHeight},a.prototype.computeLineHeight=function(l,u,c){return u.lineHeight*c.getRowLineCount(l)},a.prototype.getLength=function(){return this.cells.length},a.prototype.get=function(l){return this.cells[l]},a.prototype.shift=function(){this.$cacheCell(this.cells.shift())},a.prototype.pop=function(){this.$cacheCell(this.cells.pop())},a.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var u=s.createFragment(this.element),c=0;cE&&(w=v.end.row+1,v=m.getNextFoldLine(w,v),E=v?v.start.row:1/0),w>b){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}D=this.$lines.get(++C),D?D.row=w:(D=this.$lines.createCell(w,p,this.session,d),this.$lines.push(D)),this.$renderCell(D,p,v,w),w++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var m=this.session,y=m.gutterRenderer||this.$renderer,b=m.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||m.$useWrapMode)&&(v=m.getLength()+b-1);var E=y?y.getWidth(m,v,p):v.toString().length*p.characterWidth,D=this.$padding||this.$computePadding();E+=D.left+D.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var m=this.$lines.cells;this.$cursorCell=null;for(var y=0;y=this.$cursorRow){if(b.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(y>0&&v&&v.start.row==m[y-1].row)b=m[y-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},f.prototype.scrollLines=function(p){var m=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(m,p))return this.update(p);this.$lines.moveContainer(p);var y=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=y,!m||b0;v--)this.$lines.shift();if(b>y)for(var v=this.session.getFoldedRowCount(y+1,b);v>0;v--)this.$lines.pop();p.firstRowb&&this.$lines.push(this.$renderLines(p,b+1,y)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,m,y){for(var b=[],v=m,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session,d);this.$renderCell(C,p,E,v),b.push(C),v++}return b},f.prototype.$renderCell=function(p,m,y,b){var v=p.element,E=this.session,D=v.childNodes[0],C=v.childNodes[1],w=v.childNodes[2],T=w.firstChild,k=E.$firstLineNumber,O=E.$breakpoints,P=E.$decorations,I=E.gutterRenderer||this.$renderer,F=this.$showFoldWidgets&&E.foldWidgets,L=y?y.start.row:Number.MAX_VALUE,_=m.lineHeight+"px",A=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=(I?I.getText(E,b):b+k).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||y&&b=L&&this.$cursorRow<=y.end.row)&&(A+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),O[b]&&(A+=O[b]),P[b]&&(A+=P[b]),this.$annotations[b]&&b!==L&&(A+=this.$annotations[b].className),F){var B=F[b];B==null&&(B=F[b]=E.getFoldWidget(b))}if(B){var U="ace_fold-widget ace_"+B,V=B=="start"&&b==L&&by.right-m.right)return"foldWidgets"},f}();h.prototype.$fixedWidth=!1,h.prototype.$highlightGutterLine=!0,h.prototype.$renderer="",h.prototype.$showLineNumbers=!0,h.prototype.$showFoldWidgets=!0,o.implement(h.prototype,l);function d(f){var p=document.createTextNode("");f.appendChild(p);var m=s.createElement("span");f.appendChild(m);var y=s.createElement("span");f.appendChild(y);var b=s.createElement("span");return y.appendChild(b),f}n.Gutter=h}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(r,n,i){var s=r("../range").Range,o=r("../lib/dom"),a=function(){function u(c){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,h){var d=this.i!=-1&&this.element.childNodes[this.i];d?this.i++:(d=document.createElement("div"),this.element.appendChild(d),this.i=-1),d.style.cssText=h,d.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var h;for(var d in this.markers){var f=this.markers[d];if(!f.range){f.update(h,this,this.session,c);continue}var p=f.range.clipRows(c.firstRow,c.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var m=this.$getTop(p.start.row,c),y=this.$padding+p.start.column*c.characterWidth;f.renderer(h,p,y,m,c)}else f.type=="fullLine"?this.drawFullLineMarker(h,p,f.clazz,c):f.type=="screenLine"?this.drawScreenLineMarker(h,p,f.clazz,c):p.isMultiLine()?f.type=="text"?this.drawTextMarker(h,p,f.clazz,c):this.drawMultiLineMarker(h,p,f.clazz,c):this.drawSingleLineMarker(h,p,f.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.iC,v==b),f,v==b?0:1,p)},u.prototype.drawMultiLineMarker=function(c,h,d,f,p){var m=this.$padding,y=f.lineHeight,b=this.$getTop(h.start.row,f),v=m+h.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(h.start.row)){var E=h.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(c,E,d+" ace_br1 ace_start",f,null,p)}else this.elt(d+" ace_br1 ace_start","height:"+y+"px;right:"+m+"px;top:"+b+"px;left:"+v+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(h.end.row)){var E=h.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(c,E,d+" ace_br12",f,null,p)}else{b=this.$getTop(h.end.row,f);var D=h.end.column*f.characterWidth;this.elt(d+" ace_br12","height:"+y+"px;width:"+D+"px;top:"+b+"px;left:"+m+"px;"+(p||""))}if(y=(h.end.row-h.start.row-1)*f.lineHeight,!(y<=0)){b=this.$getTop(h.start.row+1,f);var C=(h.start.column?1:0)|(h.end.column?0:8);this.elt(d+(C?" ace_br"+C:""),"height:"+y+"px;right:"+m+"px;top:"+b+"px;left:"+m+"px;"+(p||""))}},u.prototype.drawSingleLineMarker=function(c,h,d,f,p,m){if(this.session.$bidiHandler.isBidiRow(h.start.row))return this.drawBidiSingleLineMarker(c,h,d,f,p,m);var y=f.lineHeight,b=(h.end.column+(p||0)-h.start.column)*f.characterWidth,v=this.$getTop(h.start.row,f),E=this.$padding+h.start.column*f.characterWidth;this.elt(d,"height:"+y+"px;width:"+b+"px;top:"+v+"px;left:"+E+"px;"+(m||""))},u.prototype.drawBidiSingleLineMarker=function(c,h,d,f,p,m){var y=f.lineHeight,b=this.$getTop(h.start.row,f),v=this.$padding,E=this.session.$bidiHandler.getSelections(h.start.column,h.end.column);E.forEach(function(D){this.elt(d,"height:"+y+"px;width:"+(D.width+(p||0))+"px;top:"+b+"px;left:"+(v+D.left)+"px;"+(m||""))},this)},u.prototype.drawFullLineMarker=function(c,h,d,f,p){var m=this.$getTop(h.start.row,f),y=f.lineHeight;h.start.row!=h.end.row&&(y+=this.$getTop(h.end.row,f)-m),this.elt(d,"height:"+y+"px;top:"+m+"px;left:0;right:0;"+(p||""))},u.prototype.drawScreenLineMarker=function(c,h,d,f,p){var m=this.$getTop(h.start.row,f),y=f.lineHeight;this.elt(d,"height:"+y+"px;top:"+m+"px;left:0;right:0;"+(p||""))},u}();a.prototype.$padding=0;function l(u,c,h,d){return(u?1:0)|(c?2:0)|(h?4:0)|(d?8:0)}n.Marker=a}),ace.define("ace/layer/text_util",["require","exports","module"],function(r,n,i){var s=new Set(["text","rparen","lparen"]);n.isTextToken=function(o){return s.has(o)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),a=r("../lib/lang"),l=r("./lines").Lines,u=r("../lib/event_emitter").EventEmitter,c=r("../config").nls,h=r("./text_util").isTextToken,d=function(){function f(p){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,m=p.getNewLineCharacter()==` +`&&p.getNewLineMode()!="windows",y=m?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=y)return this.EOL_CHAR=y,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(m){this._signal("changeCharacterSize",m)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var m=this.$tabStrings=[0],y=1;yk&&(w=T.end.row+1,T=this.session.getNextFoldLine(w,T),k=T?T.start.row:1/0),!(w>v);){var O=E[D++];if(O){this.dom.removeChildren(O),this.$renderLine(O,w,w==k?T:!1),C&&(O.style.top=this.$lines.computeLineTop(w,p,this.session)+"px");var P=p.lineHeight*this.session.getRowLength(w)+"px";O.style.height!=P&&(C=!0,O.style.height=P)}w++}if(C)for(;D0;v--)this.$lines.shift();if(m.lastRow>p.lastRow)for(var v=this.session.getFoldedRowCount(p.lastRow+1,m.lastRow);v>0;v--)this.$lines.pop();p.firstRowm.lastRow&&this.$lines.push(this.$renderLinesFragment(p,m.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,m,y){for(var b=[],v=m,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session),w=C.element;this.dom.removeChildren(w),o.setStyle(w.style,"height",this.$lines.computeLineHeight(v,p,this.session)+"px"),o.setStyle(w.style,"top",this.$lines.computeLineTop(v,p,this.session)+"px"),this.$renderLine(w,v,v==D?E:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",b.push(C),v++}return b},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var m=p.firstRow,y=p.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(p,m,y))},f.prototype.$renderToken=function(p,m,y,b){for(var v=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,D=this.dom.createFragment(this.element),C,w=0;C=E.exec(b);){var T=C[1],k=C[2],O=C[3],P=C[4],I=C[5];if(!(!v.showSpaces&&k)){var F=w!=C.index?b.slice(w,C.index):"";if(w=C.index+C[0].length,F&&D.appendChild(this.dom.createTextNode(F,this.element)),T){var L=v.session.getScreenTabSize(m+C.index);D.appendChild(v.$tabStrings[L].cloneNode(!0)),m+=L-1}else if(k)if(v.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=a.stringRepeat(v.SPACE_CHAR,k.length),D.appendChild(_)}else D.appendChild(this.dom.createTextNode(k,this.element));else if(O){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=a.stringRepeat(v.SPACE_CHAR,O.length),D.appendChild(_)}else if(P){m+=1;var _=this.dom.createElement("span");_.style.width=v.config.characterWidth*2+"px",_.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",_.textContent=v.showSpaces?v.SPACE_CHAR:P,D.appendChild(_)}else if(I){m+=1;var _=this.dom.createElement("span");_.style.width=v.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=I,D.appendChild(_)}}}if(D.appendChild(this.dom.createTextNode(w?b.slice(w):b,this.element)),h(y.type))p.appendChild(D);else{var A="ace_"+y.type.replace(/\./g," ace_"),_=this.dom.createElement("span");y.type=="fold"&&(_.style.width=y.value.length*this.config.characterWidth+"px",_.setAttribute("title",c("inline-fold.closed.title","Unfold code"))),_.className=A,_.appendChild(D),p.appendChild(_)}return m+b.length},f.prototype.renderIndentGuide=function(p,m,y){var b=m.search(this.$indentGuideRe);if(b<=0||b>=y)return m;if(m[0]==" "){b-=b%this.tabSize;for(var v=b/this.tabSize,E=0;EE[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[m.row]!==""&&m.column===p[m.row].length){this.$highlightIndentGuideMarker.dir=1;for(var D=m.row+1;D0){for(var v=0;v=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,m)}}else for(var y=p.length-1;y>=0;y--){var b=p[y];if(this.$highlightIndentGuideMarker.end&&b.row=E;)D=this.$renderToken(C,D,T,k.substring(0,E-b)),k=k.substring(E-b),b=E,C=this.$createLineElement(),p.appendChild(C),C.appendChild(this.dom.createTextNode(a.stringRepeat(" ",y.indent),this.element)),v++,D=0,E=y[v]||Number.MAX_VALUE;k.length!=0&&(b+=k.length,D=this.$renderToken(C,D,T,k))}}y[y.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,D,null,"",!0)},f.prototype.$renderSimpleLine=function(p,m){for(var y=0,b=0;bthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,y,v,E);y=this.$renderToken(p,y,v,E)}}},f.prototype.$renderOverflowMessage=function(p,m,y,b,v){y&&this.$renderToken(p,m,y,b.slice(0,this.MAX_LINE_LENGTH-m));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=v?"":"",p.appendChild(E)},f.prototype.$renderLine=function(p,m,y){if(!y&&y!=!1&&(y=this.session.getFoldLine(m)),y)var b=this.$getFoldLineTokens(m,y);else var b=this.session.getTokens(m);var v=p;if(b.length){var E=this.session.getRowSplitData(m);if(E&&E.length){this.$renderWrappedLine(p,b,E);var v=p.lastChild}else{var v=p;this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v)),this.$renderSimpleLine(v,b)}}else this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v));if(this.showEOL&&v){y&&(m=y.end.row);var D=this.dom.createElement("span");D.className="ace_invisible ace_invisible_eol",D.textContent=m==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(D)}},f.prototype.$getFoldLineTokens=function(p,m){var y=this.session,b=[];function v(D,C,w){for(var T=0,k=0;k+D[T].value.lengthw-C&&(O=O.substring(0,w-C)),b.push({type:D[T].type,value:O}),k=C+O.length,T+=1}for(;kw?b.push({type:D[T].type,value:O.substring(0,w-k)}):b.push(D[T]),k+=O.length,T+=1}}var E=y.getTokens(p);return m.walk(function(D,C,w,T,k){D!=null?b.push({type:"fold",value:D}):(k&&(E=y.getTokens(C)),E.length&&v(E,T,w))},m.end.row,this.session.getLine(m.end.row).length),b},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,s.implement(d.prototype,u),n.Text=d}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function a(l){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return a.prototype.$updateOpacity=function(l){for(var u=this.cursors,c=u.length;c--;)s.setStyle(u[c].style,"opacity",l?"":"0")},a.prototype.$startCssAnimation=function(){for(var l=this.cursors,u=l.length;u--;)l[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},a.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},a.prototype.setPadding=function(l){this.$padding=l},a.prototype.setSession=function(l){this.session=l},a.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},a.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},a.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,s.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},a.prototype.addCursor=function(){var l=s.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},a.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},a.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},a.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},a.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),u()},this.blinkInterval),u()}},a.prototype.getPixelPosition=function(l,u){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(l),h=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,l.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),d=(c.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:h,top:d}},a.prototype.isCursorInView=function(l,u){return l.top>=0&&l.topl.height+l.offset||f.top<0)&&c>1)){var p=this.cursors[h++]||this.addCursor(),m=p.style;this.drawCursor?this.drawCursor(p,f,l,u[c],this.session):this.isCursorInView(f,l)?(s.setStyle(m,"display","block"),s.translate(p,f.left,f.top),s.setStyle(m,"width",Math.round(l.characterWidth)+"px"),s.setStyle(m,"height",l.lineHeight+"px")):s.setStyle(m,"display","none")}}for(;this.cursors.length>h;)this.removeCursor();var y=this.session.getOverwrite();this.$setOverwrite(y),this.$pixelPos=f,this.restartTimer()},a.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},a.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},a}();o.prototype.$padding=0,o.prototype.drawCursor=null,n.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var p=function(m,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,v){b.__proto__=v}||function(b,v){for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&(b[E]=v[E])},p(m,y)};return function(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");p(m,y);function b(){this.constructor=m}m.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}}(),o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/event"),u=r("./lib/event_emitter").EventEmitter,c=32768,h=function(){function p(m,y){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+y,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),m.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return p.prototype.setVisible=function(m){this.element.style.display=m?"":"none",this.isVisible=m,this.coeff=1},p}();o.implement(h.prototype,u);var d=function(p){s(m,p);function m(y,b){var v=p.call(this,y,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,b.$scrollbarWidth=v.width=a.scrollbarWidth(y.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return m.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var y=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-y)/(this.coeff-y)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},m.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},m.prototype.setHeight=function(y){this.element.style.height=y+"px"},m.prototype.setScrollHeight=function(y){this.scrollHeight=y,y>c?(this.coeff=c/y,y=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=y+"px"},m.prototype.setScrollTop=function(y){this.scrollTop!=y&&(this.skipEvent=!0,this.scrollTop=y,this.element.scrollTop=y*this.coeff)},m}(h);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var f=function(p){s(m,p);function m(y,b){var v=p.call(this,y,"-h")||this;return v.scrollLeft=0,v.height=b.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return m.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},m.prototype.getHeight=function(){return this.isVisible?this.height:0},m.prototype.setWidth=function(y){this.element.style.width=y+"px"},m.prototype.setInnerWidth=function(y){this.inner.style.width=y+"px"},m.prototype.setScrollWidth=function(y){this.inner.style.width=y+"px"},m.prototype.setScrollLeft=function(y){this.scrollLeft!=y&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=y)},m}(h);n.ScrollBar=d,n.ScrollBarV=d,n.ScrollBarH=f,n.VScrollBar=d,n.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var f=function(p,m){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(y[v]=b[v])},f(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");f(p,m);function y(){this.constructor=p}p.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/event"),u=r("./lib/event_emitter").EventEmitter;a.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; @@ -340,7 +340,7 @@ Error generating stack: `+s.message+` .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; -}`,"ace_scrollbar.css",!1);var c=function(){function f(p,m){this.element=a.createElement("div"),this.element.className="ace_sb"+m,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();o.implement(c.prototype,u);var h=function(f){s(p,f);function p(m,y){var b=f.call(this,m,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=m,b.width=b.VScrollWidth,b.renderer=y,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return p.prototype.onMouseDown=function(m,y){if(m==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientY,E=function(P){v=P.clientY},D=function(){clearInterval($)},C=y.clientY,w=this.thumbTop,A=function(){if(v!==void 0){var P=b.scrollTopFromThumbTop(w+v-C);P!==b.scrollTop&&b._emit("scroll",{data:P})}};l.capture(this.inner,E,D);var $=setInterval(A,20);return l.preventDefault(y)}var O=y.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(O)}),l.preventDefault(y)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(m){var y=m*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return y=y>>0,y<0?y=0:y>this.pageHeight-this.viewHeight&&(y=this.pageHeight-this.viewHeight),y},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(m){this.height=Math.max(0,m),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(m,y){this.pageHeight===m&&!y||(this.pageHeight=m,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(m){this.scrollTop=m,m<0&&(m=0),this.thumbTop=m*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(c);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var d=function(f){s(p,f);function p(m,y){var b=f.call(this,m,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=y,b}return p.prototype.onMouseDown=function(m,y){if(m==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientX,E=function(P){v=P.clientX},D=function(){clearInterval($)},C=y.clientX,w=this.thumbLeft,A=function(){if(v!==void 0){var P=b.scrollLeftFromThumbLeft(w+v-C);P!==b.scrollLeft&&b._emit("scroll",{data:P})}};l.capture(this.inner,E,D);var $=setInterval(A,20);return l.preventDefault(y)}var O=y.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(O)}),l.preventDefault(y)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(m){var y=m*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return y=y>>0,y<0?y=0:y>this.pageWidth-this.viewWidth&&(y=this.pageWidth-this.viewWidth),y},p.prototype.setWidth=function(m){this.width=Math.max(0,m),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(m,y){this.pageWidth===m&&!y||(this.pageWidth=m,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(m){this.scrollLeft=m,m<0&&(m=0),this.thumbLeft=m*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(c);d.prototype.setInnerWidth=d.prototype.setScrollWidth,n.ScrollBar=h,n.ScrollBarV=h,n.ScrollBarH=d,n.VScrollBar=h,n.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(r,n,i){var s=r("./lib/event"),o=function(){function a(l,u){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(h){c.pending=!1;var d=c.changes;if(d&&(s.blockIdle(100),c.changes=0,c.onRender(d)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return a.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},a.prototype.clear=function(l){var u=this.changes;return this.changes=0,u},a}();n.RenderLoop=o}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),a=r("../lib/lang"),l=r("../lib/event"),u=r("../lib/useragent"),c=r("../lib/event_emitter").EventEmitter,h=512,d=typeof ResizeObserver=="function",f=200,p=function(){function m(y){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),y.appendChild(this.el),this.$measureNode.textContent=a.stringRepeat("X",h),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return m.prototype.$setMeasureNodeStyles=function(y,b){y.width=y.height="auto",y.left=y.top="0px",y.visibility="hidden",y.position="absolute",y.whiteSpace="pre",u.isIE<8?y["font-family"]="inherit":y.font="inherit",y.overflow=b?"hidden":"visible"},m.prototype.checkForSizeChanges=function(y){if(y===void 0&&(y=this.$measureSizes()),y&&(this.$characterSize.width!==y.width||this.$characterSize.height!==y.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=y,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===y.width&&b.height===y.height,this._emit("changeCharacterSize",{data:y})}},m.prototype.$addObserver=function(){var y=this;this.$observer=new window.ResizeObserver(function(b){y.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},m.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var y=this;return this.$pollSizeChangesTimer=l.onIdle(function b(){y.checkForSizeChanges(),l.onIdle(b,500)},500)},m.prototype.setPolling=function(y){y?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},m.prototype.$measureSizes=function(y){var b={height:(y||this.$measureNode).clientHeight,width:(y||this.$measureNode).clientWidth/h};return b.width===0||b.height===0?null:b},m.prototype.$measureCharWidth=function(y){this.$main.textContent=a.stringRepeat(y,h);var b=this.$main.getBoundingClientRect();return b.width/h},m.prototype.getCharacterWidth=function(y){var b=this.charSizes[y];return b===void 0&&(b=this.charSizes[y]=this.$measureCharWidth(y)/this.$characterSize.width),b},m.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},m.prototype.$getZoom=function(y){return!y||!y.parentElement?1:(Number(window.getComputedStyle(y).zoom)||1)*this.$getZoom(y.parentElement)},m.prototype.$initTransformMeasureNodes=function(){var y=function(b,v){return["div",{style:"position: absolute;top:"+b+"px;left:"+v+"px;"}]};this.els=o.buildDom([y(0,0),y(f,0),y(0,f),y(f,f)],this.el)},m.prototype.transformCoordinates=function(y,b){if(y){var v=this.$getZoom(this.el);y=w(1/v,y)}function E(V,K,J){var G=V[1]*K[0]-V[0]*K[1];return[(-K[1]*J[0]+K[0]*J[1])/G,(+V[1]*J[0]-V[0]*J[1])/G]}function D(V,K){return[V[0]-K[0],V[1]-K[1]]}function C(V,K){return[V[0]+K[0],V[1]+K[1]]}function w(V,K){return[V*K[0],V*K[1]]}this.els||this.$initTransformMeasureNodes();function A(V){var K=V.getBoundingClientRect();return[K.left,K.top]}var $=A(this.els[0]),O=A(this.els[1]),P=A(this.els[2]),N=A(this.els[3]),F=E(D(N,O),D(N,P),D(C(O,P),C(N,$))),L=w(1+F[0],D(O,$)),k=w(1+F[1],D(P,$));if(b){var T=b,M=F[0]*T[0]/f+F[1]*T[1]/f+1,R=C(w(T[0],L),w(T[1],k));return C(w(1/M/f,R),$)}var B=D(y,$),U=E(D(L,w(F[0],B)),D(k,w(F[1],B)),B);return w(f,U)},m}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,c),n.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(r,n,i){i.exports=` +}`,"ace_scrollbar.css",!1);var c=function(){function f(p,m){this.element=a.createElement("div"),this.element.className="ace_sb"+m,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();o.implement(c.prototype,u);var h=function(f){s(p,f);function p(m,y){var b=f.call(this,m,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=m,b.width=b.VScrollWidth,b.renderer=y,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return p.prototype.onMouseDown=function(m,y){if(m==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientY,E=function(P){v=P.clientY},D=function(){clearInterval(k)},C=y.clientY,w=this.thumbTop,T=function(){if(v!==void 0){var P=b.scrollTopFromThumbTop(w+v-C);P!==b.scrollTop&&b._emit("scroll",{data:P})}};l.capture(this.inner,E,D);var k=setInterval(T,20);return l.preventDefault(y)}var O=y.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(O)}),l.preventDefault(y)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(m){var y=m*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return y=y>>0,y<0?y=0:y>this.pageHeight-this.viewHeight&&(y=this.pageHeight-this.viewHeight),y},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(m){this.height=Math.max(0,m),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(m,y){this.pageHeight===m&&!y||(this.pageHeight=m,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(m){this.scrollTop=m,m<0&&(m=0),this.thumbTop=m*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(c);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var d=function(f){s(p,f);function p(m,y){var b=f.call(this,m,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=y,b}return p.prototype.onMouseDown=function(m,y){if(m==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientX,E=function(P){v=P.clientX},D=function(){clearInterval(k)},C=y.clientX,w=this.thumbLeft,T=function(){if(v!==void 0){var P=b.scrollLeftFromThumbLeft(w+v-C);P!==b.scrollLeft&&b._emit("scroll",{data:P})}};l.capture(this.inner,E,D);var k=setInterval(T,20);return l.preventDefault(y)}var O=y.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(O)}),l.preventDefault(y)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(m){var y=m*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return y=y>>0,y<0?y=0:y>this.pageWidth-this.viewWidth&&(y=this.pageWidth-this.viewWidth),y},p.prototype.setWidth=function(m){this.width=Math.max(0,m),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(m,y){this.pageWidth===m&&!y||(this.pageWidth=m,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(m){this.scrollLeft=m,m<0&&(m=0),this.thumbLeft=m*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(c);d.prototype.setInnerWidth=d.prototype.setScrollWidth,n.ScrollBar=h,n.ScrollBarV=h,n.ScrollBarH=d,n.VScrollBar=h,n.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(r,n,i){var s=r("./lib/event"),o=function(){function a(l,u){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(h){c.pending=!1;var d=c.changes;if(d&&(s.blockIdle(100),c.changes=0,c.onRender(d)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return a.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},a.prototype.clear=function(l){var u=this.changes;return this.changes=0,u},a}();n.RenderLoop=o}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),a=r("../lib/lang"),l=r("../lib/event"),u=r("../lib/useragent"),c=r("../lib/event_emitter").EventEmitter,h=512,d=typeof ResizeObserver=="function",f=200,p=function(){function m(y){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),y.appendChild(this.el),this.$measureNode.textContent=a.stringRepeat("X",h),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return m.prototype.$setMeasureNodeStyles=function(y,b){y.width=y.height="auto",y.left=y.top="0px",y.visibility="hidden",y.position="absolute",y.whiteSpace="pre",u.isIE<8?y["font-family"]="inherit":y.font="inherit",y.overflow=b?"hidden":"visible"},m.prototype.checkForSizeChanges=function(y){if(y===void 0&&(y=this.$measureSizes()),y&&(this.$characterSize.width!==y.width||this.$characterSize.height!==y.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=y,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===y.width&&b.height===y.height,this._emit("changeCharacterSize",{data:y})}},m.prototype.$addObserver=function(){var y=this;this.$observer=new window.ResizeObserver(function(b){y.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},m.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var y=this;return this.$pollSizeChangesTimer=l.onIdle(function b(){y.checkForSizeChanges(),l.onIdle(b,500)},500)},m.prototype.setPolling=function(y){y?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},m.prototype.$measureSizes=function(y){var b={height:(y||this.$measureNode).clientHeight,width:(y||this.$measureNode).clientWidth/h};return b.width===0||b.height===0?null:b},m.prototype.$measureCharWidth=function(y){this.$main.textContent=a.stringRepeat(y,h);var b=this.$main.getBoundingClientRect();return b.width/h},m.prototype.getCharacterWidth=function(y){var b=this.charSizes[y];return b===void 0&&(b=this.charSizes[y]=this.$measureCharWidth(y)/this.$characterSize.width),b},m.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},m.prototype.$getZoom=function(y){return!y||!y.parentElement?1:(Number(window.getComputedStyle(y).zoom)||1)*this.$getZoom(y.parentElement)},m.prototype.$initTransformMeasureNodes=function(){var y=function(b,v){return["div",{style:"position: absolute;top:"+b+"px;left:"+v+"px;"}]};this.els=o.buildDom([y(0,0),y(f,0),y(0,f),y(f,f)],this.el)},m.prototype.transformCoordinates=function(y,b){if(y){var v=this.$getZoom(this.el);y=w(1/v,y)}function E(V,K,J){var G=V[1]*K[0]-V[0]*K[1];return[(-K[1]*J[0]+K[0]*J[1])/G,(+V[1]*J[0]-V[0]*J[1])/G]}function D(V,K){return[V[0]-K[0],V[1]-K[1]]}function C(V,K){return[V[0]+K[0],V[1]+K[1]]}function w(V,K){return[V*K[0],V*K[1]]}this.els||this.$initTransformMeasureNodes();function T(V){var K=V.getBoundingClientRect();return[K.left,K.top]}var k=T(this.els[0]),O=T(this.els[1]),P=T(this.els[2]),I=T(this.els[3]),F=E(D(I,O),D(I,P),D(C(O,P),C(I,k))),L=w(1+F[0],D(O,k)),_=w(1+F[1],D(P,k));if(b){var A=b,M=F[0]*A[0]/f+F[1]*A[1]/f+1,R=C(w(A[0],L),w(A[1],_));return C(w(1/M/f,R),k)}var B=D(y,k),U=E(D(L,w(F[0],B)),D(_,w(F[1],B)),B);return w(f,U)},m}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,c),n.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(r,n,i){i.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} @@ -1029,9 +1029,9 @@ Error generating stack: `+s.message+` .ace_hidden_token { display: none; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/dom"),o=r("../lib/oop"),a=r("../lib/event_emitter").EventEmitter,l=function(){function u(c,h){this.canvas=s.createElement("canvas"),this.renderer=h,this.pixelRatio=1,this.maxHeight=h.layerConfig.maxHeight,this.lineHeight=h.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var h=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var d=(c.lastRow+1)*this.lineHeight;dF.priority?1:0}var m=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),m){var y={info:1,warning:2,error:3};m.forEach(function(N){N.priority=y[N.type]||null}),m=m.sort(p);for(var b=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&(O=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round(O-this.halfMinDecorationHeight),A=Math.round(O+this.halfMinDecorationHeight)}f.fillStyle=h[m[v].type]||null,f.fillRect(0,C,this.canvasWidth,A-w)}}var P=this.renderer.session.selection.getCursor();if(P){var D=this.compensateFoldRows(P.row,b),C=Math.round((P.row-D)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,C,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,h){var d=0;if(h&&h.length>0)for(var f=0;fh[f].start.row&&c=h[f].end.row&&(d+=h[f].end.row-h[f].start.row);return d},u}();o.implement(l.prototype,a),n.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/dom"),a=r("./lib/lang"),l=r("./config"),u=r("./layer/gutter").Gutter,c=r("./layer/marker").Marker,h=r("./layer/text").Text,d=r("./layer/cursor").Cursor,f=r("./scrollbar").HScrollBar,p=r("./scrollbar").VScrollBar,m=r("./scrollbar_custom").HScrollBar,y=r("./scrollbar_custom").VScrollBar,b=r("./renderloop").RenderLoop,v=r("./layer/font_metrics").FontMetrics,E=r("./lib/event_emitter").EventEmitter,D=r("./css/editor-css"),C=r("./layer/decorators").Decorator,w=r("./lib/useragent"),A=r("./layer/text_util").isTextToken;o.importCssString(D,"ace_editor.css",!1);var $=function(){function O(P,N){var F=this;this.container=P||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(N),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var L=this.$textLayer=new h(this.content);this.canvas=L.element,this.$markerFront=new c(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(k){F.$scrollAnimation||F.session.setScrollTop(k.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(k){F.$scrollAnimation||F.session.setScrollLeft(k.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(k){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",k)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return O.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},O.prototype.setSession=function(P){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=P,P&&this.scrollMargin.top&&P.getScrollTop()<=0&&P.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(P),this.$markerBack.setSession(P),this.$markerFront.setSession(P),this.$gutterLayer.setSession(P),this.$textLayer.setSession(P),P&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},O.prototype.updateLines=function(P,N,F){if(N===void 0&&(N=1/0),this.$changedLines?(this.$changedLines.firstRow>P&&(this.$changedLines.firstRow=P),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},O.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},O.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},O.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},O.prototype.updateFull=function(P){P?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},O.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},O.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},O.prototype.onResize=function(P,N,F,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=P?1:0;var k=this.container;L||(L=k.clientHeight||k.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(!k.style.height||k.style.height=="0px")&&(k.style.height="1px",L=k.clientHeight||k.scrollHeight),F||(F=k.clientWidth||k.scrollWidth);var T=this.$updateCachedSize(P,N,F,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!L)return this.resizing=0;P&&(this.$gutterLayer.$padding=null),P?this.$renderChanges(T|this.$changes,!0):this.$loop.schedule(T|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},O.prototype.$updateCachedSize=function(P,N,F,L){L-=this.$extraHeight||0;var k=0,T=this.$size,M={width:T.width,height:T.height,scrollerHeight:T.scrollerHeight,scrollerWidth:T.scrollerWidth};if(L&&(P||T.height!=L)&&(T.height=L,k|=this.CHANGE_SIZE,T.scrollerHeight=T.height,this.$horizScroll&&(T.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(T.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",k=k|this.CHANGE_SCROLL),F&&(P||T.width!=F)){k|=this.CHANGE_SIZE,T.width=F,N==null&&(N=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=N,o.setStyle(this.scrollBarH.element.style,"left",N+"px"),o.setStyle(this.scroller.style,"left",N+this.margin.left+"px"),T.scrollerWidth=Math.max(0,F-N-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var R=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",R),o.setStyle(this.scroller.style,"right",R),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(T.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||P)&&(k|=this.CHANGE_FULL)}return T.$dirty=!F||!L,k&&this._signal("resize",M),k},O.prototype.onGutterResize=function(P){var N=this.$showGutter?P:0;N!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,N,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},O.prototype.adjustWrapLimit=function(){var P=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(P/this.characterWidth);return this.session.adjustWrapLimit(N,this.$showPrintMargin&&this.$printMarginColumn)},O.prototype.setAnimatedScroll=function(P){this.setOption("animatedScroll",P)},O.prototype.getAnimatedScroll=function(){return this.$animatedScroll},O.prototype.setShowInvisibles=function(P){this.setOption("showInvisibles",P),this.session.$bidiHandler.setShowInvisibles(P)},O.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},O.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},O.prototype.setDisplayIndentGuides=function(P){this.setOption("displayIndentGuides",P)},O.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},O.prototype.setHighlightIndentGuides=function(P){this.setOption("highlightIndentGuides",P)},O.prototype.setShowPrintMargin=function(P){this.setOption("showPrintMargin",P)},O.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},O.prototype.setPrintMarginColumn=function(P){this.setOption("printMarginColumn",P)},O.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},O.prototype.getShowGutter=function(){return this.getOption("showGutter")},O.prototype.setShowGutter=function(P){return this.setOption("showGutter",P)},O.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},O.prototype.setFadeFoldWidgets=function(P){this.setOption("fadeFoldWidgets",P)},O.prototype.setHighlightGutterLine=function(P){this.setOption("highlightGutterLine",P)},O.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},O.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var P=o.createElement("div");P.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",P.appendChild(this.$printMarginEl),this.content.insertBefore(P,this.content.firstChild)}var N=this.$printMarginEl.style;N.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",N.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},O.prototype.getContainerElement=function(){return this.container},O.prototype.getMouseEventTarget=function(){return this.scroller},O.prototype.getTextAreaContainer=function(){return this.container},O.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var P=this.textarea.style,N=this.$composition;if(!this.$keepTextAreaAtCursor&&!N){o.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){N&&N.markerRange&&(F=this.$cursorLayer.getPixelPosition(N.markerRange.start,!0));var L=this.layerConfig,k=F.top,T=F.left;k-=L.offset;var M=N&&N.useTextareaForIME||w.isMobile?this.lineHeight:1;if(k<0||k>L.height-M){o.translate(this.textarea,0,0);return}var R=1,B=this.$size.height-M;if(!N)k+=this.lineHeight;else if(N.useTextareaForIME){var U=this.textarea.value;R=this.characterWidth*this.session.$getStringScreenWidth(U)[0]}else k+=this.lineHeight+2;T-=this.scrollLeft,T>this.$size.scrollerWidth-R&&(T=this.$size.scrollerWidth-R),T+=this.gutterWidth+this.margin.left,o.setStyle(P,"height",M+"px"),o.setStyle(P,"width",R+"px"),o.translate(this.textarea,Math.min(T,this.$size.scrollerWidth-R),Math.min(k,B))}}},O.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},O.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},O.prototype.getLastFullyVisibleRow=function(){var P=this.layerConfig,N=P.lastRow,F=this.session.documentToScreenRow(N,0)*P.lineHeight;return F-this.session.getScrollTop()>P.height-P.lineHeight?N-1:N},O.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},O.prototype.setPadding=function(P){this.$padding=P,this.$textLayer.setPadding(P),this.$cursorLayer.setPadding(P),this.$markerFront.setPadding(P),this.$markerBack.setPadding(P),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},O.prototype.setScrollMargin=function(P,N,F,L){var k=this.scrollMargin;k.top=P|0,k.bottom=N|0,k.right=L|0,k.left=F|0,k.v=k.top+k.bottom,k.h=k.left+k.right,k.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-k.top),this.updateFull()},O.prototype.setMargin=function(P,N,F,L){var k=this.margin;k.top=P|0,k.bottom=N|0,k.right=L|0,k.left=F|0,k.v=k.top+k.bottom,k.h=k.left+k.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},O.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},O.prototype.setHScrollBarAlwaysVisible=function(P){this.setOption("hScrollBarAlwaysVisible",P)},O.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},O.prototype.setVScrollBarAlwaysVisible=function(P){this.setOption("vScrollBarAlwaysVisible",P)},O.prototype.$updateScrollBarV=function(){var P=this.layerConfig.maxHeight,N=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(P-=(N-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>P-N&&(P=this.scrollTop+N,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(P+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},O.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},O.prototype.freeze=function(){this.$frozen=!0},O.prototype.unfreeze=function(){this.$frozen=!1},O.prototype.$renderChanges=function(P,N){if(this.$changes&&(P|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!P&&!N){this.$changes|=P;return}if(this.$size.$dirty)return this.$changes|=P,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",P),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(P&this.CHANGE_FULL||P&this.CHANGE_SIZE||P&this.CHANGE_TEXT||P&this.CHANGE_LINES||P&this.CHANGE_SCROLL||P&this.CHANGE_H_SCROLL){if(P|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,P=P|this.CHANGE_SCROLL,P|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),P&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-F.offset);var k=F.width+2*this.$padding+"px",T=F.minHeight+"px";o.setStyle(this.content.style,"width",k),o.setStyle(this.content.style,"height",T)}if(P&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),P&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",P);return}if(P&this.CHANGE_SCROLL){this.$changedLines=null,P&this.CHANGE_TEXT||P&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(P&this.CHANGE_GUTTER||P&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",P);return}P&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):P&this.CHANGE_LINES?((this.$updateLines()||P&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):P&this.CHANGE_TEXT||P&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):P&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),P&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),P&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),P&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",P)},O.prototype.$autosize=function(){var P=this.session.getScreenLength()*this.lineHeight,N=this.$maxLines*this.lineHeight,F=Math.min(N,Math.max((this.$minLines||1)*this.lineHeight,P))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var L=F<=2*this.lineHeight,k=!L&&P>N;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||k!=this.$vScroll){k!=this.$vScroll&&(this.$vScroll=k,this.scrollBarV.setVisible(k));var T=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,T,F),this.desiredHeight=F,this._signal("autosize")}},O.prototype.$computeLayerConfig=function(){var P=this.session,N=this.$size,F=N.height<=2*this.lineHeight,L=this.session.getScreenLength(),k=L*this.lineHeight,T=this.$getLongestLine(),M=!F&&(this.$hScrollBarAlwaysVisible||N.scrollerWidth-T-2*this.$padding<0),R=this.$horizScroll!==M;R&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var B=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var U=N.scrollerHeight+this.lineHeight,V=!this.$maxLines&&this.$scrollPastEnd?(N.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;k+=V;var K=this.scrollMargin;this.session.setScrollTop(Math.max(-K.top,Math.min(this.scrollTop,k-N.scrollerHeight+K.bottom))),this.session.setScrollLeft(Math.max(-K.left,Math.min(this.scrollLeft,T+2*this.$padding-N.scrollerWidth+K.right)));var J=!F&&(this.$vScrollBarAlwaysVisible||N.scrollerHeight-k+V<0||this.scrollTop>K.top),G=B!==J;G&&(this.$vScroll=J,this.scrollBarV.setVisible(J));var Y=this.scrollTop%this.lineHeight,Q=Math.ceil(U/this.lineHeight)-1,X=Math.max(0,Math.round((this.scrollTop-Y)/this.lineHeight)),le=X+Q,be,ce,xe=this.lineHeight;X=P.screenToDocumentRow(X,0);var ke=P.getFoldLine(X);ke&&(X=ke.start.row),be=P.documentToScreenRow(X,0),ce=P.getRowLength(X)*xe,le=Math.min(P.screenToDocumentRow(le,0),P.getLength()-1),U=N.scrollerHeight+P.getRowLength(le)*xe+ce,Y=this.scrollTop-be*xe;var Re=0;return(this.layerConfig.width!=T||R)&&(Re=this.CHANGE_H_SCROLL),(R||G)&&(Re|=this.$updateCachedSize(!0,this.gutterWidth,N.width,N.height),this._signal("scrollbarVisibilityChanged"),G&&(T=this.$getLongestLine())),this.layerConfig={width:T,padding:this.$padding,firstRow:X,firstRowScreen:be,lastRow:le,lineHeight:xe,characterWidth:this.characterWidth,minHeight:U,maxHeight:k,offset:Y,gutterOffset:xe?Math.max(0,Math.ceil((Y+N.height-N.scrollerHeight)/xe)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(T-this.$padding),Re},O.prototype.$updateLines=function(){if(this.$changedLines){var P=this.$changedLines.firstRow,N=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(P>F.lastRow+1)&&!(Nthis.$textLayer.MAX_LINE_LENGTH&&(P=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(P*this.characterWidth))},O.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},O.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},O.prototype.addGutterDecoration=function(P,N){this.$gutterLayer.addGutterDecoration(P,N)},O.prototype.removeGutterDecoration=function(P,N){this.$gutterLayer.removeGutterDecoration(P,N)},O.prototype.updateBreakpoints=function(P){this._rows=P,this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.setAnnotations=function(P){this.$gutterLayer.setAnnotations(P),this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},O.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},O.prototype.showCursor=function(){this.$cursorLayer.showCursor()},O.prototype.scrollSelectionIntoView=function(P,N,F){this.scrollCursorIntoView(P,F),this.scrollCursorIntoView(N,F)},O.prototype.scrollCursorIntoView=function(P,N,F){if(this.$size.scrollerHeight!==0){var L=this.$cursorLayer.getPixelPosition(P),k=L.left,T=L.top,M=F&&F.top||0,R=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var B=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;B+M>T?(N&&B+M>T+this.lineHeight&&(T-=N*this.$size.scrollerHeight),T===0&&(T=-this.scrollMargin.top),this.session.setScrollTop(T)):B+this.$size.scrollerHeight-R=1-this.scrollMargin.top||N>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||P<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||P>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},O.prototype.pixelToScreenCoordinates=function(P,N){var F;if(this.$hasCssTransforms){F={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([P,N]);P=L[1]-this.gutterWidth-this.margin.left,N=L[0]}else F=this.scroller.getBoundingClientRect();var k=P+this.scrollLeft-F.left-this.$padding,T=k/this.characterWidth,M=Math.floor((N+this.scrollTop-F.top)/this.lineHeight),R=this.$blockCursor?Math.floor(T):Math.round(T);return{row:M,column:R,side:T-R>0?1:-1,offsetX:k}},O.prototype.screenToTextCoordinates=function(P,N){var F;if(this.$hasCssTransforms){F={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([P,N]);P=L[1]-this.gutterWidth-this.margin.left,N=L[0]}else F=this.scroller.getBoundingClientRect();var k=P+this.scrollLeft-F.left-this.$padding,T=k/this.characterWidth,M=this.$blockCursor?Math.floor(T):Math.round(T),R=Math.floor((N+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(R,Math.max(M,0),k)},O.prototype.textToScreenCoordinates=function(P,N){var F=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition(P,N),k=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,P)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),T=L.row*this.lineHeight;return{pageX:F.left+k-this.scrollLeft,pageY:F.top+T-this.scrollTop}},O.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},O.prototype.showComposition=function(P){this.$composition=P,P.cssText||(P.cssText=this.textarea.style.cssText),P.useTextareaForIME==null&&(P.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):P.markerId=this.session.addMarker(P.markerRange,"ace_composition_marker","text")},O.prototype.setCompositionText=function(P){var N=this.session.selection.cursor;this.addToken(P,"composition_placeholder",N.row,N.column),this.$moveTextAreaToCursor()},O.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var P=this.session.selection.cursor;this.removeExtraToken(P.row,P.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},O.prototype.setGhostText=function(P,N){var F=this.session.selection.cursor,L=N||{row:F.row,column:F.column};this.removeGhostText();var k=this.$calculateWrappedTextChunks(P,L);this.addToken(k[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:P,position:{row:L.row,column:L.column}};var T=o.createElement("div");if(k.length>1){var M=this.hideTokensAfterPosition(L.row,L.column),R;k.slice(1).forEach(function(G){var Y=o.createElement("div"),Q=o.createElement("span");Q.className="ace_ghost_text",G.wrapped&&(Y.className="ghost_text_line_wrapped"),G.text.length===0&&(G.text=" "),Q.appendChild(o.createTextNode(G.text)),Y.appendChild(Q),T.appendChild(Y),R=Y}),M.forEach(function(G){var Y=o.createElement("span");A(G.type)||(Y.className="ace_"+G.type.replace(/\./g," ace_")),Y.appendChild(o.createTextNode(G.value)),R.appendChild(Y)}),this.$ghostTextWidget={el:T,row:L.row,column:L.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var B=this.$cursorLayer.getPixelPosition(L,!0),U=this.container,V=U.getBoundingClientRect().height,K=k.length*this.lineHeight,J=K0){var U=0;B.push(k[M].length);for(var V=0;V1||Math.abs(P.$size.height-L)>1?P.$resizeTimer.delay():P.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},O}();$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,s.implement($.prototype,E),l.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(O){!O&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):O&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(O){this.$textLayer.setShowInvisibles(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(O){typeof O=="number"&&(this.$printMarginColumn=O),this.$showPrintMargin=!!O,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(O){this.$gutter.style.display=O?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(O){this.$gutterLayer.$useSvgGutterIcons=O},initialValue:!1},showFoldedAnnotations:{set:function(O){this.$gutterLayer.$showFoldedAnnotations=O},initialValue:!1},fadeFoldWidgets:{set:function(O){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",O)},initialValue:!1},showFoldWidgets:{set:function(O){this.$gutterLayer.setShowFoldWidgets(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(O){this.$textLayer.setDisplayIndentGuides(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(O){this.$textLayer.setHighlightIndentGuides(O)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(O){this.$gutterLayer.setHighlightGutterLine(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(O){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(O){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(O){typeof O=="number"&&(O=O+"px"),this.container.style.fontSize=O,this.updateFontSize()},initialValue:12},fontFamily:{set:function(O){this.container.style.fontFamily=O,this.updateFontSize()}},maxLines:{set:function(O){this.updateFull()}},minLines:{set:function(O){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(O){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(O){O=+O||0,this.$scrollPastEnd!=O&&(this.$scrollPastEnd=O,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(O){this.$gutterLayer.$fixedWidth=!!O,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(O){this.$updateCustomScrollbar(O)},initialValue:!1},theme:{set:function(O){this.setTheme(O)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),n.VirtualRenderer=$}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/net"),a=r("../lib/event_emitter").EventEmitter,l=r("../config");function u(f){var p="importScripts('"+o.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var m=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,y=new m;return y.append(p),y.getBlob("application/javascript")}}function c(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var p=u(f),m=window.URL||window.webkitURL,y=m.createObjectURL(p);return new Worker(y)}return new Worker(f)}var h=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,a),this.$createWorkerFromOldConfig=function(f,p,m,y,b){if(r.nameToUrl&&!r.toUrl&&(r.toUrl=r.nameToUrl),l.get("packaged")||!r.toUrl)y=y||l.moduleUrl(p,"worker");else{var v=this.$normalizePath;y=y||v(r.toUrl("ace/worker/worker.js",null,"_"));var E={};f.forEach(function(D){E[D]=v(r.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(y),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:E,module:p,classname:m}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var m=this.callbacks[p.id];m&&(m(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return o.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,m){if(m){var y=this.callbackId++;this.callbacks[y]=m,p.push(y)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(m){console.error(m.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(h.prototype);var d=function(f,p,m){var y=null,b=!1,v=Object.create(a),E=[],D=new h({messageBuffer:E,terminate:function(){},postMessage:function(w){E.push(w),y&&(b?setTimeout(C):C())}});D.setEmitSync=function(w){b=w};var C=function(){var w=E.shift();w.command?y[w.command].apply(y,w.args):w.event&&v._signal(w.event,w.data)};return v.postMessage=function(w){D.onMessage({data:w})},v.callback=function(w,A){this.postMessage({type:"call",id:A,data:w})},v.emit=function(w,A){this.postMessage({type:"event",name:w,data:A})},l.loadModule(["worker",p],function(w){for(y=new w[m](v);E.length;)C()}),D};n.UIWorkerClient=d,n.WorkerClient=h,n.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(r,n,i){var s=r("./range").Range,o=r("./lib/event_emitter").EventEmitter,a=r("./lib/oop"),l=function(){function u(c,h,d,f,p,m){var y=this;this.length=h,this.session=c,this.doc=c.getDocument(),this.mainClass=p,this.othersClass=m,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){y.onCursorChange()})},this.$pos=d;var b=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,h=this.doc,d=this.session;this.selectionBefore=d.selection.toJSON(),d.selection.inMultiSelectMode&&d.selection.toSingleRange(),this.pos=h.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=d.addMarker(new s(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var m=h.createAnchor(p.row,p.column);m.$insertRight=!0,m.detach(),c.others.push(m)}),d.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,h=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=c.addMarker(new s(d.row,d.column,d.row,d.column+h.length),h.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&h.start.column<=this.pos.column+this.length+1,p=h.start.column-this.pos.column;if(this.updateAnchors(c),f&&(this.length+=d),f&&!this.session.$fromUndo){if(c.action==="insert")for(var m=this.others.length-1;m>=0;m--){var y=this.others[m],b={row:y.row,column:y.column+p};this.doc.insertMergedLines(b,c.lines)}else if(c.action==="remove")for(var m=this.others.length-1;m>=0;m--){var y=this.others[m],b={row:y.row,column:y.column+p};this.doc.remove(new s(b.row,b.column,b.row,b.column-d))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var h=this.others.length;h--;)this.others[h].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,h=this.session,d=function(p,m){h.removeMarker(p.markerId),p.markerId=h.addMarker(new s(p.row,p.column,p.row,p.column+c.length),m,null,!1)};d(this.pos,this.mainClass);for(var f=this.others.length;f--;)d(this.others[f],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var h=this.session.selection.getCursor();h.row===this.pos.row&&h.column>=this.pos.column&&h.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),h=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,d=0;d1?o.multiSelect.joinSelections():o.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(o){o.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(o){o.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(o){o.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(o){o.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(o){return o&&o.inMultiSelectMode}}];var s=r("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new s(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(r,n,i){var s=r("./range_list").RangeList,o=r("./range").Range,a=r("./selection").Selection,l=r("./mouse/multi_select_handler").onMouseDown,u=r("./lib/event"),c=r("./lib/lang"),h=r("./commands/multi_select_commands");n.commands=h.defaultCommands.concat(h.multiSelectCommands);var d=r("./search").Search,f=new d;function p(D,C,w){return f.$options.wrap=!0,f.$options.needle=C,f.$options.backwards=w==-1,f.find(D)}var m=r("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(m.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(D,C){if(D){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(D),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(D);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}D.cursor||(D.cursor=D.end);var A=this.rangeList.add(D);return this.$onAddRange(D),A.length&&this.$onRemoveRange(A),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(D)}},this.toSingleRange=function(D){D=D||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),D&&this.fromOrientedRange(D)},this.substractPoint=function(D){var C=this.rangeList.substractPoint(D);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var D=this.rangeList.merge();D.length&&this.$onRemoveRange(D)},this.$onAddRange=function(D){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(D),this._signal("addRange",{range:D})},this.$onRemoveRange=function(D){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();D.push(C),this.rangeCount=0}for(var w=D.length;w--;){var A=this.ranges.indexOf(D[w]);this.ranges.splice(A,1)}this._signal("removeRange",{ranges:D}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var D=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w1){var D=this.rangeList.ranges,C=D[D.length-1],w=o.fromPoints(D[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var A=this.session.documentToScreenPosition(this.cursor),$=this.session.documentToScreenPosition(this.anchor),O=this.rectangularRangeBlock(A,$);O.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(D,C,w){var A=[],$=D.column0;)U--;if(U>0)for(var V=0;A[V].isEmpty();)V++;for(var K=U;K>=V;K--)A[K].isEmpty()&&A.splice(K,1)}return A}}).call(a.prototype);var y=r("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(D){D.cursor||(D.cursor=D.end);var C=this.getSelectionStyle();return D.marker=this.session.addMarker(D,"ace_selection",C),this.session.$selectionMarkers.push(D),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,D},this.removeSelectionMarker=function(D){if(D.marker){this.session.removeMarker(D.marker);var C=this.session.$selectionMarkers.indexOf(D);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(D){for(var C=this.session.$selectionMarkers,w=D.length;w--;){var A=D[w];if(A.marker){this.session.removeMarker(A.marker);var $=C.indexOf(A);$!=-1&&C.splice($,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(D){this.addSelectionMarker(D.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(D){this.removeSelectionMarkers(D.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(D){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(D){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(D){var C=D.command,w=D.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?A=w.forEachSelection(C,D.args):C.multiSelectAction=="forEachLine"?A=w.forEachSelection(C,D.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),A=C.exec(w,D.args||{})):A=C.multiSelectAction(w,D.args||{});else{var A=C.exec(w,D.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return A}},this.forEachSelection=function(D,C,w){if(!this.inVirtualSelectionMode){var A=w&&w.keepOrder,$=w==!0||w&&w.$byLines,O=this.session,P=this.selection,N=P.rangeList,F=(A?P:N).ranges,L;if(!F.length)return D.exec?D.exec(this,C||{}):D(this,C||{});var k=P._eventRegistry;P._eventRegistry={};var T=new a(O);this.inVirtualSelectionMode=!0;for(var M=F.length;M--;){if($)for(;M>0&&F[M].start.row==F[M-1].end.row;)M--;T.fromOrientedRange(F[M]),T.index=M,this.selection=O.selection=T;var R=D.exec?D.exec(this,C||{}):D(this,C||{});!L&&R!==void 0&&(L=R),T.toOrientedRange(F[M])}T.detach(),this.selection=O.selection=P,this.inVirtualSelectionMode=!1,P._eventRegistry=k,P.mergeOverlappingRanges(),P.ranges[0]&&P.fromOrientedRange(P.ranges[0]);var B=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),B&&B.from==B.to&&this.renderer.animateScrolling(B.from),L}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var D="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],A=0;A0);P<0&&(P=0),N>=L&&(N=L-1)}var T=this.session.removeFullLines(P,N);T=this.$reAlignText(T,F),this.session.insert({row:P,column:0},T.join(` +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/dom"),o=r("../lib/oop"),a=r("../lib/event_emitter").EventEmitter,l=function(){function u(c,h){this.canvas=s.createElement("canvas"),this.renderer=h,this.pixelRatio=1,this.maxHeight=h.layerConfig.maxHeight,this.lineHeight=h.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var h=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var d=(c.lastRow+1)*this.lineHeight;dF.priority?1:0}var m=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),m){var y={info:1,warning:2,error:3};m.forEach(function(I){I.priority=y[I.type]||null}),m=m.sort(p);for(var b=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&(O=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round(O-this.halfMinDecorationHeight),T=Math.round(O+this.halfMinDecorationHeight)}f.fillStyle=h[m[v].type]||null,f.fillRect(0,C,this.canvasWidth,T-w)}}var P=this.renderer.session.selection.getCursor();if(P){var D=this.compensateFoldRows(P.row,b),C=Math.round((P.row-D)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,C,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,h){var d=0;if(h&&h.length>0)for(var f=0;fh[f].start.row&&c=h[f].end.row&&(d+=h[f].end.row-h[f].start.row);return d},u}();o.implement(l.prototype,a),n.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/dom"),a=r("./lib/lang"),l=r("./config"),u=r("./layer/gutter").Gutter,c=r("./layer/marker").Marker,h=r("./layer/text").Text,d=r("./layer/cursor").Cursor,f=r("./scrollbar").HScrollBar,p=r("./scrollbar").VScrollBar,m=r("./scrollbar_custom").HScrollBar,y=r("./scrollbar_custom").VScrollBar,b=r("./renderloop").RenderLoop,v=r("./layer/font_metrics").FontMetrics,E=r("./lib/event_emitter").EventEmitter,D=r("./css/editor-css"),C=r("./layer/decorators").Decorator,w=r("./lib/useragent"),T=r("./layer/text_util").isTextToken;o.importCssString(D,"ace_editor.css",!1);var k=function(){function O(P,I){var F=this;this.container=P||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(I),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var L=this.$textLayer=new h(this.content);this.canvas=L.element,this.$markerFront=new c(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(_){F.$scrollAnimation||F.session.setScrollTop(_.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){F.$scrollAnimation||F.session.setScrollLeft(_.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return O.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},O.prototype.setSession=function(P){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=P,P&&this.scrollMargin.top&&P.getScrollTop()<=0&&P.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(P),this.$markerBack.setSession(P),this.$markerFront.setSession(P),this.$gutterLayer.setSession(P),this.$textLayer.setSession(P),P&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},O.prototype.updateLines=function(P,I,F){if(I===void 0&&(I=1/0),this.$changedLines?(this.$changedLines.firstRow>P&&(this.$changedLines.firstRow=P),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},O.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},O.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},O.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},O.prototype.updateFull=function(P){P?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},O.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},O.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},O.prototype.onResize=function(P,I,F,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=P?1:0;var _=this.container;L||(L=_.clientHeight||_.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",L=_.clientHeight||_.scrollHeight),F||(F=_.clientWidth||_.scrollWidth);var A=this.$updateCachedSize(P,I,F,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!L)return this.resizing=0;P&&(this.$gutterLayer.$padding=null),P?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},O.prototype.$updateCachedSize=function(P,I,F,L){L-=this.$extraHeight||0;var _=0,A=this.$size,M={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(L&&(P||A.height!=L)&&(A.height=L,_|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),F&&(P||A.width!=F)){_|=this.CHANGE_SIZE,A.width=F,I==null&&(I=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=I,o.setStyle(this.scrollBarH.element.style,"left",I+"px"),o.setStyle(this.scroller.style,"left",I+this.margin.left+"px"),A.scrollerWidth=Math.max(0,F-I-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var R=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",R),o.setStyle(this.scroller.style,"right",R),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||P)&&(_|=this.CHANGE_FULL)}return A.$dirty=!F||!L,_&&this._signal("resize",M),_},O.prototype.onGutterResize=function(P){var I=this.$showGutter?P:0;I!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,I,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},O.prototype.adjustWrapLimit=function(){var P=this.$size.scrollerWidth-this.$padding*2,I=Math.floor(P/this.characterWidth);return this.session.adjustWrapLimit(I,this.$showPrintMargin&&this.$printMarginColumn)},O.prototype.setAnimatedScroll=function(P){this.setOption("animatedScroll",P)},O.prototype.getAnimatedScroll=function(){return this.$animatedScroll},O.prototype.setShowInvisibles=function(P){this.setOption("showInvisibles",P),this.session.$bidiHandler.setShowInvisibles(P)},O.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},O.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},O.prototype.setDisplayIndentGuides=function(P){this.setOption("displayIndentGuides",P)},O.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},O.prototype.setHighlightIndentGuides=function(P){this.setOption("highlightIndentGuides",P)},O.prototype.setShowPrintMargin=function(P){this.setOption("showPrintMargin",P)},O.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},O.prototype.setPrintMarginColumn=function(P){this.setOption("printMarginColumn",P)},O.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},O.prototype.getShowGutter=function(){return this.getOption("showGutter")},O.prototype.setShowGutter=function(P){return this.setOption("showGutter",P)},O.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},O.prototype.setFadeFoldWidgets=function(P){this.setOption("fadeFoldWidgets",P)},O.prototype.setHighlightGutterLine=function(P){this.setOption("highlightGutterLine",P)},O.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},O.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var P=o.createElement("div");P.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",P.appendChild(this.$printMarginEl),this.content.insertBefore(P,this.content.firstChild)}var I=this.$printMarginEl.style;I.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",I.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},O.prototype.getContainerElement=function(){return this.container},O.prototype.getMouseEventTarget=function(){return this.scroller},O.prototype.getTextAreaContainer=function(){return this.container},O.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var P=this.textarea.style,I=this.$composition;if(!this.$keepTextAreaAtCursor&&!I){o.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){I&&I.markerRange&&(F=this.$cursorLayer.getPixelPosition(I.markerRange.start,!0));var L=this.layerConfig,_=F.top,A=F.left;_-=L.offset;var M=I&&I.useTextareaForIME||w.isMobile?this.lineHeight:1;if(_<0||_>L.height-M){o.translate(this.textarea,0,0);return}var R=1,B=this.$size.height-M;if(!I)_+=this.lineHeight;else if(I.useTextareaForIME){var U=this.textarea.value;R=this.characterWidth*this.session.$getStringScreenWidth(U)[0]}else _+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-R&&(A=this.$size.scrollerWidth-R),A+=this.gutterWidth+this.margin.left,o.setStyle(P,"height",M+"px"),o.setStyle(P,"width",R+"px"),o.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-R),Math.min(_,B))}}},O.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},O.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},O.prototype.getLastFullyVisibleRow=function(){var P=this.layerConfig,I=P.lastRow,F=this.session.documentToScreenRow(I,0)*P.lineHeight;return F-this.session.getScrollTop()>P.height-P.lineHeight?I-1:I},O.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},O.prototype.setPadding=function(P){this.$padding=P,this.$textLayer.setPadding(P),this.$cursorLayer.setPadding(P),this.$markerFront.setPadding(P),this.$markerBack.setPadding(P),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},O.prototype.setScrollMargin=function(P,I,F,L){var _=this.scrollMargin;_.top=P|0,_.bottom=I|0,_.right=L|0,_.left=F|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},O.prototype.setMargin=function(P,I,F,L){var _=this.margin;_.top=P|0,_.bottom=I|0,_.right=L|0,_.left=F|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},O.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},O.prototype.setHScrollBarAlwaysVisible=function(P){this.setOption("hScrollBarAlwaysVisible",P)},O.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},O.prototype.setVScrollBarAlwaysVisible=function(P){this.setOption("vScrollBarAlwaysVisible",P)},O.prototype.$updateScrollBarV=function(){var P=this.layerConfig.maxHeight,I=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(P-=(I-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>P-I&&(P=this.scrollTop+I,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(P+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},O.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},O.prototype.freeze=function(){this.$frozen=!0},O.prototype.unfreeze=function(){this.$frozen=!1},O.prototype.$renderChanges=function(P,I){if(this.$changes&&(P|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!P&&!I){this.$changes|=P;return}if(this.$size.$dirty)return this.$changes|=P,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",P),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(P&this.CHANGE_FULL||P&this.CHANGE_SIZE||P&this.CHANGE_TEXT||P&this.CHANGE_LINES||P&this.CHANGE_SCROLL||P&this.CHANGE_H_SCROLL){if(P|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,P=P|this.CHANGE_SCROLL,P|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),P&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-F.offset);var _=F.width+2*this.$padding+"px",A=F.minHeight+"px";o.setStyle(this.content.style,"width",_),o.setStyle(this.content.style,"height",A)}if(P&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),P&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",P);return}if(P&this.CHANGE_SCROLL){this.$changedLines=null,P&this.CHANGE_TEXT||P&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(P&this.CHANGE_GUTTER||P&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",P);return}P&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):P&this.CHANGE_LINES?((this.$updateLines()||P&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):P&this.CHANGE_TEXT||P&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):P&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),P&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),P&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),P&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",P)},O.prototype.$autosize=function(){var P=this.session.getScreenLength()*this.lineHeight,I=this.$maxLines*this.lineHeight,F=Math.min(I,Math.max((this.$minLines||1)*this.lineHeight,P))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var L=F<=2*this.lineHeight,_=!L&&P>I;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var A=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,F),this.desiredHeight=F,this._signal("autosize")}},O.prototype.$computeLayerConfig=function(){var P=this.session,I=this.$size,F=I.height<=2*this.lineHeight,L=this.session.getScreenLength(),_=L*this.lineHeight,A=this.$getLongestLine(),M=!F&&(this.$hScrollBarAlwaysVisible||I.scrollerWidth-A-2*this.$padding<0),R=this.$horizScroll!==M;R&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var B=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var U=I.scrollerHeight+this.lineHeight,V=!this.$maxLines&&this.$scrollPastEnd?(I.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=V;var K=this.scrollMargin;this.session.setScrollTop(Math.max(-K.top,Math.min(this.scrollTop,_-I.scrollerHeight+K.bottom))),this.session.setScrollLeft(Math.max(-K.left,Math.min(this.scrollLeft,A+2*this.$padding-I.scrollerWidth+K.right)));var J=!F&&(this.$vScrollBarAlwaysVisible||I.scrollerHeight-_+V<0||this.scrollTop>K.top),G=B!==J;G&&(this.$vScroll=J,this.scrollBarV.setVisible(J));var Y=this.scrollTop%this.lineHeight,Q=Math.ceil(U/this.lineHeight)-1,X=Math.max(0,Math.round((this.scrollTop-Y)/this.lineHeight)),le=X+Q,be,ce,xe=this.lineHeight;X=P.screenToDocumentRow(X,0);var ke=P.getFoldLine(X);ke&&(X=ke.start.row),be=P.documentToScreenRow(X,0),ce=P.getRowLength(X)*xe,le=Math.min(P.screenToDocumentRow(le,0),P.getLength()-1),U=I.scrollerHeight+P.getRowLength(le)*xe+ce,Y=this.scrollTop-be*xe;var Re=0;return(this.layerConfig.width!=A||R)&&(Re=this.CHANGE_H_SCROLL),(R||G)&&(Re|=this.$updateCachedSize(!0,this.gutterWidth,I.width,I.height),this._signal("scrollbarVisibilityChanged"),G&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:X,firstRowScreen:be,lastRow:le,lineHeight:xe,characterWidth:this.characterWidth,minHeight:U,maxHeight:_,offset:Y,gutterOffset:xe?Math.max(0,Math.ceil((Y+I.height-I.scrollerHeight)/xe)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),Re},O.prototype.$updateLines=function(){if(this.$changedLines){var P=this.$changedLines.firstRow,I=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(P>F.lastRow+1)&&!(Ithis.$textLayer.MAX_LINE_LENGTH&&(P=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(P*this.characterWidth))},O.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},O.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},O.prototype.addGutterDecoration=function(P,I){this.$gutterLayer.addGutterDecoration(P,I)},O.prototype.removeGutterDecoration=function(P,I){this.$gutterLayer.removeGutterDecoration(P,I)},O.prototype.updateBreakpoints=function(P){this._rows=P,this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.setAnnotations=function(P){this.$gutterLayer.setAnnotations(P),this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},O.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},O.prototype.showCursor=function(){this.$cursorLayer.showCursor()},O.prototype.scrollSelectionIntoView=function(P,I,F){this.scrollCursorIntoView(P,F),this.scrollCursorIntoView(I,F)},O.prototype.scrollCursorIntoView=function(P,I,F){if(this.$size.scrollerHeight!==0){var L=this.$cursorLayer.getPixelPosition(P),_=L.left,A=L.top,M=F&&F.top||0,R=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var B=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;B+M>A?(I&&B+M>A+this.lineHeight&&(A-=I*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):B+this.$size.scrollerHeight-R=1-this.scrollMargin.top||I>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||P<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||P>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},O.prototype.pixelToScreenCoordinates=function(P,I){var F;if(this.$hasCssTransforms){F={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([P,I]);P=L[1]-this.gutterWidth-this.margin.left,I=L[0]}else F=this.scroller.getBoundingClientRect();var _=P+this.scrollLeft-F.left-this.$padding,A=_/this.characterWidth,M=Math.floor((I+this.scrollTop-F.top)/this.lineHeight),R=this.$blockCursor?Math.floor(A):Math.round(A);return{row:M,column:R,side:A-R>0?1:-1,offsetX:_}},O.prototype.screenToTextCoordinates=function(P,I){var F;if(this.$hasCssTransforms){F={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([P,I]);P=L[1]-this.gutterWidth-this.margin.left,I=L[0]}else F=this.scroller.getBoundingClientRect();var _=P+this.scrollLeft-F.left-this.$padding,A=_/this.characterWidth,M=this.$blockCursor?Math.floor(A):Math.round(A),R=Math.floor((I+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(R,Math.max(M,0),_)},O.prototype.textToScreenCoordinates=function(P,I){var F=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition(P,I),_=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,P)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),A=L.row*this.lineHeight;return{pageX:F.left+_-this.scrollLeft,pageY:F.top+A-this.scrollTop}},O.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},O.prototype.showComposition=function(P){this.$composition=P,P.cssText||(P.cssText=this.textarea.style.cssText),P.useTextareaForIME==null&&(P.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):P.markerId=this.session.addMarker(P.markerRange,"ace_composition_marker","text")},O.prototype.setCompositionText=function(P){var I=this.session.selection.cursor;this.addToken(P,"composition_placeholder",I.row,I.column),this.$moveTextAreaToCursor()},O.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var P=this.session.selection.cursor;this.removeExtraToken(P.row,P.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},O.prototype.setGhostText=function(P,I){var F=this.session.selection.cursor,L=I||{row:F.row,column:F.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(P,L);this.addToken(_[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:P,position:{row:L.row,column:L.column}};var A=o.createElement("div");if(_.length>1){var M=this.hideTokensAfterPosition(L.row,L.column),R;_.slice(1).forEach(function(G){var Y=o.createElement("div"),Q=o.createElement("span");Q.className="ace_ghost_text",G.wrapped&&(Y.className="ghost_text_line_wrapped"),G.text.length===0&&(G.text=" "),Q.appendChild(o.createTextNode(G.text)),Y.appendChild(Q),A.appendChild(Y),R=Y}),M.forEach(function(G){var Y=o.createElement("span");T(G.type)||(Y.className="ace_"+G.type.replace(/\./g," ace_")),Y.appendChild(o.createTextNode(G.value)),R.appendChild(Y)}),this.$ghostTextWidget={el:A,row:L.row,column:L.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var B=this.$cursorLayer.getPixelPosition(L,!0),U=this.container,V=U.getBoundingClientRect().height,K=_.length*this.lineHeight,J=K0){var U=0;B.push(_[M].length);for(var V=0;V1||Math.abs(P.$size.height-L)>1?P.$resizeTimer.delay():P.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},O}();k.prototype.CHANGE_CURSOR=1,k.prototype.CHANGE_MARKER=2,k.prototype.CHANGE_GUTTER=4,k.prototype.CHANGE_SCROLL=8,k.prototype.CHANGE_LINES=16,k.prototype.CHANGE_TEXT=32,k.prototype.CHANGE_SIZE=64,k.prototype.CHANGE_MARKER_BACK=128,k.prototype.CHANGE_MARKER_FRONT=256,k.prototype.CHANGE_FULL=512,k.prototype.CHANGE_H_SCROLL=1024,k.prototype.$changes=0,k.prototype.$padding=null,k.prototype.$frozen=!1,k.prototype.STEPS=8,s.implement(k.prototype,E),l.defineOptions(k.prototype,"renderer",{useResizeObserver:{set:function(O){!O&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):O&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(O){this.$textLayer.setShowInvisibles(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(O){typeof O=="number"&&(this.$printMarginColumn=O),this.$showPrintMargin=!!O,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(O){this.$gutter.style.display=O?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(O){this.$gutterLayer.$useSvgGutterIcons=O},initialValue:!1},showFoldedAnnotations:{set:function(O){this.$gutterLayer.$showFoldedAnnotations=O},initialValue:!1},fadeFoldWidgets:{set:function(O){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",O)},initialValue:!1},showFoldWidgets:{set:function(O){this.$gutterLayer.setShowFoldWidgets(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(O){this.$textLayer.setDisplayIndentGuides(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(O){this.$textLayer.setHighlightIndentGuides(O)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(O){this.$gutterLayer.setHighlightGutterLine(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(O){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(O){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(O){typeof O=="number"&&(O=O+"px"),this.container.style.fontSize=O,this.updateFontSize()},initialValue:12},fontFamily:{set:function(O){this.container.style.fontFamily=O,this.updateFontSize()}},maxLines:{set:function(O){this.updateFull()}},minLines:{set:function(O){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(O){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(O){O=+O||0,this.$scrollPastEnd!=O&&(this.$scrollPastEnd=O,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(O){this.$gutterLayer.$fixedWidth=!!O,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(O){this.$updateCustomScrollbar(O)},initialValue:!1},theme:{set:function(O){this.setTheme(O)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),n.VirtualRenderer=k}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/net"),a=r("../lib/event_emitter").EventEmitter,l=r("../config");function u(f){var p="importScripts('"+o.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var m=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,y=new m;return y.append(p),y.getBlob("application/javascript")}}function c(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var p=u(f),m=window.URL||window.webkitURL,y=m.createObjectURL(p);return new Worker(y)}return new Worker(f)}var h=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,a),this.$createWorkerFromOldConfig=function(f,p,m,y,b){if(r.nameToUrl&&!r.toUrl&&(r.toUrl=r.nameToUrl),l.get("packaged")||!r.toUrl)y=y||l.moduleUrl(p,"worker");else{var v=this.$normalizePath;y=y||v(r.toUrl("ace/worker/worker.js",null,"_"));var E={};f.forEach(function(D){E[D]=v(r.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(y),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:E,module:p,classname:m}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var m=this.callbacks[p.id];m&&(m(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return o.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,m){if(m){var y=this.callbackId++;this.callbacks[y]=m,p.push(y)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(m){console.error(m.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(h.prototype);var d=function(f,p,m){var y=null,b=!1,v=Object.create(a),E=[],D=new h({messageBuffer:E,terminate:function(){},postMessage:function(w){E.push(w),y&&(b?setTimeout(C):C())}});D.setEmitSync=function(w){b=w};var C=function(){var w=E.shift();w.command?y[w.command].apply(y,w.args):w.event&&v._signal(w.event,w.data)};return v.postMessage=function(w){D.onMessage({data:w})},v.callback=function(w,T){this.postMessage({type:"call",id:T,data:w})},v.emit=function(w,T){this.postMessage({type:"event",name:w,data:T})},l.loadModule(["worker",p],function(w){for(y=new w[m](v);E.length;)C()}),D};n.UIWorkerClient=d,n.WorkerClient=h,n.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(r,n,i){var s=r("./range").Range,o=r("./lib/event_emitter").EventEmitter,a=r("./lib/oop"),l=function(){function u(c,h,d,f,p,m){var y=this;this.length=h,this.session=c,this.doc=c.getDocument(),this.mainClass=p,this.othersClass=m,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){y.onCursorChange()})},this.$pos=d;var b=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,h=this.doc,d=this.session;this.selectionBefore=d.selection.toJSON(),d.selection.inMultiSelectMode&&d.selection.toSingleRange(),this.pos=h.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=d.addMarker(new s(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var m=h.createAnchor(p.row,p.column);m.$insertRight=!0,m.detach(),c.others.push(m)}),d.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,h=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=c.addMarker(new s(d.row,d.column,d.row,d.column+h.length),h.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&h.start.column<=this.pos.column+this.length+1,p=h.start.column-this.pos.column;if(this.updateAnchors(c),f&&(this.length+=d),f&&!this.session.$fromUndo){if(c.action==="insert")for(var m=this.others.length-1;m>=0;m--){var y=this.others[m],b={row:y.row,column:y.column+p};this.doc.insertMergedLines(b,c.lines)}else if(c.action==="remove")for(var m=this.others.length-1;m>=0;m--){var y=this.others[m],b={row:y.row,column:y.column+p};this.doc.remove(new s(b.row,b.column,b.row,b.column-d))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var h=this.others.length;h--;)this.others[h].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,h=this.session,d=function(p,m){h.removeMarker(p.markerId),p.markerId=h.addMarker(new s(p.row,p.column,p.row,p.column+c.length),m,null,!1)};d(this.pos,this.mainClass);for(var f=this.others.length;f--;)d(this.others[f],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var h=this.session.selection.getCursor();h.row===this.pos.row&&h.column>=this.pos.column&&h.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),h=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,d=0;d1?o.multiSelect.joinSelections():o.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(o){o.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(o){o.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(o){o.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(o){o.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(o){return o&&o.inMultiSelectMode}}];var s=r("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new s(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(r,n,i){var s=r("./range_list").RangeList,o=r("./range").Range,a=r("./selection").Selection,l=r("./mouse/multi_select_handler").onMouseDown,u=r("./lib/event"),c=r("./lib/lang"),h=r("./commands/multi_select_commands");n.commands=h.defaultCommands.concat(h.multiSelectCommands);var d=r("./search").Search,f=new d;function p(D,C,w){return f.$options.wrap=!0,f.$options.needle=C,f.$options.backwards=w==-1,f.find(D)}var m=r("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(m.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(D,C){if(D){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(D),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(D);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}D.cursor||(D.cursor=D.end);var T=this.rangeList.add(D);return this.$onAddRange(D),T.length&&this.$onRemoveRange(T),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(D)}},this.toSingleRange=function(D){D=D||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),D&&this.fromOrientedRange(D)},this.substractPoint=function(D){var C=this.rangeList.substractPoint(D);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var D=this.rangeList.merge();D.length&&this.$onRemoveRange(D)},this.$onAddRange=function(D){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(D),this._signal("addRange",{range:D})},this.$onRemoveRange=function(D){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();D.push(C),this.rangeCount=0}for(var w=D.length;w--;){var T=this.ranges.indexOf(D[w]);this.ranges.splice(T,1)}this._signal("removeRange",{ranges:D}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var D=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w1){var D=this.rangeList.ranges,C=D[D.length-1],w=o.fromPoints(D[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var T=this.session.documentToScreenPosition(this.cursor),k=this.session.documentToScreenPosition(this.anchor),O=this.rectangularRangeBlock(T,k);O.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(D,C,w){var T=[],k=D.column0;)U--;if(U>0)for(var V=0;T[V].isEmpty();)V++;for(var K=U;K>=V;K--)T[K].isEmpty()&&T.splice(K,1)}return T}}).call(a.prototype);var y=r("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(D){D.cursor||(D.cursor=D.end);var C=this.getSelectionStyle();return D.marker=this.session.addMarker(D,"ace_selection",C),this.session.$selectionMarkers.push(D),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,D},this.removeSelectionMarker=function(D){if(D.marker){this.session.removeMarker(D.marker);var C=this.session.$selectionMarkers.indexOf(D);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(D){for(var C=this.session.$selectionMarkers,w=D.length;w--;){var T=D[w];if(T.marker){this.session.removeMarker(T.marker);var k=C.indexOf(T);k!=-1&&C.splice(k,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(D){this.addSelectionMarker(D.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(D){this.removeSelectionMarkers(D.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(D){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(D){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(D){var C=D.command,w=D.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?T=w.forEachSelection(C,D.args):C.multiSelectAction=="forEachLine"?T=w.forEachSelection(C,D.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),T=C.exec(w,D.args||{})):T=C.multiSelectAction(w,D.args||{});else{var T=C.exec(w,D.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return T}},this.forEachSelection=function(D,C,w){if(!this.inVirtualSelectionMode){var T=w&&w.keepOrder,k=w==!0||w&&w.$byLines,O=this.session,P=this.selection,I=P.rangeList,F=(T?P:I).ranges,L;if(!F.length)return D.exec?D.exec(this,C||{}):D(this,C||{});var _=P._eventRegistry;P._eventRegistry={};var A=new a(O);this.inVirtualSelectionMode=!0;for(var M=F.length;M--;){if(k)for(;M>0&&F[M].start.row==F[M-1].end.row;)M--;A.fromOrientedRange(F[M]),A.index=M,this.selection=O.selection=A;var R=D.exec?D.exec(this,C||{}):D(this,C||{});!L&&R!==void 0&&(L=R),A.toOrientedRange(F[M])}A.detach(),this.selection=O.selection=P,this.inVirtualSelectionMode=!1,P._eventRegistry=_,P.mergeOverlappingRanges(),P.ranges[0]&&P.fromOrientedRange(P.ranges[0]);var B=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),B&&B.from==B.to&&this.renderer.animateScrolling(B.from),L}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var D="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],T=0;T0);P<0&&(P=0),I>=L&&(I=L-1)}var A=this.session.removeFullLines(P,I);A=this.$reAlignText(A,F),this.session.insert({row:P,column:0},A.join(` `)+` -`),F||(O.start.column=0,O.end.column=T[T.length-1].length),this.selection.setRange(O)}else{$.forEach(function(U){C.substractPoint(U.cursor)});var M=0,R=1/0,B=w.map(function(U){var V=U.cursor,K=D.getLine(V.row),J=K.substr(V.column).search(/\S/g);return J==-1&&(J=0),V.column>M&&(M=V.column),JG?D.insert(K,c.stringRepeat(" ",J-G)):D.remove(new o(K.row,K.column,K.row,K.column-J+G)),U.start.column=U.end.column=M,U.start.row=U.end.row=K.row,U.cursor=U.end}),C.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(D,C){var w=!0,A=!0,$,O,P;return D.map(function(T){var M=T.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?$==null?($=M[1].length,O=M[2].length,P=M[3].length,M):($+O+P!=M[1].length+M[2].length+M[3].length&&(A=!1),$!=M[1].length&&(w=!1),$>M[1].length&&($=M[1].length),OM[3].length&&(P=M[3].length),M):[T]}).map(C?F:w?A?L:F:k);function N(T){return c.stringRepeat(" ",T)}function F(T){return T[2]?N($)+T[2]+N(O-T[2].length+P)+T[4].replace(/^([=:])\s+/,"$1 "):T[0]}function L(T){return T[2]?N($+O-T[2].length)+T[2]+N(P)+T[4].replace(/^([=:])\s+/,"$1 "):T[0]}function k(T){return T[2]?N($)+T[2]+N(P)+T[4].replace(/^([=:])\s+/,"$1 "):T[0]}}}).call(y.prototype);function b(D,C){return D.row==C.row&&D.column==C.column}n.onSessionChange=function(D){var C=D.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var w=D.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(D){D.$multiselectOnSessionChange||(D.$onAddRange=D.$onAddRange.bind(D),D.$onRemoveRange=D.$onRemoveRange.bind(D),D.$onMultiSelect=D.$onMultiSelect.bind(D),D.$onSingleSelect=D.$onSingleSelect.bind(D),D.$multiselectOnSessionChange=n.onSessionChange.bind(D),D.$checkMultiselectChange=D.$checkMultiselectChange.bind(D),D.$multiselectOnSessionChange(D),D.on("changeSession",D.$multiselectOnSessionChange),D.on("mousedown",l),D.commands.addCommands(h.defaultCommands),E(D))}function E(D){if(!D.textInput)return;var C=D.textInput.getElement(),w=!1;u.addListener(C,"keydown",function($){var O=$.keyCode==18&&!($.ctrlKey||$.shiftKey||$.metaKey);D.$blockSelectEnabled&&O?w||(D.renderer.setMouseCursor("crosshair"),w=!0):w&&A()},D),u.addListener(C,"keyup",A,D),u.addListener(C,"blur",A,D);function A($){w&&(D.renderer.setMouseCursor(""),w=!1)}}n.MultiSelect=v,r("./config").defineOptions(y.prototype,"editor",{enableMultiselect:{set:function(D){v(this),D?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(D){this.$blockSelectEnabled=D},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(r,n,i){var s=r("../../range").Range,o=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,l,u){var c=a.getLine(u);return this.foldingStartMarker.test(c)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(a,l,u){return null},this.indentationBlock=function(a,l,u){var c=/\S/,h=a.getLine(l),d=h.search(c);if(d!=-1){for(var f=u||h.length,p=a.getLength(),m=l,y=l;++lm){var E=a.getLine(y).length;return new s(m,f,y,E)}}},this.openingBracketBlock=function(a,l,u,c,h){var d={row:u,column:c+1},f=a.$findClosingBracket(l,d,h);if(f){var p=a.foldWidgets[f.row];return p==null&&(p=a.getFoldWidget(f.row)),p=="start"&&f.row>d.row&&(f.row--,f.column=a.getLine(f.row).length),s.fromPoints(d,f)}},this.closingBracketBlock=function(a,l,u,c,h){var d={row:u,column:c},f=a.$findOpeningBracket(l,d);if(f)return f.column++,d.column--,s.fromPoints(f,d)}}).call(o.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(r,n,i){var s=r("../line_widgets").LineWidgets,o=r("../lib/dom"),a=r("../range").Range,l=r("../config").nls;function u(h,d,f){for(var p=0,m=h.length-1;p<=m;){var y=p+m>>1,b=f(d,h[y]);if(b>0)p=y+1;else if(b<0)m=y-1;else return y}return-(p+1)}function c(h,d,f){var p=h.getAnnotations().sort(a.comparePoints);if(p.length){var m=u(p,{row:d,column:-1},a.comparePoints);m<0&&(m=-m-1),m>=p.length?m=f>0?0:p.length-1:m===0&&f<0&&(m=p.length-1);var y=p[m];if(!(!y||!f)){if(y.row===d){do y=p[m+=f];while(y&&y.row===d);if(!y)return p.slice()}var b=[];d=y.row;do b[f<0?"unshift":"push"](y),y=p[m+=f];while(y&&y.row==d);return b.length&&b}}}n.showErrorMarker=function(h,d){var f=h.session;f.widgetManager||(f.widgetManager=new s(f),f.widgetManager.attach(h));var p=h.getCursorPosition(),m=p.row,y=f.widgetManager.getWidgetsAtRow(m).filter(function(O){return O.type=="errorMarker"})[0];y?y.destroy():m-=d;var b=c(f,m,d),v;if(b){var E=b[0];p.column=(E.pos&&typeof E.column!="number"?E.pos.sc:E.column)||0,p.row=E.row,v=h.renderer.$gutterLayer.$annotations[p.row]}else{if(y)return;v={displayText:[l("error-marker.good-state","Looks good!")],className:"ace_ok"}}h.session.unfold(p.row),h.selection.moveToPosition(p);var D={row:p.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},C=D.el.appendChild(o.createElement("div")),w=D.el.appendChild(o.createElement("div"));w.className="error_widget_arrow "+v.className;var A=h.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=A+h.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",C.className="error_widget "+v.className,v.displayText.forEach(function(O,P){C.appendChild(o.createTextNode(O)),PM&&(M=V.column),JG?D.insert(K,c.stringRepeat(" ",J-G)):D.remove(new o(K.row,K.column,K.row,K.column-J+G)),U.start.column=U.end.column=M,U.start.row=U.end.row=K.row,U.cursor=U.end}),C.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(D,C){var w=!0,T=!0,k,O,P;return D.map(function(A){var M=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?k==null?(k=M[1].length,O=M[2].length,P=M[3].length,M):(k+O+P!=M[1].length+M[2].length+M[3].length&&(T=!1),k!=M[1].length&&(w=!1),k>M[1].length&&(k=M[1].length),OM[3].length&&(P=M[3].length),M):[A]}).map(C?F:w?T?L:F:_);function I(A){return c.stringRepeat(" ",A)}function F(A){return A[2]?I(k)+A[2]+I(O-A[2].length+P)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function L(A){return A[2]?I(k+O-A[2].length)+A[2]+I(P)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function _(A){return A[2]?I(k)+A[2]+I(P)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(y.prototype);function b(D,C){return D.row==C.row&&D.column==C.column}n.onSessionChange=function(D){var C=D.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var w=D.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(D){D.$multiselectOnSessionChange||(D.$onAddRange=D.$onAddRange.bind(D),D.$onRemoveRange=D.$onRemoveRange.bind(D),D.$onMultiSelect=D.$onMultiSelect.bind(D),D.$onSingleSelect=D.$onSingleSelect.bind(D),D.$multiselectOnSessionChange=n.onSessionChange.bind(D),D.$checkMultiselectChange=D.$checkMultiselectChange.bind(D),D.$multiselectOnSessionChange(D),D.on("changeSession",D.$multiselectOnSessionChange),D.on("mousedown",l),D.commands.addCommands(h.defaultCommands),E(D))}function E(D){if(!D.textInput)return;var C=D.textInput.getElement(),w=!1;u.addListener(C,"keydown",function(k){var O=k.keyCode==18&&!(k.ctrlKey||k.shiftKey||k.metaKey);D.$blockSelectEnabled&&O?w||(D.renderer.setMouseCursor("crosshair"),w=!0):w&&T()},D),u.addListener(C,"keyup",T,D),u.addListener(C,"blur",T,D);function T(k){w&&(D.renderer.setMouseCursor(""),w=!1)}}n.MultiSelect=v,r("./config").defineOptions(y.prototype,"editor",{enableMultiselect:{set:function(D){v(this),D?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(D){this.$blockSelectEnabled=D},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(r,n,i){var s=r("../../range").Range,o=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,l,u){var c=a.getLine(u);return this.foldingStartMarker.test(c)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(a,l,u){return null},this.indentationBlock=function(a,l,u){var c=/\S/,h=a.getLine(l),d=h.search(c);if(d!=-1){for(var f=u||h.length,p=a.getLength(),m=l,y=l;++lm){var E=a.getLine(y).length;return new s(m,f,y,E)}}},this.openingBracketBlock=function(a,l,u,c,h){var d={row:u,column:c+1},f=a.$findClosingBracket(l,d,h);if(f){var p=a.foldWidgets[f.row];return p==null&&(p=a.getFoldWidget(f.row)),p=="start"&&f.row>d.row&&(f.row--,f.column=a.getLine(f.row).length),s.fromPoints(d,f)}},this.closingBracketBlock=function(a,l,u,c,h){var d={row:u,column:c},f=a.$findOpeningBracket(l,d);if(f)return f.column++,d.column--,s.fromPoints(f,d)}}).call(o.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(r,n,i){var s=r("../line_widgets").LineWidgets,o=r("../lib/dom"),a=r("../range").Range,l=r("../config").nls;function u(h,d,f){for(var p=0,m=h.length-1;p<=m;){var y=p+m>>1,b=f(d,h[y]);if(b>0)p=y+1;else if(b<0)m=y-1;else return y}return-(p+1)}function c(h,d,f){var p=h.getAnnotations().sort(a.comparePoints);if(p.length){var m=u(p,{row:d,column:-1},a.comparePoints);m<0&&(m=-m-1),m>=p.length?m=f>0?0:p.length-1:m===0&&f<0&&(m=p.length-1);var y=p[m];if(!(!y||!f)){if(y.row===d){do y=p[m+=f];while(y&&y.row===d);if(!y)return p.slice()}var b=[];d=y.row;do b[f<0?"unshift":"push"](y),y=p[m+=f];while(y&&y.row==d);return b.length&&b}}}n.showErrorMarker=function(h,d){var f=h.session;f.widgetManager||(f.widgetManager=new s(f),f.widgetManager.attach(h));var p=h.getCursorPosition(),m=p.row,y=f.widgetManager.getWidgetsAtRow(m).filter(function(O){return O.type=="errorMarker"})[0];y?y.destroy():m-=d;var b=c(f,m,d),v;if(b){var E=b[0];p.column=(E.pos&&typeof E.column!="number"?E.pos.sc:E.column)||0,p.row=E.row,v=h.renderer.$gutterLayer.$annotations[p.row]}else{if(y)return;v={displayText:[l("error-marker.good-state","Looks good!")],className:"ace_ok"}}h.session.unfold(p.row),h.selection.moveToPosition(p);var D={row:p.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},C=D.el.appendChild(o.createElement("div")),w=D.el.appendChild(o.createElement("div"));w.className="error_widget_arrow "+v.className;var T=h.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=T+h.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",C.className="error_widget "+v.className,v.displayText.forEach(function(O,P){C.appendChild(o.createTextNode(O)),P-1}function Ke(te,he){var Te=this.__data__,Xe=Gc(Te,te);return Xe<0?(++this.size,Te.push([te,he])):Te[Xe][1]=he,this}Gt.prototype.clear=Ut,Gt.prototype.delete=Ne,Gt.prototype.get=oe,Gt.prototype.has=Pe,Gt.prototype.set=Ke;function yt(te){var he=-1,Te=te==null?0:te.length;for(this.clear();++heKr))return!1;var Er=Et.get(te);if(Er&&Et.get(he))return Er==he;var Kt=-1,an=!0,ln=Te&o?new pr:void 0;for(Et.set(te,he),Et.set(he,te);++Kt-1&&te%1==0&&te-1&&te%1==0&&te<=a}function gm(te){var he=typeof te;return te!=null&&(he=="object"||he=="function")}function hu(te){return te!=null&&typeof te=="object"}var yf=W?ue(W):J1;function Ze(te){return rx(te)?hm(te):Kc(te)}function ix(){return[]}function mm(){return!1}e.exports=nx})(i0,i0.exports);var e8=i0.exports,Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.getAceInstance=Ys.debounce=Ys.editorEvents=Ys.editorOptions=void 0;var boe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Ys.editorOptions=boe;var xoe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Ys.editorEvents=xoe;var woe=function(){var e;return typeof window>"u"?e=fg:window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=fg,e};Ys.getAceInstance=woe;var Soe=function(e,t){var r=null;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){e.apply(n,i)},t)}};Ys.debounce=Soe;var Doe=lr&&lr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pC=lr&&lr.__assign||function(){return pC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&this.handleMarkers(A);var N=this.editor.$options;gh.editorOptions.forEach(function(F){N.hasOwnProperty(F)?r.editor.setOption(F,r.props[F]):r.props[F]&&console.warn("ReactAce: editor option ".concat(F," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(C)&&C.forEach(function(F){typeof F.exec=="string"?r.editor.commands.bindKey(F.bindKey,F.exec):r.editor.commands.addCommand(F)}),E&&this.editor.setKeyboardHandler("ace/keyboard/"+E),i&&(this.refEditor.className+=" "+i),D&&D(this.editor),this.editor.resize(),l&&this.editor.focus()},t.prototype.componentDidUpdate=function(r){for(var n=r,i=this.props,s=0;s 0!";if(h!=this.$splits){if(h>this.$splits){for(;this.$splitsh;)d=this.$editors[this.$splits-1],this.$container.removeChild(d.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(h){return this.$editors[h]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(h){this.$editors.forEach(function(d){d.setTheme(h)})},this.setKeyboardHandler=function(h){this.$editors.forEach(function(d){d.setKeyboardHandler(h)})},this.forEach=function(h,d){this.$editors.forEach(h,d)},this.$fontSize="",this.setFontSize=function(h){this.$fontSize=h,this.forEach(function(d){d.setFontSize(h)})},this.$cloneSession=function(h){var d=new u(h.getDocument(),h.getMode()),f=h.getUndoManager();return d.setUndoManager(f),d.setTabSize(h.getTabSize()),d.setUseSoftTabs(h.getUseSoftTabs()),d.setOverwrite(h.getOverwrite()),d.setBreakpoints(h.getBreakpoints()),d.setUseWrapMode(h.getUseWrapMode()),d.setUseWorker(h.getUseWorker()),d.setWrapLimitRange(h.$wrapLimitRange.min,h.$wrapLimitRange.max),d.$foldData=h.$cloneFoldData(),d},this.setSession=function(h,d){var f;d==null?f=this.$cEditor:f=this.$editors[d];var p=this.$editors.some(function(m){return m.session===h});return p&&(h=this.$cloneSession(h)),f.setSession(h),h},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(h){this.$orientation!=h&&(this.$orientation=h,this.resize())},this.resize=function(){var h=this.$container.clientWidth,d=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=h/this.$splits,m=0;m-1}function rae(e,t){var r=this.__data__,n=Mb(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Ud.prototype.clear=Qoe;Ud.prototype.delete=Zoe;Ud.prototype.get=eae;Ud.prototype.has=tae;Ud.prototype.set=rae;function Dc(e){var t=-1,r=e?e.length:0;for(this.clear();++t0&&r.handleMarkers(B,F);for(var k=0;k"u"&&(this.Diff_Timeout<=0?l=Number.MAX_VALUE:l=new Date().getTime()+this.Diff_Timeout*1e3);var u=l;if(s==null||o==null)throw new Error("Null input. (diff_main)");if(s==o)return s?[new t.Diff(i,s)]:[];typeof a>"u"&&(a=!0);var c=a,h=this.diff_commonPrefix(s,o),d=s.substring(0,h);s=s.substring(h),o=o.substring(h),h=this.diff_commonSuffix(s,o);var f=s.substring(s.length-h);s=s.substring(0,s.length-h),o=o.substring(0,o.length-h);var p=this.diff_compute_(s,o,c,u);return d&&p.unshift(new t.Diff(i,d)),f&&p.push(new t.Diff(i,f)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(s,o,a,l){var u;if(!s)return[new t.Diff(n,o)];if(!o)return[new t.Diff(r,s)];var c=s.length>o.length?s:o,h=s.length>o.length?o:s,d=c.indexOf(h);if(d!=-1)return u=[new t.Diff(n,c.substring(0,d)),new t.Diff(i,h),new t.Diff(n,c.substring(d+h.length))],s.length>o.length&&(u[0][0]=u[2][0]=r),u;if(h.length==1)return[new t.Diff(r,s),new t.Diff(n,o)];var f=this.diff_halfMatch_(s,o);if(f){var p=f[0],m=f[1],y=f[2],b=f[3],v=f[4],E=this.diff_main(p,y,a,l),D=this.diff_main(m,b,a,l);return E.concat([new t.Diff(i,v)],D)}return a&&s.length>100&&o.length>100?this.diff_lineMode_(s,o,l):this.diff_bisect_(s,o,l)},t.prototype.diff_lineMode_=function(s,o,a){var l=this.diff_linesToChars_(s,o);s=l.chars1,o=l.chars2;var u=l.lineArray,c=this.diff_main(s,o,!1,a);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new t.Diff(i,""));for(var h=0,d=0,f=0,p="",m="";h=1&&f>=1){c.splice(h-d-f,d+f),h=h-d-f;for(var y=this.diff_main(p,m,!1,a),b=y.length-1;b>=0;b--)c.splice(h,0,y[b]);h=h+y.length}f=0,d=0,p="",m="";break}h++}return c.pop(),c},t.prototype.diff_bisect_=function(s,o,a){for(var l=s.length,u=o.length,c=Math.ceil((l+u)/2),h=c,d=2*c,f=new Array(d),p=new Array(d),m=0;ma);w++){for(var A=-w+v;A<=w-E;A+=2){var $=h+A,O;A==-w||A!=w&&f[$-1]l)E+=2;else if(P>u)v+=2;else if(b){var N=h+y-A;if(N>=0&&N=F)return this.diff_bisectSplit_(s,o,O,P,a)}}}for(var L=-w+D;L<=w-C;L+=2){var N=h+L,F;L==-w||L!=w&&p[N-1]l)C+=2;else if(k>u)D+=2;else if(!b){var $=h+y-L;if($>=0&&$=F)return this.diff_bisectSplit_(s,o,O,P,a)}}}}return[new t.Diff(r,s),new t.Diff(n,o)]},t.prototype.diff_bisectSplit_=function(s,o,a,l,u){var c=s.substring(0,a),h=o.substring(0,l),d=s.substring(a),f=o.substring(l),p=this.diff_main(c,h,!1,u),m=this.diff_main(d,f,!1,u);return p.concat(m)},t.prototype.diff_linesToChars_=function(s,o){var a=[],l={};a[0]="";function u(f){for(var p="",m=0,y=-1,b=a.length;yl?s=s.substring(a-l):ao.length?s:o,l=s.length>o.length?o:s;if(a.length<4||l.length*2=E.length?[O,P,N,F,$]:null}var h=c(a,l,Math.ceil(a.length/4)),d=c(a,l,Math.ceil(a.length/2)),f;if(!h&&!d)return null;d?h?f=h[4].length>d[4].length?h:d:f=d:f=h;var p,m,y,b;s.length>o.length?(p=f[0],m=f[1],y=f[2],b=f[3]):(y=f[0],b=f[1],p=f[2],m=f[3]);var v=f[4];return[p,m,y,b,v]},t.prototype.diff_cleanupSemantic=function(s){for(var o=!1,a=[],l=0,u=null,c=0,h=0,d=0,f=0,p=0;c0?a[l-1]:-1,h=0,d=0,f=0,p=0,u=null,o=!0)),c++;for(o&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),c=1;c=v?(b>=m.length/2||b>=y.length/2)&&(s.splice(c,0,new t.Diff(i,y.substring(0,b))),s[c-1][1]=m.substring(0,m.length-b),s[c+1][1]=y.substring(b),c++):(v>=m.length/2||v>=y.length/2)&&(s.splice(c,0,new t.Diff(i,m.substring(0,v))),s[c-1][0]=n,s[c-1][1]=y.substring(0,y.length-v),s[c+1][0]=r,s[c+1][1]=m.substring(v),c++),c++}c++}},t.prototype.diff_cleanupSemanticLossless=function(s){function o(v,E){if(!v||!E)return 6;var D=v.charAt(v.length-1),C=E.charAt(0),w=D.match(t.nonAlphaNumericRegex_),A=C.match(t.nonAlphaNumericRegex_),$=w&&D.match(t.whitespaceRegex_),O=A&&C.match(t.whitespaceRegex_),P=$&&D.match(t.linebreakRegex_),N=O&&C.match(t.linebreakRegex_),F=P&&v.match(t.blanklineEndRegex_),L=N&&E.match(t.blanklineStartRegex_);return F||L?5:P||N?4:w&&!$&&O?3:$||O?2:w||A?1:0}for(var a=1;a=y&&(y=b,f=l,p=u,m=c)}s[a-1][1]!=f&&(f?s[a-1][1]=f:(s.splice(a-1,1),a--),s[a][1]=p,m?s[a+1][1]=m:(s.splice(a+1,1),a--))}a++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(s){for(var o=!1,a=[],l=0,u=null,c=0,h=!1,d=!1,f=!1,p=!1;c0?a[l-1]:-1,f=p=!1),o=!0)),c++;o&&this.diff_cleanupMerge(s)},t.prototype.diff_cleanupMerge=function(s){s.push(new t.Diff(i,""));for(var o=0,a=0,l=0,u="",c="",h;o1?(a!==0&&l!==0&&(h=this.diff_commonPrefix(c,u),h!==0&&(o-a-l>0&&s[o-a-l-1][0]==i?s[o-a-l-1][1]+=c.substring(0,h):(s.splice(0,0,new t.Diff(i,c.substring(0,h))),o++),c=c.substring(h),u=u.substring(h)),h=this.diff_commonSuffix(c,u),h!==0&&(s[o][1]=c.substring(c.length-h)+s[o][1],c=c.substring(0,c.length-h),u=u.substring(0,u.length-h))),o-=a+l,s.splice(o,a+l),u.length&&(s.splice(o,0,new t.Diff(r,u)),o++),c.length&&(s.splice(o,0,new t.Diff(n,c)),o++),o++):o!==0&&s[o-1][0]==i?(s[o-1][1]+=s[o][1],s.splice(o,1)):o++,l=0,a=0,u="",c="";break}s[s.length-1][1]===""&&s.pop();var d=!1;for(o=1;oo));h++)u=a,c=l;return s.length!=h&&s[h][0]===r?c:c+(o-u)},t.prototype.diff_prettyHtml=function(s){for(var o=[],a=/&/g,l=//g,c=/\n/g,h=0;h");switch(d){case n:o[h]=''+p+"";break;case r:o[h]=''+p+"";break;case i:o[h]=""+p+"";break}}return o.join("")},t.prototype.diff_text1=function(s){for(var o=[],a=0;athis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var l=this.match_alphabet_(o),u=this;function c(O,P){var N=O/o.length,F=Math.abs(a-P);return u.Match_Distance?N+F/u.Match_Distance:F?1:N}var h=this.Match_Threshold,d=s.indexOf(o,a);d!=-1&&(h=Math.min(c(0,d),h),d=s.lastIndexOf(o,a+o.length),d!=-1&&(h=Math.min(c(0,d),h)));var f=1<=E;w--){var A=l[s.charAt(w-1)];if(v===0?C[w]=(C[w+1]<<1|1)&A:C[w]=(C[w+1]<<1|1)&A|((b[w+1]|b[w])<<1|1)|b[w+1],C[w]&f){var $=c(v,w-1);if($<=h)if(h=$,d=w-1,d>a)E=Math.max(1,2*a-d);else break}}if(c(v+1,a)>h)break;b=C}return d},t.prototype.match_alphabet_=function(s){for(var o={},a=0;a"u")l=s,u=this.diff_main(l,o,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(s&&typeof s=="object"&&typeof o>"u"&&typeof a>"u")u=s,l=this.diff_text1(u);else if(typeof s=="string"&&o&&typeof o=="object"&&typeof a>"u")l=s,u=o;else if(typeof s=="string"&&typeof o=="string"&&a&&typeof a=="object")l=s,u=a;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],h=new t.patch_obj,d=0,f=0,p=0,m=l,y=l,b=0;b=2*this.Patch_Margin&&d&&(this.patch_addContext_(h,m),c.push(h),h=new t.patch_obj,d=0,m=y,f=p);break}v!==n&&(f+=E.length),v!==r&&(p+=E.length)}return d&&(this.patch_addContext_(h,m),c.push(h)),c},t.prototype.patch_deepCopy=function(s){for(var o=[],a=0;athis.Match_MaxBits?(f=this.match_main(o,d.substring(0,this.Match_MaxBits),h),f!=-1&&(p=this.match_main(o,d.substring(d.length-this.Match_MaxBits),h+d.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(o,d,h),f==-1)u[c]=!1,l-=s[c].length2-s[c].length1;else{u[c]=!0,l=f-h;var m;if(p==-1?m=o.substring(f,f+d.length):m=o.substring(f,p+this.Match_MaxBits),d==m)o=o.substring(0,f)+this.diff_text2(s[c].diffs)+o.substring(f+d.length);else{var y=this.diff_main(d,m,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(y)/d.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(y);for(var b=0,v,E=0;Ec[0][1].length){var h=o-c[0][1].length;c[0][1]=a.substring(c[0][1].length)+c[0][1],u.start1-=h,u.start2-=h,u.length1+=h,u.length2+=h}if(u=s[s.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=i)c.push(new t.Diff(i,a)),u.length1+=o,u.length2+=o;else if(o>c[c.length-1][1].length){var h=o-c[c.length-1][1].length;c[c.length-1][1]+=a.substring(0,h),u.length1+=h,u.length2+=h}return a},t.prototype.patch_splitMax=function(s){for(var o=this.Match_MaxBits,a=0;a2*o?(d.length1+=m.length,u+=m.length,f=!1,d.diffs.push(new t.Diff(p,m)),l.diffs.shift()):(m=m.substring(0,o-d.length1-this.Patch_Margin),d.length1+=m.length,u+=m.length,p===i?(d.length2+=m.length,c+=m.length):f=!1,d.diffs.push(new t.Diff(p,m)),m==l.diffs[0][1]?l.diffs.shift():l.diffs[0][1]=l.diffs[0][1].substring(m.length))}h=this.diff_text2(d.diffs),h=h.substring(h.length-this.Patch_Margin);var y=this.diff_text1(l.diffs).substring(0,this.Patch_Margin);y!==""&&(d.length1+=y.length,d.length2+=y.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===i?d.diffs[d.diffs.length-1][1]+=y:d.diffs.push(new t.Diff(i,y))),f||s.splice(++a,0,d)}}},t.prototype.patch_toText=function(s){for(var o=[],a=0;a-1}function Ke(te,he){var Ae=this.__data__,Xe=Kc(Ae,te);return Xe<0?(++this.size,Ae.push([te,he])):Ae[Xe][1]=he,this}Jt.prototype.clear=Gt,Jt.prototype.delete=Ie,Jt.prototype.get=oe,Jt.prototype.has=Pe,Jt.prototype.set=Ke;function vt(te){var he=-1,Ae=te==null?0:te.length;for(this.clear();++heXr))return!1;var Ar=Tt.get(te);if(Ar&&Tt.get(he))return Ar==he;var Yt=-1,cn=!0,hn=Ae&o?new yr:void 0;for(Tt.set(te,he),Tt.set(he,te);++Yt-1&&te%1==0&&te-1&&te%1==0&&te<=a}function gm(te){var he=typeof te;return te!=null&&(he=="object"||he=="function")}function fu(te){return te!=null&&typeof te=="object"}var bf=W?ue(W):q1;function Ze(te){return ex(te)?hm(te):Xc(te)}function rx(){return[]}function mm(){return!1}e.exports=tx})(n0,n0.exports);var r8=n0.exports,eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.getAceInstance=eo.debounce=eo.editorEvents=eo.editorOptions=void 0;var xoe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];eo.editorOptions=xoe;var woe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];eo.editorEvents=woe;var Soe=function(){var e;return typeof window>"u"?e=fg:window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=fg,e};eo.getAceInstance=Soe;var Doe=function(e,t){var r=null;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){e.apply(n,i)},t)}};eo.debounce=Doe;var Eoe=hr&&hr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fC=hr&&hr.__assign||function(){return fC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&this.handleMarkers(T);var I=this.editor.$options;yh.editorOptions.forEach(function(F){I.hasOwnProperty(F)?r.editor.setOption(F,r.props[F]):r.props[F]&&console.warn("ReactAce: editor option ".concat(F," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(C)&&C.forEach(function(F){typeof F.exec=="string"?r.editor.commands.bindKey(F.bindKey,F.exec):r.editor.commands.addCommand(F)}),E&&this.editor.setKeyboardHandler("ace/keyboard/"+E),i&&(this.refEditor.className+=" "+i),D&&D(this.editor),this.editor.resize(),l&&this.editor.focus()},t.prototype.componentDidUpdate=function(r){for(var n=r,i=this.props,s=0;s 0!";if(h!=this.$splits){if(h>this.$splits){for(;this.$splitsh;)d=this.$editors[this.$splits-1],this.$container.removeChild(d.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(h){return this.$editors[h]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(h){this.$editors.forEach(function(d){d.setTheme(h)})},this.setKeyboardHandler=function(h){this.$editors.forEach(function(d){d.setKeyboardHandler(h)})},this.forEach=function(h,d){this.$editors.forEach(h,d)},this.$fontSize="",this.setFontSize=function(h){this.$fontSize=h,this.forEach(function(d){d.setFontSize(h)})},this.$cloneSession=function(h){var d=new u(h.getDocument(),h.getMode()),f=h.getUndoManager();return d.setUndoManager(f),d.setTabSize(h.getTabSize()),d.setUseSoftTabs(h.getUseSoftTabs()),d.setOverwrite(h.getOverwrite()),d.setBreakpoints(h.getBreakpoints()),d.setUseWrapMode(h.getUseWrapMode()),d.setUseWorker(h.getUseWorker()),d.setWrapLimitRange(h.$wrapLimitRange.min,h.$wrapLimitRange.max),d.$foldData=h.$cloneFoldData(),d},this.setSession=function(h,d){var f;d==null?f=this.$cEditor:f=this.$editors[d];var p=this.$editors.some(function(m){return m.session===h});return p&&(h=this.$cloneSession(h)),f.setSession(h),h},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(h){this.$orientation!=h&&(this.$orientation=h,this.resize())},this.resize=function(){var h=this.$container.clientWidth,d=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=h/this.$splits,m=0;m-1}function nae(e,t){var r=this.__data__,n=Ib(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Vd.prototype.clear=Zoe;Vd.prototype.delete=eae;Vd.prototype.get=tae;Vd.prototype.has=rae;Vd.prototype.set=nae;function Cc(e){var t=-1,r=e?e.length:0;for(this.clear();++t0&&r.handleMarkers(B,F);for(var _=0;_"u"&&(this.Diff_Timeout<=0?l=Number.MAX_VALUE:l=new Date().getTime()+this.Diff_Timeout*1e3);var u=l;if(s==null||o==null)throw new Error("Null input. (diff_main)");if(s==o)return s?[new t.Diff(i,s)]:[];typeof a>"u"&&(a=!0);var c=a,h=this.diff_commonPrefix(s,o),d=s.substring(0,h);s=s.substring(h),o=o.substring(h),h=this.diff_commonSuffix(s,o);var f=s.substring(s.length-h);s=s.substring(0,s.length-h),o=o.substring(0,o.length-h);var p=this.diff_compute_(s,o,c,u);return d&&p.unshift(new t.Diff(i,d)),f&&p.push(new t.Diff(i,f)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(s,o,a,l){var u;if(!s)return[new t.Diff(n,o)];if(!o)return[new t.Diff(r,s)];var c=s.length>o.length?s:o,h=s.length>o.length?o:s,d=c.indexOf(h);if(d!=-1)return u=[new t.Diff(n,c.substring(0,d)),new t.Diff(i,h),new t.Diff(n,c.substring(d+h.length))],s.length>o.length&&(u[0][0]=u[2][0]=r),u;if(h.length==1)return[new t.Diff(r,s),new t.Diff(n,o)];var f=this.diff_halfMatch_(s,o);if(f){var p=f[0],m=f[1],y=f[2],b=f[3],v=f[4],E=this.diff_main(p,y,a,l),D=this.diff_main(m,b,a,l);return E.concat([new t.Diff(i,v)],D)}return a&&s.length>100&&o.length>100?this.diff_lineMode_(s,o,l):this.diff_bisect_(s,o,l)},t.prototype.diff_lineMode_=function(s,o,a){var l=this.diff_linesToChars_(s,o);s=l.chars1,o=l.chars2;var u=l.lineArray,c=this.diff_main(s,o,!1,a);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new t.Diff(i,""));for(var h=0,d=0,f=0,p="",m="";h=1&&f>=1){c.splice(h-d-f,d+f),h=h-d-f;for(var y=this.diff_main(p,m,!1,a),b=y.length-1;b>=0;b--)c.splice(h,0,y[b]);h=h+y.length}f=0,d=0,p="",m="";break}h++}return c.pop(),c},t.prototype.diff_bisect_=function(s,o,a){for(var l=s.length,u=o.length,c=Math.ceil((l+u)/2),h=c,d=2*c,f=new Array(d),p=new Array(d),m=0;ma);w++){for(var T=-w+v;T<=w-E;T+=2){var k=h+T,O;T==-w||T!=w&&f[k-1]l)E+=2;else if(P>u)v+=2;else if(b){var I=h+y-T;if(I>=0&&I=F)return this.diff_bisectSplit_(s,o,O,P,a)}}}for(var L=-w+D;L<=w-C;L+=2){var I=h+L,F;L==-w||L!=w&&p[I-1]l)C+=2;else if(_>u)D+=2;else if(!b){var k=h+y-L;if(k>=0&&k=F)return this.diff_bisectSplit_(s,o,O,P,a)}}}}return[new t.Diff(r,s),new t.Diff(n,o)]},t.prototype.diff_bisectSplit_=function(s,o,a,l,u){var c=s.substring(0,a),h=o.substring(0,l),d=s.substring(a),f=o.substring(l),p=this.diff_main(c,h,!1,u),m=this.diff_main(d,f,!1,u);return p.concat(m)},t.prototype.diff_linesToChars_=function(s,o){var a=[],l={};a[0]="";function u(f){for(var p="",m=0,y=-1,b=a.length;yl?s=s.substring(a-l):ao.length?s:o,l=s.length>o.length?o:s;if(a.length<4||l.length*2=E.length?[O,P,I,F,k]:null}var h=c(a,l,Math.ceil(a.length/4)),d=c(a,l,Math.ceil(a.length/2)),f;if(!h&&!d)return null;d?h?f=h[4].length>d[4].length?h:d:f=d:f=h;var p,m,y,b;s.length>o.length?(p=f[0],m=f[1],y=f[2],b=f[3]):(y=f[0],b=f[1],p=f[2],m=f[3]);var v=f[4];return[p,m,y,b,v]},t.prototype.diff_cleanupSemantic=function(s){for(var o=!1,a=[],l=0,u=null,c=0,h=0,d=0,f=0,p=0;c0?a[l-1]:-1,h=0,d=0,f=0,p=0,u=null,o=!0)),c++;for(o&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),c=1;c=v?(b>=m.length/2||b>=y.length/2)&&(s.splice(c,0,new t.Diff(i,y.substring(0,b))),s[c-1][1]=m.substring(0,m.length-b),s[c+1][1]=y.substring(b),c++):(v>=m.length/2||v>=y.length/2)&&(s.splice(c,0,new t.Diff(i,m.substring(0,v))),s[c-1][0]=n,s[c-1][1]=y.substring(0,y.length-v),s[c+1][0]=r,s[c+1][1]=m.substring(v),c++),c++}c++}},t.prototype.diff_cleanupSemanticLossless=function(s){function o(v,E){if(!v||!E)return 6;var D=v.charAt(v.length-1),C=E.charAt(0),w=D.match(t.nonAlphaNumericRegex_),T=C.match(t.nonAlphaNumericRegex_),k=w&&D.match(t.whitespaceRegex_),O=T&&C.match(t.whitespaceRegex_),P=k&&D.match(t.linebreakRegex_),I=O&&C.match(t.linebreakRegex_),F=P&&v.match(t.blanklineEndRegex_),L=I&&E.match(t.blanklineStartRegex_);return F||L?5:P||I?4:w&&!k&&O?3:k||O?2:w||T?1:0}for(var a=1;a=y&&(y=b,f=l,p=u,m=c)}s[a-1][1]!=f&&(f?s[a-1][1]=f:(s.splice(a-1,1),a--),s[a][1]=p,m?s[a+1][1]=m:(s.splice(a+1,1),a--))}a++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(s){for(var o=!1,a=[],l=0,u=null,c=0,h=!1,d=!1,f=!1,p=!1;c0?a[l-1]:-1,f=p=!1),o=!0)),c++;o&&this.diff_cleanupMerge(s)},t.prototype.diff_cleanupMerge=function(s){s.push(new t.Diff(i,""));for(var o=0,a=0,l=0,u="",c="",h;o1?(a!==0&&l!==0&&(h=this.diff_commonPrefix(c,u),h!==0&&(o-a-l>0&&s[o-a-l-1][0]==i?s[o-a-l-1][1]+=c.substring(0,h):(s.splice(0,0,new t.Diff(i,c.substring(0,h))),o++),c=c.substring(h),u=u.substring(h)),h=this.diff_commonSuffix(c,u),h!==0&&(s[o][1]=c.substring(c.length-h)+s[o][1],c=c.substring(0,c.length-h),u=u.substring(0,u.length-h))),o-=a+l,s.splice(o,a+l),u.length&&(s.splice(o,0,new t.Diff(r,u)),o++),c.length&&(s.splice(o,0,new t.Diff(n,c)),o++),o++):o!==0&&s[o-1][0]==i?(s[o-1][1]+=s[o][1],s.splice(o,1)):o++,l=0,a=0,u="",c="";break}s[s.length-1][1]===""&&s.pop();var d=!1;for(o=1;oo));h++)u=a,c=l;return s.length!=h&&s[h][0]===r?c:c+(o-u)},t.prototype.diff_prettyHtml=function(s){for(var o=[],a=/&/g,l=//g,c=/\n/g,h=0;h");switch(d){case n:o[h]=''+p+"";break;case r:o[h]=''+p+"";break;case i:o[h]=""+p+"";break}}return o.join("")},t.prototype.diff_text1=function(s){for(var o=[],a=0;athis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var l=this.match_alphabet_(o),u=this;function c(O,P){var I=O/o.length,F=Math.abs(a-P);return u.Match_Distance?I+F/u.Match_Distance:F?1:I}var h=this.Match_Threshold,d=s.indexOf(o,a);d!=-1&&(h=Math.min(c(0,d),h),d=s.lastIndexOf(o,a+o.length),d!=-1&&(h=Math.min(c(0,d),h)));var f=1<=E;w--){var T=l[s.charAt(w-1)];if(v===0?C[w]=(C[w+1]<<1|1)&T:C[w]=(C[w+1]<<1|1)&T|((b[w+1]|b[w])<<1|1)|b[w+1],C[w]&f){var k=c(v,w-1);if(k<=h)if(h=k,d=w-1,d>a)E=Math.max(1,2*a-d);else break}}if(c(v+1,a)>h)break;b=C}return d},t.prototype.match_alphabet_=function(s){for(var o={},a=0;a"u")l=s,u=this.diff_main(l,o,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(s&&typeof s=="object"&&typeof o>"u"&&typeof a>"u")u=s,l=this.diff_text1(u);else if(typeof s=="string"&&o&&typeof o=="object"&&typeof a>"u")l=s,u=o;else if(typeof s=="string"&&typeof o=="string"&&a&&typeof a=="object")l=s,u=a;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],h=new t.patch_obj,d=0,f=0,p=0,m=l,y=l,b=0;b=2*this.Patch_Margin&&d&&(this.patch_addContext_(h,m),c.push(h),h=new t.patch_obj,d=0,m=y,f=p);break}v!==n&&(f+=E.length),v!==r&&(p+=E.length)}return d&&(this.patch_addContext_(h,m),c.push(h)),c},t.prototype.patch_deepCopy=function(s){for(var o=[],a=0;athis.Match_MaxBits?(f=this.match_main(o,d.substring(0,this.Match_MaxBits),h),f!=-1&&(p=this.match_main(o,d.substring(d.length-this.Match_MaxBits),h+d.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(o,d,h),f==-1)u[c]=!1,l-=s[c].length2-s[c].length1;else{u[c]=!0,l=f-h;var m;if(p==-1?m=o.substring(f,f+d.length):m=o.substring(f,p+this.Match_MaxBits),d==m)o=o.substring(0,f)+this.diff_text2(s[c].diffs)+o.substring(f+d.length);else{var y=this.diff_main(d,m,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(y)/d.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(y);for(var b=0,v,E=0;Ec[0][1].length){var h=o-c[0][1].length;c[0][1]=a.substring(c[0][1].length)+c[0][1],u.start1-=h,u.start2-=h,u.length1+=h,u.length2+=h}if(u=s[s.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=i)c.push(new t.Diff(i,a)),u.length1+=o,u.length2+=o;else if(o>c[c.length-1][1].length){var h=o-c[c.length-1][1].length;c[c.length-1][1]+=a.substring(0,h),u.length1+=h,u.length2+=h}return a},t.prototype.patch_splitMax=function(s){for(var o=this.Match_MaxBits,a=0;a2*o?(d.length1+=m.length,u+=m.length,f=!1,d.diffs.push(new t.Diff(p,m)),l.diffs.shift()):(m=m.substring(0,o-d.length1-this.Patch_Margin),d.length1+=m.length,u+=m.length,p===i?(d.length2+=m.length,c+=m.length):f=!1,d.diffs.push(new t.Diff(p,m)),m==l.diffs[0][1]?l.diffs.shift():l.diffs[0][1]=l.diffs[0][1].substring(m.length))}h=this.diff_text2(d.diffs),h=h.substring(h.length-this.Patch_Margin);var y=this.diff_text1(l.diffs).substring(0,this.Patch_Margin);y!==""&&(d.length1+=y.length,d.length2+=y.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===i?d.diffs[d.diffs.length-1][1]+=y:d.diffs.push(new t.Diff(i,y))),f||s.splice(++a,0,d)}}},t.prototype.patch_toText=function(s){for(var o=[],a=0;a/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:l},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),h("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[h("function_arguments"),{token:"variable.parameter",regex:l},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!d||!d.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,D,C){if(this.next=E=="{"?this.nextState:"",E=="{"&&C.length)C.unshift("start",D);else if(E=="}"&&C.length&&(C.shift(),this.next=C.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:y},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+l+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!d||d.jsx!=!1)&&c.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};s.inherits(u,a);function c(){var d=l.replace("\\d","\\d\\-"),f={onMatch:function(m,y,b){var v=m.charAt(1)=="/"?2:1;return v==1?(y!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):v==2&&y==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:m.slice(0,v)},{type:"meta.tag.tag-name.xml",value:m.substr(v)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(f);var p={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[p,f,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(m,y,b){return y==b[0]&&b.shift(),m.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:m}]},nextState:"jsx"},p,h("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function h(d){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}n.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(r,n,i){var s=r("../range").Range,o=function(){};(function(){this.checkOutdent=function(a,l){return/^\s+$/.test(a)?/^\s*\}/.test(l):!1},this.autoOutdent=function(a,l){var u=a.getLine(l),c=u.match(/^(\s*\})/);if(!c)return 0;var h=c[1].length,d=a.findMatchingBracket({row:l,column:h});if(!d||d.row==l)return 0;var f=this.$getIndent(a.getLine(d.row));a.replace(new s(l,0,l,h-1),f)},this.$getIndent=function(a){return a.match(/^\s*/)[0]}}).call(o.prototype),n.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,a=r("../../token_iterator").TokenIterator;function l(c,h){return c&&c.type.lastIndexOf(h+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,h,d,f,p){if(p=='"'||p=="'"){var m=p,y=f.doc.getTextRange(d.getSelectionRange());if(y!==""&&y!=="'"&&y!='"'&&d.getWrapBehavioursEnabled())return{text:m+y+m,selection:!1};var b=d.getCursorPosition(),v=f.doc.getLine(b.row),E=v.substring(b.column,b.column+1),D=new a(f,b.row,b.column),C=D.getCurrentToken();if(E==m&&(l(C,"attribute-value")||l(C,"string")))return{text:"",selection:[1,1]};if(C||(C=D.stepBackward()),!C)return;for(;l(C,"tag-whitespace")||l(C,"whitespace");)C=D.stepBackward();var w=!E||E.match(/\s/);if(l(C,"attribute-equals")&&(w||E==">")||l(C,"decl-attribute-equals")&&(w||E=="?"))return{text:m+m,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,h,d,f,p){var m=f.doc.getTextRange(p);if(!p.isMultiLine()&&(m=='"'||m=="'")){var y=f.doc.getLine(p.start.row),b=y.substring(p.start.column+1,p.start.column+2);if(b==m)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,h,d,f,p){if(p==">"){var m=d.getSelectionRange().start,y=new a(f,m.row,m.column),b=y.getCurrentToken()||y.stepBackward();if(!b||!(l(b,"tag-name")||l(b,"tag-whitespace")||l(b,"attribute-name")||l(b,"attribute-equals")||l(b,"attribute-value"))||l(b,"reference.attribute-value"))return;if(l(b,"attribute-value")){var v=y.getCurrentTokenColumn()+b.value.length;if(m.column/.test(f.getLine(m.row).slice(m.column)))return;for(;!l(b,"tag-name");)if(b=y.stepBackward(),b.value=="<"){b=y.stepForward();break}var D=y.getCurrentTokenRow(),C=y.getCurrentTokenColumn();if(l(y.stepBackward(),"end-tag-open"))return;var w=b.value;return D==m.row&&(w=w.substring(0,m.column-C)),this.voidElements&&this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,h,d,f,p){if(p==` -`){var m=d.getCursorPosition(),y=f.getLine(m.row),b=new a(f,m.row,m.column),v=b.getCurrentToken();if(l(v,"")&&v.type.indexOf("tag-close")!==-1){if(v.value=="/>")return;for(;v&&v.type.indexOf("tag-name")===-1;)v=b.stepBackward();if(!v)return;var E=v.value,D=b.getCurrentTokenRow();if(v=b.stepBackward(),!v||v.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var C=f.getTokenAt(m.row,m.column+1),y=f.getLine(D),w=this.$getIndent(y),A=w+f.getTabString();return C&&C.value===""){var y=f.getSelectionRange().start,b=new o(p,y.row,y.column),v=b.getCurrentToken()||b.stepBackward();if(!v)return;if(v.value=="<")return{text:">",selection:[1,1]}}})};s.inherits(u,a),n.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("../../range").Range,a=r("./fold_mode").FoldMode,l=n.FoldMode=function(h,d){a.call(this),this.voidElements=h||{},this.optionalEndTags=s.mixin({},this.voidElements),d&&s.mixin(this.optionalEndTags,d)};s.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function c(h,d){return h.type.lastIndexOf(d+".xml")>-1}(function(){this.getFoldWidget=function(h,d,f){var p=this._getFirstTagInLine(h,f);return p?p.closing||!p.tagName&&p.selfClosing?d==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(h,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(h,f)},this.getCommentFoldWidget=function(h,d){return/comment/.test(h.getState(d))&&/";break}return p}else if(c(y,"tag-close"))return p.selfClosing=y.value=="/>",p;p.start.column+=y.value.length}return null},this._findEndTagInLine=function(h,d,f,p){for(var m=h.getTokens(d),y=0,b=0;bb)break;var v=this.getFoldWidgetRange(u,"all",c);if(v){if(v.start.row<=f)break;if(v.isMultiLine())c=v.end.row;else if(d==b)break}m=c}}return new o(f,p,m,u.getLine(m).length)},this.getCommentRegionBlock=function(u,c,h){for(var d=c.search(/\s*$/),f=u.getLength(),p=h,m=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,y=1;++hp)return new o(p,d,v,c.length)}}).call(l.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./xml").FoldMode,a=r("./cstyle").FoldMode,l=n.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end))),this.xmlFoldMode=new o};s.inherits(l,a),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,h){var d=this.getFoldWidgetBase(u,c,h);return d||this.xmlFoldMode.getFoldWidget(u,c,h)},this.getFoldWidgetRange=function(u,c,h,d){var f=this.getFoldWidgetRangeBase(u,c,h,d);return f||this.xmlFoldMode.getFoldWidgetRange(u,c,h)}}).call(l.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,a=r("./javascript_highlight_rules").JavaScriptHighlightRules,l=r("./matching_brace_outdent").MatchingBraceOutdent,u=r("../worker/worker_client").WorkerClient,c=r("./behaviour/javascript").JavaScriptBehaviour,h=r("./folding/javascript").FoldMode,d=function(){this.HighlightRules=a,this.$outdent=new l,this.$behaviour=new c,this.foldingRules=new h};s.inherits(d,o),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,m){var y=this.$getIndent(p),b=this.getTokenizer().getLineTokens(p,f),v=b.tokens,E=b.state;if(v.length&&v[v.length-1].type=="comment")return y;if(f=="start"||f=="no_regex"){var D=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);D&&(y+=m)}else if(f=="doc-start"&&(E=="start"||E=="no_regex"))return"";return y},this.checkOutdent=function(f,p,m){return this.$outdent.checkOutdent(p,m)},this.autoOutdent=function(f,p,m){this.$outdent.autoOutdent(p,m)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(m){f.setAnnotations(m.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(d.prototype),n.Mode=d}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop");r("../lib/lang");var o=r("./text_highlight_rules").TextHighlightRules,a=n.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",l=n.supportFunction="rgb|rgba|url|attr|counter|counters",u=n.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=n.supportConstantColor="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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",h=n.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=n.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=n.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=n.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var y=this.createKeywordMapper({"support.function":l,"support.constant":u,"support.type":a,"support.constant.color":c,"support.constant.fonts":h},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:y,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};s.inherits(m,o),n.CssHighlightRules=m}),ace.define("ace/mode/css_completions",["require","exports","module"],function(r,n,i){var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var a=document.createElement("c").style;for(var l in a)if(typeof a[l]=="string"){var u=l.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});s.hasOwnProperty(u)||(s[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(a,l,u,c){if(this.completionsDefined||this.defineCompletions(),a==="ruleset"||l.$mode.$id=="ace/mode/scss"){var h=l.getLine(u.row).substr(0,u.column),d=/\([^)]*$/.test(h);return d&&(h=h.substr(h.lastIndexOf("(")+1)),/:[^;]+$/.test(h)?this.getPropertyValueCompletions(a,l,u,c):this.getPropertyCompletions(a,l,u,c,d)}return[]},this.getPropertyCompletions=function(a,l,u,c,h){h=h||!1;var d=Object.keys(s);return d.map(function(f){return{caption:f,snippet:f+": $0"+(h?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(a,l,u,c){var h=l.getLine(u.row).substr(0,u.column),d=(/([\w\-]+):[^:]*$/.exec(h)||{})[1];if(!d)return[];var f=[];return d in s&&typeof s[d]=="object"&&(f=Object.keys(s[d])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(o.prototype),n.CssCompletions=o}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop");r("../behaviour").Behaviour;var o=r("./cstyle").CstyleBehaviour,a=r("../../token_iterator").TokenIterator,l=function(){this.inherit(o),this.add("colon","insertion",function(u,c,h,d,f){if(f===":"&&h.selection.isEmpty()){var p=h.getCursorPosition(),m=new a(d,p.row,p.column),y=m.getCurrentToken();if(y&&y.value.match(/\s+/)&&(y=m.stepBackward()),y&&y.type==="support.type"){var b=d.doc.getLine(p.row),v=b.substring(p.column,p.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,h,d,f){var p=d.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var m=h.getCursorPosition(),y=new a(d,m.row,m.column),b=y.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=y.stepBackward()),b&&b.type==="support.type"){var v=d.doc.getLine(f.start.row),E=v.substring(f.end.column,f.end.column+1);if(E===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,h,d,f){if(f===";"&&h.selection.isEmpty()){var p=h.getCursorPosition(),m=d.doc.getLine(p.row),y=m.substring(p.column,p.column+1);if(y===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,h,d,f){if(f==="!"&&h.selection.isEmpty()){var p=h.getCursorPosition(),m=d.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(m.substring(p.column)))return{text:"!important",selection:[10,10]}}})};s.inherits(l,o),n.CssBehaviour=l}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,a=r("./css_highlight_rules").CssHighlightRules,l=r("./matching_brace_outdent").MatchingBraceOutdent,u=r("../worker/worker_client").WorkerClient,c=r("./css_completions").CssCompletions,h=r("./behaviour/css").CssBehaviour,d=r("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=a,this.$outdent=new l,this.$behaviour=new h,this.$completer=new c,this.foldingRules=new d};s.inherits(f,o),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,m,y){var b=this.$getIndent(m),v=this.getTokenizer().getLineTokens(m,p).tokens;if(v.length&&v[v.length-1].type=="comment")return b;var E=m.match(/^.*\{\s*$/);return E&&(b+=y),b},this.checkOutdent=function(p,m,y){return this.$outdent.checkOutdent(m,y)},this.autoOutdent=function(p,m,y){this.$outdent.autoOutdent(m,y)},this.getCompletions=function(p,m,y,b){return this.$completer.getCompletions(p,m,y,b)},this.createWorker=function(p){var m=new u(["ace"],"ace/mode/css_worker","Worker");return m.attachToDocument(p.getDocument()),m.on("annotate",function(y){p.setAnnotations(y.data)}),m.on("terminate",function(){p.clearAnnotations()}),m},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),n.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("./text_highlight_rules").TextHighlightRules,a=function(l){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(l,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(h,d,f){return f.splice(0),this.token}}],this.embedRules(l,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),s.inherits(a,o),n.XmlHighlightRules=a}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),a=r("./css_highlight_rules").CssHighlightRules,l=r("./javascript_highlight_rules").JavaScriptHighlightRules,u=r("./xml_highlight_rules").XmlHighlightRules,c=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),h=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(d,f){var p=c[f];return["meta.tag.punctuation."+(d=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(new l({jsx:!1}).getRules(),"js-","script"),this.constructor===h&&this.normalizeRules()};s.inherits(h,u),n.HtmlHighlightRules=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("./fold_mode").FoldMode,a=n.FoldMode=function(l,u){this.defaultMode=l,this.subModes=u};s.inherits(a,o),(function(){this.$getMode=function(l){typeof l!="string"&&(l=l[0]);for(var u in this.subModes)if(l.indexOf(u)===0)return this.subModes[u];return null},this.$tryMode=function(l,u,c,h){var d=this.$getMode(l);return d?d.getFoldWidget(u,c,h):""},this.getFoldWidget=function(l,u,c){return this.$tryMode(l.getState(c-1),l,u,c)||this.$tryMode(l.getState(c),l,u,c)||this.defaultMode.getFoldWidget(l,u,c)},this.getFoldWidgetRange=function(l,u,c){var h=this.$getMode(l.getState(c-1));return(!h||!h.getFoldWidget(l,u,c))&&(h=this.$getMode(l.getState(c))),(!h||!h.getFoldWidget(l,u,c))&&(h=this.defaultMode),h.getFoldWidgetRange(l,u,c)}}).call(a.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./mixed").FoldMode,a=r("./xml").FoldMode,l=r("./cstyle").FoldMode,u=n.FoldMode=function(c,h){o.call(this,new a(c,h),{"js-":new l,"css-":new l})};s.inherits(u,o)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=o.concat(a),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},c=Object.keys(u);function h(m,y){return m.type.lastIndexOf(y+".xml")>-1}function d(m,y){for(var b=new s(m,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"tag-name");)v=b.stepBackward();if(v)return v.value}function f(m,y){for(var b=new s(m,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"attribute-name");)v=b.stepBackward();if(v)return v.value}var p=function(){};(function(){this.getCompletions=function(m,y,b,v){var E=y.getTokenAt(b.row,b.column);if(!E)return[];if(h(E,"tag-name")||h(E,"tag-open")||h(E,"end-tag-open"))return this.getTagCompletions(m,y,b,v);if(h(E,"tag-whitespace")||h(E,"attribute-name"))return this.getAttributeCompletions(m,y,b,v);if(h(E,"attribute-value"))return this.getAttributeValueCompletions(m,y,b,v);var D=y.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(D)?this.getHTMLEntityCompletions(m,y,b,v):[]},this.getTagCompletions=function(m,y,b,v){return c.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(m,y,b,v){var E=d(y,b);if(!E)return[];var D=l;return E in u&&(D=D.concat(Object.keys(u[E]))),D.map(function(C){return{caption:C,snippet:C+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(m,y,b,v){var E=d(y,b),D=f(y,b);if(!E)return[];var C=[];return E in u&&D in u[E]&&typeof u[E][D]=="object"&&(C=Object.keys(u[E][D])),C.map(function(w){return{caption:w,snippet:w,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(m,y,b,v){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(D){return{caption:D,snippet:D,meta:"html entity",score:1e6}})}}).call(p.prototype),n.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),a=r("./text").Mode,l=r("./javascript").Mode,u=r("./css").Mode,c=r("./html_highlight_rules").HtmlHighlightRules,h=r("./behaviour/xml").XmlBehaviour,d=r("./folding/html").FoldMode,f=r("./html_completions").HtmlCompletions,p=r("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],y=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(v){this.fragmentContext=v&&v.fragmentContext,this.HighlightRules=c,this.$behaviour=new h,this.$completer=new f,this.createModeDelegates({"js-":l,"css-":u}),this.foldingRules=new d(this.voidElements,o.arrayToMap(y))};s.inherits(b,a),(function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(m),this.getNextLineIndent=function(v,E,D){return this.$getIndent(E)},this.checkOutdent=function(v,E,D){return!1},this.getCompletions=function(v,E,D,C){return this.$completer.getCompletions(v,E,D,C)},this.createWorker=function(v){if(this.constructor==b){var E=new p(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(v.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(D){v.setAnnotations(D.data)}),E.on("terminate",function(){v.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),n.Mode=b}),function(){ace.require(["ace/mode/html"],function(r){e&&(e.exports=r)})}()})(Iae);var Rae={exports:{}};(function(e,t){ace.define("ace/theme/dracula-css",["require","exports","module"],function(r,n,i){i.exports=`/* +`&&(d-=1),i.right.push({startLine:s.right,endLine:s.right+d}),s.right+=u;break;default:throw new Error("Diff type was not defined.")}}}),i},t.prototype.setCodeMarkers=function(r){r===void 0&&(r={left:[],right:[]});for(var n=[],i={left:[],right:[]},s=0;s/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:l},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),h("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[h("function_arguments"),{token:"variable.parameter",regex:l},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!d||!d.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,D,C){if(this.next=E=="{"?this.nextState:"",E=="{"&&C.length)C.unshift("start",D);else if(E=="}"&&C.length&&(C.shift(),this.next=C.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:y},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+l+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!d||d.jsx!=!1)&&c.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};s.inherits(u,a);function c(){var d=l.replace("\\d","\\d\\-"),f={onMatch:function(m,y,b){var v=m.charAt(1)=="/"?2:1;return v==1?(y!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):v==2&&y==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:m.slice(0,v)},{type:"meta.tag.tag-name.xml",value:m.substr(v)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(f);var p={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[p,f,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(m,y,b){return y==b[0]&&b.shift(),m.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:m}]},nextState:"jsx"},p,h("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function h(d){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}n.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(r,n,i){var s=r("../range").Range,o=function(){};(function(){this.checkOutdent=function(a,l){return/^\s+$/.test(a)?/^\s*\}/.test(l):!1},this.autoOutdent=function(a,l){var u=a.getLine(l),c=u.match(/^(\s*\})/);if(!c)return 0;var h=c[1].length,d=a.findMatchingBracket({row:l,column:h});if(!d||d.row==l)return 0;var f=this.$getIndent(a.getLine(d.row));a.replace(new s(l,0,l,h-1),f)},this.$getIndent=function(a){return a.match(/^\s*/)[0]}}).call(o.prototype),n.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,a=r("../../token_iterator").TokenIterator;function l(c,h){return c&&c.type.lastIndexOf(h+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,h,d,f,p){if(p=='"'||p=="'"){var m=p,y=f.doc.getTextRange(d.getSelectionRange());if(y!==""&&y!=="'"&&y!='"'&&d.getWrapBehavioursEnabled())return{text:m+y+m,selection:!1};var b=d.getCursorPosition(),v=f.doc.getLine(b.row),E=v.substring(b.column,b.column+1),D=new a(f,b.row,b.column),C=D.getCurrentToken();if(E==m&&(l(C,"attribute-value")||l(C,"string")))return{text:"",selection:[1,1]};if(C||(C=D.stepBackward()),!C)return;for(;l(C,"tag-whitespace")||l(C,"whitespace");)C=D.stepBackward();var w=!E||E.match(/\s/);if(l(C,"attribute-equals")&&(w||E==">")||l(C,"decl-attribute-equals")&&(w||E=="?"))return{text:m+m,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,h,d,f,p){var m=f.doc.getTextRange(p);if(!p.isMultiLine()&&(m=='"'||m=="'")){var y=f.doc.getLine(p.start.row),b=y.substring(p.start.column+1,p.start.column+2);if(b==m)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,h,d,f,p){if(p==">"){var m=d.getSelectionRange().start,y=new a(f,m.row,m.column),b=y.getCurrentToken()||y.stepBackward();if(!b||!(l(b,"tag-name")||l(b,"tag-whitespace")||l(b,"attribute-name")||l(b,"attribute-equals")||l(b,"attribute-value"))||l(b,"reference.attribute-value"))return;if(l(b,"attribute-value")){var v=y.getCurrentTokenColumn()+b.value.length;if(m.column/.test(f.getLine(m.row).slice(m.column)))return;for(;!l(b,"tag-name");)if(b=y.stepBackward(),b.value=="<"){b=y.stepForward();break}var D=y.getCurrentTokenRow(),C=y.getCurrentTokenColumn();if(l(y.stepBackward(),"end-tag-open"))return;var w=b.value;return D==m.row&&(w=w.substring(0,m.column-C)),this.voidElements&&this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,h,d,f,p){if(p==` +`){var m=d.getCursorPosition(),y=f.getLine(m.row),b=new a(f,m.row,m.column),v=b.getCurrentToken();if(l(v,"")&&v.type.indexOf("tag-close")!==-1){if(v.value=="/>")return;for(;v&&v.type.indexOf("tag-name")===-1;)v=b.stepBackward();if(!v)return;var E=v.value,D=b.getCurrentTokenRow();if(v=b.stepBackward(),!v||v.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var C=f.getTokenAt(m.row,m.column+1),y=f.getLine(D),w=this.$getIndent(y),T=w+f.getTabString();return C&&C.value===""){var y=f.getSelectionRange().start,b=new o(p,y.row,y.column),v=b.getCurrentToken()||b.stepBackward();if(!v)return;if(v.value=="<")return{text:">",selection:[1,1]}}})};s.inherits(u,a),n.JavaScriptBehaviour=u}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("../../range").Range,a=r("./fold_mode").FoldMode,l=n.FoldMode=function(h,d){a.call(this),this.voidElements=h||{},this.optionalEndTags=s.mixin({},this.voidElements),d&&s.mixin(this.optionalEndTags,d)};s.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function c(h,d){return h.type.lastIndexOf(d+".xml")>-1}(function(){this.getFoldWidget=function(h,d,f){var p=this._getFirstTagInLine(h,f);return p?p.closing||!p.tagName&&p.selfClosing?d==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(h,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(h,f)},this.getCommentFoldWidget=function(h,d){return/comment/.test(h.getState(d))&&/";break}return p}else if(c(y,"tag-close"))return p.selfClosing=y.value=="/>",p;p.start.column+=y.value.length}return null},this._findEndTagInLine=function(h,d,f,p){for(var m=h.getTokens(d),y=0,b=0;bb)break;var v=this.getFoldWidgetRange(u,"all",c);if(v){if(v.start.row<=f)break;if(v.isMultiLine())c=v.end.row;else if(d==b)break}m=c}}return new o(f,p,m,u.getLine(m).length)},this.getCommentRegionBlock=function(u,c,h){for(var d=c.search(/\s*$/),f=u.getLength(),p=h,m=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,y=1;++hp)return new o(p,d,v,c.length)}}).call(l.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./xml").FoldMode,a=r("./cstyle").FoldMode,l=n.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end))),this.xmlFoldMode=new o};s.inherits(l,a),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,h){var d=this.getFoldWidgetBase(u,c,h);return d||this.xmlFoldMode.getFoldWidget(u,c,h)},this.getFoldWidgetRange=function(u,c,h,d){var f=this.getFoldWidgetRangeBase(u,c,h,d);return f||this.xmlFoldMode.getFoldWidgetRange(u,c,h)}}).call(l.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,a=r("./javascript_highlight_rules").JavaScriptHighlightRules,l=r("./matching_brace_outdent").MatchingBraceOutdent,u=r("../worker/worker_client").WorkerClient,c=r("./behaviour/javascript").JavaScriptBehaviour,h=r("./folding/javascript").FoldMode,d=function(){this.HighlightRules=a,this.$outdent=new l,this.$behaviour=new c,this.foldingRules=new h};s.inherits(d,o),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,m){var y=this.$getIndent(p),b=this.getTokenizer().getLineTokens(p,f),v=b.tokens,E=b.state;if(v.length&&v[v.length-1].type=="comment")return y;if(f=="start"||f=="no_regex"){var D=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);D&&(y+=m)}else if(f=="doc-start"&&(E=="start"||E=="no_regex"))return"";return y},this.checkOutdent=function(f,p,m){return this.$outdent.checkOutdent(p,m)},this.autoOutdent=function(f,p,m){this.$outdent.autoOutdent(p,m)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(m){f.setAnnotations(m.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(d.prototype),n.Mode=d}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop");r("../lib/lang");var o=r("./text_highlight_rules").TextHighlightRules,a=n.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",l=n.supportFunction="rgb|rgba|url|attr|counter|counters",u=n.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=n.supportConstantColor="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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",h=n.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=n.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=n.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=n.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var y=this.createKeywordMapper({"support.function":l,"support.constant":u,"support.type":a,"support.constant.color":c,"support.constant.fonts":h},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:y,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};s.inherits(m,o),n.CssHighlightRules=m}),ace.define("ace/mode/css_completions",["require","exports","module"],function(r,n,i){var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var a=document.createElement("c").style;for(var l in a)if(typeof a[l]=="string"){var u=l.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});s.hasOwnProperty(u)||(s[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(a,l,u,c){if(this.completionsDefined||this.defineCompletions(),a==="ruleset"||l.$mode.$id=="ace/mode/scss"){var h=l.getLine(u.row).substr(0,u.column),d=/\([^)]*$/.test(h);return d&&(h=h.substr(h.lastIndexOf("(")+1)),/:[^;]+$/.test(h)?this.getPropertyValueCompletions(a,l,u,c):this.getPropertyCompletions(a,l,u,c,d)}return[]},this.getPropertyCompletions=function(a,l,u,c,h){h=h||!1;var d=Object.keys(s);return d.map(function(f){return{caption:f,snippet:f+": $0"+(h?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(a,l,u,c){var h=l.getLine(u.row).substr(0,u.column),d=(/([\w\-]+):[^:]*$/.exec(h)||{})[1];if(!d)return[];var f=[];return d in s&&typeof s[d]=="object"&&(f=Object.keys(s[d])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(o.prototype),n.CssCompletions=o}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop");r("../behaviour").Behaviour;var o=r("./cstyle").CstyleBehaviour,a=r("../../token_iterator").TokenIterator,l=function(){this.inherit(o),this.add("colon","insertion",function(u,c,h,d,f){if(f===":"&&h.selection.isEmpty()){var p=h.getCursorPosition(),m=new a(d,p.row,p.column),y=m.getCurrentToken();if(y&&y.value.match(/\s+/)&&(y=m.stepBackward()),y&&y.type==="support.type"){var b=d.doc.getLine(p.row),v=b.substring(p.column,p.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,h,d,f){var p=d.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var m=h.getCursorPosition(),y=new a(d,m.row,m.column),b=y.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=y.stepBackward()),b&&b.type==="support.type"){var v=d.doc.getLine(f.start.row),E=v.substring(f.end.column,f.end.column+1);if(E===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,h,d,f){if(f===";"&&h.selection.isEmpty()){var p=h.getCursorPosition(),m=d.doc.getLine(p.row),y=m.substring(p.column,p.column+1);if(y===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,h,d,f){if(f==="!"&&h.selection.isEmpty()){var p=h.getCursorPosition(),m=d.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(m.substring(p.column)))return{text:"!important",selection:[10,10]}}})};s.inherits(l,o),n.CssBehaviour=l}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,a=r("./css_highlight_rules").CssHighlightRules,l=r("./matching_brace_outdent").MatchingBraceOutdent,u=r("../worker/worker_client").WorkerClient,c=r("./css_completions").CssCompletions,h=r("./behaviour/css").CssBehaviour,d=r("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=a,this.$outdent=new l,this.$behaviour=new h,this.$completer=new c,this.foldingRules=new d};s.inherits(f,o),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,m,y){var b=this.$getIndent(m),v=this.getTokenizer().getLineTokens(m,p).tokens;if(v.length&&v[v.length-1].type=="comment")return b;var E=m.match(/^.*\{\s*$/);return E&&(b+=y),b},this.checkOutdent=function(p,m,y){return this.$outdent.checkOutdent(m,y)},this.autoOutdent=function(p,m,y){this.$outdent.autoOutdent(m,y)},this.getCompletions=function(p,m,y,b){return this.$completer.getCompletions(p,m,y,b)},this.createWorker=function(p){var m=new u(["ace"],"ace/mode/css_worker","Worker");return m.attachToDocument(p.getDocument()),m.on("annotate",function(y){p.setAnnotations(y.data)}),m.on("terminate",function(){p.clearAnnotations()}),m},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),n.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("./text_highlight_rules").TextHighlightRules,a=function(l){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(l,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(h,d,f){return f.splice(0),this.token}}],this.embedRules(l,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),s.inherits(a,o),n.XmlHighlightRules=a}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),a=r("./css_highlight_rules").CssHighlightRules,l=r("./javascript_highlight_rules").JavaScriptHighlightRules,u=r("./xml_highlight_rules").XmlHighlightRules,c=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),h=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(d,f){var p=c[f];return["meta.tag.punctuation."+(d=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(new l({jsx:!1}).getRules(),"js-","script"),this.constructor===h&&this.normalizeRules()};s.inherits(h,u),n.HtmlHighlightRules=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("./fold_mode").FoldMode,a=n.FoldMode=function(l,u){this.defaultMode=l,this.subModes=u};s.inherits(a,o),(function(){this.$getMode=function(l){typeof l!="string"&&(l=l[0]);for(var u in this.subModes)if(l.indexOf(u)===0)return this.subModes[u];return null},this.$tryMode=function(l,u,c,h){var d=this.$getMode(l);return d?d.getFoldWidget(u,c,h):""},this.getFoldWidget=function(l,u,c){return this.$tryMode(l.getState(c-1),l,u,c)||this.$tryMode(l.getState(c),l,u,c)||this.defaultMode.getFoldWidget(l,u,c)},this.getFoldWidgetRange=function(l,u,c){var h=this.$getMode(l.getState(c-1));return(!h||!h.getFoldWidget(l,u,c))&&(h=this.$getMode(l.getState(c))),(!h||!h.getFoldWidget(l,u,c))&&(h=this.defaultMode),h.getFoldWidgetRange(l,u,c)}}).call(a.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./mixed").FoldMode,a=r("./xml").FoldMode,l=r("./cstyle").FoldMode,u=n.FoldMode=function(c,h){o.call(this,new a(c,h),{"js-":new l,"css-":new l})};s.inherits(u,o)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=o.concat(a),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},c=Object.keys(u);function h(m,y){return m.type.lastIndexOf(y+".xml")>-1}function d(m,y){for(var b=new s(m,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"tag-name");)v=b.stepBackward();if(v)return v.value}function f(m,y){for(var b=new s(m,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"attribute-name");)v=b.stepBackward();if(v)return v.value}var p=function(){};(function(){this.getCompletions=function(m,y,b,v){var E=y.getTokenAt(b.row,b.column);if(!E)return[];if(h(E,"tag-name")||h(E,"tag-open")||h(E,"end-tag-open"))return this.getTagCompletions(m,y,b,v);if(h(E,"tag-whitespace")||h(E,"attribute-name"))return this.getAttributeCompletions(m,y,b,v);if(h(E,"attribute-value"))return this.getAttributeValueCompletions(m,y,b,v);var D=y.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(D)?this.getHTMLEntityCompletions(m,y,b,v):[]},this.getTagCompletions=function(m,y,b,v){return c.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(m,y,b,v){var E=d(y,b);if(!E)return[];var D=l;return E in u&&(D=D.concat(Object.keys(u[E]))),D.map(function(C){return{caption:C,snippet:C+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(m,y,b,v){var E=d(y,b),D=f(y,b);if(!E)return[];var C=[];return E in u&&D in u[E]&&typeof u[E][D]=="object"&&(C=Object.keys(u[E][D])),C.map(function(w){return{caption:w,snippet:w,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(m,y,b,v){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(D){return{caption:D,snippet:D,meta:"html entity",score:1e6}})}}).call(p.prototype),n.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),a=r("./text").Mode,l=r("./javascript").Mode,u=r("./css").Mode,c=r("./html_highlight_rules").HtmlHighlightRules,h=r("./behaviour/xml").XmlBehaviour,d=r("./folding/html").FoldMode,f=r("./html_completions").HtmlCompletions,p=r("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],y=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(v){this.fragmentContext=v&&v.fragmentContext,this.HighlightRules=c,this.$behaviour=new h,this.$completer=new f,this.createModeDelegates({"js-":l,"css-":u}),this.foldingRules=new d(this.voidElements,o.arrayToMap(y))};s.inherits(b,a),(function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(m),this.getNextLineIndent=function(v,E,D){return this.$getIndent(E)},this.checkOutdent=function(v,E,D){return!1},this.getCompletions=function(v,E,D,C){return this.$completer.getCompletions(v,E,D,C)},this.createWorker=function(v){if(this.constructor==b){var E=new p(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(v.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(D){v.setAnnotations(D.data)}),E.on("terminate",function(){v.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),n.Mode=b}),function(){ace.require(["ace/mode/html"],function(r){e&&(e.exports=r)})}()})(Rae);var Bae={exports:{}};(function(e,t){ace.define("ace/theme/dracula-css",["require","exports","module"],function(r,n,i){i.exports=`/* * Copyright © 2017 Zeno Rocha * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -1242,21 +1242,21 @@ Error generating stack: `+s.message+` .ace-dracula .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==") right repeat-y; } -`}),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],function(r,n,i){n.isDark=!0,n.cssClass="ace-dracula",n.cssText=r("./dracula-css"),n.$selectionColorConflict=!0;var s=r("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),function(){ace.require(["ace/theme/dracula"],function(r){e&&(e.exports=r)})}()})(Rae);var Bae={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(r,n,i){var s=r("./lib/dom"),o=r("./lib/oop"),a=r("./lib/event_emitter").EventEmitter,l=r("./lib/lang"),u=r("./range").Range,c=r("./range_list").RangeList,h=r("./keyboard/hash_handler").HashHandler,d=r("./tokenizer").Tokenizer,f=r("./clipboard"),p={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,A,$){var O=w.session.getTextRange();return $?O.replace(/\n\r?([ \t]*\S)/g,` -`+$+"$1"):O},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return f.getText&&f.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var A=w.session.$mode||{};return A.blockComment&&A.blockComment.start||""},BLOCK_COMMENT_END:function(w){var A=w.session.$mode||{};return A.blockComment&&A.blockComment.end||""},LINE_COMMENT:function(w){var A=w.session.$mode||{};return A.lineCommentStart||""},CURRENT_YEAR:m.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:m.bind(null,{year:"2-digit"}),CURRENT_MONTH:m.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:m.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:m.bind(null,{month:"short"}),CURRENT_DATE:m.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:m.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:m.bind(null,{weekday:"short"}),CURRENT_HOUR:m.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:m.bind(null,{minute:"2-digit"}),CURRENT_SECOND:m.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;function m(w){var A=new Date().toLocaleString("en-us",w);return A.length==1?"0"+A:A}var y=function(){function w(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return w.prototype.getTokenizer=function(){return w.$tokenizer||this.createTokenizer()},w.prototype.createTokenizer=function(){function A(P){return P=P.substr(1),/^\d+$/.test(P)?[{tabstopId:parseInt(P,10)}]:[{text:P}]}function $(P){return"(?:[^\\\\"+P+"]|\\\\.)"}var O={regex:"/("+$("/")+"+)/",onMatch:function(P,N,F){var L=F[0];return L.fmtString=!0,L.guard=P.slice(1,-1),L.flag="",""},next:"formatString"};return w.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(P,N,F){var L=P[1];return(L=="}"&&F.length||"`$\\".indexOf(L)!=-1)&&(P=L),[P]}},{regex:/}/,onMatch:function(P,N,F){return[F.length?F.shift():P]}},{regex:/\$(?:\d+|\w+)/,onMatch:A},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(P,N,F){var L=A(P.substr(1));return F.unshift(L[0]),L},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+$("\\|")+"*\\|",onMatch:function(P,N,F){var L=P.slice(1,-1).replace(/\\[,|\\]|,/g,function(k){return k.length==2?k[1]:"\0"}).split("\0").map(function(k){return{value:k}});return F[0].choices=L,[L[0]]},next:"start"},O,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(P,N,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(P,N,F){var L=P[1];return L=="}"&&F.length||"`$\\".indexOf(L)!=-1?P=L:L=="n"?P=` -`:L=="t"?P=" ":"ulULE".indexOf(L)!=-1&&(P={changeCase:L,local:L>"a"}),[P]}},{regex:"/\\w*}",onMatch:function(P,N,F){var L=F.shift();return L&&(L.flag=P.slice(1,-1)),this.next=L&&L.tabstopId?"start":"",[L||P]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(P,N,F){return[{text:P.slice(1)}]}},{regex:/\${\w+/,onMatch:function(P,N,F){var L={text:P.slice(2)};return F.unshift(L),[L]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(P,N,F){var L=F.shift();return this.next=L&&L.tabstopId?"start":"",[L||P]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(P,N,F){var L=F[0];return L.formatFunction=P.slice(2,-1),[F.shift()]},next:"formatString"},O,{regex:/:[\?\-+]?/,onMatch:function(P,N,F){P[1]=="+"&&(F[0].ifEnd=F[0]),P[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(A,$){return this.getTokenizer().getLineTokens(A,$).tokens.map(function(O){return O.value||O})},w.prototype.getVariableValue=function(A,$,O){if(/^\d+$/.test($))return(this.variables.__||{})[$]||"";if(/^[A-Z]\d+$/.test($))return(this.variables[$[0]+"__"]||{})[$.substr(1)]||"";if($=$.replace(/^TM_/,""),!this.variables.hasOwnProperty($))return"";var P=this.variables[$];return typeof P=="function"&&(P=this.variables[$](A,$,O)),P??""},w.prototype.tmStrFormat=function(A,$,O){if(!$.fmt)return A;var P=$.flag||"",N=$.guard;N=new RegExp(N,P.replace(/[^gim]/g,""));var F=typeof $.fmt=="string"?this.tokenizeTmSnippet($.fmt,"formatString"):$.fmt,L=this,k=A.replace(N,function(){var T=L.variables.__;L.variables.__=[].slice.call(arguments);for(var M=L.resolveVariables(F,O),R="E",B=0;B=0&&k.splice(T,1)}}A.content?N(A):Array.isArray(A)&&A.forEach(N)},w.prototype.parseSnippetFile=function(A){A=A.replace(/\r/g,"");for(var $=[],O={},P=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,N;N=P.exec(A);){if(N[1])try{O=JSON.parse(N[1]),$.push(O)}catch{}if(N[4])O.content=N[4].replace(/^\t/gm,""),$.push(O),O={};else{var F=N[2],L=N[3];if(F=="regex"){var k=/\/((?:[^\/\\]|\\.)*)|$/g;O.guard=k.exec(L)[1],O.trigger=k.exec(L)[1],O.endTrigger=k.exec(L)[1],O.endGuard=k.exec(L)[1]}else F=="snippet"?(O.tabTrigger=L.match(/^\S*/)[0],O.name||(O.name=L)):F&&(O[F]=L)}}return $},w.prototype.getSnippetByName=function(A,$){var O=this.snippetNameMap,P;return this.getActiveScopes($).some(function(N){var F=O[N];return F&&(P=F[A]),!!P},this),P},w}();o.implement(y.prototype,a);var b=function(w,A,$){$===void 0&&($={});var O=w.getCursorPosition(),P=w.session.getLine(O.row),N=w.session.getTabString(),F=P.match(/^\s*/)[0];O.column1?(Y=le[le.length-1].length,G+=le.length-1):Y+=X.length,Q+=X}else X&&(X.start?X.end={row:G,column:Y}:X.start={row:G,column:Y})}),{text:Q,tabstops:k,tokens:L}},v=function(){function w(A){if(this.index=0,this.ranges=[],this.tabstops=[],A.tabstopManager)return A.tabstopManager;A.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(A)}return w.prototype.attach=function(A){this.$openTabstops=null,this.selectedTabstop=null,this.editor=A,this.session=A.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(A){for(var $=A.action[0]=="r",O=this.selectedTabstop||{},P=O.parents||{},N=this.tabstops.slice(),F=0;F2&&(this.tabstops.length&&L.push(L.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,L))},w.prototype.addTabstopMarkers=function(A){var $=this.session;A.forEach(function(O){O.markerId||(O.markerId=$.addMarker(O,"ace_snippet-marker","text"))})},w.prototype.removeTabstopMarkers=function(A){var $=this.session;A.forEach(function(O){$.removeMarker(O.markerId),O.markerId=null})},w.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var A=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&A--,this.tabstops.forEach(function($){$.snippetId===A?this.addTabstopMarkers($):this.removeTabstopMarkers($)},this)}},w.prototype.removeRange=function(A){var $=A.tabstop.indexOf(A);$!=-1&&A.tabstop.splice($,1),$=this.ranges.indexOf(A),$!=-1&&this.ranges.splice($,1),$=A.tabstop.rangeList.ranges.indexOf(A),$!=-1&&A.tabstop.splice($,1),this.session.removeMarker(A.markerId),A.tabstop.length||($=this.tabstops.indexOf(A.tabstop),$!=-1&&this.tabstops.splice($,1),this.tabstops.length||this.detach())},w}();v.prototype.keyboardHandler=new h,v.prototype.keyboardHandler.bindKeys({Tab:function(w){n.snippetManager&&n.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}});var E=function(w,A){w.row==0&&(w.column+=A.column),w.row+=A.row},D=function(w,A){w.row==A.row&&(w.column-=A.column),w.row-=A.row};s.importCssString(` +`}),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],function(r,n,i){n.isDark=!0,n.cssClass="ace-dracula",n.cssText=r("./dracula-css"),n.$selectionColorConflict=!0;var s=r("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),function(){ace.require(["ace/theme/dracula"],function(r){e&&(e.exports=r)})}()})(Bae);var jae={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(r,n,i){var s=r("./lib/dom"),o=r("./lib/oop"),a=r("./lib/event_emitter").EventEmitter,l=r("./lib/lang"),u=r("./range").Range,c=r("./range_list").RangeList,h=r("./keyboard/hash_handler").HashHandler,d=r("./tokenizer").Tokenizer,f=r("./clipboard"),p={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,T,k){var O=w.session.getTextRange();return k?O.replace(/\n\r?([ \t]*\S)/g,` +`+k+"$1"):O},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return f.getText&&f.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var T=w.session.$mode||{};return T.blockComment&&T.blockComment.start||""},BLOCK_COMMENT_END:function(w){var T=w.session.$mode||{};return T.blockComment&&T.blockComment.end||""},LINE_COMMENT:function(w){var T=w.session.$mode||{};return T.lineCommentStart||""},CURRENT_YEAR:m.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:m.bind(null,{year:"2-digit"}),CURRENT_MONTH:m.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:m.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:m.bind(null,{month:"short"}),CURRENT_DATE:m.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:m.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:m.bind(null,{weekday:"short"}),CURRENT_HOUR:m.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:m.bind(null,{minute:"2-digit"}),CURRENT_SECOND:m.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;function m(w){var T=new Date().toLocaleString("en-us",w);return T.length==1?"0"+T:T}var y=function(){function w(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return w.prototype.getTokenizer=function(){return w.$tokenizer||this.createTokenizer()},w.prototype.createTokenizer=function(){function T(P){return P=P.substr(1),/^\d+$/.test(P)?[{tabstopId:parseInt(P,10)}]:[{text:P}]}function k(P){return"(?:[^\\\\"+P+"]|\\\\.)"}var O={regex:"/("+k("/")+"+)/",onMatch:function(P,I,F){var L=F[0];return L.fmtString=!0,L.guard=P.slice(1,-1),L.flag="",""},next:"formatString"};return w.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(P,I,F){var L=P[1];return(L=="}"&&F.length||"`$\\".indexOf(L)!=-1)&&(P=L),[P]}},{regex:/}/,onMatch:function(P,I,F){return[F.length?F.shift():P]}},{regex:/\$(?:\d+|\w+)/,onMatch:T},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(P,I,F){var L=T(P.substr(1));return F.unshift(L[0]),L},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+k("\\|")+"*\\|",onMatch:function(P,I,F){var L=P.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return F[0].choices=L,[L[0]]},next:"start"},O,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(P,I,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(P,I,F){var L=P[1];return L=="}"&&F.length||"`$\\".indexOf(L)!=-1?P=L:L=="n"?P=` +`:L=="t"?P=" ":"ulULE".indexOf(L)!=-1&&(P={changeCase:L,local:L>"a"}),[P]}},{regex:"/\\w*}",onMatch:function(P,I,F){var L=F.shift();return L&&(L.flag=P.slice(1,-1)),this.next=L&&L.tabstopId?"start":"",[L||P]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(P,I,F){return[{text:P.slice(1)}]}},{regex:/\${\w+/,onMatch:function(P,I,F){var L={text:P.slice(2)};return F.unshift(L),[L]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(P,I,F){var L=F.shift();return this.next=L&&L.tabstopId?"start":"",[L||P]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(P,I,F){var L=F[0];return L.formatFunction=P.slice(2,-1),[F.shift()]},next:"formatString"},O,{regex:/:[\?\-+]?/,onMatch:function(P,I,F){P[1]=="+"&&(F[0].ifEnd=F[0]),P[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(T,k){return this.getTokenizer().getLineTokens(T,k).tokens.map(function(O){return O.value||O})},w.prototype.getVariableValue=function(T,k,O){if(/^\d+$/.test(k))return(this.variables.__||{})[k]||"";if(/^[A-Z]\d+$/.test(k))return(this.variables[k[0]+"__"]||{})[k.substr(1)]||"";if(k=k.replace(/^TM_/,""),!this.variables.hasOwnProperty(k))return"";var P=this.variables[k];return typeof P=="function"&&(P=this.variables[k](T,k,O)),P??""},w.prototype.tmStrFormat=function(T,k,O){if(!k.fmt)return T;var P=k.flag||"",I=k.guard;I=new RegExp(I,P.replace(/[^gim]/g,""));var F=typeof k.fmt=="string"?this.tokenizeTmSnippet(k.fmt,"formatString"):k.fmt,L=this,_=T.replace(I,function(){var A=L.variables.__;L.variables.__=[].slice.call(arguments);for(var M=L.resolveVariables(F,O),R="E",B=0;B=0&&_.splice(A,1)}}T.content?I(T):Array.isArray(T)&&T.forEach(I)},w.prototype.parseSnippetFile=function(T){T=T.replace(/\r/g,"");for(var k=[],O={},P=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,I;I=P.exec(T);){if(I[1])try{O=JSON.parse(I[1]),k.push(O)}catch{}if(I[4])O.content=I[4].replace(/^\t/gm,""),k.push(O),O={};else{var F=I[2],L=I[3];if(F=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;O.guard=_.exec(L)[1],O.trigger=_.exec(L)[1],O.endTrigger=_.exec(L)[1],O.endGuard=_.exec(L)[1]}else F=="snippet"?(O.tabTrigger=L.match(/^\S*/)[0],O.name||(O.name=L)):F&&(O[F]=L)}}return k},w.prototype.getSnippetByName=function(T,k){var O=this.snippetNameMap,P;return this.getActiveScopes(k).some(function(I){var F=O[I];return F&&(P=F[T]),!!P},this),P},w}();o.implement(y.prototype,a);var b=function(w,T,k){k===void 0&&(k={});var O=w.getCursorPosition(),P=w.session.getLine(O.row),I=w.session.getTabString(),F=P.match(/^\s*/)[0];O.column1?(Y=le[le.length-1].length,G+=le.length-1):Y+=X.length,Q+=X}else X&&(X.start?X.end={row:G,column:Y}:X.start={row:G,column:Y})}),{text:Q,tabstops:_,tokens:L}},v=function(){function w(T){if(this.index=0,this.ranges=[],this.tabstops=[],T.tabstopManager)return T.tabstopManager;T.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(T)}return w.prototype.attach=function(T){this.$openTabstops=null,this.selectedTabstop=null,this.editor=T,this.session=T.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(T){for(var k=T.action[0]=="r",O=this.selectedTabstop||{},P=O.parents||{},I=this.tabstops.slice(),F=0;F2&&(this.tabstops.length&&L.push(L.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,L))},w.prototype.addTabstopMarkers=function(T){var k=this.session;T.forEach(function(O){O.markerId||(O.markerId=k.addMarker(O,"ace_snippet-marker","text"))})},w.prototype.removeTabstopMarkers=function(T){var k=this.session;T.forEach(function(O){k.removeMarker(O.markerId),O.markerId=null})},w.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var T=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&T--,this.tabstops.forEach(function(k){k.snippetId===T?this.addTabstopMarkers(k):this.removeTabstopMarkers(k)},this)}},w.prototype.removeRange=function(T){var k=T.tabstop.indexOf(T);k!=-1&&T.tabstop.splice(k,1),k=this.ranges.indexOf(T),k!=-1&&this.ranges.splice(k,1),k=T.tabstop.rangeList.ranges.indexOf(T),k!=-1&&T.tabstop.splice(k,1),this.session.removeMarker(T.markerId),T.tabstop.length||(k=this.tabstops.indexOf(T.tabstop),k!=-1&&this.tabstops.splice(k,1),this.tabstops.length||this.detach())},w}();v.prototype.keyboardHandler=new h,v.prototype.keyboardHandler.bindKeys({Tab:function(w){n.snippetManager&&n.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}});var E=function(w,T){w.row==0&&(w.column+=T.column),w.row+=T.row},D=function(w,T){w.row==T.row&&(w.column-=T.column),w.row-=T.row};s.importCssString(` .ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute; -}`,"snippets.css",!1),n.snippetManager=new y;var C=r("./editor").Editor;(function(){this.insertSnippet=function(w,A){return n.snippetManager.insertSnippet(this,w,A)},this.expandSnippet=function(w){return n.snippetManager.expandWithTab(this,w)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(r,n,i){var s=r("../virtual_renderer").VirtualRenderer,o=r("../editor").Editor,a=r("../range").Range,l=r("../lib/event"),u=r("../lib/lang"),c=r("../lib/dom"),h=r("../config").nls,d=r("./../lib/useragent"),f=function(E){return"suggest-aria-id:".concat(E)},p=d.isSafari?"menu":"listbox",m=d.isSafari?"menuitem":"option",y=d.isSafari?"aria-current":"aria-selected",b=function(E){var D=new s(E);D.$maxLines=4;var C=new o(D);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},v=function(){function E(D){var C=c.createElement("div"),w=b(C);D&&D.appendChild(C),C.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",p),w.renderer.$textLayer.element.setAttribute("aria-roledescription",h("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",h("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var A=function(){};w.focus=A,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=A,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(k){var T=k.getDocumentPosition();w.selection.moveToPosition(T),P.start.row=P.end.row=T.row,k.stop()});var $,O=new a(-1,0,-1,1/0),P=new a(-1,0,-1,1/0);P.id=w.session.addMarker(P,"ace_active-line","fullLine"),w.setSelectOnHover=function(k){k?O.id&&(w.session.removeMarker(O.id),O.id=null):O.id=w.session.addMarker(O,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(k){if(!$){$=k;return}if(!($.x==k.x&&$.y==k.y)){$=k,$.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var T=$.getDocumentPosition().row;O.start.row!=T&&(O.id||w.setRow(T),F(T))}}),w.renderer.on("beforeRender",function(){if($&&O.start.row!=-1){$.$pos=null;var k=$.getDocumentPosition().row;O.id||w.setRow(k),F(k,!0)}}),w.renderer.on("afterRender",function(){var k=w.getRow(),T=w.renderer.$textLayer,M=T.element.childNodes[k-T.config.firstRow],R=document.activeElement;if(M!==w.selectedNode&&w.selectedNode&&(c.removeCssClass(w.selectedNode,"ace_selected"),R.removeAttribute("aria-activedescendant"),w.selectedNode.removeAttribute(y),w.selectedNode.removeAttribute("id")),w.selectedNode=M,M){c.addCssClass(M,"ace_selected");var B=f(k);M.id=B,T.element.setAttribute("aria-activedescendant",B),R.setAttribute("aria-activedescendant",B),M.setAttribute("role",m),M.setAttribute("aria-roledescription",h("autocomplete.popup.item.aria-roledescription","item")),M.setAttribute("aria-label",w.getData(k).caption||w.getData(k).value),M.setAttribute("aria-setsize",w.data.length),M.setAttribute("aria-posinset",k+1),M.setAttribute("aria-describedby","doc-tooltip"),M.setAttribute(y,"true")}});var N=function(){F(-1)},F=function(k,T){k!==O.start.row&&(O.start.row=O.end.row=k,T||w.session._emit("changeBackMarker"),w._emit("changeHoverMarker"))};w.getHoveredRow=function(){return O.start.row},l.addListener(w.container,"mouseout",function(){w.isMouseOver=!1,N()}),w.on("hide",N),w.on("changeSelection",N),w.session.doc.getLength=function(){return w.data.length},w.session.doc.getLine=function(k){var T=w.data[k];return typeof T=="string"?T:T&&T.value||""};var L=w.session.bgTokenizer;return L.$tokenizeRow=function(k){var T=w.data[k],M=[];if(!T)return M;typeof T=="string"&&(T={value:T});var R=T.caption||T.value||T.name;function B(X,le){X&&M.push({type:(T.className||"")+(le||""),value:X})}for(var U=R.toLowerCase(),V=(w.filterText||"").toLowerCase(),K=0,J=0,G=0;G<=V.length;G++)if(G!=J&&(T.matchMask&1<=J?M="bottom":M="top"),M==="top"?(G.bottom=k.top-this.$borderSize,G.top=G.bottom-J):M==="bottom"&&(G.top=k.top+T+this.$borderSize,G.bottom=G.top+J);var X=G.top>=0&&G.bottom<=U;if(!R&&!X)return!1;X?K.$maxPixelHeight=null:M==="top"?K.$maxPixelHeight=Q:K.$maxPixelHeight=Y,M==="top"?(B.style.top="",B.style.bottom=U-G.bottom+"px",w.isTopdown=!1):(B.style.top=G.top+"px",B.style.bottom="",w.isTopdown=!0),B.style.display="";var le=k.left;return le+B.offsetWidth>V&&(le=V-B.offsetWidth),B.style.left=le+"px",B.style.right="",w.isOpen||(w.isOpen=!0,this._signal("show"),$=null),w.anchorPos=k,w.anchor=M,!0},w.show=function(k,T,M){this.tryShow(k,T,M?"bottom":void 0,!0)},w.goTo=function(k){var T=this.getRow(),M=this.session.getLength()-1;switch(k){case"up":T=T<=0?M:T-1;break;case"down":T=T>=M?-1:T+1;break;case"start":T=0;break;case"end":T=M;break}this.setRow(T)},w.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},w.$imageSize=0,w.$borderSize=1,w}return E}();c.importCssString(` +}`,"snippets.css",!1),n.snippetManager=new y;var C=r("./editor").Editor;(function(){this.insertSnippet=function(w,T){return n.snippetManager.insertSnippet(this,w,T)},this.expandSnippet=function(w){return n.snippetManager.expandWithTab(this,w)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(r,n,i){var s=r("../virtual_renderer").VirtualRenderer,o=r("../editor").Editor,a=r("../range").Range,l=r("../lib/event"),u=r("../lib/lang"),c=r("../lib/dom"),h=r("../config").nls,d=r("./../lib/useragent"),f=function(E){return"suggest-aria-id:".concat(E)},p=d.isSafari?"menu":"listbox",m=d.isSafari?"menuitem":"option",y=d.isSafari?"aria-current":"aria-selected",b=function(E){var D=new s(E);D.$maxLines=4;var C=new o(D);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},v=function(){function E(D){var C=c.createElement("div"),w=b(C);D&&D.appendChild(C),C.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",p),w.renderer.$textLayer.element.setAttribute("aria-roledescription",h("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",h("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var T=function(){};w.focus=T,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=T,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(_){var A=_.getDocumentPosition();w.selection.moveToPosition(A),P.start.row=P.end.row=A.row,_.stop()});var k,O=new a(-1,0,-1,1/0),P=new a(-1,0,-1,1/0);P.id=w.session.addMarker(P,"ace_active-line","fullLine"),w.setSelectOnHover=function(_){_?O.id&&(w.session.removeMarker(O.id),O.id=null):O.id=w.session.addMarker(O,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(_){if(!k){k=_;return}if(!(k.x==_.x&&k.y==_.y)){k=_,k.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var A=k.getDocumentPosition().row;O.start.row!=A&&(O.id||w.setRow(A),F(A))}}),w.renderer.on("beforeRender",function(){if(k&&O.start.row!=-1){k.$pos=null;var _=k.getDocumentPosition().row;O.id||w.setRow(_),F(_,!0)}}),w.renderer.on("afterRender",function(){var _=w.getRow(),A=w.renderer.$textLayer,M=A.element.childNodes[_-A.config.firstRow],R=document.activeElement;if(M!==w.selectedNode&&w.selectedNode&&(c.removeCssClass(w.selectedNode,"ace_selected"),R.removeAttribute("aria-activedescendant"),w.selectedNode.removeAttribute(y),w.selectedNode.removeAttribute("id")),w.selectedNode=M,M){c.addCssClass(M,"ace_selected");var B=f(_);M.id=B,A.element.setAttribute("aria-activedescendant",B),R.setAttribute("aria-activedescendant",B),M.setAttribute("role",m),M.setAttribute("aria-roledescription",h("autocomplete.popup.item.aria-roledescription","item")),M.setAttribute("aria-label",w.getData(_).caption||w.getData(_).value),M.setAttribute("aria-setsize",w.data.length),M.setAttribute("aria-posinset",_+1),M.setAttribute("aria-describedby","doc-tooltip"),M.setAttribute(y,"true")}});var I=function(){F(-1)},F=function(_,A){_!==O.start.row&&(O.start.row=O.end.row=_,A||w.session._emit("changeBackMarker"),w._emit("changeHoverMarker"))};w.getHoveredRow=function(){return O.start.row},l.addListener(w.container,"mouseout",function(){w.isMouseOver=!1,I()}),w.on("hide",I),w.on("changeSelection",I),w.session.doc.getLength=function(){return w.data.length},w.session.doc.getLine=function(_){var A=w.data[_];return typeof A=="string"?A:A&&A.value||""};var L=w.session.bgTokenizer;return L.$tokenizeRow=function(_){var A=w.data[_],M=[];if(!A)return M;typeof A=="string"&&(A={value:A});var R=A.caption||A.value||A.name;function B(X,le){X&&M.push({type:(A.className||"")+(le||""),value:X})}for(var U=R.toLowerCase(),V=(w.filterText||"").toLowerCase(),K=0,J=0,G=0;G<=V.length;G++)if(G!=J&&(A.matchMask&1<=J?M="bottom":M="top"),M==="top"?(G.bottom=_.top-this.$borderSize,G.top=G.bottom-J):M==="bottom"&&(G.top=_.top+A+this.$borderSize,G.bottom=G.top+J);var X=G.top>=0&&G.bottom<=U;if(!R&&!X)return!1;X?K.$maxPixelHeight=null:M==="top"?K.$maxPixelHeight=Q:K.$maxPixelHeight=Y,M==="top"?(B.style.top="",B.style.bottom=U-G.bottom+"px",w.isTopdown=!1):(B.style.top=G.top+"px",B.style.bottom="",w.isTopdown=!0),B.style.display="";var le=_.left;return le+B.offsetWidth>V&&(le=V-B.offsetWidth),B.style.left=le+"px",B.style.right="",w.isOpen||(w.isOpen=!0,this._signal("show"),k=null),w.anchorPos=_,w.anchor=M,!0},w.show=function(_,A,M){this.tryShow(_,A,M?"bottom":void 0,!0)},w.goTo=function(_){var A=this.getRow(),M=this.session.getLength()-1;switch(_){case"up":A=A<=0?M:A-1;break;case"down":A=A>=M?-1:A+1;break;case"start":A=0;break;case"end":A=M;break}this.setRow(A)},w.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},w.$imageSize=0,w.$borderSize=1,w}return E}();c.importCssString(` .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1; @@ -1348,112 +1348,112 @@ Error generating stack: `+s.message+` animation: none; } } -`,"autocompletion.css",!1),n.AcePopup=v,n.$singleLineEditor=b,n.getAriaId=f}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(r,n,i){var s=function(){function o(a){this.editor=a,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return o.prototype.setScreenReaderContent=function(a){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var u=this.popup.getRow(),c=this.popup.renderer.$textLayer,h=c.element.childNodes[u-c.config.firstRow];if(h){for(var d="doc-tooltip ",f=0;f=0&&l.test(o[c]);c--)u.push(o[c]);return u.reverse().join("")},n.retrieveFollowingIdentifier=function(o,a,l){l=l||s;for(var u=[],c=a;c0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var A=this.popup.getData(w);A&&(!C||A.hideInlinePreview)&&this.$seen(A)}},D.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},D.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,w=[];C;)w.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=w}},D.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},D.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},D.prototype.$updatePopupPosition=function(){var C=this.editor,w=C.renderer,A=w.layerConfig.lineHeight,$=w.$cursorLayer.getPixelPosition(this.base,!0);$.left-=this.popup.getTextLeftOffset();var O=C.container.getBoundingClientRect();$.top+=O.top-w.layerConfig.offset,$.left+=O.left-C.renderer.scrollLeft,$.left+=w.gutterWidth;var P={top:$.top,left:$.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(P.top+=w.$ghostTextWidget.el.offsetHeight);var N=C.container.getBoundingClientRect().bottom-A,F=Nthis.filterText&&C.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=C,w=this.filterCompletions(w,this.filterText),w=w.sort(function($,O){return O.exactMatch-$.exactMatch||O.$score-$.$score||($.caption||$.value).localeCompare(O.caption||O.value)});var A=null;w=w.filter(function($){var O=$.snippet||$.caption||$.value;return O===A?!1:(A=O,!0)}),this.filtered=w},D.prototype.filterCompletions=function(C,w){var A=[],$=w.toUpperCase(),O=w.toLowerCase();e:for(var P=0,N;N=C[P];P++){var F=!this.ignoreCaption&&N.caption||N.value||N.snippet;if(F){var L=-1,k=0,T=0,M,R;if(this.exactMatch){if(w!==F.substr(0,w.length))continue e}else{var B=F.toLowerCase().indexOf(O);if(B>-1)T=B;else for(var U=0;U=0&&(K<0||V0&&(L===-1&&(T+=10),T+=R,k=k|1<",l.escapeHTML($.caption),"","
",l.escapeHTML(d($.snippet))].join(""))},id:"snippetCompleter"},p=[f,c,h];n.setCompleters=function($){p.length=0,$&&p.push.apply(p,$)},n.addCompleter=function($){p.push($)},n.textCompleter=c,n.keyWordCompleter=h,n.snippetCompleter=f;var m={name:"expandSnippet",exec:function($){return s.expandWithTab($)},bindKey:"Tab"},y=function($,O){b(O.session.$mode)},b=function($){typeof $=="string"&&($=a.$modes[$]),$&&(s.files||(s.files={}),v($.$id,$.snippetFileId),$.modes&&$.modes.forEach(b))},v=function($,O){!O||!$||s.files[$]||(s.files[$]={},a.loadModule(O,function(P){P&&(s.files[$]=P,!P.snippets&&P.snippetText&&(P.snippets=s.parseSnippetFile(P.snippetText)),s.register(P.snippets||[],P.scope),P.includeScopes&&(s.snippetMap[P.scope].includeScopes=P.includeScopes,P.includeScopes.forEach(function(N){b("ace/mode/"+N)})))}))},E=function($){var O=$.editor,P=O.completer&&O.completer.activated;if($.command.name==="backspace")P&&!u.getCompletionPrefix(O)&&O.completer.detach();else if($.command.name==="insertstring"&&!P){D=$;var N=$.editor.$liveAutocompletionDelay;N?C.delay(N):w($)}},D,C=l.delayedCall(function(){w(D)},0),w=function($){var O=$.editor,P=u.getCompletionPrefix(O),N=$.args,F=u.triggerAutocomplete(O,N);if(P&&P.length>=O.$liveAutocompletionThreshold||F){var L=o.for(O);L.autoShown=!0,L.showPopup(O)}},A=r("../editor").Editor;r("../config").defineOptions(A.prototype,"editor",{enableBasicAutocompletion:{set:function($){$?(this.completers||(this.completers=Array.isArray($)?$:p),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function($){$?(this.completers||(this.completers=Array.isArray($)?$:p),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function($){$?(this.commands.addCommand(m),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(m),this.off("changeMode",y))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(r){e&&(e.exports=r)})}()})(Bae);var jae=Object.create,Rb=Object.defineProperty,zae=Object.getOwnPropertyDescriptor,Hae=Object.getOwnPropertyNames,Uae=Object.getPrototypeOf,Wae=Object.prototype.hasOwnProperty,h8=e=>{throw TypeError(e)},Vae=(e,t)=>()=>(e&&(t=e(e=0)),t),jk=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bb=(e,t)=>{for(var r in t)Rb(e,r,{get:t[r],enumerable:!0})},d8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hae(t))!Wae.call(e,i)&&i!==r&&Rb(e,i,{get:()=>t[i],enumerable:!(n=zae(t,i))||n.enumerable});return e},jb=(e,t,r)=>(r=e!=null?jae(Uae(e)):{},d8(Rb(r,"default",{value:e,enumerable:!0}),e)),Gae=e=>d8(Rb({},"__esModule",{value:!0}),e),qae=(e,t,r)=>t.has(e)||h8("Cannot "+r),Kae=(e,t,r)=>t.has(e)?h8("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Of=(e,t,r)=>(qae(e,t,"access private method"),r),zk=jk((e,t)=>{var r=new Proxy(String,{get:()=>r});t.exports=r}),f8={};Bb(f8,{default:()=>g8,shouldHighlight:()=>p8});var p8,g8,Jae=Vae(()=>{p8=()=>!1,g8=String}),Xae=jk((e,t)=>{var r=String,n=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r}};t.exports=n(),t.exports.createColors=n}),Yae=jk(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=f,e.default=p;var t=(Jae(),Gae(f8)),r=i(Xae(),!0);function n(m){if(typeof WeakMap!="function")return null;var y=new WeakMap,b=new WeakMap;return(n=function(v){return v?b:y})(m)}function i(m,y){if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var b=n(y);if(b&&b.has(m))return b.get(m);var v={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in m)if(D!=="default"&&{}.hasOwnProperty.call(m,D)){var C=E?Object.getOwnPropertyDescriptor(m,D):null;C&&(C.get||C.set)?Object.defineProperty(v,D,C):v[D]=m[D]}return v.default=m,b&&b.set(m,v),v}var s=r.default,o=(m,y)=>b=>m(y(b)),a;function l(m){return m?(a!=null||(a=(0,r.createColors)(!0)),a):s}var u=!1;function c(m){return{gutter:m.gray,marker:o(m.red,m.bold),message:o(m.red,m.bold)}}var h=/\r\n|[\n\r\u2028\u2029]/;function d(m,y,b){let v=Object.assign({column:0,line:-1},m.start),E=Object.assign({},v,m.end),{linesAbove:D=2,linesBelow:C=3}=b||{},w=v.line,A=v.column,$=E.line,O=E.column,P=Math.max(w-(D+1),0),N=Math.min(y.length,$+C);w===-1&&(P=0),$===-1&&(N=y.length);let F=$-w,L={};if(F)for(let k=0;k<=F;k++){let T=k+w;if(!A)L[T]=!0;else if(k===0){let M=y[T-1].length;L[T]=[A,M-A+1]}else if(k===F)L[T]=[0,O];else{let M=y[T-k].length;L[T]=[0,M]}}else A===O?A?L[w]=[A,0]:L[w]=!0:L[w]=[A,O-A];return{start:P,end:N,markerLines:L}}function f(m,y,b={}){let v=(b.highlightCode||b.forceColor)&&(0,t.shouldHighlight)(b),E=l(b.forceColor),D=c(E),C=(L,k)=>v?L(k):k,w=m.split(h),{start:A,end:$,markerLines:O}=d(y,w,b),P=y.start&&typeof y.start.column=="number",N=String($).length,F=(v?(0,t.default)(m,b):m).split(h,$).slice(A,$).map((L,k)=>{let T=A+1+k,M=` ${` ${T}`.slice(-N)} |`,R=O[T],B=!O[T+1];if(R){let U="";if(Array.isArray(R)){let V=L.slice(0,Math.max(R[0]-1,0)).replace(/[^\t]/g," "),K=R[1]||1;U=[` +`,"autocompletion.css",!1),n.AcePopup=v,n.$singleLineEditor=b,n.getAriaId=f}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(r,n,i){var s=function(){function o(a){this.editor=a,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return o.prototype.setScreenReaderContent=function(a){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var u=this.popup.getRow(),c=this.popup.renderer.$textLayer,h=c.element.childNodes[u-c.config.firstRow];if(h){for(var d="doc-tooltip ",f=0;f=0&&l.test(o[c]);c--)u.push(o[c]);return u.reverse().join("")},n.retrieveFollowingIdentifier=function(o,a,l){l=l||s;for(var u=[],c=a;c0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var T=this.popup.getData(w);T&&(!C||T.hideInlinePreview)&&this.$seen(T)}},D.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},D.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,w=[];C;)w.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=w}},D.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},D.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},D.prototype.$updatePopupPosition=function(){var C=this.editor,w=C.renderer,T=w.layerConfig.lineHeight,k=w.$cursorLayer.getPixelPosition(this.base,!0);k.left-=this.popup.getTextLeftOffset();var O=C.container.getBoundingClientRect();k.top+=O.top-w.layerConfig.offset,k.left+=O.left-C.renderer.scrollLeft,k.left+=w.gutterWidth;var P={top:k.top,left:k.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(P.top+=w.$ghostTextWidget.el.offsetHeight);var I=C.container.getBoundingClientRect().bottom-T,F=Ithis.filterText&&C.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=C,w=this.filterCompletions(w,this.filterText),w=w.sort(function(k,O){return O.exactMatch-k.exactMatch||O.$score-k.$score||(k.caption||k.value).localeCompare(O.caption||O.value)});var T=null;w=w.filter(function(k){var O=k.snippet||k.caption||k.value;return O===T?!1:(T=O,!0)}),this.filtered=w},D.prototype.filterCompletions=function(C,w){var T=[],k=w.toUpperCase(),O=w.toLowerCase();e:for(var P=0,I;I=C[P];P++){var F=!this.ignoreCaption&&I.caption||I.value||I.snippet;if(F){var L=-1,_=0,A=0,M,R;if(this.exactMatch){if(w!==F.substr(0,w.length))continue e}else{var B=F.toLowerCase().indexOf(O);if(B>-1)A=B;else for(var U=0;U=0&&(K<0||V0&&(L===-1&&(A+=10),A+=R,_=_|1<",l.escapeHTML(k.caption),"","
",l.escapeHTML(d(k.snippet))].join(""))},id:"snippetCompleter"},p=[f,c,h];n.setCompleters=function(k){p.length=0,k&&p.push.apply(p,k)},n.addCompleter=function(k){p.push(k)},n.textCompleter=c,n.keyWordCompleter=h,n.snippetCompleter=f;var m={name:"expandSnippet",exec:function(k){return s.expandWithTab(k)},bindKey:"Tab"},y=function(k,O){b(O.session.$mode)},b=function(k){typeof k=="string"&&(k=a.$modes[k]),k&&(s.files||(s.files={}),v(k.$id,k.snippetFileId),k.modes&&k.modes.forEach(b))},v=function(k,O){!O||!k||s.files[k]||(s.files[k]={},a.loadModule(O,function(P){P&&(s.files[k]=P,!P.snippets&&P.snippetText&&(P.snippets=s.parseSnippetFile(P.snippetText)),s.register(P.snippets||[],P.scope),P.includeScopes&&(s.snippetMap[P.scope].includeScopes=P.includeScopes,P.includeScopes.forEach(function(I){b("ace/mode/"+I)})))}))},E=function(k){var O=k.editor,P=O.completer&&O.completer.activated;if(k.command.name==="backspace")P&&!u.getCompletionPrefix(O)&&O.completer.detach();else if(k.command.name==="insertstring"&&!P){D=k;var I=k.editor.$liveAutocompletionDelay;I?C.delay(I):w(k)}},D,C=l.delayedCall(function(){w(D)},0),w=function(k){var O=k.editor,P=u.getCompletionPrefix(O),I=k.args,F=u.triggerAutocomplete(O,I);if(P&&P.length>=O.$liveAutocompletionThreshold||F){var L=o.for(O);L.autoShown=!0,L.showPopup(O)}},T=r("../editor").Editor;r("../config").defineOptions(T.prototype,"editor",{enableBasicAutocompletion:{set:function(k){k?(this.completers||(this.completers=Array.isArray(k)?k:p),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(k){k?(this.completers||(this.completers=Array.isArray(k)?k:p),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(k){k?(this.commands.addCommand(m),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(m),this.off("changeMode",y))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(r){e&&(e.exports=r)})}()})(jae);var zae=Object.create,Nb=Object.defineProperty,Hae=Object.getOwnPropertyDescriptor,Uae=Object.getOwnPropertyNames,Wae=Object.getPrototypeOf,Vae=Object.prototype.hasOwnProperty,f8=e=>{throw TypeError(e)},Gae=(e,t)=>()=>(e&&(t=e(e=0)),t),zk=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rb=(e,t)=>{for(var r in t)Nb(e,r,{get:t[r],enumerable:!0})},p8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uae(t))!Vae.call(e,i)&&i!==r&&Nb(e,i,{get:()=>t[i],enumerable:!(n=Hae(t,i))||n.enumerable});return e},Bb=(e,t,r)=>(r=e!=null?zae(Wae(e)):{},p8(Nb(r,"default",{value:e,enumerable:!0}),e)),qae=e=>p8(Nb({},"__esModule",{value:!0}),e),Kae=(e,t,r)=>t.has(e)||f8("Cannot "+r),Jae=(e,t,r)=>t.has(e)?f8("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Mf=(e,t,r)=>(Kae(e,t,"access private method"),r),Hk=zk((e,t)=>{var r=new Proxy(String,{get:()=>r});t.exports=r}),g8={};Rb(g8,{default:()=>y8,shouldHighlight:()=>m8});var m8,y8,Xae=Gae(()=>{m8=()=>!1,y8=String}),Yae=zk((e,t)=>{var r=String,n=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r}};t.exports=n(),t.exports.createColors=n}),Qae=zk(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=f,e.default=p;var t=(Xae(),qae(g8)),r=i(Yae(),!0);function n(m){if(typeof WeakMap!="function")return null;var y=new WeakMap,b=new WeakMap;return(n=function(v){return v?b:y})(m)}function i(m,y){if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var b=n(y);if(b&&b.has(m))return b.get(m);var v={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in m)if(D!=="default"&&{}.hasOwnProperty.call(m,D)){var C=E?Object.getOwnPropertyDescriptor(m,D):null;C&&(C.get||C.set)?Object.defineProperty(v,D,C):v[D]=m[D]}return v.default=m,b&&b.set(m,v),v}var s=r.default,o=(m,y)=>b=>m(y(b)),a;function l(m){return m?(a!=null||(a=(0,r.createColors)(!0)),a):s}var u=!1;function c(m){return{gutter:m.gray,marker:o(m.red,m.bold),message:o(m.red,m.bold)}}var h=/\r\n|[\n\r\u2028\u2029]/;function d(m,y,b){let v=Object.assign({column:0,line:-1},m.start),E=Object.assign({},v,m.end),{linesAbove:D=2,linesBelow:C=3}=b||{},w=v.line,T=v.column,k=E.line,O=E.column,P=Math.max(w-(D+1),0),I=Math.min(y.length,k+C);w===-1&&(P=0),k===-1&&(I=y.length);let F=k-w,L={};if(F)for(let _=0;_<=F;_++){let A=_+w;if(!T)L[A]=!0;else if(_===0){let M=y[A-1].length;L[A]=[T,M-T+1]}else if(_===F)L[A]=[0,O];else{let M=y[A-_].length;L[A]=[0,M]}}else T===O?T?L[w]=[T,0]:L[w]=!0:L[w]=[T,O-T];return{start:P,end:I,markerLines:L}}function f(m,y,b={}){let v=(b.highlightCode||b.forceColor)&&(0,t.shouldHighlight)(b),E=l(b.forceColor),D=c(E),C=(L,_)=>v?L(_):_,w=m.split(h),{start:T,end:k,markerLines:O}=d(y,w,b),P=y.start&&typeof y.start.column=="number",I=String(k).length,F=(v?(0,t.default)(m,b):m).split(h,k).slice(T,k).map((L,_)=>{let A=T+1+_,M=` ${` ${A}`.slice(-I)} |`,R=O[A],B=!O[A+1];if(R){let U="";if(Array.isArray(R)){let V=L.slice(0,Math.max(R[0]-1,0)).replace(/[^\t]/g," "),K=R[1]||1;U=[` `,C(D.gutter,M.replace(/\d/g," "))," ",V,C(D.marker,"^").repeat(K)].join(""),B&&b.message&&(U+=" "+C(D.message,b.message))}return[C(D.marker,">"),C(D.gutter,M),L.length>0?` ${L}`:"",U].join("")}else return` ${C(D.gutter,M)}${L.length>0?` ${L}`:""}`}).join(` -`);return b.message&&!P&&(F=`${" ".repeat(N+1)}${b.message} -${F}`),v?E.reset(F):F}function p(m,y,b,v={}){if(!u){u=!0;let E="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let D=new Error(E);D.name="DeprecationWarning",console.warn(new Error(E))}}return b=Math.max(b,0),f(m,{start:{column:b,line:y}},v)}}),Qae={};Bb(Qae,{__debug:()=>the,check:()=>Zce,doc:()=>tj,format:()=>t2,formatWithCursor:()=>nj,getSupportInfo:()=>ehe,util:()=>rj,version:()=>_ce});var Zae=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},zb=Zae;function tu(){}tu.prototype={diff:function(e,t){var r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var s=this;function o(E){return i?(setTimeout(function(){i(void 0,E)},0),!0):E}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var a=t.length,l=e.length,u=1,c=a+l;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var h=(r=n.timeout)!==null&&r!==void 0?r:1/0,d=Date.now()+h,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=l&&p+1>=a)return o([{value:this.join(t),count:t.length}]);var m=-1/0,y=1/0;function b(){for(var E=Math.max(m,-u);E<=Math.min(y,u);E+=2){var D=void 0,C=f[E-1],w=f[E+1];C&&(f[E-1]=void 0);var A=!1;if(w){var $=w.oldPos-E;A=w&&0<=$&&$=l&&p+1>=a)return o(ele(s,D.lastComponent,t,e,s.useLongestToken));f[E]=D,D.oldPos+1>=l&&(y=Math.min(y,E-1)),p+1>=a&&(m=Math.max(m,E+1))}u++}if(i)(function E(){setTimeout(function(){if(u>c||Date.now()>d)return i();b()||E()},0)})();else for(;u<=c&&Date.now()<=d;){var v=b();if(v)return v}},addToPath:function(e,t,r,n){var i=e.lastComponent;return i&&i.added===t&&i.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:i.count+1,added:t,removed:r,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:i}}},extractCommon:function(e,t,r,n){for(var i=t.length,s=r.length,o=e.oldPos,a=o-n,l=0;a+1m.length?b:m}),h.value=e.join(f)}else h.value=e.join(r.slice(u,u+h.count));u+=h.count,h.added||(c+=h.count)}}var p=s[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(s[l-2].value+=p.value,s.pop()),s}var XF=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,YF=/\S/,m8=new tu;m8.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!YF.test(e)&&!YF.test(t)};m8.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r"u"?r:o}:n;return typeof e=="string"?e:JSON.stringify(mC(e,null,null,i),i," ")};gg.equals=function(e,t){return tu.prototype.equals.call(gg,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function mC(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var s;for(s=0;s=0?e.charAt(t+1)===` -`?"crlf":"cr":"lf"}function Hk(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`);return b.message&&!P&&(F=`${" ".repeat(I+1)}${b.message} +${F}`),v?E.reset(F):F}function p(m,y,b,v={}){if(!u){u=!0;let E="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let D=new Error(E);D.name="DeprecationWarning",console.warn(new Error(E))}}return b=Math.max(b,0),f(m,{start:{column:b,line:y}},v)}}),Zae={};Rb(Zae,{__debug:()=>rhe,check:()=>ehe,doc:()=>nj,format:()=>r2,formatWithCursor:()=>sj,getSupportInfo:()=>the,util:()=>ij,version:()=>$ce});var ele=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},jb=ele;function nu(){}nu.prototype={diff:function(e,t){var r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var s=this;function o(E){return i?(setTimeout(function(){i(void 0,E)},0),!0):E}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var a=t.length,l=e.length,u=1,c=a+l;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var h=(r=n.timeout)!==null&&r!==void 0?r:1/0,d=Date.now()+h,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=l&&p+1>=a)return o([{value:this.join(t),count:t.length}]);var m=-1/0,y=1/0;function b(){for(var E=Math.max(m,-u);E<=Math.min(y,u);E+=2){var D=void 0,C=f[E-1],w=f[E+1];C&&(f[E-1]=void 0);var T=!1;if(w){var k=w.oldPos-E;T=w&&0<=k&&k=l&&p+1>=a)return o(tle(s,D.lastComponent,t,e,s.useLongestToken));f[E]=D,D.oldPos+1>=l&&(y=Math.min(y,E-1)),p+1>=a&&(m=Math.max(m,E+1))}u++}if(i)(function E(){setTimeout(function(){if(u>c||Date.now()>d)return i();b()||E()},0)})();else for(;u<=c&&Date.now()<=d;){var v=b();if(v)return v}},addToPath:function(e,t,r,n){var i=e.lastComponent;return i&&i.added===t&&i.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:i.count+1,added:t,removed:r,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:i}}},extractCommon:function(e,t,r,n){for(var i=t.length,s=r.length,o=e.oldPos,a=o-n,l=0;a+1m.length?b:m}),h.value=e.join(f)}else h.value=e.join(r.slice(u,u+h.count));u+=h.count,h.added||(c+=h.count)}}var p=s[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(s[l-2].value+=p.value,s.pop()),s}var QF=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,ZF=/\S/,v8=new nu;v8.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!ZF.test(e)&&!ZF.test(t)};v8.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r"u"?r:o}:n;return typeof e=="string"?e:JSON.stringify(gC(e,null,null,i),i," ")};gg.equals=function(e,t){return nu.prototype.equals.call(gg,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function gC(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var s;for(s=0;s=0?e.charAt(t+1)===` +`?"crlf":"cr":"lf"}function Uk(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}function v8(e,t){let r;switch(t){case` +`}}function x8(e,t){let r;switch(t){case` `:r=/\n/gu;break;case"\r":r=/\r/gu;break;case`\r -`:r=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function ole(e){return zb(!1,e,/\r\n?/gu,` -`)}var Ec="string",wa="array",Cc="cursor",$a="indent",La="align",Pa="trim",Ui="group",zo="fill",Zi="if-break",Fa="indent-if-break",Oa="line-suffix",Na="line-suffix-boundary",Bn="line",Ho="label",As="break-parent",b8=new Set([Cc,$a,La,Pa,Ui,zo,Zi,Fa,Oa,Na,Bn,Ho,As]);function ale(e){if(typeof e=="string")return Ec;if(Array.isArray(e))return wa;if(!e)return;let{type:t}=e;if(b8.has(t))return t}var Ac=ale,lle=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ule(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(Ac(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=lle([...b8].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var cle=class extends Error{constructor(r){super(ule(r));qo(this,"name","InvalidDocError");this.doc=r}},dd=cle,QF={};function hle(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===QF){r(i.pop());continue}r&&i.push(s,QF);let o=Ac(s);if(!o)throw new dd(s);if((t==null?void 0:t(s))!==!1)switch(o){case wa:case zo:{let a=o===wa?s:s.parts;for(let l=a.length,u=l-1;u>=0;--u)i.push(a[u]);break}case Zi:i.push(s.flatContents,s.breakContents);break;case Ui:if(n&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case La:case $a:case Fa:case Ho:case Oa:i.push(s.contents);break;case Ec:case Cc:case Pa:case Na:case Bn:case As:break;default:throw new dd(s)}}}var Uk=hle,dle=()=>{},fle=dle;function o0(e){return{type:$a,contents:e}}function fd(e,t){return{type:La,contents:t,n:e}}function x8(e,t={}){return fle(t.expandedStates),{type:Ui,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function ple(e){return fd(Number.NEGATIVE_INFINITY,e)}function gle(e){return fd({type:"root"},e)}function mle(e){return fd(-1,e)}function yle(e,t){return x8(e[0],{...t,expandedStates:e})}function w8(e){return{type:zo,parts:e}}function vle(e,t="",r={}){return{type:Zi,breakContents:e,flatContents:t,groupId:r.groupId}}function ble(e,t){return{type:Fa,contents:e,groupId:t.groupId,negate:t.negate}}function yC(e){return{type:Oa,contents:e}}var xle={type:Na},Hb={type:As},wle={type:Pa},Wk={type:Bn,hard:!0},S8={type:Bn,hard:!0,literal:!0},D8={type:Bn},Sle={type:Bn,soft:!0},Hu=[Wk,Hb],E8=[S8,Hb],vC={type:Cc};function C8(e,t){let r=[];for(let n=0;n0){for(let i=0;i0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(s.contents)}${h})`}if(s.type===Ui){let c=[];s.break&&s.break!=="propagated"&&c.push("shouldBreak: true"),s.id&&c.push(`id: ${i(s.id)}`);let h=c.length>0?`, { ${c.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(d=>n(d)).join(",")}]${h})`:`group(${n(s.contents)}${h})`}if(s.type===zo)return`fill([${s.parts.map(c=>n(c)).join(", ")}])`;if(s.type===Oa)return"lineSuffix("+n(s.contents)+")";if(s.type===Na)return"lineSuffixBoundary";if(s.type===Ho)return`label(${JSON.stringify(s.label)}, ${n(s.contents)})`;throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let a=0;;a++){let l=o+(a>0?` #${a}`:"");if(!r.has(l))return r.add(l),t[s]=`Symbol.for(${JSON.stringify(l)})`}}}var Cle=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},bn=Cle,Ale=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Tle(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function kle(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var _le=e=>!(Tle(e)||kle(e)),$le=/[^\x20-\x7F]/u;function Lle(e){if(!e)return 0;if(!$le.test(e))return e.length;e=e.replace(Ale()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=_le(n)?1:2)}return t}var Vk=Lle;function Ub(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(Ac(s)){case wa:return t(s.map(n));case zo:return t({...s,parts:s.parts.map(n)});case Zi:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Ui:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case La:case $a:case Fa:case Ho:case Oa:return t({...s,contents:n(s.contents)});case Ec:case Cc:case Pa:case Na:case Bn:case As:return t(s);default:throw new dd(s)}}}function Gk(e,t,r){let n=r,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,n=a)}return Uk(e,s),n}function Ple(e){if(e.type===Ui&&e.break||e.type===Bn&&e.hard||e.type===As)return!0}function Fle(e){return Gk(e,Ple,!1)}function ZF(e){if(e.length>0){let t=bn(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ole(e){let t=new Set,r=[];function n(s){if(s.type===As&&ZF(r),s.type===Ui){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===Ui&&r.pop().break&&ZF(r)}Uk(e,n,i,!0)}function Nle(e){return e.type===Bn&&!e.hard?e.soft?"":" ":e.type===Zi?e.flatContents:e}function Mle(e){return Ub(e,Nle)}function eO(e){for(e=[...e];e.length>=2&&bn(!1,e,-2).type===Bn&&bn(!1,e,-1).type===As;)e.length-=2;if(e.length>0){let t=Tp(bn(!1,e,-1));e[e.length-1]=t}return e}function Tp(e){switch(Ac(e)){case $a:case Fa:case Ui:case Oa:case Ho:{let t=Tp(e.contents);return{...e,contents:t}}case Zi:return{...e,breakContents:Tp(e.breakContents),flatContents:Tp(e.flatContents)};case zo:return{...e,parts:eO(e.parts)};case wa:return eO(e);case Ec:return e.replace(/[\n\r]*$/u,"");case La:case Cc:case Pa:case Na:case Bn:case As:break;default:throw new dd(e)}return e}function T8(e){return Tp(Rle(e))}function Ile(e){switch(Ac(e)){case zo:if(e.parts.every(t=>t===""))return"";break;case Ui:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Ui&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case La:case $a:case Fa:case Oa:if(!e.contents)return"";break;case Zi:if(!e.flatContents&&!e.breakContents)return"";break;case wa:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof bn(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Ec:case Cc:case Pa:case Na:case Bn:case Ho:case As:break;default:throw new dd(e)}return e}function Rle(e){return Ub(e,t=>Ile(t))}function Ble(e,t=E8){return Ub(e,r=>typeof r=="string"?C8(t,r.split(` -`)):r)}function jle(e){if(e.type===Bn)return!0}function zle(e){return Gk(e,jle,!1)}function k8(e,t){return e.type===Ho?{...e,contents:t(e.contents)}:t(e)}var Pi=Symbol("MODE_BREAK"),xo=Symbol("MODE_FLAT"),kp=Symbol("cursor");function _8(){return{value:"",length:0,queue:[]}}function Hle(e,t){return bC(e,{type:"indent"},t)}function Ule(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||_8():t<0?bC(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:bC(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function bC(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let p of n)switch(p.type){case"indent":c(),r.useTabs?l(1):u(r.tabWidth);break;case"stringAlign":c(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,a+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function l(p){i+=" ".repeat(p),s+=r.tabWidth*p}function u(p){i+=" ".repeat(p),s+=p}function c(){r.useTabs?h():d()}function h(){o>0&&l(o),f()}function d(){a>0&&u(a),f()}function f(){o=0,a=0}}function xC(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===kp){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(kp);return t}function iy(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],l=[];for(;r>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:u,doc:c}=a.pop(),h=Ac(c);switch(h){case Ec:l.push(c),r-=Vk(c);break;case wa:case zo:{let d=h===wa?c:c.parts;for(let f=d.length-1;f>=0;f--)a.push({mode:u,doc:d[f]});break}case $a:case La:case Fa:case Ho:a.push({mode:u,doc:c.contents});break;case Pa:r+=xC(l);break;case Ui:{if(s&&c.break)return!1;let d=c.break?Pi:u,f=c.expandedStates&&d===Pi?bn(!1,c.expandedStates,-1):c.contents;a.push({mode:d,doc:f});break}case Zi:{let d=(c.groupId?i[c.groupId]||xo:u)===Pi?c.breakContents:c.flatContents;d&&a.push({mode:u,doc:d});break}case Bn:if(u===Pi||c.hard)return!0;c.soft||(l.push(" "),r--);break;case Oa:n=!0;break;case Na:if(n)return!1;break}}return!1}function Wb(e,t){let r={},n=t.printWidth,i=Hk(t.endOfLine),s=0,o=[{ind:_8(),mode:Pi,doc:e}],a=[],l=!1,u=[],c=0;for(Ole(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(Ac(p)){case Ec:{let m=i!==` -`?zb(!1,p,` -`,i):p;a.push(m),o.length>0&&(s+=Vk(m));break}case wa:for(let m=p.length-1;m>=0;m--)o.push({ind:d,mode:f,doc:p[m]});break;case Cc:if(c>=2)throw new Error("There are too many 'cursor' in doc.");a.push(kp),c++;break;case $a:o.push({ind:Hle(d,t),mode:f,doc:p.contents});break;case La:o.push({ind:Ule(d,p.n,t),mode:f,doc:p.contents});break;case Pa:s-=xC(a);break;case Ui:switch(f){case xo:if(!l){o.push({ind:d,mode:p.break?Pi:xo,doc:p.contents});break}case Pi:{l=!1;let m={ind:d,mode:xo,doc:p.contents},y=n-s,b=u.length>0;if(!p.break&&iy(m,o,y,b,r))o.push(m);else if(p.expandedStates){let v=bn(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:Pi,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:Pi,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:xo,doc:D};if(iy(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:Pi,doc:p.contents});break}}p.id&&(r[p.id]=bn(!1,o,-1).mode);break;case zo:{let m=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:xo,doc:b},D={ind:d,mode:Pi,doc:b},C=iy(E,[],m,u.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:xo,doc:v},A={ind:d,mode:Pi,doc:v};if(y.length===2){C?o.push(w,E):o.push(A,D);break}y.splice(0,2);let $={ind:d,mode:f,doc:w8(y)},O=y[0];iy({ind:d,mode:xo,doc:[b,v,O]},[],m,u.length>0,r,!0)?o.push($,w,E):C?o.push($,A,E):o.push($,A,D);break}case Zi:case Fa:{let m=p.groupId?r[p.groupId]:f;if(m===Pi){let y=p.type===Zi?p.breakContents:p.negate?p.contents:o0(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(m===xo){let y=p.type===Zi?p.flatContents:p.negate?o0(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case Oa:u.push({ind:d,mode:f,doc:p.contents});break;case Na:u.length>0&&o.push({ind:d,mode:f,doc:Wk});break;case Bn:switch(f){case xo:if(p.hard)l=!0;else{p.soft||(a.push(" "),s+=1);break}case Pi:if(u.length>0){o.push({ind:d,mode:f,doc:p},...u.reverse()),u.length=0;break}p.literal?d.root?(a.push(i,d.root.value),s=d.root.length):(a.push(i),s=0):(s-=xC(a),a.push(i+d.value),s=d.length);break}break;case Ho:o.push({ind:d,mode:f,doc:p.contents});break;case As:break;default:throw new dd(p)}o.length===0&&u.length>0&&(o.push(...u.reverse()),u.length=0)}let h=a.indexOf(kp);if(h!==-1){let d=a.indexOf(kp,h+1),f=a.slice(0,h).join(""),p=a.slice(h+1,d).join(""),m=a.slice(d+1).join("");return{formatted:f+p+m,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:a.join("")}}function Wle(e,t,r=0){let n=0;for(let i=r;i1?bn(!1,t,-2):null}getValue(){return bn(!1,this.stack,-1)}getNode(t=0){let r=Of(this,mu,wC).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:i}=n,s=bn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{return t(this)}finally{n.length=i}}callParent(t,r=0){let n=Of(this,mu,wC).call(this,r+1),i=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...i)}}each(t,...r){let{stack:n}=this,{length:i}=n,s=bn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{for(let o=0;o{n[s]=t(i,s,o)},...r),n}match(...t){let r=this.stack.length-1,n=null,i=this.stack[r--];for(let s of t){if(i===void 0)return!1;let o=null;if(typeof n=="number"&&(o=n,n=this.stack[r--],i=this.stack[r--]),s&&!s(i,n,o))return!1;n=this.stack[r--],i=this.stack[r--]}return!0}findAncestor(t){for(let r of Of(this,mu,Yy).call(this))if(t(r))return r}hasAncestor(t){for(let r of Of(this,mu,Yy).call(this))if(t(r))return!0;return!1}};mu=new WeakSet,wC=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},Yy=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var Gle=Vle,$8=new Proxy(()=>{},{get:()=>$8}),SC=$8;function qle(e){return e!==null&&typeof e=="object"}var Kle=qle;function*L8(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>Kle(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*Jle(e,t){let r=[e];for(let n=0;n{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&onew Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function cle(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(kc(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ule([...w8].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var hle=class extends Error{constructor(r){super(cle(r));Jo(this,"name","InvalidDocError");this.doc=r}},pd=hle,eO={};function dle(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===eO){r(i.pop());continue}r&&i.push(s,eO);let o=kc(s);if(!o)throw new pd(s);if((t==null?void 0:t(s))!==!1)switch(o){case Da:case Uo:{let a=o===Da?s:s.parts;for(let l=a.length,u=l-1;u>=0;--u)i.push(a[u]);break}case rs:i.push(s.flatContents,s.breakContents);break;case Gi:if(n&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case Fa:case Pa:case Ia:case Wo:case Ma:i.push(s.contents);break;case Tc:case Ac:case Oa:case Na:case Hn:case _s:break;default:throw new pd(s)}}}var Wk=dle,fle=()=>{},ple=fle;function s0(e){return{type:Pa,contents:e}}function gd(e,t){return{type:Fa,contents:t,n:e}}function S8(e,t={}){return ple(t.expandedStates),{type:Gi,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function gle(e){return gd(Number.NEGATIVE_INFINITY,e)}function mle(e){return gd({type:"root"},e)}function yle(e){return gd(-1,e)}function vle(e,t){return S8(e[0],{...t,expandedStates:e})}function D8(e){return{type:Uo,parts:e}}function ble(e,t="",r={}){return{type:rs,breakContents:e,flatContents:t,groupId:r.groupId}}function xle(e,t){return{type:Ia,contents:e,groupId:t.groupId,negate:t.negate}}function mC(e){return{type:Ma,contents:e}}var wle={type:Na},zb={type:_s},Sle={type:Oa},Vk={type:Hn,hard:!0},E8={type:Hn,hard:!0,literal:!0},C8={type:Hn},Dle={type:Hn,soft:!0},Wu=[Vk,zb],T8=[E8,zb],yC={type:Ac};function A8(e,t){let r=[];for(let n=0;n0){for(let i=0;i0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(s.contents)}${h})`}if(s.type===Gi){let c=[];s.break&&s.break!=="propagated"&&c.push("shouldBreak: true"),s.id&&c.push(`id: ${i(s.id)}`);let h=c.length>0?`, { ${c.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(d=>n(d)).join(",")}]${h})`:`group(${n(s.contents)}${h})`}if(s.type===Uo)return`fill([${s.parts.map(c=>n(c)).join(", ")}])`;if(s.type===Ma)return"lineSuffix("+n(s.contents)+")";if(s.type===Na)return"lineSuffixBoundary";if(s.type===Wo)return`label(${JSON.stringify(s.label)}, ${n(s.contents)})`;throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let a=0;;a++){let l=o+(a>0?` #${a}`:"");if(!r.has(l))return r.add(l),t[s]=`Symbol.for(${JSON.stringify(l)})`}}}var Tle=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Sn=Tle,Ale=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function kle(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function _le(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var $le=e=>!(kle(e)||_le(e)),Lle=/[^\x20-\x7F]/u;function Ple(e){if(!e)return 0;if(!Lle.test(e))return e.length;e=e.replace(Ale()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=$le(n)?1:2)}return t}var Gk=Ple;function Hb(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(kc(s)){case Da:return t(s.map(n));case Uo:return t({...s,parts:s.parts.map(n)});case rs:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Gi:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case Fa:case Pa:case Ia:case Wo:case Ma:return t({...s,contents:n(s.contents)});case Tc:case Ac:case Oa:case Na:case Hn:case _s:return t(s);default:throw new pd(s)}}}function qk(e,t,r){let n=r,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,n=a)}return Wk(e,s),n}function Fle(e){if(e.type===Gi&&e.break||e.type===Hn&&e.hard||e.type===_s)return!0}function Ole(e){return qk(e,Fle,!1)}function tO(e){if(e.length>0){let t=Sn(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ile(e){let t=new Set,r=[];function n(s){if(s.type===_s&&tO(r),s.type===Gi){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===Gi&&r.pop().break&&tO(r)}Wk(e,n,i,!0)}function Mle(e){return e.type===Hn&&!e.hard?e.soft?"":" ":e.type===rs?e.flatContents:e}function Nle(e){return Hb(e,Mle)}function rO(e){for(e=[...e];e.length>=2&&Sn(!1,e,-2).type===Hn&&Sn(!1,e,-1).type===_s;)e.length-=2;if(e.length>0){let t=_p(Sn(!1,e,-1));e[e.length-1]=t}return e}function _p(e){switch(kc(e)){case Pa:case Ia:case Gi:case Ma:case Wo:{let t=_p(e.contents);return{...e,contents:t}}case rs:return{...e,breakContents:_p(e.breakContents),flatContents:_p(e.flatContents)};case Uo:return{...e,parts:rO(e.parts)};case Da:return rO(e);case Tc:return e.replace(/[\n\r]*$/u,"");case Fa:case Ac:case Oa:case Na:case Hn:case _s:break;default:throw new pd(e)}return e}function _8(e){return _p(Ble(e))}function Rle(e){switch(kc(e)){case Uo:if(e.parts.every(t=>t===""))return"";break;case Gi:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Gi&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Fa:case Pa:case Ia:case Ma:if(!e.contents)return"";break;case rs:if(!e.flatContents&&!e.breakContents)return"";break;case Da:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Sn(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Tc:case Ac:case Oa:case Na:case Hn:case Wo:case _s:break;default:throw new pd(e)}return e}function Ble(e){return Hb(e,t=>Rle(t))}function jle(e,t=T8){return Hb(e,r=>typeof r=="string"?A8(t,r.split(` +`)):r)}function zle(e){if(e.type===Hn)return!0}function Hle(e){return qk(e,zle,!1)}function $8(e,t){return e.type===Wo?{...e,contents:t(e.contents)}:t(e)}var Ii=Symbol("MODE_BREAK"),Do=Symbol("MODE_FLAT"),$p=Symbol("cursor");function L8(){return{value:"",length:0,queue:[]}}function Ule(e,t){return vC(e,{type:"indent"},t)}function Wle(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||L8():t<0?vC(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:vC(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function vC(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let p of n)switch(p.type){case"indent":c(),r.useTabs?l(1):u(r.tabWidth);break;case"stringAlign":c(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,a+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function l(p){i+=" ".repeat(p),s+=r.tabWidth*p}function u(p){i+=" ".repeat(p),s+=p}function c(){r.useTabs?h():d()}function h(){o>0&&l(o),f()}function d(){a>0&&u(a),f()}function f(){o=0,a=0}}function bC(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===$p){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push($p);return t}function iy(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],l=[];for(;r>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:u,doc:c}=a.pop(),h=kc(c);switch(h){case Tc:l.push(c),r-=Gk(c);break;case Da:case Uo:{let d=h===Da?c:c.parts;for(let f=d.length-1;f>=0;f--)a.push({mode:u,doc:d[f]});break}case Pa:case Fa:case Ia:case Wo:a.push({mode:u,doc:c.contents});break;case Oa:r+=bC(l);break;case Gi:{if(s&&c.break)return!1;let d=c.break?Ii:u,f=c.expandedStates&&d===Ii?Sn(!1,c.expandedStates,-1):c.contents;a.push({mode:d,doc:f});break}case rs:{let d=(c.groupId?i[c.groupId]||Do:u)===Ii?c.breakContents:c.flatContents;d&&a.push({mode:u,doc:d});break}case Hn:if(u===Ii||c.hard)return!0;c.soft||(l.push(" "),r--);break;case Ma:n=!0;break;case Na:if(n)return!1;break}}return!1}function Ub(e,t){let r={},n=t.printWidth,i=Uk(t.endOfLine),s=0,o=[{ind:L8(),mode:Ii,doc:e}],a=[],l=!1,u=[],c=0;for(Ile(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(kc(p)){case Tc:{let m=i!==` +`?jb(!1,p,` +`,i):p;a.push(m),o.length>0&&(s+=Gk(m));break}case Da:for(let m=p.length-1;m>=0;m--)o.push({ind:d,mode:f,doc:p[m]});break;case Ac:if(c>=2)throw new Error("There are too many 'cursor' in doc.");a.push($p),c++;break;case Pa:o.push({ind:Ule(d,t),mode:f,doc:p.contents});break;case Fa:o.push({ind:Wle(d,p.n,t),mode:f,doc:p.contents});break;case Oa:s-=bC(a);break;case Gi:switch(f){case Do:if(!l){o.push({ind:d,mode:p.break?Ii:Do,doc:p.contents});break}case Ii:{l=!1;let m={ind:d,mode:Do,doc:p.contents},y=n-s,b=u.length>0;if(!p.break&&iy(m,o,y,b,r))o.push(m);else if(p.expandedStates){let v=Sn(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:Ii,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:Ii,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:Do,doc:D};if(iy(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:Ii,doc:p.contents});break}}p.id&&(r[p.id]=Sn(!1,o,-1).mode);break;case Uo:{let m=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:Do,doc:b},D={ind:d,mode:Ii,doc:b},C=iy(E,[],m,u.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:Do,doc:v},T={ind:d,mode:Ii,doc:v};if(y.length===2){C?o.push(w,E):o.push(T,D);break}y.splice(0,2);let k={ind:d,mode:f,doc:D8(y)},O=y[0];iy({ind:d,mode:Do,doc:[b,v,O]},[],m,u.length>0,r,!0)?o.push(k,w,E):C?o.push(k,T,E):o.push(k,T,D);break}case rs:case Ia:{let m=p.groupId?r[p.groupId]:f;if(m===Ii){let y=p.type===rs?p.breakContents:p.negate?p.contents:s0(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(m===Do){let y=p.type===rs?p.flatContents:p.negate?s0(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case Ma:u.push({ind:d,mode:f,doc:p.contents});break;case Na:u.length>0&&o.push({ind:d,mode:f,doc:Vk});break;case Hn:switch(f){case Do:if(p.hard)l=!0;else{p.soft||(a.push(" "),s+=1);break}case Ii:if(u.length>0){o.push({ind:d,mode:f,doc:p},...u.reverse()),u.length=0;break}p.literal?d.root?(a.push(i,d.root.value),s=d.root.length):(a.push(i),s=0):(s-=bC(a),a.push(i+d.value),s=d.length);break}break;case Wo:o.push({ind:d,mode:f,doc:p.contents});break;case _s:break;default:throw new pd(p)}o.length===0&&u.length>0&&(o.push(...u.reverse()),u.length=0)}let h=a.indexOf($p);if(h!==-1){let d=a.indexOf($p,h+1),f=a.slice(0,h).join(""),p=a.slice(h+1,d).join(""),m=a.slice(d+1).join("");return{formatted:f+p+m,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:a.join("")}}function Vle(e,t,r=0){let n=0;for(let i=r;i1?Sn(!1,t,-2):null}getValue(){return Sn(!1,this.stack,-1)}getNode(t=0){let r=Mf(this,vu,xC).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:i}=n,s=Sn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{return t(this)}finally{n.length=i}}callParent(t,r=0){let n=Mf(this,vu,xC).call(this,r+1),i=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...i)}}each(t,...r){let{stack:n}=this,{length:i}=n,s=Sn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{for(let o=0;o{n[s]=t(i,s,o)},...r),n}match(...t){let r=this.stack.length-1,n=null,i=this.stack[r--];for(let s of t){if(i===void 0)return!1;let o=null;if(typeof n=="number"&&(o=n,n=this.stack[r--],i=this.stack[r--]),s&&!s(i,n,o))return!1;n=this.stack[r--],i=this.stack[r--]}return!0}findAncestor(t){for(let r of Mf(this,vu,Xy).call(this))if(t(r))return r}hasAncestor(t){for(let r of Mf(this,vu,Xy).call(this))if(t(r))return!0;return!1}};vu=new WeakSet,xC=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},Xy=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var qle=Gle,P8=new Proxy(()=>{},{get:()=>P8}),wC=P8;function Kle(e){return e!==null&&typeof e=="object"}var Jle=Kle;function*F8(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>Jle(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*Xle(e,t){let r=[e];for(let n=0;n{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o0}var eue=Zle,O8=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),tue=e=>Object.keys(e).filter(t=>!O8.has(t));function rue(e){return e?t=>e(t,O8):tue}var Vb=rue;function nue(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function Kk(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=nue(e)}function Oh(e,t){t.leading=!0,t.trailing=!1,Kk(e,t)}function yu(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Kk(e,t)}function Nh(e,t){t.leading=!1,t.trailing=!0,Kk(e,t)}var DS=new WeakMap;function Jk(e,t){if(DS.has(e))return DS.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:o}=t;if(!n)return[];let a=((r==null?void 0:r(e,t))??[...L8(e,{getVisitorKeys:Vb(i)})]).flatMap(l=>n(l)?[l]:Jk(l,t));return a.sort((l,u)=>s(l)-s(u)||o(l)-o(u)),DS.set(e,a),a}function N8(e,t,r,n){let{locStart:i,locEnd:s}=r,o=i(t),a=s(t),l=Jk(e,r),u,c,h=0,d=l.length;for(;h>1,p=l[f],m=i(p),y=s(p);if(m<=o&&a<=y)return N8(p,t,r,p);if(y<=o){u=p,h=f+1;continue}if(a<=m){c=p,d=f;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:f}=n,p=CS(f,t,r);u&&CS(f,u,r)!==p&&(u=null),c&&CS(f,c,r)!==p&&(c=null)}return{enclosingNode:n,precedingNode:u,followingNode:c}}var ES=()=>!1;function iue(e,t){let{comments:r}=e;if(delete e.comments,!eue(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:a={}},originalText:l}=t,{ownLine:u=ES,endOfLine:c=ES,remaining:h=ES}=a,d=r.map((f,p)=>({...N8(e,f,t),comment:f,text:l,options:t,ast:e,isLastComment:r.length-1===p}));for(let[f,p]of d.entries()){let{comment:m,precedingNode:y,enclosingNode:b,followingNode:v,text:E,options:D,ast:C,isLastComment:w}=p;if(D.parser==="json"||D.parser==="json5"||D.parser==="jsonc"||D.parser==="__js_expression"||D.parser==="__ts_expression"||D.parser==="__vue_expression"||D.parser==="__vue_ts_expression"){if(i(m)-i(C)<=0){Oh(C,m);continue}if(s(m)-s(C)>=0){Nh(C,m);continue}}let A;if(o?A=[p]:(m.enclosingNode=b,m.precedingNode=y,m.followingNode=v,A=[m,E,D,C,w]),sue(E,D,d,f))m.placement="ownLine",u(...A)||(v?Oh(v,m):y?Nh(y,m):yu(b||C,m));else if(oue(E,D,d,f))m.placement="endOfLine",c(...A)||(y?Nh(y,m):v?Oh(v,m):yu(b||C,m));else if(m.placement="remaining",!h(...A))if(y&&v){let $=n.length;$>0&&n[$-1].followingNode!==v&&tO(n,D),n.push(p)}else y?Nh(y,m):v?Oh(v,m):yu(b||C,m)}if(tO(n,t),!o)for(let f of r)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var M8=e=>!/[\S\n\u2028\u2029]/u.test(e);function sue(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:o,locEnd:a}=t,l=o(i);if(s)for(let u=n-1;u>=0;u--){let{comment:c,precedingNode:h}=r[u];if(h!==s||!M8(e.slice(a(c),l)))break;l=o(c)}return Dl(e,l,{backwards:!0})}function oue(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:o,locEnd:a}=t,l=a(i);if(s)for(let u=n+1;u0;--l){let{comment:u,precedingNode:c,followingNode:h}=e[l-1];SC.strictEqual(c,s),SC.strictEqual(h,o);let d=t.originalText.slice(t.locEnd(u),a);if(((n=(r=t.printer).isGap)==null?void 0:n.call(r,d,t))??/^[\s(]*$/u.test(d))a=t.locStart(u);else break}for(let[u,{comment:c}]of e.entries())u1&&u.comments.sort((c,h)=>t.locStart(c)-t.locStart(h));e.length=0}function CS(e,t,r){let n=r.locStart(t)-1;for(let i=1;i!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:l,trailing:u}=a;l?i.push(lue(e,t)):u&&(o=uue(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function hue(e,t,r){let{leading:n,trailing:i}=cue(e,r);return!n&&!i?t:k8(t,s=>[n,s,i])}function due(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}var R8=class extends Error{constructor(){super(...arguments);qo(this,"name","ConfigError")}},rO=class extends Error{constructor(){super(...arguments);qo(this,"name","UndefinedParserError")}},fue={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var sc=Qle;function Zle(e,t,r={}){let n=Rl(e,r.backwards?t-1:t,r),i=sc(e,n,r);return n!==i}var Cl=Zle;function eue(e){return Array.isArray(e)&&e.length>0}var tue=eue,M8=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),rue=e=>Object.keys(e).filter(t=>!M8.has(t));function nue(e){return e?t=>e(t,M8):rue}var Wb=nue;function iue(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function Jk(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=iue(e)}function Mh(e,t){t.leading=!0,t.trailing=!1,Jk(e,t)}function bu(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Jk(e,t)}function Nh(e,t){t.leading=!1,t.trailing=!0,Jk(e,t)}var SS=new WeakMap;function Xk(e,t){if(SS.has(e))return SS.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:o}=t;if(!n)return[];let a=((r==null?void 0:r(e,t))??[...F8(e,{getVisitorKeys:Wb(i)})]).flatMap(l=>n(l)?[l]:Xk(l,t));return a.sort((l,u)=>s(l)-s(u)||o(l)-o(u)),SS.set(e,a),a}function N8(e,t,r,n){let{locStart:i,locEnd:s}=r,o=i(t),a=s(t),l=Xk(e,r),u,c,h=0,d=l.length;for(;h>1,p=l[f],m=i(p),y=s(p);if(m<=o&&a<=y)return N8(p,t,r,p);if(y<=o){u=p,h=f+1;continue}if(a<=m){c=p,d=f;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:f}=n,p=ES(f,t,r);u&&ES(f,u,r)!==p&&(u=null),c&&ES(f,c,r)!==p&&(c=null)}return{enclosingNode:n,precedingNode:u,followingNode:c}}var DS=()=>!1;function sue(e,t){let{comments:r}=e;if(delete e.comments,!tue(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:a={}},originalText:l}=t,{ownLine:u=DS,endOfLine:c=DS,remaining:h=DS}=a,d=r.map((f,p)=>({...N8(e,f,t),comment:f,text:l,options:t,ast:e,isLastComment:r.length-1===p}));for(let[f,p]of d.entries()){let{comment:m,precedingNode:y,enclosingNode:b,followingNode:v,text:E,options:D,ast:C,isLastComment:w}=p;if(D.parser==="json"||D.parser==="json5"||D.parser==="jsonc"||D.parser==="__js_expression"||D.parser==="__ts_expression"||D.parser==="__vue_expression"||D.parser==="__vue_ts_expression"){if(i(m)-i(C)<=0){Mh(C,m);continue}if(s(m)-s(C)>=0){Nh(C,m);continue}}let T;if(o?T=[p]:(m.enclosingNode=b,m.precedingNode=y,m.followingNode=v,T=[m,E,D,C,w]),oue(E,D,d,f))m.placement="ownLine",u(...T)||(v?Mh(v,m):y?Nh(y,m):bu(b||C,m));else if(aue(E,D,d,f))m.placement="endOfLine",c(...T)||(y?Nh(y,m):v?Mh(v,m):bu(b||C,m));else if(m.placement="remaining",!h(...T))if(y&&v){let k=n.length;k>0&&n[k-1].followingNode!==v&&nO(n,D),n.push(p)}else y?Nh(y,m):v?Mh(v,m):bu(b||C,m)}if(nO(n,t),!o)for(let f of r)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var R8=e=>!/[\S\n\u2028\u2029]/u.test(e);function oue(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:o,locEnd:a}=t,l=o(i);if(s)for(let u=n-1;u>=0;u--){let{comment:c,precedingNode:h}=r[u];if(h!==s||!R8(e.slice(a(c),l)))break;l=o(c)}return Cl(e,l,{backwards:!0})}function aue(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:o,locEnd:a}=t,l=a(i);if(s)for(let u=n+1;u0;--l){let{comment:u,precedingNode:c,followingNode:h}=e[l-1];wC.strictEqual(c,s),wC.strictEqual(h,o);let d=t.originalText.slice(t.locEnd(u),a);if(((n=(r=t.printer).isGap)==null?void 0:n.call(r,d,t))??/^[\s(]*$/u.test(d))a=t.locStart(u);else break}for(let[u,{comment:c}]of e.entries())u1&&u.comments.sort((c,h)=>t.locStart(c)-t.locStart(h));e.length=0}function ES(e,t,r){let n=r.locStart(t)-1;for(let i=1;i!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:l,trailing:u}=a;l?i.push(uue(e,t)):u&&(o=cue(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function due(e,t,r){let{leading:n,trailing:i}=hue(e,r);return!n&&!i?t:$8(t,s=>[n,s,i])}function fue(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}var j8=class extends Error{constructor(){super(...arguments);Jo(this,"name","ConfigError")}},iO=class extends Error{constructor(){super(...arguments);Jo(this,"name","UndefinedParserError")}},pue={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function B8({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(i=>i.languages??[]),n=[];for(let i of gue(Object.assign({},...e.map(({options:s})=>s),fue)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...pue(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>{var o;return((o=s.defaultOptions)==null?void 0:o[i.name])!==void 0}).map(s=>[s.name,s.defaultOptions[i.name]])),n.push(i));return{languages:r,options:n}}function*pue(e,t,r){let n=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!n.has(s)){n.add(s);let o=r.find(l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,s)),a=i.name;o!=null&&o.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function gue(e){let t=[];for(let[r,n]of Object.entries(e)){let i={name:r,...n};Array.isArray(i.default)&&(i.default=bn(!1,i.default,-1).value),t.push(i)}return t}var mue=e=>String(e).split(/[/\\]/u).pop();function nO(e,t){if(!t)return;let r=mue(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function yue(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function vue(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=yue(r,t.language)??nO(r,t.physicalFile)??nO(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var bue=vue,Mh={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>Mh.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${Mh.key(r)}: ${Mh.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>Mh.value({[e]:t})},iO=jb(zk()),xue=(e,t,{descriptor:r})=>{let n=[`${iO.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${iO.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."},Ih=jb(zk()),j8=Symbol.for("vnopts.VALUE_NOT_EXIST"),Qy=Symbol.for("vnopts.VALUE_UNCHANGED"),sO=" ".repeat(2),wue=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(oO(e,t,n,r.descriptor)),i&&s.push([oO(e,t,i.title,r.descriptor)].concat(i.values.map(o=>z8(o,r.loggerPrintWidth))).join(` -`)),H8(s,r.loggerPrintWidth)};function oO(e,t,r,n){return[`Invalid ${Ih.default.red(n.key(e))} value.`,`Expected ${Ih.default.blue(r)},`,`but received ${t===j8?Ih.default.gray("nothing"):Ih.default.red(n.value(t))}.`].join(" ")}function z8({text:e,list:t},r){let n=[];return e&&n.push(`- ${Ih.default.blue(e)}`),t&&n.push([`- ${Ih.default.blue(t.title)}:`].concat(t.values.map(i=>z8(i,r-sO.length).replace(/^|\n/g,`$&${sO}`))).join(` -`)),H8(n,r)}function H8(e,t){if(e.length===1)return e[0];let[r,n]=e,[i,s]=e.map(o=>o.split(` -`,1)[0].length);return i>t&&i>s?n:r}var aO=jb(zk()),AS=[],lO=[];function Sue(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;sa?u>a?a+1:u:u>l?l+1:u;return a}var U8=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${aO.default.yellow(r.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find(a=>Sue(e,a)<3);o&&s.push(`Did you mean ${aO.default.blue(r.key(o))}?`),n.warn(s.join(" "))},Due=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Eue(e,t){let r=new e(t),n=Object.create(r);for(let i of Due)i in t&&(n[i]=Cue(t[i],r,ru.prototype[i].length));return n}var ru=class{static create(t){return Eue(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return Qy}};function Cue(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var Aue=class extends ru{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}},Tue=class extends ru{expected(){return"anything"}validate(){return!0}},kue=class extends ru{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let i of t){let s=r.normalizeValidateResult(this._valueSchema.validate(i,r),i);s!==!0&&n.push(s.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let i of t){let s=r.normalizeDeprecatedResult(this._valueSchema.deprecated(i,r),i);s!==!1&&n.push(...s.map(({value:o})=>({value:[o]})))}return n}forward(t,r){let n=[];for(let i of t){let s=r.normalizeForwardResult(this._valueSchema.forward(i,r),i);n.push(...s.map(uO))}return n}redirect(t,r){let n=[],i=[];for(let s of t){let o=r.normalizeRedirectResult(this._valueSchema.redirect(s,r),s);"remain"in o&&n.push(o.remain),i.push(...o.redirect.map(uO))}return n.length===0?{redirect:i}:{redirect:i,remain:n}}overlap(t,r){return t.concat(r)}};function uO({from:e,to:t}){return{from:[e],to:t}}var _ue=class extends ru{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function $ue(e,t){let r=Object.create(null);for(let n of e){let i=n[t];if(r[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r[i]=n}return r}function Lue(e,t){let r=new Map;for(let n of e){let i=n[t];if(r.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r.set(i,n)}return r}function Pue(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function Fue(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}function Oue(e){return e===Math.floor(e)}function Nue(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Mue(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function cO(e){return e===void 0?{}:e}function W8(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Iue((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(W8)}}:{text:t}}function hO(e,t){return e===!0?!0:e===!1?{value:t}:e}function dO(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function fO(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function DC(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>fO(r,t)):[fO(e,t)]}function pO(e,t){let r=DC(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Iue(e,t){if(!e)throw new Error(t)}var Rue=class extends ru{constructor(t){super(t),this._choices=Lue(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(s=>this._choices.get(s)).filter(({hidden:s})=>!s).map(s=>s.value).sort(Nue).map(t.value),n=r.slice(0,-2),i=r.slice(-2);return{text:n.concat(i.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}},Bue=class extends ru{expected(){return"a number"}validate(t,r){return typeof t=="number"}},jue=class extends Bue{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&Oue(t)}},gO=class extends ru{expected(){return"a string"}validate(t){return typeof t=="string"}},zue=Mh,Hue=U8,Uue=wue,Wue=xue,Vue=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:i=80,descriptor:s=zue,unknown:o=Hue,invalid:a=Uue,deprecated:l=Wue,missing:u=()=>!1,required:c=()=>!1,preprocess:h=f=>f,postprocess:d=()=>Qy}=r||{};this._utils={descriptor:s,logger:n||{warn:()=>{}},loggerPrintWidth:i,schemas:$ue(t,"name"),normalizeDefaultResult:cO,normalizeExpectedResult:W8,normalizeDeprecatedResult:dO,normalizeForwardResult:DC,normalizeRedirectResult:pO,normalizeValidateResult:hO},this._unknownHandler=o,this._invalidHandler=Mue(a),this._deprecatedHandler=l,this._identifyMissing=(f,p)=>!(f in p)||u(f,p),this._identifyRequired=c,this._preprocess=h,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Pue()}normalize(t){let r={},n=[this._preprocess(t,this._utils)],i=()=>{for(;n.length!==0;){let s=n.shift(),o=this._applyNormalization(s,r);n.push(...o)}};i();for(let s of Object.keys(this._utils.schemas)){let o=this._utils.schemas[s];if(!(s in r)){let a=cO(o.default(this._utils));"value"in a&&n.push({[s]:a.value})}}i();for(let s of Object.keys(this._utils.schemas)){if(!(s in r))continue;let o=this._utils.schemas[s],a=r[s],l=o.postprocess(a,this._utils);l!==Qy&&(this._applyValidation(l,s,o),r[s]=l)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:i,unknownKeys:s}=this._partitionOptionKeys(t);for(let o of i){let a=this._utils.schemas[o],l=a.preprocess(t[o],this._utils);this._applyValidation(l,o,a);let u=({from:d,to:f})=>{n.push(typeof f=="string"?{[f]:d}:{[f.key]:f.value})},c=({value:d,redirectTo:f})=>{let p=dO(a.deprecated(d,this._utils),l,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,f,this._utils));else for(let{value:m}of p){let y={key:o,value:m};if(!this._hasDeprecationWarned(y)){let b=typeof f=="string"?{key:f,value:m}:f;this._utils.logger.warn(this._deprecatedHandler(y,b,this._utils))}}};DC(a.forward(l,this._utils),l).forEach(u);let h=pO(a.redirect(l,this._utils),l);if(h.redirect.forEach(u),"remain"in h){let d=h.remain;r[o]=o in r?a.overlap(r[o],d,this._utils):d,c({value:d})}for(let{from:d,to:f}of h.redirect)c({value:d,redirectTo:f})}for(let o of s){let a=t[o];this._applyUnknownHandler(o,a,r,(l,u)=>{n.push({[l]:u})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,j8,this._utils)}_partitionOptionKeys(t){let[r,n]=Fue(Object.keys(t).filter(i=>!this._identifyMissing(i,t)),i=>i in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let i=hO(n.validate(t,this._utils),t);if(i!==!0)throw this._invalidHandler(r,i.value,this._utils)}_applyUnknownHandler(t,r,n,i){let s=this._unknownHandler(t,r,this._utils);if(s)for(let o of Object.keys(s)){if(this._identifyMissing(o,s))continue;let a=s[o];o in this._utils.schemas?i(o,a):n[o]=a}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==Qy){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(r.override);for(let s of n){let o=r.override[s];this._applyValidation(o,s,this._utils.schemas[s]),t[s]=o}for(let s of i){let o=r.override[s];this._applyUnknownHandler(s,o,t,(a,l)=>{let u=this._utils.schemas[a];this._applyValidation(l,a,u),t[a]=l})}}}}},TS;function Gue(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=Mh;let a=i?Array.isArray(i)?(d,f)=>i.includes(d)?{[d]:f}:void 0:(d,f)=>({[d]:f}):(d,f,p)=>{let{_:m,...y}=p.schemas;return U8(d,f,{...p,schemas:y})},l=que(t,{isCLI:n,FlagSchema:s}),u=new Vue(l,{logger:r,unknown:a,descriptor:o}),c=r!==!1;c&&TS&&(u._hasDeprecationWarned=TS);let h=u.normalize(e);return c&&(TS=u._hasDeprecationWarned),h}function que(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(Tue.create({name:"_"}));for(let i of e)n.push(Kue(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(Aue.create({name:i.alias,sourceName:i.name}));return n}function Kue(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:i}=e,s={name:i},o,a={};switch(e.type){case"int":o=jue,t&&(s.preprocess=Number);break;case"string":o=gO;break;case"choice":o=Rue,s.choices=e.choices.map(l=>l!=null&&l.redirect?{...l,redirect:{to:{key:e.name,value:l.redirect}}}:l);break;case"boolean":o=_ue;break;case"flag":o=n,s.flags=r.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":o=gO;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(l,u,c)=>e.exception(l)||u.validate(l,c):s.validate=(l,u,c)=>l===void 0||u.validate(l,c),e.redirect&&(a.redirect=l=>l?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(a.deprecated=!0),t&&!e.array){let l=s.preprocess||(u=>u);s.preprocess=(u,c,h)=>c.preprocess(l(Array.isArray(u)?bn(!1,u,-1):u),h)}return e.array?kue.create({...t?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}var Jue=Gue,Xue=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},V8=Xue;function G8(e,t){if(!t)throw new Error("parserName is required.");let r=V8(!1,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new R8(n)}function Yue(e,t){if(!t)throw new Error("astFormat is required.");let r=V8(!1,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new R8(n)}function q8({plugins:e,parser:t}){let r=G8(e,t);return K8(r,t)}function K8(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function Que(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var mO={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Zue(e,t={}){var r;let n={...e};if(!n.parser)if(n.filepath){if(n.parser=bue(n,{physicalFile:n.filepath}),!n.parser)throw new rO(`No parser could be inferred for file "${n.filepath}".`)}else throw new rO("No parser and no file path given, couldn't infer a parser.");let i=B8({plugins:e.plugins,showDeprecated:!0}).options,s={...mO,...Object.fromEntries(i.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},o=G8(n.plugins,n.parser),a=await K8(o,n.parser);n.astFormat=a.astFormat,n.locEnd=a.locEnd,n.locStart=a.locStart;let l=(r=o.printers)!=null&&r[a.astFormat]?o:Yue(n.plugins,a.astFormat),u=await Que(l,a.astFormat);n.printer=u;let c=l.defaultOptions?Object.fromEntries(Object.entries(l.defaultOptions).filter(([,d])=>d!==void 0)):{},h={...s,...c};for(let[d,f]of Object.entries(h))(n[d]===null||n[d]===void 0)&&(n[d]=f);return n.parser==="json"&&(n.trailingComma="none"),Jue(n,i,{passThrough:Object.keys(mO),...t})}var Wd=Zue,ece=jb(Yae());async function tce(e,t){let r=await q8(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let i;try{i=await r.parse(n,t,t)}catch(s){rce(s,e)}return{text:n,ast:i}}function rce(e,t){let{loc:r}=e;if(r){let n=(0,ece.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` -`+n,e.codeFrame=n,e}throw e}var Yg=tce;async function nce(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:o,hasPrettierIgnore:a=()=>!1,getVisitorKeys:l}}=r;if(!o||s!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let u=Vb(o.getVisitorKeys??l),c=[];f();let h=e.stack;for(let{print:p,node:m,pathStack:y}of c)try{e.stack=y;let b=await p(d,t,e,r);b&&i.set(m,b)}catch(b){if(globalThis.PRETTIER_DEBUG)throw b}e.stack=h;function d(p,m){return ice(p,m,r,n)}function f(){let{node:p}=e;if(p===null||typeof p!="object"||a(e))return;for(let y of u(p))Array.isArray(p[y])?e.each(f,y):e.call(f,y);let m=o(e,r);if(m){if(typeof m=="function"){c.push({print:m,node:p,pathStack:[...e.stack]});return}i.set(p,m)}}}async function ice(e,t,r,n){let i=await Wd({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await Yg(e,i),o=await n(s,i);return T8(o)}function sce(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:a}=e,l=i(a),u=s(a);for(let c of n)i(c)>=l&&s(c)<=u&&o.add(c);return r.slice(l,u)}var oce=sce;async function Gb(e,t){({ast:e}=await J8(e,t));let r=new Map,n=new Gle(e),i=new Map;await nce(n,o,t,Gb,i);let s=await yO(n,t,o,void 0,i);return due(t),s;function o(l,u){return l===void 0||l===n?a(u):Array.isArray(l)?n.call(()=>a(u),...l):n.call(()=>a(u),l)}function a(l){let u=n.node;if(u==null)return"";let c=u&&typeof u=="object"&&l===void 0;if(c&&r.has(u))return r.get(u);let h=yO(n,t,o,l,i);return c&&r.set(u,h),h}}function yO(e,t,r,n,i){var s;let{node:o}=e,{printer:a}=t,l;return(s=a.hasPrettierIgnore)!=null&&s.call(a,e)?l=oce(e,t):i.has(o)?l=i.get(o):l=a.print(e,t,r,n),o===t.cursorNode&&(l=k8(l,u=>[vC,u,vC])),a.printComment&&(!a.willPrintOwnComments||!a.willPrintOwnComments(e,t))&&(l=hue(e,l,t)),l}async function J8(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,iue(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function lce(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=Vb(t.printer.getVisitorKeys),o=l=>n(l)<=r&&i(l)>=r,a=e;for(let l of Jle(e,{getVisitorKeys:s,filter:o}))a=l;return a}var uce=lce;function cce(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=Vb(n),s=r.ignoredProperties??new Set;return o(e);function o(a,l){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a))return a.map(d=>o(d,l)).filter(Boolean);let u={},c=new Set(i(a));for(let d in a)!Object.prototype.hasOwnProperty.call(a,d)||s.has(d)||(c.has(d)?u[d]=o(a[d],a):u[d]=a[d]);let h=r(a,u,l);if(h!==null)return h??u}}var hce=cce,dce=(e,t,r)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return n}return-1}},fce=dce,pce=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function gce(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(i=>X8.has(i.type)&&n.has(i))}function vO(e){let t=fce(!1,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function mce(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let o=r(e.node);for(let l of vO(t.parentNodes))if(r(l)>=o)s=l;else break;let a=n(t.node);for(let l of vO(e.parentNodes)){if(n(l)<=a)i=l;else break;if(i===s)break}return{startNode:i,endNode:s}}function EC(e,t,r,n,i=[],s){let{locStart:o,locEnd:a}=r,l=o(e),u=a(e);if(!(t>u||tn);let a=e.slice(n,i).search(/\S/u),l=a===-1;if(!l)for(n+=a;i>n&&!/\S/u.test(e[i-1]);--i);let u=EC(r,n,t,(f,p)=>bO(t,f,p),[],"rangeStart"),c=l?u:EC(r,i,t,f=>bO(t,f),[],"rangeEnd");if(!u||!c)return{rangeStart:0,rangeEnd:0};let h,d;if(pce(t)){let f=gce(u,c);h=f,d=f}else({startNode:h,endNode:d}=mce(u,c,t));return{rangeStart:Math.min(s(h),s(d)),rangeEnd:Math.max(o(h),o(d))}}var Y8="\uFEFF",xO=Symbol("cursor");async function Q8(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await Yg(e,t);t.cursorOffset>=0&&(t.cursorNode=uce(n,t));let s=await Gb(n,t);r>0&&(s=A8([Hu,s],r,t.tabWidth));let o=Wb(s,t);if(r>0){let l=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(l)),o.formatted=l+Hk(t.endOfLine)}let a=t[Symbol.for("comments")];if(t.cursorOffset>=0){let l,u,c,h,d;if(t.cursorNode&&o.cursorNodeText?(l=t.locStart(t.cursorNode),u=i.slice(l,t.locEnd(t.cursorNode)),c=t.cursorOffset-l,h=o.cursorNodeStart,d=o.cursorNodeText):(l=0,u=i,c=t.cursorOffset,h=0,d=o.formatted),u===d)return{formatted:o.formatted,cursorOffset:h+c,comments:a};let f=u.split("");f.splice(c,0,xO);let p=d.split(""),m=ile(f,p),y=h;for(let b of m)if(b.removed){if(b.value.includes(xO))break}else y+=b.count;return{formatted:o.formatted,cursorOffset:y,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function xce(e,t){let{ast:r,text:n}=await Yg(e,t),{rangeStart:i,rangeEnd:s}=bce(n,t,r),o=n.slice(i,s),a=Math.min(i,n.lastIndexOf(` -`,i)+1),l=n.slice(a,i).match(/^\s*/u)[0],u=qk(l,t.tabWidth),c=await Q8(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},u),h=c.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=h.length-o.length:c.cursorOffset>=0&&(d=c.cursorOffset+i);let f=n.slice(0,i)+h+n.slice(s);if(t.endOfLine!=="lf"){let p=Hk(t.endOfLine);d>=0&&p===`\r -`&&(d+=v8(f.slice(0,d),` -`)),f=zb(!1,f,` -`,p)}return{formatted:f,cursorOffset:d,comments:c.comments}}function kS(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function wO(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=kS(e,r,-1),n=kS(e,n,0),i=kS(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function Z8(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=wO(e,t),o=e.charAt(0)===Y8;if(o&&(e=e.slice(1),r--,n--,i--),s==="auto"&&(s=sle(e)),e.includes("\r")){let a=l=>v8(e.slice(0,Math.max(l,0)),`\r -`);r-=a(r),n-=a(n),i-=a(i),e=ole(e)}return{hasBOM:o,text:e,options:wO(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function SO(e,t){let r=await q8(t);return!r.hasPragma||r.hasPragma(e)}async function ej(e,t){let{hasBOM:r,text:n,options:i}=Z8(e,await Wd(t));if(i.rangeStart>=i.rangeEnd&&n!==""||i.requirePragma&&!await SO(n,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function wce(e,t,r){let{text:n,options:i}=Z8(e,await Wd(t)),s=await Yg(n,i);return r&&(r.preprocessForPrint&&(s.ast=await J8(s.ast,i)),r.massage&&(s.ast=hce(s.ast,i))),s}async function Sce(e,t){t=await Wd(t);let r=await Gb(e,t);return Wb(r,t)}async function Dce(e,t){let r=Ele(e),{formatted:n}=await ej(r,{...t,parser:"__js_expression"});return n}async function Ece(e,t){t=await Wd(t);let{ast:r}=await Yg(e,t);return Gb(r,t)}async function Cce(e,t){return Wb(e,await Wd(t))}var tj={};Bb(tj,{builders:()=>Ace,printer:()=>Tce,utils:()=>kce});var Ace={join:C8,line:D8,softline:Sle,hardline:Hu,literalline:E8,group:x8,conditionalGroup:yle,fill:w8,lineSuffix:yC,lineSuffixBoundary:xle,cursor:vC,breakParent:Hb,ifBreak:vle,trim:wle,indent:o0,indentIfBreak:ble,align:fd,addAlignmentToDoc:A8,markAsRoot:gle,dedentToRoot:ple,dedent:mle,hardlineWithoutBreakParent:Wk,literallineWithoutBreakParent:S8,label:Dle,concat:e=>e},Tce={printDocToString:Wb},kce={willBreak:Fle,traverseDoc:Uk,findInDoc:Gk,mapDoc:Ub,removeLines:Mle,stripTrailingHardline:T8,replaceEndOfLine:Ble,canBreak:zle},_ce="3.3.3",rj={};Bb(rj,{addDanglingComment:()=>yu,addLeadingComment:()=>Oh,addTrailingComment:()=>Nh,getAlignmentSize:()=>qk,getIndentSize:()=>Nce,getMaxContinuousCount:()=>Rce,getNextNonSpaceNonCommentCharacter:()=>jce,getNextNonSpaceNonCommentCharacterIndex:()=>Kce,getStringWidth:()=>Vk,hasNewline:()=>Dl,hasNewlineInRange:()=>Hce,hasSpaces:()=>Wce,isNextLineEmpty:()=>Qce,isNextLineEmptyAfterIndex:()=>e2,isPreviousLineEmpty:()=>Xce,makeString:()=>Gce,skip:()=>Xg,skipEverythingButNewLine:()=>F8,skipInlineComment:()=>Yk,skipNewline:()=>nc,skipSpaces:()=>Ml,skipToLineEnd:()=>P8,skipTrailingComment:()=>Qk,skipWhitespace:()=>Xle});function $ce(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,i.length/t.length),0)}var Rce=Ice;function Bce(e,t){let r=Zk(e,t);return r===!1?"":e.charAt(r)}var jce=Bce;function zce(e,t,r){for(let n=t;no===n?o:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return t+i+t}var Gce=Vce;function qce(e,t,r){return Zk(e,r(t))}function Kce(e,t){return arguments.length===2||typeof t=="number"?Zk(e,t):qce(...arguments)}function Jce(e,t,r){return Xk(e,r(t))}function Xce(e,t){return arguments.length===2||typeof t=="number"?Xk(e,t):Jce(...arguments)}function Yce(e,t,r){return e2(e,r(t))}function Qce(e,t){return arguments.length===2||typeof t=="number"?e2(e,t):Yce(...arguments)}function Du(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var nj=Du(ej);async function t2(e,t){let{formatted:r}=await nj(e,{...t,cursorOffset:-1});return r}async function Zce(e,t){return await t2(e,t)===e}var ehe=Du(B8,0),the={parse:Du(wce),formatAST:Du(Sce),formatDoc:Du(Dce),printToDoc:Du(Ece),printDocToString:Du(Cce)},rhe=Object.create,r2=Object.defineProperty,nhe=Object.getOwnPropertyDescriptor,ihe=Object.getOwnPropertyNames,she=Object.getPrototypeOf,ohe=Object.prototype.hasOwnProperty,ahe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lhe=(e,t)=>{for(var r in t)r2(e,r,{get:t[r],enumerable:!0})},uhe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ihe(t))!ohe.call(e,i)&&i!==r&&r2(e,i,{get:()=>t[i],enumerable:!(n=nhe(t,i))||n.enumerable});return e},ij=(e,t,r)=>(r=e!=null?rhe(she(e)):{},uhe(r2(r,"default",{value:e,enumerable:!0}),e)),sj=ahe(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(x,g){if(x==null)return{};var S={},_=Object.keys(x),I,H;for(H=0;H<_.length;H++)I=_[H],!(g.indexOf(I)>=0)&&(S[I]=x[I]);return S}var r=class{constructor(x,g,S){this.line=void 0,this.column=void 0,this.index=void 0,this.line=x,this.column=g,this.index=S}},n=class{constructor(x,g){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=x,this.end=g}};function i(x,g){let{line:S,column:_,index:I}=x;return new r(S,_+g,I+g)}var s="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:s},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:s}},a={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},l=x=>x.type==="UpdateExpression"?a.UpdateExpression[`${x.prefix}`]:a[x.type],u={AccessorIsGenerator:({kind:x})=>`A ${x}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:x})=>`Missing initializer in ${x} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:x})=>`\`${x}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:x})=>`'import.${x}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:x,exportName:g})=>`A string literal cannot be used as an exported binding without \`from\`. +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function z8({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(i=>i.languages??[]),n=[];for(let i of mue(Object.assign({},...e.map(({options:s})=>s),pue)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...gue(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>{var o;return((o=s.defaultOptions)==null?void 0:o[i.name])!==void 0}).map(s=>[s.name,s.defaultOptions[i.name]])),n.push(i));return{languages:r,options:n}}function*gue(e,t,r){let n=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!n.has(s)){n.add(s);let o=r.find(l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,s)),a=i.name;o!=null&&o.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function mue(e){let t=[];for(let[r,n]of Object.entries(e)){let i={name:r,...n};Array.isArray(i.default)&&(i.default=Sn(!1,i.default,-1).value),t.push(i)}return t}var yue=e=>String(e).split(/[/\\]/u).pop();function sO(e,t){if(!t)return;let r=yue(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function vue(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function bue(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=vue(r,t.language)??sO(r,t.physicalFile)??sO(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var xue=bue,Rh={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>Rh.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${Rh.key(r)}: ${Rh.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>Rh.value({[e]:t})},oO=Bb(Hk()),wue=(e,t,{descriptor:r})=>{let n=[`${oO.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${oO.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."},Bh=Bb(Hk()),H8=Symbol.for("vnopts.VALUE_NOT_EXIST"),Yy=Symbol.for("vnopts.VALUE_UNCHANGED"),aO=" ".repeat(2),Sue=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(lO(e,t,n,r.descriptor)),i&&s.push([lO(e,t,i.title,r.descriptor)].concat(i.values.map(o=>U8(o,r.loggerPrintWidth))).join(` +`)),W8(s,r.loggerPrintWidth)};function lO(e,t,r,n){return[`Invalid ${Bh.default.red(n.key(e))} value.`,`Expected ${Bh.default.blue(r)},`,`but received ${t===H8?Bh.default.gray("nothing"):Bh.default.red(n.value(t))}.`].join(" ")}function U8({text:e,list:t},r){let n=[];return e&&n.push(`- ${Bh.default.blue(e)}`),t&&n.push([`- ${Bh.default.blue(t.title)}:`].concat(t.values.map(i=>U8(i,r-aO.length).replace(/^|\n/g,`$&${aO}`))).join(` +`)),W8(n,r)}function W8(e,t){if(e.length===1)return e[0];let[r,n]=e,[i,s]=e.map(o=>o.split(` +`,1)[0].length);return i>t&&i>s?n:r}var uO=Bb(Hk()),CS=[],cO=[];function Due(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;sa?u>a?a+1:u:u>l?l+1:u;return a}var V8=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${uO.default.yellow(r.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find(a=>Due(e,a)<3);o&&s.push(`Did you mean ${uO.default.blue(r.key(o))}?`),n.warn(s.join(" "))},Eue=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Cue(e,t){let r=new e(t),n=Object.create(r);for(let i of Eue)i in t&&(n[i]=Tue(t[i],r,iu.prototype[i].length));return n}var iu=class{static create(t){return Cue(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return Yy}};function Tue(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var Aue=class extends iu{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}},kue=class extends iu{expected(){return"anything"}validate(){return!0}},_ue=class extends iu{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let i of t){let s=r.normalizeValidateResult(this._valueSchema.validate(i,r),i);s!==!0&&n.push(s.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let i of t){let s=r.normalizeDeprecatedResult(this._valueSchema.deprecated(i,r),i);s!==!1&&n.push(...s.map(({value:o})=>({value:[o]})))}return n}forward(t,r){let n=[];for(let i of t){let s=r.normalizeForwardResult(this._valueSchema.forward(i,r),i);n.push(...s.map(hO))}return n}redirect(t,r){let n=[],i=[];for(let s of t){let o=r.normalizeRedirectResult(this._valueSchema.redirect(s,r),s);"remain"in o&&n.push(o.remain),i.push(...o.redirect.map(hO))}return n.length===0?{redirect:i}:{redirect:i,remain:n}}overlap(t,r){return t.concat(r)}};function hO({from:e,to:t}){return{from:[e],to:t}}var $ue=class extends iu{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function Lue(e,t){let r=Object.create(null);for(let n of e){let i=n[t];if(r[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r[i]=n}return r}function Pue(e,t){let r=new Map;for(let n of e){let i=n[t];if(r.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r.set(i,n)}return r}function Fue(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function Oue(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}function Iue(e){return e===Math.floor(e)}function Mue(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Nue(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function dO(e){return e===void 0?{}:e}function G8(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Rue((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(G8)}}:{text:t}}function fO(e,t){return e===!0?!0:e===!1?{value:t}:e}function pO(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function gO(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function SC(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>gO(r,t)):[gO(e,t)]}function mO(e,t){let r=SC(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Rue(e,t){if(!e)throw new Error(t)}var Bue=class extends iu{constructor(t){super(t),this._choices=Pue(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(s=>this._choices.get(s)).filter(({hidden:s})=>!s).map(s=>s.value).sort(Mue).map(t.value),n=r.slice(0,-2),i=r.slice(-2);return{text:n.concat(i.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}},jue=class extends iu{expected(){return"a number"}validate(t,r){return typeof t=="number"}},zue=class extends jue{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&Iue(t)}},yO=class extends iu{expected(){return"a string"}validate(t){return typeof t=="string"}},Hue=Rh,Uue=V8,Wue=Sue,Vue=wue,Gue=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:i=80,descriptor:s=Hue,unknown:o=Uue,invalid:a=Wue,deprecated:l=Vue,missing:u=()=>!1,required:c=()=>!1,preprocess:h=f=>f,postprocess:d=()=>Yy}=r||{};this._utils={descriptor:s,logger:n||{warn:()=>{}},loggerPrintWidth:i,schemas:Lue(t,"name"),normalizeDefaultResult:dO,normalizeExpectedResult:G8,normalizeDeprecatedResult:pO,normalizeForwardResult:SC,normalizeRedirectResult:mO,normalizeValidateResult:fO},this._unknownHandler=o,this._invalidHandler=Nue(a),this._deprecatedHandler=l,this._identifyMissing=(f,p)=>!(f in p)||u(f,p),this._identifyRequired=c,this._preprocess=h,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Fue()}normalize(t){let r={},n=[this._preprocess(t,this._utils)],i=()=>{for(;n.length!==0;){let s=n.shift(),o=this._applyNormalization(s,r);n.push(...o)}};i();for(let s of Object.keys(this._utils.schemas)){let o=this._utils.schemas[s];if(!(s in r)){let a=dO(o.default(this._utils));"value"in a&&n.push({[s]:a.value})}}i();for(let s of Object.keys(this._utils.schemas)){if(!(s in r))continue;let o=this._utils.schemas[s],a=r[s],l=o.postprocess(a,this._utils);l!==Yy&&(this._applyValidation(l,s,o),r[s]=l)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:i,unknownKeys:s}=this._partitionOptionKeys(t);for(let o of i){let a=this._utils.schemas[o],l=a.preprocess(t[o],this._utils);this._applyValidation(l,o,a);let u=({from:d,to:f})=>{n.push(typeof f=="string"?{[f]:d}:{[f.key]:f.value})},c=({value:d,redirectTo:f})=>{let p=pO(a.deprecated(d,this._utils),l,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,f,this._utils));else for(let{value:m}of p){let y={key:o,value:m};if(!this._hasDeprecationWarned(y)){let b=typeof f=="string"?{key:f,value:m}:f;this._utils.logger.warn(this._deprecatedHandler(y,b,this._utils))}}};SC(a.forward(l,this._utils),l).forEach(u);let h=mO(a.redirect(l,this._utils),l);if(h.redirect.forEach(u),"remain"in h){let d=h.remain;r[o]=o in r?a.overlap(r[o],d,this._utils):d,c({value:d})}for(let{from:d,to:f}of h.redirect)c({value:d,redirectTo:f})}for(let o of s){let a=t[o];this._applyUnknownHandler(o,a,r,(l,u)=>{n.push({[l]:u})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,H8,this._utils)}_partitionOptionKeys(t){let[r,n]=Oue(Object.keys(t).filter(i=>!this._identifyMissing(i,t)),i=>i in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let i=fO(n.validate(t,this._utils),t);if(i!==!0)throw this._invalidHandler(r,i.value,this._utils)}_applyUnknownHandler(t,r,n,i){let s=this._unknownHandler(t,r,this._utils);if(s)for(let o of Object.keys(s)){if(this._identifyMissing(o,s))continue;let a=s[o];o in this._utils.schemas?i(o,a):n[o]=a}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==Yy){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(r.override);for(let s of n){let o=r.override[s];this._applyValidation(o,s,this._utils.schemas[s]),t[s]=o}for(let s of i){let o=r.override[s];this._applyUnknownHandler(s,o,t,(a,l)=>{let u=this._utils.schemas[a];this._applyValidation(l,a,u),t[a]=l})}}}}},TS;function que(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=Rh;let a=i?Array.isArray(i)?(d,f)=>i.includes(d)?{[d]:f}:void 0:(d,f)=>({[d]:f}):(d,f,p)=>{let{_:m,...y}=p.schemas;return V8(d,f,{...p,schemas:y})},l=Kue(t,{isCLI:n,FlagSchema:s}),u=new Gue(l,{logger:r,unknown:a,descriptor:o}),c=r!==!1;c&&TS&&(u._hasDeprecationWarned=TS);let h=u.normalize(e);return c&&(TS=u._hasDeprecationWarned),h}function Kue(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(kue.create({name:"_"}));for(let i of e)n.push(Jue(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(Aue.create({name:i.alias,sourceName:i.name}));return n}function Jue(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:i}=e,s={name:i},o,a={};switch(e.type){case"int":o=zue,t&&(s.preprocess=Number);break;case"string":o=yO;break;case"choice":o=Bue,s.choices=e.choices.map(l=>l!=null&&l.redirect?{...l,redirect:{to:{key:e.name,value:l.redirect}}}:l);break;case"boolean":o=$ue;break;case"flag":o=n,s.flags=r.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":o=yO;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(l,u,c)=>e.exception(l)||u.validate(l,c):s.validate=(l,u,c)=>l===void 0||u.validate(l,c),e.redirect&&(a.redirect=l=>l?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(a.deprecated=!0),t&&!e.array){let l=s.preprocess||(u=>u);s.preprocess=(u,c,h)=>c.preprocess(l(Array.isArray(u)?Sn(!1,u,-1):u),h)}return e.array?_ue.create({...t?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}var Xue=que,Yue=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},q8=Yue;function K8(e,t){if(!t)throw new Error("parserName is required.");let r=q8(!1,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new j8(n)}function Que(e,t){if(!t)throw new Error("astFormat is required.");let r=q8(!1,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new j8(n)}function J8({plugins:e,parser:t}){let r=K8(e,t);return X8(r,t)}function X8(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function Zue(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var vO={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function ece(e,t={}){var r;let n={...e};if(!n.parser)if(n.filepath){if(n.parser=xue(n,{physicalFile:n.filepath}),!n.parser)throw new iO(`No parser could be inferred for file "${n.filepath}".`)}else throw new iO("No parser and no file path given, couldn't infer a parser.");let i=z8({plugins:e.plugins,showDeprecated:!0}).options,s={...vO,...Object.fromEntries(i.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},o=K8(n.plugins,n.parser),a=await X8(o,n.parser);n.astFormat=a.astFormat,n.locEnd=a.locEnd,n.locStart=a.locStart;let l=(r=o.printers)!=null&&r[a.astFormat]?o:Que(n.plugins,a.astFormat),u=await Zue(l,a.astFormat);n.printer=u;let c=l.defaultOptions?Object.fromEntries(Object.entries(l.defaultOptions).filter(([,d])=>d!==void 0)):{},h={...s,...c};for(let[d,f]of Object.entries(h))(n[d]===null||n[d]===void 0)&&(n[d]=f);return n.parser==="json"&&(n.trailingComma="none"),Xue(n,i,{passThrough:Object.keys(vO),...t})}var Gd=ece,tce=Bb(Qae());async function rce(e,t){let r=await J8(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let i;try{i=await r.parse(n,t,t)}catch(s){nce(s,e)}return{text:n,ast:i}}function nce(e,t){let{loc:r}=e;if(r){let n=(0,tce.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var Yg=rce;async function ice(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:o,hasPrettierIgnore:a=()=>!1,getVisitorKeys:l}}=r;if(!o||s!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let u=Wb(o.getVisitorKeys??l),c=[];f();let h=e.stack;for(let{print:p,node:m,pathStack:y}of c)try{e.stack=y;let b=await p(d,t,e,r);b&&i.set(m,b)}catch(b){if(globalThis.PRETTIER_DEBUG)throw b}e.stack=h;function d(p,m){return sce(p,m,r,n)}function f(){let{node:p}=e;if(p===null||typeof p!="object"||a(e))return;for(let y of u(p))Array.isArray(p[y])?e.each(f,y):e.call(f,y);let m=o(e,r);if(m){if(typeof m=="function"){c.push({print:m,node:p,pathStack:[...e.stack]});return}i.set(p,m)}}}async function sce(e,t,r,n){let i=await Gd({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await Yg(e,i),o=await n(s,i);return _8(o)}function oce(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:a}=e,l=i(a),u=s(a);for(let c of n)i(c)>=l&&s(c)<=u&&o.add(c);return r.slice(l,u)}var lce=oce;async function Vb(e,t){({ast:e}=await Y8(e,t));let r=new Map,n=new qle(e),i=new Map;await ice(n,o,t,Vb,i);let s=await bO(n,t,o,void 0,i);return fue(t),s;function o(l,u){return l===void 0||l===n?a(u):Array.isArray(l)?n.call(()=>a(u),...l):n.call(()=>a(u),l)}function a(l){let u=n.node;if(u==null)return"";let c=u&&typeof u=="object"&&l===void 0;if(c&&r.has(u))return r.get(u);let h=bO(n,t,o,l,i);return c&&r.set(u,h),h}}function bO(e,t,r,n,i){var s;let{node:o}=e,{printer:a}=t,l;return(s=a.hasPrettierIgnore)!=null&&s.call(a,e)?l=lce(e,t):i.has(o)?l=i.get(o):l=a.print(e,t,r,n),o===t.cursorNode&&(l=$8(l,u=>[yC,u,yC])),a.printComment&&(!a.willPrintOwnComments||!a.willPrintOwnComments(e,t))&&(l=due(e,l,t)),l}async function Y8(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,sue(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function uce(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=Wb(t.printer.getVisitorKeys),o=l=>n(l)<=r&&i(l)>=r,a=e;for(let l of Xle(e,{getVisitorKeys:s,filter:o}))a=l;return a}var cce=uce;function hce(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=Wb(n),s=r.ignoredProperties??new Set;return o(e);function o(a,l){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a))return a.map(d=>o(d,l)).filter(Boolean);let u={},c=new Set(i(a));for(let d in a)!Object.prototype.hasOwnProperty.call(a,d)||s.has(d)||(c.has(d)?u[d]=o(a[d],a):u[d]=a[d]);let h=r(a,u,l);if(h!==null)return h??u}}var dce=hce,fce=(e,t,r)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return n}return-1}},pce=fce,gce=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function mce(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(i=>Q8.has(i.type)&&n.has(i))}function xO(e){let t=pce(!1,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function yce(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let o=r(e.node);for(let l of xO(t.parentNodes))if(r(l)>=o)s=l;else break;let a=n(t.node);for(let l of xO(e.parentNodes)){if(n(l)<=a)i=l;else break;if(i===s)break}return{startNode:i,endNode:s}}function DC(e,t,r,n,i=[],s){let{locStart:o,locEnd:a}=r,l=o(e),u=a(e);if(!(t>u||tn);let a=e.slice(n,i).search(/\S/u),l=a===-1;if(!l)for(n+=a;i>n&&!/\S/u.test(e[i-1]);--i);let u=DC(r,n,t,(f,p)=>wO(t,f,p),[],"rangeStart"),c=l?u:DC(r,i,t,f=>wO(t,f),[],"rangeEnd");if(!u||!c)return{rangeStart:0,rangeEnd:0};let h,d;if(gce(t)){let f=mce(u,c);h=f,d=f}else({startNode:h,endNode:d}=yce(u,c,t));return{rangeStart:Math.min(s(h),s(d)),rangeEnd:Math.max(o(h),o(d))}}var Z8="\uFEFF",SO=Symbol("cursor");async function ej(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await Yg(e,t);t.cursorOffset>=0&&(t.cursorNode=cce(n,t));let s=await Vb(n,t);r>0&&(s=k8([Wu,s],r,t.tabWidth));let o=Ub(s,t);if(r>0){let l=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(l)),o.formatted=l+Uk(t.endOfLine)}let a=t[Symbol.for("comments")];if(t.cursorOffset>=0){let l,u,c,h,d;if(t.cursorNode&&o.cursorNodeText?(l=t.locStart(t.cursorNode),u=i.slice(l,t.locEnd(t.cursorNode)),c=t.cursorOffset-l,h=o.cursorNodeStart,d=o.cursorNodeText):(l=0,u=i,c=t.cursorOffset,h=0,d=o.formatted),u===d)return{formatted:o.formatted,cursorOffset:h+c,comments:a};let f=u.split("");f.splice(c,0,SO);let p=d.split(""),m=sle(f,p),y=h;for(let b of m)if(b.removed){if(b.value.includes(SO))break}else y+=b.count;return{formatted:o.formatted,cursorOffset:y,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function wce(e,t){let{ast:r,text:n}=await Yg(e,t),{rangeStart:i,rangeEnd:s}=xce(n,t,r),o=n.slice(i,s),a=Math.min(i,n.lastIndexOf(` +`,i)+1),l=n.slice(a,i).match(/^\s*/u)[0],u=Kk(l,t.tabWidth),c=await ej(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},u),h=c.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=h.length-o.length:c.cursorOffset>=0&&(d=c.cursorOffset+i);let f=n.slice(0,i)+h+n.slice(s);if(t.endOfLine!=="lf"){let p=Uk(t.endOfLine);d>=0&&p===`\r +`&&(d+=x8(f.slice(0,d),` +`)),f=jb(!1,f,` +`,p)}return{formatted:f,cursorOffset:d,comments:c.comments}}function AS(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function DO(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=AS(e,r,-1),n=AS(e,n,0),i=AS(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function tj(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=DO(e,t),o=e.charAt(0)===Z8;if(o&&(e=e.slice(1),r--,n--,i--),s==="auto"&&(s=ole(e)),e.includes("\r")){let a=l=>x8(e.slice(0,Math.max(l,0)),`\r +`);r-=a(r),n-=a(n),i-=a(i),e=ale(e)}return{hasBOM:o,text:e,options:DO(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function EO(e,t){let r=await J8(t);return!r.hasPragma||r.hasPragma(e)}async function rj(e,t){let{hasBOM:r,text:n,options:i}=tj(e,await Gd(t));if(i.rangeStart>=i.rangeEnd&&n!==""||i.requirePragma&&!await EO(n,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function Sce(e,t,r){let{text:n,options:i}=tj(e,await Gd(t)),s=await Yg(n,i);return r&&(r.preprocessForPrint&&(s.ast=await Y8(s.ast,i)),r.massage&&(s.ast=dce(s.ast,i))),s}async function Dce(e,t){t=await Gd(t);let r=await Vb(e,t);return Ub(r,t)}async function Ece(e,t){let r=Cle(e),{formatted:n}=await rj(r,{...t,parser:"__js_expression"});return n}async function Cce(e,t){t=await Gd(t);let{ast:r}=await Yg(e,t);return Vb(r,t)}async function Tce(e,t){return Ub(e,await Gd(t))}var nj={};Rb(nj,{builders:()=>Ace,printer:()=>kce,utils:()=>_ce});var Ace={join:A8,line:C8,softline:Dle,hardline:Wu,literalline:T8,group:S8,conditionalGroup:vle,fill:D8,lineSuffix:mC,lineSuffixBoundary:wle,cursor:yC,breakParent:zb,ifBreak:ble,trim:Sle,indent:s0,indentIfBreak:xle,align:gd,addAlignmentToDoc:k8,markAsRoot:mle,dedentToRoot:gle,dedent:yle,hardlineWithoutBreakParent:Vk,literallineWithoutBreakParent:E8,label:Ele,concat:e=>e},kce={printDocToString:Ub},_ce={willBreak:Ole,traverseDoc:Wk,findInDoc:qk,mapDoc:Hb,removeLines:Nle,stripTrailingHardline:_8,replaceEndOfLine:jle,canBreak:Hle},$ce="3.3.3",ij={};Rb(ij,{addDanglingComment:()=>bu,addLeadingComment:()=>Mh,addTrailingComment:()=>Nh,getAlignmentSize:()=>Kk,getIndentSize:()=>Mce,getMaxContinuousCount:()=>Bce,getNextNonSpaceNonCommentCharacter:()=>zce,getNextNonSpaceNonCommentCharacterIndex:()=>Jce,getStringWidth:()=>Gk,hasNewline:()=>Cl,hasNewlineInRange:()=>Uce,hasSpaces:()=>Vce,isNextLineEmpty:()=>Zce,isNextLineEmptyAfterIndex:()=>t2,isPreviousLineEmpty:()=>Yce,makeString:()=>qce,skip:()=>Xg,skipEverythingButNewLine:()=>I8,skipInlineComment:()=>Qk,skipNewline:()=>sc,skipSpaces:()=>Rl,skipToLineEnd:()=>O8,skipTrailingComment:()=>Zk,skipWhitespace:()=>Yle});function Lce(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,i.length/t.length),0)}var Bce=Rce;function jce(e,t){let r=e2(e,t);return r===!1?"":e.charAt(r)}var zce=jce;function Hce(e,t,r){for(let n=t;no===n?o:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return t+i+t}var qce=Gce;function Kce(e,t,r){return e2(e,r(t))}function Jce(e,t){return arguments.length===2||typeof t=="number"?e2(e,t):Kce(...arguments)}function Xce(e,t,r){return Yk(e,r(t))}function Yce(e,t){return arguments.length===2||typeof t=="number"?Yk(e,t):Xce(...arguments)}function Qce(e,t,r){return t2(e,r(t))}function Zce(e,t){return arguments.length===2||typeof t=="number"?t2(e,t):Qce(...arguments)}function Cu(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var sj=Cu(rj);async function r2(e,t){let{formatted:r}=await sj(e,{...t,cursorOffset:-1});return r}async function ehe(e,t){return await r2(e,t)===e}var the=Cu(z8,0),rhe={parse:Cu(Sce),formatAST:Cu(Dce),formatDoc:Cu(Ece),printToDoc:Cu(Cce),printDocToString:Cu(Tce)},nhe=Object.create,n2=Object.defineProperty,ihe=Object.getOwnPropertyDescriptor,she=Object.getOwnPropertyNames,ohe=Object.getPrototypeOf,ahe=Object.prototype.hasOwnProperty,lhe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uhe=(e,t)=>{for(var r in t)n2(e,r,{get:t[r],enumerable:!0})},che=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of she(t))!ahe.call(e,i)&&i!==r&&n2(e,i,{get:()=>t[i],enumerable:!(n=ihe(t,i))||n.enumerable});return e},oj=(e,t,r)=>(r=e!=null?nhe(ohe(e)):{},che(n2(r,"default",{value:e,enumerable:!0}),e)),aj=lhe(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(x,g){if(x==null)return{};var S={},$=Object.keys(x),N,H;for(H=0;H<$.length;H++)N=$[H],!(g.indexOf(N)>=0)&&(S[N]=x[N]);return S}var r=class{constructor(x,g,S){this.line=void 0,this.column=void 0,this.index=void 0,this.line=x,this.column=g,this.index=S}},n=class{constructor(x,g){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=x,this.end=g}};function i(x,g){let{line:S,column:$,index:N}=x;return new r(S,$+g,N+g)}var s="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:s},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:s}},a={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},l=x=>x.type==="UpdateExpression"?a.UpdateExpression[`${x.prefix}`]:a[x.type],u={AccessorIsGenerator:({kind:x})=>`A ${x}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:x})=>`Missing initializer in ${x} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:x})=>`\`${x}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:x})=>`'import.${x}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:x,exportName:g})=>`A string literal cannot be used as an exported binding without \`from\`. - Did you mean \`export { '${x}' as '${g}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:x})=>`'${x==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:x})=>`Unsyntactic ${x==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:x})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${x}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:x})=>`\`import()\` requires exactly ${x===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:x})=>`Expected number in radix ${x}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:x})=>`Escape sequence in keyword ${x}.`,InvalidIdentifier:({identifierName:x})=>`Invalid identifier ${x}.`,InvalidLhs:({ancestor:x})=>`Invalid left-hand side in ${l(x)}.`,InvalidLhsBinding:({ancestor:x})=>`Binding invalid left-hand side in ${l(x)}.`,InvalidLhsOptionalChaining:({ancestor:x})=>`Invalid optional chaining in the left-hand side of ${l(x)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:x})=>`Unexpected character '${x}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:x})=>`Private name #${x} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:x})=>`Label '${x}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:x})=>`This experimental syntax requires enabling the parser plugin: ${x.map(g=>JSON.stringify(g)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:x})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${x.map(g=>JSON.stringify(g)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:x})=>`Duplicate key "${x}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:x})=>`An export name cannot include a lone surrogate, found '\\u${x.toString(16)}'.`,ModuleExportUndefined:({localName:x})=>`Export '${x}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:x})=>`Private names are only allowed in property accesses (\`obj.#${x}\`) or in \`in\` expressions (\`#${x} in obj\`).`,PrivateNameRedeclaration:({identifierName:x})=>`Duplicate private name #${x}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:x})=>`Unexpected keyword '${x}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:x})=>`Unexpected reserved word '${x}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:x,unexpected:g})=>`Unexpected token${g?` '${g}'.`:""}${x?`, expected "${x}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:x,onlyValidPropertyName:g})=>`The only valid meta property for ${x} is ${x}.${g}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:x})=>`Identifier '${x}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},c={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:x})=>`Assigning to '${x}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:x})=>`Binding '${x}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),d={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:x})=>`Invalid topic token ${x}. In order to use ${x} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${x}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:x})=>`Hack-style pipe body cannot be an unparenthesized ${l({type:x})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},f=["toMessage"],p=["message"];function m(x,g,S){Object.defineProperty(x,g,{enumerable:!1,configurable:!0,value:S})}function y(x){let{toMessage:g}=x,S=t(x,f);return function _(I,H){let q=new SyntaxError;return Object.assign(q,S,{loc:I,pos:I.index}),"missingPlugin"in H&&Object.assign(q,{missingPlugin:H.missingPlugin}),m(q,"clone",function(Z={}){var ie;let{line:ne,column:Se,index:Be}=(ie=Z.loc)!=null?ie:I;return _(new r(ne,Se,Be),Object.assign({},H,Z.details))}),m(q,"details",H),Object.defineProperty(q,"message",{configurable:!0,get(){let Z=`${g(H)} (${I.line}:${I.column})`;return this.message=Z,Z},set(Z){Object.defineProperty(this,"message",{value:Z,writable:!0})}}),q}}function b(x,g){if(Array.isArray(x))return _=>b(_,x[0]);let S={};for(let _ of Object.keys(x)){let I=x[_],H=typeof I=="string"?{message:()=>I}:typeof I=="function"?{message:I}:I,{message:q}=H,Z=t(H,p),ie=typeof q=="string"?()=>q:q;S[_]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:_,toMessage:ie},g?{syntaxPlugin:g}:{},Z))}return S}var v=Object.assign({},b(o),b(u),b(c),b`pipelineOperator`(d)),{defineProperty:E}=Object,D=(x,g)=>{x&&E(x,g,{enumerable:!1,value:x[g]})};function C(x){return D(x.loc.start,"index"),D(x.loc.end,"index"),x}var w=x=>class extends x{parse(){let g=C(super.parse());return this.options.tokens&&(g.tokens=g.tokens.map(C)),g}parseRegExpLiteral({pattern:g,flags:S}){let _=null;try{_=new RegExp(g,S)}catch{}let I=this.estreeParseLiteral(_);return I.regex={pattern:g,flags:S},I}parseBigIntLiteral(g){let S;try{S=BigInt(g)}catch{S=null}let _=this.estreeParseLiteral(S);return _.bigint=String(_.value||g),_}parseDecimalLiteral(g){let S=this.estreeParseLiteral(null);return S.decimal=String(S.value||g),S}estreeParseLiteral(g){return this.parseLiteral(g,"Literal")}parseStringLiteral(g){return this.estreeParseLiteral(g)}parseNumericLiteral(g){return this.estreeParseLiteral(g)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(g){return this.estreeParseLiteral(g)}directiveToStmt(g){let S=g.value;delete g.value,S.type="Literal",S.raw=S.extra.raw,S.value=S.extra.expressionValue;let _=g;return _.type="ExpressionStatement",_.expression=S,_.directive=S.extra.rawValue,delete S.extra,_}initFunction(g,S){super.initFunction(g,S),g.expression=!1}checkDeclaration(g){g!=null&&this.isObjectProperty(g)?this.checkDeclaration(g.value):super.checkDeclaration(g)}getObjectOrClassMethodParams(g){return g.value.params}isValidDirective(g){var S;return g.type==="ExpressionStatement"&&g.expression.type==="Literal"&&typeof g.expression.value=="string"&&!((S=g.expression.extra)!=null&&S.parenthesized)}parseBlockBody(g,S,_,I,H){super.parseBlockBody(g,S,_,I,H);let q=g.directives.map(Z=>this.directiveToStmt(Z));g.body=q.concat(g.body),delete g.directives}pushClassMethod(g,S,_,I,H,q){this.parseMethod(S,_,I,H,q,"ClassMethod",!0),S.typeParameters&&(S.value.typeParameters=S.typeParameters,delete S.typeParameters),g.body.push(S)}parsePrivateName(){let g=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(g):g}convertPrivateNameToPrivateIdentifier(g){let S=super.getPrivateNameSV(g);return g=g,delete g.id,g.name=S,g.type="PrivateIdentifier",g}isPrivateName(g){return this.getPluginOption("estree","classFeatures")?g.type==="PrivateIdentifier":super.isPrivateName(g)}getPrivateNameSV(g){return this.getPluginOption("estree","classFeatures")?g.name:super.getPrivateNameSV(g)}parseLiteral(g,S){let _=super.parseLiteral(g,S);return _.raw=_.extra.raw,delete _.extra,_}parseFunctionBody(g,S,_=!1){super.parseFunctionBody(g,S,_),g.expression=g.body.type!=="BlockStatement"}parseMethod(g,S,_,I,H,q,Z=!1){let ie=this.startNode();return ie.kind=g.kind,ie=super.parseMethod(ie,S,_,I,H,q,Z),ie.type="FunctionExpression",delete ie.kind,g.value=ie,q==="ClassPrivateMethod"&&(g.computed=!1),this.finishNode(g,"MethodDefinition")}nameIsConstructor(g){return g.type==="Literal"?g.value==="constructor":super.nameIsConstructor(g)}parseClassProperty(...g){let S=super.parseClassProperty(...g);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition"),S}parseClassPrivateProperty(...g){let S=super.parseClassPrivateProperty(...g);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition",S.computed=!1),S}parseObjectMethod(g,S,_,I,H){let q=super.parseObjectMethod(g,S,_,I,H);return q&&(q.type="Property",q.kind==="method"&&(q.kind="init"),q.shorthand=!1),q}parseObjectProperty(g,S,_,I){let H=super.parseObjectProperty(g,S,_,I);return H&&(H.kind="init",H.type="Property"),H}isValidLVal(g,S,_){return g==="Property"?"value":super.isValidLVal(g,S,_)}isAssignable(g,S){return g!=null&&this.isObjectProperty(g)?this.isAssignable(g.value,S):super.isAssignable(g,S)}toAssignable(g,S=!1){if(g!=null&&this.isObjectProperty(g)){let{key:_,value:I}=g;this.isPrivateName(_)&&this.classScope.usePrivateName(this.getPrivateNameSV(_),_.loc.start),this.toAssignable(I,S)}else super.toAssignable(g,S)}toAssignableObjectExpressionProp(g,S,_){g.type==="Property"&&(g.kind==="get"||g.kind==="set")?this.raise(v.PatternHasAccessor,g.key):g.type==="Property"&&g.method?this.raise(v.PatternHasMethod,g.key):super.toAssignableObjectExpressionProp(g,S,_)}finishCallExpression(g,S){let _=super.finishCallExpression(g,S);if(_.callee.type==="Import"){if(_.type="ImportExpression",_.source=_.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var I,H;_.options=(I=_.arguments[1])!=null?I:null,_.attributes=(H=_.arguments[1])!=null?H:null}delete _.arguments,delete _.callee}return _}toReferencedArguments(g){g.type!=="ImportExpression"&&super.toReferencedArguments(g)}parseExport(g,S){let _=this.state.lastTokStartLoc,I=super.parseExport(g,S);switch(I.type){case"ExportAllDeclaration":I.exported=null;break;case"ExportNamedDeclaration":I.specifiers.length===1&&I.specifiers[0].type==="ExportNamespaceSpecifier"&&(I.type="ExportAllDeclaration",I.exported=I.specifiers[0].exported,delete I.specifiers);case"ExportDefaultDeclaration":{var H;let{declaration:q}=I;(q==null?void 0:q.type)==="ClassDeclaration"&&((H=q.decorators)==null?void 0:H.length)>0&&q.start===I.start&&this.resetStartLocation(I,_)}break}return I}parseSubscript(g,S,_,I){let H=super.parseSubscript(g,S,_,I);if(I.optionalChainMember){if((H.type==="OptionalMemberExpression"||H.type==="OptionalCallExpression")&&(H.type=H.type.substring(8)),I.stop){let q=this.startNodeAtNode(H);return q.expression=H,this.finishNode(q,"ChainExpression")}}else(H.type==="MemberExpression"||H.type==="CallExpression")&&(H.optional=!1);return H}isOptionalMemberExpression(g){return g.type==="ChainExpression"?g.expression.type==="MemberExpression":super.isOptionalMemberExpression(g)}hasPropertyAsPrivateName(g){return g.type==="ChainExpression"&&(g=g.expression),super.hasPropertyAsPrivateName(g)}isObjectProperty(g){return g.type==="Property"&&g.kind==="init"&&!g.method}isObjectMethod(g){return g.type==="Property"&&(g.method||g.kind==="get"||g.kind==="set")}finishNodeAt(g,S,_){return C(super.finishNodeAt(g,S,_))}resetStartLocation(g,S){super.resetStartLocation(g,S),C(g)}resetEndLocation(g,S=this.state.lastTokEndLoc){super.resetEndLocation(g,S),C(g)}},A=class{constructor(x,g){this.token=void 0,this.preserveSpace=void 0,this.token=x,this.preserveSpace=!!g}},$={brace:new A("{"),j_oTag:new A("...",!0)};$.template=new A("`",!0);var O=!0,P=!0,N=!0,F=!0,L=!0,k=!0,T=class{constructor(x,g={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=x,this.keyword=g.keyword,this.beforeExpr=!!g.beforeExpr,this.startsExpr=!!g.startsExpr,this.rightAssociative=!!g.rightAssociative,this.isLoop=!!g.isLoop,this.isAssign=!!g.isAssign,this.prefix=!!g.prefix,this.postfix=!!g.postfix,this.binop=g.binop!=null?g.binop:null,this.updateContext=null}},M=new Map;function R(x,g={}){g.keyword=x;let S=X(x,g);return M.set(x,S),S}function B(x,g){return X(x,{beforeExpr:O,binop:g})}var U=-1,V=[],K=[],J=[],G=[],Y=[],Q=[];function X(x,g={}){var S,_,I,H;return++U,K.push(x),J.push((S=g.binop)!=null?S:-1),G.push((_=g.beforeExpr)!=null?_:!1),Y.push((I=g.startsExpr)!=null?I:!1),Q.push((H=g.prefix)!=null?H:!1),V.push(new T(x,g)),U}function le(x,g={}){var S,_,I,H;return++U,M.set(x,U),K.push(x),J.push((S=g.binop)!=null?S:-1),G.push((_=g.beforeExpr)!=null?_:!1),Y.push((I=g.startsExpr)!=null?I:!1),Q.push((H=g.prefix)!=null?H:!1),V.push(new T("name",g)),U}var be={bracketL:X("[",{beforeExpr:O,startsExpr:P}),bracketHashL:X("#[",{beforeExpr:O,startsExpr:P}),bracketBarL:X("[|",{beforeExpr:O,startsExpr:P}),bracketR:X("]"),bracketBarR:X("|]"),braceL:X("{",{beforeExpr:O,startsExpr:P}),braceBarL:X("{|",{beforeExpr:O,startsExpr:P}),braceHashL:X("#{",{beforeExpr:O,startsExpr:P}),braceR:X("}"),braceBarR:X("|}"),parenL:X("(",{beforeExpr:O,startsExpr:P}),parenR:X(")"),comma:X(",",{beforeExpr:O}),semi:X(";",{beforeExpr:O}),colon:X(":",{beforeExpr:O}),doubleColon:X("::",{beforeExpr:O}),dot:X("."),question:X("?",{beforeExpr:O}),questionDot:X("?."),arrow:X("=>",{beforeExpr:O}),template:X("template"),ellipsis:X("...",{beforeExpr:O}),backQuote:X("`",{startsExpr:P}),dollarBraceL:X("${",{beforeExpr:O,startsExpr:P}),templateTail:X("...`",{startsExpr:P}),templateNonTail:X("...${",{beforeExpr:O,startsExpr:P}),at:X("@"),hash:X("#",{startsExpr:P}),interpreterDirective:X("#!..."),eq:X("=",{beforeExpr:O,isAssign:F}),assign:X("_=",{beforeExpr:O,isAssign:F}),slashAssign:X("_=",{beforeExpr:O,isAssign:F}),xorAssign:X("_=",{beforeExpr:O,isAssign:F}),moduloAssign:X("_=",{beforeExpr:O,isAssign:F}),incDec:X("++/--",{prefix:L,postfix:k,startsExpr:P}),bang:X("!",{beforeExpr:O,prefix:L,startsExpr:P}),tilde:X("~",{beforeExpr:O,prefix:L,startsExpr:P}),doubleCaret:X("^^",{startsExpr:P}),doubleAt:X("@@",{startsExpr:P}),pipeline:B("|>",0),nullishCoalescing:B("??",1),logicalOR:B("||",1),logicalAND:B("&&",2),bitwiseOR:B("|",3),bitwiseXOR:B("^",4),bitwiseAND:B("&",5),equality:B("==/!=/===/!==",6),lt:B("/<=/>=",7),gt:B("/<=/>=",7),relational:B("/<=/>=",7),bitShift:B("<>/>>>",8),bitShiftL:B("<>/>>>",8),bitShiftR:B("<>/>>>",8),plusMin:X("+/-",{beforeExpr:O,binop:9,prefix:L,startsExpr:P}),modulo:X("%",{binop:10,startsExpr:P}),star:X("*",{binop:10}),slash:B("/",10),exponent:X("**",{beforeExpr:O,binop:11,rightAssociative:!0}),_in:R("in",{beforeExpr:O,binop:7}),_instanceof:R("instanceof",{beforeExpr:O,binop:7}),_break:R("break"),_case:R("case",{beforeExpr:O}),_catch:R("catch"),_continue:R("continue"),_debugger:R("debugger"),_default:R("default",{beforeExpr:O}),_else:R("else",{beforeExpr:O}),_finally:R("finally"),_function:R("function",{startsExpr:P}),_if:R("if"),_return:R("return",{beforeExpr:O}),_switch:R("switch"),_throw:R("throw",{beforeExpr:O,prefix:L,startsExpr:P}),_try:R("try"),_var:R("var"),_const:R("const"),_with:R("with"),_new:R("new",{beforeExpr:O,startsExpr:P}),_this:R("this",{startsExpr:P}),_super:R("super",{startsExpr:P}),_class:R("class",{startsExpr:P}),_extends:R("extends",{beforeExpr:O}),_export:R("export"),_import:R("import",{startsExpr:P}),_null:R("null",{startsExpr:P}),_true:R("true",{startsExpr:P}),_false:R("false",{startsExpr:P}),_typeof:R("typeof",{beforeExpr:O,prefix:L,startsExpr:P}),_void:R("void",{beforeExpr:O,prefix:L,startsExpr:P}),_delete:R("delete",{beforeExpr:O,prefix:L,startsExpr:P}),_do:R("do",{isLoop:N,beforeExpr:O}),_for:R("for",{isLoop:N}),_while:R("while",{isLoop:N}),_as:le("as",{startsExpr:P}),_assert:le("assert",{startsExpr:P}),_async:le("async",{startsExpr:P}),_await:le("await",{startsExpr:P}),_defer:le("defer",{startsExpr:P}),_from:le("from",{startsExpr:P}),_get:le("get",{startsExpr:P}),_let:le("let",{startsExpr:P}),_meta:le("meta",{startsExpr:P}),_of:le("of",{startsExpr:P}),_sent:le("sent",{startsExpr:P}),_set:le("set",{startsExpr:P}),_source:le("source",{startsExpr:P}),_static:le("static",{startsExpr:P}),_using:le("using",{startsExpr:P}),_yield:le("yield",{startsExpr:P}),_asserts:le("asserts",{startsExpr:P}),_checks:le("checks",{startsExpr:P}),_exports:le("exports",{startsExpr:P}),_global:le("global",{startsExpr:P}),_implements:le("implements",{startsExpr:P}),_intrinsic:le("intrinsic",{startsExpr:P}),_infer:le("infer",{startsExpr:P}),_is:le("is",{startsExpr:P}),_mixins:le("mixins",{startsExpr:P}),_proto:le("proto",{startsExpr:P}),_require:le("require",{startsExpr:P}),_satisfies:le("satisfies",{startsExpr:P}),_keyof:le("keyof",{startsExpr:P}),_readonly:le("readonly",{startsExpr:P}),_unique:le("unique",{startsExpr:P}),_abstract:le("abstract",{startsExpr:P}),_declare:le("declare",{startsExpr:P}),_enum:le("enum",{startsExpr:P}),_module:le("module",{startsExpr:P}),_namespace:le("namespace",{startsExpr:P}),_interface:le("interface",{startsExpr:P}),_type:le("type",{startsExpr:P}),_opaque:le("opaque",{startsExpr:P}),name:X("name",{startsExpr:P}),string:X("string",{startsExpr:P}),num:X("num",{startsExpr:P}),bigint:X("bigint",{startsExpr:P}),decimal:X("decimal",{startsExpr:P}),regexp:X("regexp",{startsExpr:P}),privateName:X("#name",{startsExpr:P}),eof:X("eof"),jsxName:X("jsxName"),jsxText:X("jsxText",{beforeExpr:!0}),jsxTagStart:X("jsxTagStart",{startsExpr:!0}),jsxTagEnd:X("jsxTagEnd"),placeholder:X("%%",{startsExpr:!0})};function ce(x){return x>=93&&x<=132}function xe(x){return x<=92}function ke(x){return x>=58&&x<=132}function Re(x){return x>=58&&x<=136}function $t(x){return G[x]}function mt(x){return Y[x]}function W(x){return x>=29&&x<=33}function ye(x){return x>=129&&x<=131}function pe(x){return x>=90&&x<=92}function re(x){return x>=58&&x<=92}function ee(x){return x>=39&&x<=59}function ue(x){return x===34}function De(x){return Q[x]}function Ce(x){return x>=121&&x<=123}function fe(x){return x>=124&&x<=130}function Ee(x){return K[x]}function je(x){return J[x]}function ae(x){return x===57}function ve(x){return x>=24&&x<=25}function Ae(x){return V[x]}V[8].updateContext=x=>{x.pop()},V[5].updateContext=V[7].updateContext=V[23].updateContext=x=>{x.push($.brace)},V[22].updateContext=x=>{x[x.length-1]===$.template?x.pop():x.push($.template)},V[142].updateContext=x=>{x.push($.j_expr,$.j_oTag)};var ze="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",at="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",bt=new RegExp("["+ze+"]"),ft=new RegExp("["+ze+at+"]");ze=at=null;var At=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],nt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function ht(x,g){let S=65536;for(let _=0,I=g.length;_x)return!1;if(S+=g[_+1],S>=x)return!0}return!1}function Ft(x){return x<65?x===36:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&bt.test(String.fromCharCode(x)):ht(x,At)}function rr(x){return x<48?x===36:x<58?!0:x<65?!1:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&ft.test(String.fromCharCode(x)):ht(x,At)||ht(x,nt)}var sn={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Ai=new Set(sn.keyword),Tn=new Set(sn.strict),us=new Set(sn.strictBind);function fr(x,g){return g&&x==="await"||x==="enum"}function Yr(x,g){return fr(x,g)||Tn.has(x)}function oi(x){return us.has(x)}function Ti(x,g){return Yr(x,g)||oi(x)}function ki(x){return Ai.has(x)}function Vi(x,g,S){return x===64&&g===64&&Ft(S)}var mo=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Fs(x){return mo.has(x)}var se=class{constructor(x){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=x}},de=class{constructor(x,g){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=x,this.inModule=g}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let x=this.currentThisScopeFlags();return(x&64)>0&&(x&2)===0}get inStaticBlock(){for(let x=this.scopeStack.length-1;;x--){let{flags:g}=this.scopeStack[x];if(g&128)return!0;if(g&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(x){return new se(x)}enter(x){this.scopeStack.push(this.createScope(x))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(x){return!!(x.flags&130||!this.parser.inModule&&x.flags&1)}declareName(x,g,S){let _=this.currentScope();if(g&8||g&16){this.checkRedeclarationInScope(_,x,g,S);let I=_.names.get(x)||0;g&16?I=I|4:(_.firstLexicalName||(_.firstLexicalName=x),I=I|2),_.names.set(x,I),g&8&&this.maybeExportDefined(_,x)}else if(g&4)for(let I=this.scopeStack.length-1;I>=0&&(_=this.scopeStack[I],this.checkRedeclarationInScope(_,x,g,S),_.names.set(x,(_.names.get(x)||0)|1),this.maybeExportDefined(_,x),!(_.flags&387));--I);this.parser.inModule&&_.flags&1&&this.undefinedExports.delete(x)}maybeExportDefined(x,g){this.parser.inModule&&x.flags&1&&this.undefinedExports.delete(g)}checkRedeclarationInScope(x,g,S,_){this.isRedeclaredInScope(x,g,S)&&this.parser.raise(v.VarRedeclaration,_,{identifierName:g})}isRedeclaredInScope(x,g,S){if(!(S&1))return!1;if(S&8)return x.names.has(g);let _=x.names.get(g);return S&16?(_&2)>0||!this.treatFunctionsAsVarInScope(x)&&(_&1)>0:(_&2)>0&&!(x.flags&8&&x.firstLexicalName===g)||!this.treatFunctionsAsVarInScope(x)&&(_&4)>0}checkLocalExport(x){let{name:g}=x;this.scopeStack[0].names.has(g)||this.undefinedExports.set(g,x.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:g}=this.scopeStack[x];if(g&387)return g}}currentThisScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:g}=this.scopeStack[x];if(g&451&&!(g&4))return g}}},ge=class extends se{constructor(...x){super(...x),this.declareFunctions=new Set}},we=class extends de{createScope(x){return new ge(x)}declareName(x,g,S){let _=this.currentScope();if(g&2048){this.checkRedeclarationInScope(_,x,g,S),this.maybeExportDefined(_,x),_.declareFunctions.add(x);return}super.declareName(x,g,S)}isRedeclaredInScope(x,g,S){if(super.isRedeclaredInScope(x,g,S))return!0;if(S&2048&&!x.declareFunctions.has(g)){let _=x.names.get(g);return(_&4)>0||(_&2)>0}return!1}checkLocalExport(x){this.scopeStack[0].declareFunctions.has(x.name)||super.checkLocalExport(x)}},Ve=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(x){if(typeof x=="string")return this.plugins.has(x);{let[g,S]=x;if(!this.hasPlugin(g))return!1;let _=this.plugins.get(g);for(let I of Object.keys(S))if((_==null?void 0:_[I])!==S[I])return!1;return!0}}getPluginOption(x,g){var S;return(S=this.plugins.get(x))==null?void 0:S[g]}};function rt(x,g){x.trailingComments===void 0?x.trailingComments=g:x.trailingComments.unshift(...g)}function ct(x,g){x.leadingComments===void 0?x.leadingComments=g:x.leadingComments.unshift(...g)}function He(x,g){x.innerComments===void 0?x.innerComments=g:x.innerComments.unshift(...g)}function Ge(x,g,S){let _=null,I=g.length;for(;_===null&&I>0;)_=g[--I];_===null||_.start>S.start?He(x,S.comments):rt(_,S.comments)}var Ue=class extends Ve{addComment(x){this.filename&&(x.loc.filename=this.filename);let{commentsLen:g}=this.state;this.comments.length!==g&&(this.comments.length=g),this.comments.push(x),this.state.commentsLen++}processComment(x){let{commentStack:g}=this.state,S=g.length;if(S===0)return;let _=S-1,I=g[_];I.start===x.end&&(I.leadingNode=x,_--);let{start:H}=x;for(;_>=0;_--){let q=g[_],Z=q.end;if(Z>H)q.containingNode=x,this.finalizeComment(q),g.splice(_,1);else{Z===H&&(q.trailingNode=x);break}}}finalizeComment(x){let{comments:g}=x;if(x.leadingNode!==null||x.trailingNode!==null)x.leadingNode!==null&&rt(x.leadingNode,g),x.trailingNode!==null&&ct(x.trailingNode,g);else{let{containingNode:S,start:_}=x;if(this.input.charCodeAt(_-1)===44)switch(S.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Ge(S,S.properties,x);break;case"CallExpression":case"OptionalCallExpression":Ge(S,S.arguments,x);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ge(S,S.params,x);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Ge(S,S.elements,x);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ge(S,S.specifiers,x);break;default:He(S,g)}else He(S,g)}}finalizeRemainingComments(){let{commentStack:x}=this.state;for(let g=x.length-1;g>=0;g--)this.finalizeComment(x[g]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(x){let{commentStack:g}=this.state,{length:S}=g;if(S===0)return;let _=g[S-1];_.leadingNode===x&&(_.leadingNode=null)}resetPreviousIdentifierLeadingComments(x){let{commentStack:g}=this.state,{length:S}=g;S!==0&&(g[S-1].trailingNode===x?g[S-1].trailingNode=null:S>=2&&g[S-2].trailingNode===x&&(g[S-2].trailingNode=null))}takeSurroundingComments(x,g,S){let{commentStack:_}=this.state,I=_.length;if(I===0)return;let H=I-1;for(;H>=0;H--){let q=_[H],Z=q.end;if(q.start===S)q.leadingNode=x;else if(Z===g)q.trailingNode=x;else if(Z0}set strict(g){g?this.flags|=1:this.flags&=-2}init({strictMode:g,sourceType:S,startLine:_,startColumn:I}){this.strict=g===!1?!1:g===!0?!0:S==="module",this.curLine=_,this.lineStart=-I,this.startLoc=this.endLoc=new r(_,I,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(g){g?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(g){g?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(g){g?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(g){g?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(g){g?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(g){g?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(g){g?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(g){g?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(g){g?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(g){g?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(g){g?this.flags|=2048:this.flags&=-2049}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let g=new oj;return g.flags=this.flags,g.curLine=this.curLine,g.lineStart=this.lineStart,g.startLoc=this.startLoc,g.endLoc=this.endLoc,g.errors=this.errors.slice(),g.potentialArrowAt=this.potentialArrowAt,g.noArrowAt=this.noArrowAt.slice(),g.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),g.topicContext=this.topicContext,g.labels=this.labels.slice(),g.commentsLen=this.commentsLen,g.commentStack=this.commentStack.slice(),g.pos=this.pos,g.type=this.type,g.value=this.value,g.start=this.start,g.end=this.end,g.lastTokEndLoc=this.lastTokEndLoc,g.lastTokStartLoc=this.lastTokStartLoc,g.context=this.context.slice(),g.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,g.strictErrors=this.strictErrors,g.tokensLength=this.tokensLength,g}},Ke=function(x){return x>=48&&x<=57},yt={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},qt={bin:x=>x===48||x===49,oct:x=>x>=48&&x<=55,dec:x=>x>=48&&x<=57,hex:x=>x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102};function xr(x,g,S,_,I,H){let q=S,Z=_,ie=I,ne="",Se=null,Be=S,{length:qe}=g;for(;;){if(S>=qe){H.unterminated(q,Z,ie),ne+=g.slice(Be,S);break}let Qe=g.charCodeAt(S);if(Lr(x,Qe,g,S)){ne+=g.slice(Be,S);break}if(Qe===92){ne+=g.slice(Be,S);let sr=Ur(g,S,_,I,x==="template",H);sr.ch===null&&!Se?Se={pos:S,lineStart:_,curLine:I}:ne+=sr.ch,{pos:S,lineStart:_,curLine:I}=sr,Be=S}else Qe===8232||Qe===8233?(++S,++I,_=S):Qe===10||Qe===13?x==="template"?(ne+=g.slice(Be,S)+` -`,++S,Qe===13&&g.charCodeAt(S)===10&&++S,++I,Be=_=S):H.unterminated(q,Z,ie):++S}return{pos:S,str:ne,firstInvalidLoc:Se,lineStart:_,curLine:I,containsInvalid:!!Se}}function Lr(x,g,S,_){return x==="template"?g===96||g===36&&S.charCodeAt(_+1)===123:g===(x==="double"?34:39)}function Ur(x,g,S,_,I,H){let q=!I;g++;let Z=ne=>({pos:g,ch:ne,lineStart:S,curLine:_}),ie=x.charCodeAt(g++);switch(ie){case 110:return Z(` -`);case 114:return Z("\r");case 120:{let ne;return{code:ne,pos:g}=Un(x,g,S,_,2,!1,q,H),Z(ne===null?null:String.fromCharCode(ne))}case 117:{let ne;return{code:ne,pos:g}=Lt(x,g,S,_,q,H),Z(ne===null?null:String.fromCodePoint(ne))}case 116:return Z(" ");case 98:return Z("\b");case 118:return Z("\v");case 102:return Z("\f");case 13:x.charCodeAt(g)===10&&++g;case 10:S=g,++_;case 8232:case 8233:return Z("");case 56:case 57:if(I)return Z(null);H.strictNumericEscape(g-1,S,_);default:if(ie>=48&&ie<=55){let ne=g-1,Se=/^[0-7]+/.exec(x.slice(ne,g+2))[0],Be=parseInt(Se,8);Be>255&&(Se=Se.slice(0,-1),Be=parseInt(Se,8)),g+=Se.length-1;let qe=x.charCodeAt(g);if(Se!=="0"||qe===56||qe===57){if(I)return Z(null);H.strictNumericEscape(ne,S,_)}return Z(String.fromCharCode(Be))}return Z(String.fromCharCode(ie))}}function Un(x,g,S,_,I,H,q,Z){let ie=g,ne;return{n:ne,pos:g}=pr(x,g,S,_,16,I,H,!1,Z,!q),ne===null&&(q?Z.invalidEscapeSequence(ie,S,_):g=ie-1),{code:ne,pos:g}}function pr(x,g,S,_,I,H,q,Z,ie,ne){let Se=g,Be=I===16?yt.hex:yt.decBinOct,qe=I===16?qt.hex:I===10?qt.dec:I===8?qt.oct:qt.bin,Qe=!1,sr=0;for(let un=0,vr=H??1/0;un=97?Gi=Jr-97+10:Jr>=65?Gi=Jr-65+10:Ke(Jr)?Gi=Jr-48:Gi=1/0,Gi>=I){if(Gi<=9&&ne)return{n:null,pos:g};if(Gi<=9&&ie.invalidDigit(g,S,_,I))Gi=0;else if(q)Gi=0,Qe=!0;else break}++g,sr=sr*I+Gi}return g===Se||H!=null&&g-Se!==H||Qe?{n:null,pos:g}:{n:sr,pos:g}}function Lt(x,g,S,_,I,H){let q=x.charCodeAt(g),Z;if(q===123){if(++g,{code:Z,pos:g}=Un(x,g,S,_,x.indexOf("}",g)-g,!0,I,H),++g,Z!==null&&Z>1114111)if(I)H.invalidCodePoint(g,S,_);else return{code:null,pos:g}}else({code:Z,pos:g}=Un(x,g,S,_,4,!1,I,H));return{code:Z,pos:g}}function Qt(x,g,S){return new r(S,x-g,x)}var kn=new Set([103,109,115,105,121,117,100,118]),Wn=class{constructor(x){this.type=x.type,this.value=x.value,this.start=x.start,this.end=x.end,this.loc=new n(x.startLoc,x.endLoc)}},Pr=class extends Ue{constructor(x,g){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(S,_,I,H)=>this.options.errorRecovery?(this.raise(v.InvalidDigit,Qt(S,_,I),{radix:H}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(S,_,I)=>{this.recordStrictModeErrors(v.StrictNumericEscape,Qt(S,_,I))},unterminated:(S,_,I)=>{throw this.raise(v.UnterminatedString,Qt(S-1,_,I))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(S,_,I)=>{throw this.raise(v.UnterminatedTemplate,Qt(S,_,I))}}),this.state=new Pe,this.state.init(x),this.input=g,this.length=g.length,this.comments=[],this.isLookahead=!1}pushToken(x){this.tokens.length=this.state.tokensLength,this.tokens.push(x),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Wn(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(x){return this.match(x)?(this.next(),!0):!1}match(x){return this.state.type===x}createLookaheadState(x){return{pos:x.pos,value:null,type:x.type,start:x.start,end:x.end,context:[this.curContext()],inType:x.inType,startLoc:x.startLoc,lastTokEndLoc:x.lastTokEndLoc,curLine:x.curLine,lineStart:x.lineStart,curPosition:x.curPosition}}lookahead(){let x=this.state;this.state=this.createLookaheadState(x),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let g=this.state;return this.state=x,g}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(x){return Gt.lastIndex=x,Gt.test(this.input)?Gt.lastIndex:x}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(x){return Ut.lastIndex=x,Ut.test(this.input)?Ut.lastIndex:x}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(x){let g=this.input.charCodeAt(x);if((g&64512)===55296&&++xthis.raise(g,S)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(x){let g;this.isLookahead||(g=this.state.curPosition());let S=this.state.pos,_=this.input.indexOf(x,S+2);if(_===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=_+x.length,xt.lastIndex=S+2;xt.test(this.input)&&xt.lastIndex<=_;)++this.state.curLine,this.state.lineStart=xt.lastIndex;if(this.isLookahead)return;let I={type:"CommentBlock",value:this.input.slice(S+2,_),start:S,end:_+x.length,loc:new n(g,this.state.curPosition())};return this.options.tokens&&this.pushToken(I),I}skipLineComment(x){let g=this.state.pos,S;this.isLookahead||(S=this.state.curPosition());let _=this.input.charCodeAt(this.state.pos+=x);if(this.state.posx)){let I=this.skipLineComment(3);I!==void 0&&(this.addComment(I),this.options.attachComment&&g.push(I))}else break e}else if(S===60&&!this.inModule&&this.options.annexB){let _=this.state.pos;if(this.input.charCodeAt(_+1)===33&&this.input.charCodeAt(_+2)===45&&this.input.charCodeAt(_+3)===45){let I=this.skipLineComment(4);I!==void 0&&(this.addComment(I),this.options.attachComment&&g.push(I))}else break e}else break e}}if(g.length>0){let S=this.state.pos,_={start:x,end:S,comments:g,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(_)}}finishToken(x,g){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let S=this.state.type;this.state.type=x,this.state.value=g,this.isLookahead||this.updateContext(S)}replaceToken(x){this.state.type=x,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let x=this.state.pos+1,g=this.codePointAtPos(x);if(g>=48&&g<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(g===123||g===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(g===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,g===123?this.finishToken(7):this.finishToken(1)}else Ft(g)?(++this.state.pos,this.finishToken(138,this.readWord1(g))):g===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let x=this.input.charCodeAt(this.state.pos+1);if(x>=48&&x<=57){this.readNumber(!0);return}x===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let x=this.input.charCodeAt(this.state.pos+1);if(x!==33)return!1;let g=this.state.pos;for(this.state.pos+=1;!St(x)&&++this.state.pos=48&&g<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(x){switch(x){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let g=this.input.charCodeAt(this.state.pos+1);if(g===120||g===88){this.readRadixNumber(16);return}if(g===111||g===79){this.readRadixNumber(8);return}if(g===98||g===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(x);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(x);return;case 124:case 38:this.readToken_pipe_amp(x);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(x);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(x);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Ft(x)){this.readWord(x);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(x)})}finishOp(x,g){let S=this.input.slice(this.state.pos,this.state.pos+g);this.state.pos+=g,this.finishToken(x,S)}readRegexp(){let x=this.state.startLoc,g=this.state.start+1,S,_,{pos:I}=this.state;for(;;++I){if(I>=this.length)throw this.raise(v.UnterminatedRegExp,i(x,1));let ie=this.input.charCodeAt(I);if(St(ie))throw this.raise(v.UnterminatedRegExp,i(x,1));if(S)S=!1;else{if(ie===91)_=!0;else if(ie===93&&_)_=!1;else if(ie===47&&!_)break;S=ie===92}}let H=this.input.slice(g,I);++I;let q="",Z=()=>i(x,I+2-g);for(;I=2&&this.input.charCodeAt(g)===48;if(ie){let qe=this.input.slice(g,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,S),!this.state.strict){let Qe=qe.indexOf("_");Qe>0&&this.raise(v.ZeroDigitNumericSeparator,i(S,Qe))}Z=ie&&!/[89]/.test(qe)}let ne=this.input.charCodeAt(this.state.pos);if(ne===46&&!Z&&(++this.state.pos,this.readInt(10),_=!0,ne=this.input.charCodeAt(this.state.pos)),(ne===69||ne===101)&&!Z&&(ne=this.input.charCodeAt(++this.state.pos),(ne===43||ne===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,S),_=!0,q=!0,ne=this.input.charCodeAt(this.state.pos)),ne===110&&((_||ie)&&this.raise(v.InvalidBigIntLiteral,S),++this.state.pos,I=!0),ne===109&&(this.expectPlugin("decimal",this.state.curPosition()),(q||ie)&&this.raise(v.InvalidDecimal,S),++this.state.pos,H=!0),Ft(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());let Se=this.input.slice(g,this.state.pos).replace(/[_mn]/g,"");if(I){this.finishToken(135,Se);return}if(H){this.finishToken(136,Se);return}let Be=Z?parseInt(Se,8):parseFloat(Se);this.finishToken(134,Be)}readCodePoint(x){let{code:g,pos:S}=Lt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,x,this.errorHandlers_readCodePoint);return this.state.pos=S,g}readString(x){let{str:g,pos:S,curLine:_,lineStart:I}=xr(x===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=S+1,this.state.lineStart=I,this.state.curLine=_,this.finishToken(133,g)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let x=this.input[this.state.pos],{str:g,firstInvalidLoc:S,pos:_,curLine:I,lineStart:H}=xr("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=_+1,this.state.lineStart=H,this.state.curLine=I,S&&(this.state.firstInvalidTemplateEscapePos=new r(S.curLine,S.pos-S.lineStart,S.pos)),this.input.codePointAt(_)===96?this.finishToken(24,S?null:x+g+"`"):(this.state.pos++,this.finishToken(25,S?null:x+g+"${"))}recordStrictModeErrors(x,g){let S=g.index;this.state.strict&&!this.state.strictErrors.has(S)?this.raise(x,g):this.state.strictErrors.set(S,[x,g])}readWord1(x){this.state.containsEsc=!1;let g="",S=this.state.pos,_=this.state.pos;for(x!==void 0&&(this.state.pos+=x<=65535?1:2);this.state.pos=0;q--){let Z=H[q];if(Z.loc.index===I)return H[q]=x(_,S);if(Z.loc.indexthis.hasPlugin(g)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:x})}errorBuilder(x){return(g,S,_)=>{this.raise(x,Qt(g,S,_))}}},yo=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Vc=class{constructor(x){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=x}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new yo)}exit(){let x=this.stack.pop(),g=this.current();for(let[S,_]of Array.from(x.undefinedPrivateNames))g?g.undefinedPrivateNames.has(S)||g.undefinedPrivateNames.set(S,_):this.parser.raise(v.InvalidPrivateFieldResolution,_,{identifierName:S})}declarePrivateName(x,g,S){let{privateNames:_,loneAccessors:I,undefinedPrivateNames:H}=this.current(),q=_.has(x);if(g&3){let Z=q&&I.get(x);if(Z){let ie=Z&4,ne=g&4,Se=Z&3,Be=g&3;q=Se===Be||ie!==ne,q||I.delete(x)}else q||I.set(x,g)}q&&this.parser.raise(v.PrivateNameRedeclaration,S,{identifierName:x}),_.add(x),H.delete(x)}usePrivateName(x,g){let S;for(S of this.stack)if(S.privateNames.has(x))return;S?S.undefinedPrivateNames.set(x,g):this.parser.raise(v.InvalidPrivateFieldResolution,g,{identifierName:x})}},Ba=class{constructor(x=0){this.type=x}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},hm=class extends Ba{constructor(x){super(x),this.declarationErrors=new Map}recordDeclarationError(x,g){let S=g.index;this.declarationErrors.set(S,[x,g])}clearDeclarationError(x){this.declarationErrors.delete(x)}iterateErrors(x){this.declarationErrors.forEach(x)}},Gc=class{constructor(x){this.parser=void 0,this.stack=[new Ba],this.parser=x}enter(x){this.stack.push(x)}exit(){this.stack.pop()}recordParameterInitializerError(x,g){let S=g.loc.start,{stack:_}=this,I=_.length-1,H=_[I];for(;!H.isCertainlyParameterDeclaration();){if(H.canBeArrowParameterDeclaration())H.recordDeclarationError(x,S);else return;H=_[--I]}this.parser.raise(x,S)}recordArrowParameterBindingError(x,g){let{stack:S}=this,_=S[S.length-1],I=g.loc.start;if(_.isCertainlyParameterDeclaration())this.parser.raise(x,I);else if(_.canBeArrowParameterDeclaration())_.recordDeclarationError(x,I);else return}recordAsyncArrowParametersError(x){let{stack:g}=this,S=g.length-1,_=g[S];for(;_.canBeArrowParameterDeclaration();)_.type===2&&_.recordDeclarationError(v.AwaitBindingIdentifier,x),_=g[--S]}validateAsPattern(){let{stack:x}=this,g=x[x.length-1];g.canBeArrowParameterDeclaration()&&g.iterateErrors(([S,_])=>{this.parser.raise(S,_);let I=x.length-2,H=x[I];for(;H.canBeArrowParameterDeclaration();)H.clearDeclarationError(_.index),H=x[--I]})}};function q1(){return new Ba(3)}function uu(){return new hm(1)}function dm(){return new hm(2)}function ff(){return new Ba}var K1=class{constructor(){this.stacks=[]}enter(x){this.stacks.push(x)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function qc(x,g){return(x?2:0)|(g?1:0)}var J1=class extends Pr{addExtra(x,g,S,_=!0){if(!x)return;let I=x.extra=x.extra||{};_?I[g]=S:Object.defineProperty(I,g,{enumerable:_,value:S})}isContextual(x){return this.state.type===x&&!this.state.containsEsc}isUnparsedContextual(x,g){let S=x+g.length;if(this.input.slice(x,S)===g){let _=this.input.charCodeAt(S);return!(rr(_)||(_&64512)===55296)}return!1}isLookaheadContextual(x){let g=this.nextTokenStart();return this.isUnparsedContextual(g,x)}eatContextual(x){return this.isContextual(x)?(this.next(),!0):!1}expectContextual(x,g){if(!this.eatContextual(x)){if(g!=null)throw this.raise(g,this.state.startLoc);this.unexpected(null,x)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return it.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Ne.lastIndex=this.state.end,Ne.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(x=!0){(x?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(x,g){this.eat(x)||this.unexpected(g,x)}tryParse(x,g=this.state.clone()){let S={node:null};try{let _=x((I=null)=>{throw S.node=I,S});if(this.state.errors.length>g.errors.length){let I=this.state;return this.state=g,this.state.tokensLength=I.tokensLength,{node:_,error:I.errors[g.errors.length],thrown:!1,aborted:!1,failState:I}}return{node:_,error:null,thrown:!1,aborted:!1,failState:null}}catch(_){let I=this.state;if(this.state=g,_ instanceof SyntaxError)return{node:null,error:_,thrown:!0,aborted:!1,failState:I};if(_===S)return{node:S.node,error:null,thrown:!1,aborted:!0,failState:I};throw _}}checkExpressionErrors(x,g){if(!x)return!1;let{shorthandAssignLoc:S,doubleProtoLoc:_,privateKeyLoc:I,optionalParametersLoc:H}=x,q=!!S||!!_||!!H||!!I;if(!g)return q;S!=null&&this.raise(v.InvalidCoverInitializedName,S),_!=null&&this.raise(v.DuplicateProto,_),I!=null&&this.raise(v.UnexpectedPrivateField,I),H!=null&&this.unexpected(H)}isLiteralPropertyName(){return Re(this.state.type)}isPrivateName(x){return x.type==="PrivateName"}getPrivateNameSV(x){return x.id.name}hasPropertyAsPrivateName(x){return(x.type==="MemberExpression"||x.type==="OptionalMemberExpression")&&this.isPrivateName(x.property)}isObjectProperty(x){return x.type==="ObjectProperty"}isObjectMethod(x){return x.type==="ObjectMethod"}initializeScopes(x=this.options.sourceType==="module"){let g=this.state.labels;this.state.labels=[];let S=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let _=this.inModule;this.inModule=x;let I=this.scope,H=this.getScopeHandler();this.scope=new H(this,x);let q=this.prodParam;this.prodParam=new K1;let Z=this.classScope;this.classScope=new Vc(this);let ie=this.expressionScope;return this.expressionScope=new Gc(this),()=>{this.state.labels=g,this.exportedIdentifiers=S,this.inModule=_,this.scope=I,this.prodParam=q,this.classScope=Z,this.expressionScope=ie}}enterInitialScopes(){let x=0;this.inModule&&(x|=2),this.scope.enter(1),this.prodParam.enter(x)}checkDestructuringPrivate(x){let{privateKeyLoc:g}=x;g!==null&&this.expectPlugin("destructuringPrivate",g)}},Kc=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},cu=class{constructor(x,g,S){this.type="",this.start=g,this.end=0,this.loc=new n(S),x!=null&&x.options.ranges&&(this.range=[g,0]),x!=null&&x.filename&&(this.loc.filename=x.filename)}},pf=cu.prototype;pf.__clone=function(){let x=new cu(void 0,this.start,this.loc.start),g=Object.keys(this);for(let S=0,_=g.length;S<_;S++){let I=g[S];I!=="leadingComments"&&I!=="trailingComments"&&I!=="innerComments"&&(x[I]=this[I])}return x};function X1(x){return cs(x)}function cs(x){let{type:g,start:S,end:_,loc:I,range:H,extra:q,name:Z}=x,ie=Object.create(pf);return ie.type=g,ie.start=S,ie.end=_,ie.loc=I,ie.range=H,ie.extra=q,ie.name=Z,g==="Placeholder"&&(ie.expectedNode=x.expectedNode),ie}function Jc(x){let{type:g,start:S,end:_,loc:I,range:H,extra:q}=x;if(g==="Placeholder")return X1(x);let Z=Object.create(pf);return Z.type=g,Z.start=S,Z.end=_,Z.loc=I,Z.range=H,x.raw!==void 0?Z.raw=x.raw:Z.extra=q,Z.value=x.value,Z}var ja=class extends J1{startNode(){let x=this.state.startLoc;return new cu(this,x.index,x)}startNodeAt(x){return new cu(this,x.index,x)}startNodeAtNode(x){return this.startNodeAt(x.loc.start)}finishNode(x,g){return this.finishNodeAt(x,g,this.state.lastTokEndLoc)}finishNodeAt(x,g,S){return x.type=g,x.end=S.index,x.loc.end=S,this.options.ranges&&(x.range[1]=S.index),this.options.attachComment&&this.processComment(x),x}resetStartLocation(x,g){x.start=g.index,x.loc.start=g,this.options.ranges&&(x.range[0]=g.index)}resetEndLocation(x,g=this.state.lastTokEndLoc){x.end=g.index,x.loc.end=g,this.options.ranges&&(x.range[1]=g.index)}resetStartLocationFromNode(x,g){this.resetStartLocation(x,g.loc.start)}},Y1=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),lt=b`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:x})=>`Cannot overwrite reserved type ${x}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:x,enumName:g})=>`Boolean enum members need to be initialized. Use either \`${x} = true,\` or \`${x} = false,\` in enum \`${g}\`.`,EnumDuplicateMemberName:({memberName:x,enumName:g})=>`Enum member names need to be unique, but the name \`${x}\` has already been used before in enum \`${g}\`.`,EnumInconsistentMemberValues:({enumName:x})=>`Enum \`${x}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:x,enumName:g})=>`Enum type \`${x}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${g}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:x})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${x}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:x,memberName:g,explicitType:S})=>`Enum \`${x}\` has type \`${S}\`, so the initializer of \`${g}\` needs to be a ${S} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:x,memberName:g})=>`Symbol enum members cannot be initialized. Use \`${g},\` in enum \`${x}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:x,memberName:g})=>`The enum member initializer for \`${g}\` needs to be a literal (either a boolean, number, or string) in enum \`${x}\`.`,EnumInvalidMemberName:({enumName:x,memberName:g,suggestion:S})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${g}\`, consider using \`${S}\`, in enum \`${x}\`.`,EnumNumberMemberNotInitialized:({enumName:x,memberName:g})=>`Number enum members need to be initialized, e.g. \`${g} = 1\` in enum \`${x}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:x})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${x}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:x})=>`Unexpected reserved type ${x}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:x,suggestion:g})=>`\`declare export ${x}\` is not supported. Use \`${g}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function vo(x){return x.type==="DeclareExportAllDeclaration"||x.type==="DeclareExportDeclaration"&&(!x.declaration||x.declaration.type!=="TypeAlias"&&x.declaration.type!=="InterfaceDeclaration")}function fm(x){return x.importKind==="type"||x.importKind==="typeof"}var Q1={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Z1(x,g){let S=[],_=[];for(let I=0;Iclass extends x{constructor(...g){super(...g),this.flowPragma=void 0}getScopeHandler(){return we}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(g,S){g!==133&&g!==13&&g!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(g,S)}addComment(g){if(this.flowPragma===void 0){let S=ex.exec(g.value);if(S)if(S[1]==="flow")this.flowPragma="flow";else if(S[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(g)}flowParseTypeInitialiser(g){let S=this.state.inType;this.state.inType=!0,this.expect(g||14);let _=this.flowParseType();return this.state.inType=S,_}flowParsePredicate(){let g=this.startNode(),S=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>S.index+1&&this.raise(lt.UnexpectedSpaceBetweenModuloChecks,S),this.eat(10)?(g.value=super.parseExpression(),this.expect(11),this.finishNode(g,"DeclaredPredicate")):this.finishNode(g,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let g=this.state.inType;this.state.inType=!0,this.expect(14);let S=null,_=null;return this.match(54)?(this.state.inType=g,_=this.flowParsePredicate()):(S=this.flowParseType(),this.state.inType=g,this.match(54)&&(_=this.flowParsePredicate())),[S,_]}flowParseDeclareClass(g){return this.next(),this.flowParseInterfaceish(g,!0),this.finishNode(g,"DeclareClass")}flowParseDeclareFunction(g){this.next();let S=g.id=this.parseIdentifier(),_=this.startNode(),I=this.startNode();this.match(47)?_.typeParameters=this.flowParseTypeParameterDeclaration():_.typeParameters=null,this.expect(10);let H=this.flowParseFunctionTypeParams();return _.params=H.params,_.rest=H.rest,_.this=H._this,this.expect(11),[_.returnType,g.predicate]=this.flowParseTypeAndPredicateInitialiser(),I.typeAnnotation=this.finishNode(_,"FunctionTypeAnnotation"),S.typeAnnotation=this.finishNode(I,"TypeAnnotation"),this.resetEndLocation(S),this.semicolon(),this.scope.declareName(g.id.name,2048,g.id.loc.start),this.finishNode(g,"DeclareFunction")}flowParseDeclare(g,S){if(this.match(80))return this.flowParseDeclareClass(g);if(this.match(68))return this.flowParseDeclareFunction(g);if(this.match(74))return this.flowParseDeclareVariable(g);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(g):(S&&this.raise(lt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(g));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(g);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(g);if(this.isContextual(129))return this.flowParseDeclareInterface(g);if(this.match(82))return this.flowParseDeclareExportDeclaration(g,S);this.unexpected()}flowParseDeclareVariable(g){return this.next(),g.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(g.id.name,5,g.id.loc.start),this.semicolon(),this.finishNode(g,"DeclareVariable")}flowParseDeclareModule(g){this.scope.enter(0),this.match(133)?g.id=super.parseExprAtom():g.id=this.parseIdentifier();let S=g.body=this.startNode(),_=S.body=[];for(this.expect(5);!this.match(8);){let q=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(lt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(q)):(this.expectContextual(125,lt.UnsupportedStatementInDeclareModule),q=this.flowParseDeclare(q,!0)),_.push(q)}this.scope.exit(),this.expect(8),this.finishNode(S,"BlockStatement");let I=null,H=!1;return _.forEach(q=>{vo(q)?(I==="CommonJS"&&this.raise(lt.AmbiguousDeclareModuleKind,q),I="ES"):q.type==="DeclareModuleExports"&&(H&&this.raise(lt.DuplicateDeclareModuleExports,q),I==="ES"&&this.raise(lt.AmbiguousDeclareModuleKind,q),I="CommonJS",H=!0)}),g.kind=I||"CommonJS",this.finishNode(g,"DeclareModule")}flowParseDeclareExportDeclaration(g,S){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?g.declaration=this.flowParseDeclare(this.startNode()):(g.declaration=this.flowParseType(),this.semicolon()),g.default=!0,this.finishNode(g,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!S){let _=this.state.value;throw this.raise(lt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:_,suggestion:Q1[_]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return g.declaration=this.flowParseDeclare(this.startNode()),g.default=!1,this.finishNode(g,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return g=this.parseExport(g,null),g.type==="ExportNamedDeclaration"&&(g.type="ExportDeclaration",g.default=!1,delete g.exportKind),g.type="Declare"+g.type,g;this.unexpected()}flowParseDeclareModuleExports(g){return this.next(),this.expectContextual(111),g.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(g,"DeclareModuleExports")}flowParseDeclareTypeAlias(g){this.next();let S=this.flowParseTypeAlias(g);return S.type="DeclareTypeAlias",S}flowParseDeclareOpaqueType(g){this.next();let S=this.flowParseOpaqueType(g,!0);return S.type="DeclareOpaqueType",S}flowParseDeclareInterface(g){return this.next(),this.flowParseInterfaceish(g,!1),this.finishNode(g,"DeclareInterface")}flowParseInterfaceish(g,S){if(g.id=this.flowParseRestrictedIdentifier(!S,!0),this.scope.declareName(g.id.name,S?17:8201,g.id.loc.start),this.match(47)?g.typeParameters=this.flowParseTypeParameterDeclaration():g.typeParameters=null,g.extends=[],this.eat(81))do g.extends.push(this.flowParseInterfaceExtends());while(!S&&this.eat(12));if(S){if(g.implements=[],g.mixins=[],this.eatContextual(117))do g.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do g.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}g.body=this.flowParseObjectType({allowStatic:S,allowExact:!1,allowSpread:!1,allowProto:S,allowInexact:!1})}flowParseInterfaceExtends(){let g=this.startNode();return g.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?g.typeParameters=this.flowParseTypeParameterInstantiation():g.typeParameters=null,this.finishNode(g,"InterfaceExtends")}flowParseInterface(g){return this.flowParseInterfaceish(g,!1),this.finishNode(g,"InterfaceDeclaration")}checkNotUnderscore(g){g==="_"&&this.raise(lt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(g,S,_){Y1.has(g)&&this.raise(_?lt.AssignReservedType:lt.UnexpectedReservedType,S,{reservedType:g})}flowParseRestrictedIdentifier(g,S){return this.checkReservedType(this.state.value,this.state.startLoc,S),this.parseIdentifier(g)}flowParseTypeAlias(g){return g.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(g.id.name,8201,g.id.loc.start),this.match(47)?g.typeParameters=this.flowParseTypeParameterDeclaration():g.typeParameters=null,g.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(g,"TypeAlias")}flowParseOpaqueType(g,S){return this.expectContextual(130),g.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(g.id.name,8201,g.id.loc.start),this.match(47)?g.typeParameters=this.flowParseTypeParameterDeclaration():g.typeParameters=null,g.supertype=null,this.match(14)&&(g.supertype=this.flowParseTypeInitialiser(14)),g.impltype=null,S||(g.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(g,"OpaqueType")}flowParseTypeParameter(g=!1){let S=this.state.startLoc,_=this.startNode(),I=this.flowParseVariance(),H=this.flowParseTypeAnnotatableIdentifier();return _.name=H.name,_.variance=I,_.bound=H.typeAnnotation,this.match(29)?(this.eat(29),_.default=this.flowParseType()):g&&this.raise(lt.MissingTypeParamDefault,S),this.finishNode(_,"TypeParameter")}flowParseTypeParameterDeclaration(){let g=this.state.inType,S=this.startNode();S.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let _=!1;do{let I=this.flowParseTypeParameter(_);S.params.push(I),I.default&&(_=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=g,this.finishNode(S,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let g=this.startNode(),S=this.state.inType;g.params=[],this.state.inType=!0,this.expect(47);let _=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)g.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=_,this.expect(48),this.state.inType=S,this.finishNode(g,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let g=this.startNode(),S=this.state.inType;for(g.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)g.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=S,this.finishNode(g,"TypeParameterInstantiation")}flowParseInterfaceType(){let g=this.startNode();if(this.expectContextual(129),g.extends=[],this.eat(81))do g.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return g.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(g,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(g,S,_){return g.static=S,this.lookahead().type===14?(g.id=this.flowParseObjectPropertyKey(),g.key=this.flowParseTypeInitialiser()):(g.id=null,g.key=this.flowParseType()),this.expect(3),g.value=this.flowParseTypeInitialiser(),g.variance=_,this.finishNode(g,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(g,S){return g.static=S,g.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(g.method=!0,g.optional=!1,g.value=this.flowParseObjectTypeMethodish(this.startNodeAt(g.loc.start))):(g.method=!1,this.eat(17)&&(g.optional=!0),g.value=this.flowParseTypeInitialiser()),this.finishNode(g,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(g){for(g.params=[],g.rest=null,g.typeParameters=null,g.this=null,this.match(47)&&(g.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(g.this=this.flowParseFunctionTypeParam(!0),g.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)g.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(g.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),g.returnType=this.flowParseTypeInitialiser(),this.finishNode(g,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(g,S){let _=this.startNode();return g.static=S,g.value=this.flowParseObjectTypeMethodish(_),this.finishNode(g,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:g,allowExact:S,allowSpread:_,allowProto:I,allowInexact:H}){let q=this.state.inType;this.state.inType=!0;let Z=this.startNode();Z.callProperties=[],Z.properties=[],Z.indexers=[],Z.internalSlots=[];let ie,ne,Se=!1;for(S&&this.match(6)?(this.expect(6),ie=9,ne=!0):(this.expect(5),ie=8,ne=!1),Z.exact=ne;!this.match(ie);){let qe=!1,Qe=null,sr=null,un=this.startNode();if(I&&this.isContextual(118)){let Jr=this.lookahead();Jr.type!==14&&Jr.type!==17&&(this.next(),Qe=this.state.startLoc,g=!1)}if(g&&this.isContextual(106)){let Jr=this.lookahead();Jr.type!==14&&Jr.type!==17&&(this.next(),qe=!0)}let vr=this.flowParseVariance();if(this.eat(0))Qe!=null&&this.unexpected(Qe),this.eat(0)?(vr&&this.unexpected(vr.loc.start),Z.internalSlots.push(this.flowParseObjectTypeInternalSlot(un,qe))):Z.indexers.push(this.flowParseObjectTypeIndexer(un,qe,vr));else if(this.match(10)||this.match(47))Qe!=null&&this.unexpected(Qe),vr&&this.unexpected(vr.loc.start),Z.callProperties.push(this.flowParseObjectTypeCallProperty(un,qe));else{let Jr="init";if(this.isContextual(99)||this.isContextual(104)){let ox=this.lookahead();Re(ox.type)&&(Jr=this.state.value,this.next())}let Gi=this.flowParseObjectTypeProperty(un,qe,Qe,vr,Jr,_,H??!ne);Gi===null?(Se=!0,sr=this.state.lastTokStartLoc):Z.properties.push(Gi)}this.flowObjectTypeSemicolon(),sr&&!this.match(8)&&!this.match(9)&&this.raise(lt.UnexpectedExplicitInexactInObject,sr)}this.expect(ie),_&&(Z.inexact=Se);let Be=this.finishNode(Z,"ObjectTypeAnnotation");return this.state.inType=q,Be}flowParseObjectTypeProperty(g,S,_,I,H,q,Z){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(q?Z||this.raise(lt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(lt.InexactInsideNonObject,this.state.lastTokStartLoc),I&&this.raise(lt.InexactVariance,I),null):(q||this.raise(lt.UnexpectedSpreadType,this.state.lastTokStartLoc),_!=null&&this.unexpected(_),I&&this.raise(lt.SpreadVariance,I),g.argument=this.flowParseType(),this.finishNode(g,"ObjectTypeSpreadProperty"));{g.key=this.flowParseObjectPropertyKey(),g.static=S,g.proto=_!=null,g.kind=H;let ie=!1;return this.match(47)||this.match(10)?(g.method=!0,_!=null&&this.unexpected(_),I&&this.unexpected(I.loc.start),g.value=this.flowParseObjectTypeMethodish(this.startNodeAt(g.loc.start)),(H==="get"||H==="set")&&this.flowCheckGetterSetterParams(g),!q&&g.key.name==="constructor"&&g.value.this&&this.raise(lt.ThisParamBannedInConstructor,g.value.this)):(H!=="init"&&this.unexpected(),g.method=!1,this.eat(17)&&(ie=!0),g.value=this.flowParseTypeInitialiser(),g.variance=I),g.optional=ie,this.finishNode(g,"ObjectTypeProperty")}}flowCheckGetterSetterParams(g){let S=g.kind==="get"?0:1,_=g.value.params.length+(g.value.rest?1:0);g.value.this&&this.raise(g.kind==="get"?lt.GetterMayNotHaveThisParam:lt.SetterMayNotHaveThisParam,g.value.this),_!==S&&this.raise(g.kind==="get"?v.BadGetterArity:v.BadSetterArity,g),g.kind==="set"&&g.value.rest&&this.raise(v.BadSetterRestParameter,g)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(g,S){g!=null||(g=this.state.startLoc);let _=S||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let I=this.startNodeAt(g);I.qualification=_,I.id=this.flowParseRestrictedIdentifier(!0),_=this.finishNode(I,"QualifiedTypeIdentifier")}return _}flowParseGenericType(g,S){let _=this.startNodeAt(g);return _.typeParameters=null,_.id=this.flowParseQualifiedTypeIdentifier(g,S),this.match(47)&&(_.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(_,"GenericTypeAnnotation")}flowParseTypeofType(){let g=this.startNode();return this.expect(87),g.argument=this.flowParsePrimaryType(),this.finishNode(g,"TypeofTypeAnnotation")}flowParseTupleType(){let g=this.startNode();for(g.types=[],this.expect(0);this.state.possuper.parseFunctionBody(g,!0,_));return}super.parseFunctionBody(g,!1,_)}parseFunctionBodyAndFinish(g,S,_=!1){if(this.match(14)){let I=this.startNode();[I.typeAnnotation,g.predicate]=this.flowParseTypeAndPredicateInitialiser(),g.returnType=I.typeAnnotation?this.finishNode(I,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(g,S,_)}parseStatementLike(g){if(this.state.strict&&this.isContextual(129)){let _=this.lookahead();if(ke(_.type)){let I=this.startNode();return this.next(),this.flowParseInterface(I)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let _=this.startNode();return this.next(),this.flowParseEnumDeclaration(_)}let S=super.parseStatementLike(g);return this.flowPragma===void 0&&!this.isValidDirective(S)&&(this.flowPragma=null),S}parseExpressionStatement(g,S,_){if(S.type==="Identifier"){if(S.name==="declare"){if(this.match(80)||ce(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(g)}else if(ce(this.state.type)){if(S.name==="interface")return this.flowParseInterface(g);if(S.name==="type")return this.flowParseTypeAlias(g);if(S.name==="opaque")return this.flowParseOpaqueType(g,!1)}}return super.parseExpressionStatement(g,S,_)}shouldParseExportDeclaration(){let{type:g}=this.state;return ye(g)||this.shouldParseEnums()&&g===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:g}=this.state;return ye(g)||this.shouldParseEnums()&&g===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let g=this.startNode();return this.next(),this.flowParseEnumDeclaration(g)}return super.parseExportDefaultExpression()}parseConditional(g,S,_){if(!this.match(17))return g;if(this.state.maybeInArrowParameters){let Be=this.lookaheadCharCode();if(Be===44||Be===61||Be===58||Be===41)return this.setOptionalParametersError(_),g}this.expect(17);let I=this.state.clone(),H=this.state.noArrowAt,q=this.startNodeAt(S),{consequent:Z,failed:ie}=this.tryParseConditionalConsequent(),[ne,Se]=this.getArrowLikeExpressions(Z);if(ie||Se.length>0){let Be=[...H];if(Se.length>0){this.state=I,this.state.noArrowAt=Be;for(let qe=0;qe1&&this.raise(lt.AmbiguousConditionalArrow,I.startLoc),ie&&ne.length===1&&(this.state=I,Be.push(ne[0].start),this.state.noArrowAt=Be,{consequent:Z,failed:ie}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(Z,!0),this.state.noArrowAt=H,this.expect(14),q.test=g,q.consequent=Z,q.alternate=this.forwardNoArrowParamsConversionAt(q,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(q,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let g=this.parseMaybeAssignAllowIn(),S=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:g,failed:S}}getArrowLikeExpressions(g,S){let _=[g],I=[];for(;_.length!==0;){let H=_.pop();H.type==="ArrowFunctionExpression"&&H.body.type!=="BlockStatement"?(H.typeParameters||!H.returnType?this.finishArrowValidation(H):I.push(H),_.push(H.body)):H.type==="ConditionalExpression"&&(_.push(H.consequent),_.push(H.alternate))}return S?(I.forEach(H=>this.finishArrowValidation(H)),[I,[]]):Z1(I,H=>H.params.every(q=>this.isAssignable(q,!0)))}finishArrowValidation(g){var S;this.toAssignableList(g.params,(S=g.extra)==null?void 0:S.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(g,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(g,S){let _;return this.state.noArrowParamsConversionAt.includes(g.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),_=S(),this.state.noArrowParamsConversionAt.pop()):_=S(),_}parseParenItem(g,S){let _=super.parseParenItem(g,S);if(this.eat(17)&&(_.optional=!0,this.resetEndLocation(g)),this.match(14)){let I=this.startNodeAt(S);return I.expression=_,I.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(I,"TypeCastExpression")}return _}assertModuleNodeAllowed(g){g.type==="ImportDeclaration"&&(g.importKind==="type"||g.importKind==="typeof")||g.type==="ExportNamedDeclaration"&&g.exportKind==="type"||g.type==="ExportAllDeclaration"&&g.exportKind==="type"||super.assertModuleNodeAllowed(g)}parseExportDeclaration(g){if(this.isContextual(130)){g.exportKind="type";let S=this.startNode();return this.next(),this.match(5)?(g.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(g),null):this.flowParseTypeAlias(S)}else if(this.isContextual(131)){g.exportKind="type";let S=this.startNode();return this.next(),this.flowParseOpaqueType(S,!1)}else if(this.isContextual(129)){g.exportKind="type";let S=this.startNode();return this.next(),this.flowParseInterface(S)}else if(this.shouldParseEnums()&&this.isContextual(126)){g.exportKind="value";let S=this.startNode();return this.next(),this.flowParseEnumDeclaration(S)}else return super.parseExportDeclaration(g)}eatExportStar(g){return super.eatExportStar(g)?!0:this.isContextual(130)&&this.lookahead().type===55?(g.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(g){let{startLoc:S}=this.state,_=super.maybeParseExportNamespaceSpecifier(g);return _&&g.exportKind==="type"&&this.unexpected(S),_}parseClassId(g,S,_){super.parseClassId(g,S,_),this.match(47)&&(g.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(g,S,_){let{startLoc:I}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(g,S))return;S.declare=!0}super.parseClassMember(g,S,_),S.declare&&(S.type!=="ClassProperty"&&S.type!=="ClassPrivateProperty"&&S.type!=="PropertyDefinition"?this.raise(lt.DeclareClassElement,I):S.value&&this.raise(lt.DeclareClassFieldInitializer,S.value))}isIterator(g){return g==="iterator"||g==="asyncIterator"}readIterator(){let g=super.readWord1(),S="@@"+g;(!this.isIterator(g)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:S}),this.finishToken(132,S)}getTokenFromCode(g){let S=this.input.charCodeAt(this.state.pos+1);g===123&&S===124?this.finishOp(6,2):this.state.inType&&(g===62||g===60)?this.finishOp(g===62?48:47,1):this.state.inType&&g===63?S===46?this.finishOp(18,2):this.finishOp(17,1):Vi(g,S,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(g)}isAssignable(g,S){return g.type==="TypeCastExpression"?this.isAssignable(g.expression,S):super.isAssignable(g,S)}toAssignable(g,S=!1){!S&&g.type==="AssignmentExpression"&&g.left.type==="TypeCastExpression"&&(g.left=this.typeCastToParameter(g.left)),super.toAssignable(g,S)}toAssignableList(g,S,_){for(let I=0;I1||!S)&&this.raise(lt.TypeCastInPattern,H.typeAnnotation)}return g}parseArrayLike(g,S,_,I){let H=super.parseArrayLike(g,S,_,I);return S&&!this.state.maybeInArrowParameters&&this.toReferencedList(H.elements),H}isValidLVal(g,S,_){return g==="TypeCastExpression"||super.isValidLVal(g,S,_)}parseClassProperty(g){return this.match(14)&&(g.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(g)}parseClassPrivateProperty(g){return this.match(14)&&(g.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(g)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(g){return!this.match(14)&&super.isNonstaticConstructor(g)}pushClassMethod(g,S,_,I,H,q){if(S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(g,S,_,I,H,q),S.params&&H){let Z=S.params;Z.length>0&&this.isThisParam(Z[0])&&this.raise(lt.ThisParamBannedInConstructor,S)}else if(S.type==="MethodDefinition"&&H&&S.value.params){let Z=S.value.params;Z.length>0&&this.isThisParam(Z[0])&&this.raise(lt.ThisParamBannedInConstructor,S)}}pushClassPrivateMethod(g,S,_,I){S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(g,S,_,I)}parseClassSuper(g){if(super.parseClassSuper(g),g.superClass&&this.match(47)&&(g.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let S=g.implements=[];do{let _=this.startNode();_.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?_.typeParameters=this.flowParseTypeParameterInstantiation():_.typeParameters=null,S.push(this.finishNode(_,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(g){super.checkGetterSetterParams(g);let S=this.getObjectOrClassMethodParams(g);if(S.length>0){let _=S[0];this.isThisParam(_)&&g.kind==="get"?this.raise(lt.GetterMayNotHaveThisParam,_):this.isThisParam(_)&&this.raise(lt.SetterMayNotHaveThisParam,_)}}parsePropertyNamePrefixOperator(g){g.variance=this.flowParseVariance()}parseObjPropValue(g,S,_,I,H,q,Z){g.variance&&this.unexpected(g.variance.loc.start),delete g.variance;let ie;this.match(47)&&!q&&(ie=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let ne=super.parseObjPropValue(g,S,_,I,H,q,Z);return ie&&((ne.value||ne).typeParameters=ie),ne}parseAssignableListItemTypes(g){return this.eat(17)&&(g.type!=="Identifier"&&this.raise(lt.PatternIsOptional,g),this.isThisParam(g)&&this.raise(lt.ThisParamMayNotBeOptional,g),g.optional=!0),this.match(14)?g.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(g)&&this.raise(lt.ThisParamAnnotationRequired,g),this.match(29)&&this.isThisParam(g)&&this.raise(lt.ThisParamNoDefault,g),this.resetEndLocation(g),g}parseMaybeDefault(g,S){let _=super.parseMaybeDefault(g,S);return _.type==="AssignmentPattern"&&_.typeAnnotation&&_.right.start<_.typeAnnotation.start&&this.raise(lt.TypeBeforeInitializer,_.typeAnnotation),_}checkImportReflection(g){super.checkImportReflection(g),g.module&&g.importKind!=="value"&&this.raise(lt.ImportReflectionHasImportType,g.specifiers[0].loc.start)}parseImportSpecifierLocal(g,S,_){S.local=fm(g)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),g.specifiers.push(this.finishImportSpecifier(S,_))}isPotentialImportPhase(g){if(super.isPotentialImportPhase(g))return!0;if(this.isContextual(130)){if(!g)return!0;let S=this.lookaheadCharCode();return S===123||S===42}return!g&&this.isContextual(87)}applyImportPhase(g,S,_,I){if(super.applyImportPhase(g,S,_,I),S){if(!_&&this.match(65))return;g.exportKind=_==="type"?_:"value"}else _==="type"&&this.match(55)&&this.unexpected(),g.importKind=_==="type"||_==="typeof"?_:"value"}parseImportSpecifier(g,S,_,I,H){let q=g.imported,Z=null;q.type==="Identifier"&&(q.name==="type"?Z="type":q.name==="typeof"&&(Z="typeof"));let ie=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let Se=this.parseIdentifier(!0);Z!==null&&!ke(this.state.type)?(g.imported=Se,g.importKind=Z,g.local=cs(Se)):(g.imported=q,g.importKind=null,g.local=this.parseIdentifier())}else{if(Z!==null&&ke(this.state.type))g.imported=this.parseIdentifier(!0),g.importKind=Z;else{if(S)throw this.raise(v.ImportBindingIsString,g,{importName:q.value});g.imported=q,g.importKind=null}this.eatContextual(93)?g.local=this.parseIdentifier():(ie=!0,g.local=cs(g.imported))}let ne=fm(g);return _&&ne&&this.raise(lt.ImportTypeShorthandOnlyInPureImport,g),(_||ne)&&this.checkReservedType(g.local.name,g.local.loc.start,!0),ie&&!_&&!ne&&this.checkReservedWord(g.local.name,g.loc.start,!0,!0),this.finishImportSpecifier(g,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(g,S){let _=g.kind;_!=="get"&&_!=="set"&&this.match(47)&&(g.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(g,S)}parseVarId(g,S){super.parseVarId(g,S),this.match(14)&&(g.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(g.id))}parseAsyncArrowFromCallExpression(g,S){if(this.match(14)){let _=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,g.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=_}return super.parseAsyncArrowFromCallExpression(g,S)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(g,S){var _;let I=null,H;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(I=this.state.clone(),H=this.tryParse(()=>super.parseMaybeAssign(g,S),I),!H.error)return H.node;let{context:ie}=this.state,ne=ie[ie.length-1];(ne===$.j_oTag||ne===$.j_expr)&&ie.pop()}if((_=H)!=null&&_.error||this.match(47)){var q,Z;I=I||this.state.clone();let ie,ne=this.tryParse(Be=>{var qe;ie=this.flowParseTypeParameterDeclaration();let Qe=this.forwardNoArrowParamsConversionAt(ie,()=>{let un=super.parseMaybeAssign(g,S);return this.resetStartLocationFromNode(un,ie),un});(qe=Qe.extra)!=null&&qe.parenthesized&&Be();let sr=this.maybeUnwrapTypeCastExpression(Qe);return sr.type!=="ArrowFunctionExpression"&&Be(),sr.typeParameters=ie,this.resetStartLocationFromNode(sr,ie),Qe},I),Se=null;if(ne.node&&this.maybeUnwrapTypeCastExpression(ne.node).type==="ArrowFunctionExpression"){if(!ne.error&&!ne.aborted)return ne.node.async&&this.raise(lt.UnexpectedTypeParameterBeforeAsyncArrowFunction,ie),ne.node;Se=ne.node}if((q=H)!=null&&q.node)return this.state=H.failState,H.node;if(Se)return this.state=ne.failState,Se;throw(Z=H)!=null&&Z.thrown?H.error:ne.thrown?ne.error:this.raise(lt.UnexpectedTokenAfterTypeParameter,ie)}return super.parseMaybeAssign(g,S)}parseArrow(g){if(this.match(14)){let S=this.tryParse(()=>{let _=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let I=this.startNode();return[I.typeAnnotation,g.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=_,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),I});if(S.thrown)return null;S.error&&(this.state=S.failState),g.returnType=S.node.typeAnnotation?this.finishNode(S.node,"TypeAnnotation"):null}return super.parseArrow(g)}shouldParseArrow(g){return this.match(14)||super.shouldParseArrow(g)}setArrowFunctionParameters(g,S){this.state.noArrowParamsConversionAt.includes(g.start)?g.params=S:super.setArrowFunctionParameters(g,S)}checkParams(g,S,_,I=!0){if(!(_&&this.state.noArrowParamsConversionAt.includes(g.start))){for(let H=0;H0&&this.raise(lt.ThisParamMustBeFirst,g.params[H]);super.checkParams(g,S,_,I)}}parseParenAndDistinguishExpression(g){return super.parseParenAndDistinguishExpression(g&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(g,S,_){if(g.type==="Identifier"&&g.name==="async"&&this.state.noArrowAt.includes(S.index)){this.next();let I=this.startNodeAt(S);I.callee=g,I.arguments=super.parseCallExpressionArguments(11,!1),g=this.finishNode(I,"CallExpression")}else if(g.type==="Identifier"&&g.name==="async"&&this.match(47)){let I=this.state.clone(),H=this.tryParse(Z=>this.parseAsyncArrowWithTypeParameters(S)||Z(),I);if(!H.error&&!H.aborted)return H.node;let q=this.tryParse(()=>super.parseSubscripts(g,S,_),I);if(q.node&&!q.error)return q.node;if(H.node)return this.state=H.failState,H.node;if(q.node)return this.state=q.failState,q.node;throw H.error||q.error}return super.parseSubscripts(g,S,_)}parseSubscript(g,S,_,I){if(this.match(18)&&this.isLookaheadToken_lt()){if(I.optionalChainMember=!0,_)return I.stop=!0,g;this.next();let H=this.startNodeAt(S);return H.callee=g,H.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),H.arguments=this.parseCallExpressionArguments(11,!1),H.optional=!0,this.finishCallExpression(H,!0)}else if(!_&&this.shouldParseTypes()&&this.match(47)){let H=this.startNodeAt(S);H.callee=g;let q=this.tryParse(()=>(H.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),H.arguments=super.parseCallExpressionArguments(11,!1),I.optionalChainMember&&(H.optional=!1),this.finishCallExpression(H,I.optionalChainMember)));if(q.node)return q.error&&(this.state=q.failState),q.node}return super.parseSubscript(g,S,_,I)}parseNewCallee(g){super.parseNewCallee(g);let S=null;this.shouldParseTypes()&&this.match(47)&&(S=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),g.typeArguments=S}parseAsyncArrowWithTypeParameters(g){let S=this.startNodeAt(g);if(this.parseFunctionParams(S,!1),!!this.parseArrow(S))return super.parseArrowExpression(S,void 0,!0)}readToken_mult_modulo(g){let S=this.input.charCodeAt(this.state.pos+1);if(g===42&&S===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(g)}readToken_pipe_amp(g){let S=this.input.charCodeAt(this.state.pos+1);if(g===124&&S===125){this.finishOp(9,2);return}super.readToken_pipe_amp(g)}parseTopLevel(g,S){let _=super.parseTopLevel(g,S);return this.state.hasFlowComment&&this.raise(lt.UnterminatedFlowComment,this.state.curPosition()),_}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(lt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let g=this.skipFlowComment();g&&(this.state.pos+=g,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:g}=this.state,S=2;for(;[32,9].includes(this.input.charCodeAt(g+S));)S++;let _=this.input.charCodeAt(S+g),I=this.input.charCodeAt(S+g+1);return _===58&&I===58?S+2:this.input.slice(S+g,S+g+12)==="flow-include"?S+12:_===58&&I!==58?S:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(g,{enumName:S,memberName:_}){this.raise(lt.EnumBooleanMemberNotInitialized,g,{memberName:_,enumName:S})}flowEnumErrorInvalidMemberInitializer(g,S){return this.raise(S.explicitType?S.explicitType==="symbol"?lt.EnumInvalidMemberInitializerSymbolType:lt.EnumInvalidMemberInitializerPrimaryType:lt.EnumInvalidMemberInitializerUnknownType,g,S)}flowEnumErrorNumberMemberNotInitialized(g,S){this.raise(lt.EnumNumberMemberNotInitialized,g,S)}flowEnumErrorStringMemberInconsistentlyInitialized(g,S){this.raise(lt.EnumStringMemberInconsistentlyInitialized,g,S)}flowEnumMemberInit(){let g=this.state.startLoc,S=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let _=this.parseNumericLiteral(this.state.value);return S()?{type:"number",loc:_.loc.start,value:_}:{type:"invalid",loc:g}}case 133:{let _=this.parseStringLiteral(this.state.value);return S()?{type:"string",loc:_.loc.start,value:_}:{type:"invalid",loc:g}}case 85:case 86:{let _=this.parseBooleanLiteral(this.match(85));return S()?{type:"boolean",loc:_.loc.start,value:_}:{type:"invalid",loc:g}}default:return{type:"invalid",loc:g}}}flowEnumMemberRaw(){let g=this.state.startLoc,S=this.parseIdentifier(!0),_=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:g};return{id:S,init:_}}flowEnumCheckExplicitTypeMismatch(g,S,_){let{explicitType:I}=S;I!==null&&I!==_&&this.flowEnumErrorInvalidMemberInitializer(g,S)}flowEnumMembers({enumName:g,explicitType:S}){let _=new Set,I={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},H=!1;for(;!this.match(8);){if(this.eat(21)){H=!0;break}let q=this.startNode(),{id:Z,init:ie}=this.flowEnumMemberRaw(),ne=Z.name;if(ne==="")continue;/^[a-z]/.test(ne)&&this.raise(lt.EnumInvalidMemberName,Z,{memberName:ne,suggestion:ne[0].toUpperCase()+ne.slice(1),enumName:g}),_.has(ne)&&this.raise(lt.EnumDuplicateMemberName,Z,{memberName:ne,enumName:g}),_.add(ne);let Se={enumName:g,explicitType:S,memberName:ne};switch(q.id=Z,ie.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(ie.loc,Se,"boolean"),q.init=ie.value,I.booleanMembers.push(this.finishNode(q,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(ie.loc,Se,"number"),q.init=ie.value,I.numberMembers.push(this.finishNode(q,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(ie.loc,Se,"string"),q.init=ie.value,I.stringMembers.push(this.finishNode(q,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(ie.loc,Se);case"none":switch(S){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(ie.loc,Se);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(ie.loc,Se);break;default:I.defaultedMembers.push(this.finishNode(q,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:I,hasUnknownMembers:H}}flowEnumStringMembers(g,S,{enumName:_}){if(g.length===0)return S;if(S.length===0)return g;if(S.length>g.length){for(let I of g)this.flowEnumErrorStringMemberInconsistentlyInitialized(I,{enumName:_});return S}else{for(let I of S)this.flowEnumErrorStringMemberInconsistentlyInitialized(I,{enumName:_});return g}}flowEnumParseExplicitType({enumName:g}){if(!this.eatContextual(102))return null;if(!ce(this.state.type))throw this.raise(lt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:g});let{value:S}=this.state;return this.next(),S!=="boolean"&&S!=="number"&&S!=="string"&&S!=="symbol"&&this.raise(lt.EnumInvalidExplicitType,this.state.startLoc,{enumName:g,invalidEnumType:S}),S}flowEnumBody(g,S){let _=S.name,I=S.loc.start,H=this.flowEnumParseExplicitType({enumName:_});this.expect(5);let{members:q,hasUnknownMembers:Z}=this.flowEnumMembers({enumName:_,explicitType:H});switch(g.hasUnknownMembers=Z,H){case"boolean":return g.explicitType=!0,g.members=q.booleanMembers,this.expect(8),this.finishNode(g,"EnumBooleanBody");case"number":return g.explicitType=!0,g.members=q.numberMembers,this.expect(8),this.finishNode(g,"EnumNumberBody");case"string":return g.explicitType=!0,g.members=this.flowEnumStringMembers(q.stringMembers,q.defaultedMembers,{enumName:_}),this.expect(8),this.finishNode(g,"EnumStringBody");case"symbol":return g.members=q.defaultedMembers,this.expect(8),this.finishNode(g,"EnumSymbolBody");default:{let ie=()=>(g.members=[],this.expect(8),this.finishNode(g,"EnumStringBody"));g.explicitType=!1;let ne=q.booleanMembers.length,Se=q.numberMembers.length,Be=q.stringMembers.length,qe=q.defaultedMembers.length;if(!ne&&!Se&&!Be&&!qe)return ie();if(!ne&&!Se)return g.members=this.flowEnumStringMembers(q.stringMembers,q.defaultedMembers,{enumName:_}),this.expect(8),this.finishNode(g,"EnumStringBody");if(!Se&&!Be&&ne>=qe){for(let Qe of q.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(Qe.loc.start,{enumName:_,memberName:Qe.id.name});return g.members=q.booleanMembers,this.expect(8),this.finishNode(g,"EnumBooleanBody")}else if(!ne&&!Be&&Se>=qe){for(let Qe of q.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(Qe.loc.start,{enumName:_,memberName:Qe.id.name});return g.members=q.numberMembers,this.expect(8),this.finishNode(g,"EnumNumberBody")}else return this.raise(lt.EnumInconsistentMemberValues,I,{enumName:_}),ie()}}}flowParseEnumDeclaration(g){let S=this.parseIdentifier();return g.id=S,g.body=this.flowEnumBody(this.startNode(),S),this.finishNode(g,"EnumDeclaration")}isLookaheadToken_lt(){let g=this.nextTokenStart();if(this.input.charCodeAt(g)===60){let S=this.input.charCodeAt(g+1);return S!==60&&S!==61}return!1}maybeUnwrapTypeCastExpression(g){return g.type==="TypeCastExpression"?g.expression:g}},ai=b`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:x})=>`Expected corresponding JSX closing tag for <${x}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:x,HTMLEntity:g})=>`Unexpected token \`${x}\`. Did you mean \`${g}\` or \`{'${x}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function Os(x){return x?x.type==="JSXOpeningFragment"||x.type==="JSXClosingFragment":!1}function za(x){if(x.type==="JSXIdentifier")return x.name;if(x.type==="JSXNamespacedName")return x.namespace.name+":"+x.name.name;if(x.type==="JSXMemberExpression")return za(x.object)+"."+za(x.property);throw new Error("Node had unexpected type: "+x.type)}var Xc=x=>class extends x{jsxReadToken(){let g="",S=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ai.UnterminatedJsxContent,this.state.startLoc);let _=this.input.charCodeAt(this.state.pos);switch(_){case 60:case 123:if(this.state.pos===this.state.start){_===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(_);return}g+=this.input.slice(S,this.state.pos),this.finishToken(141,g);return;case 38:g+=this.input.slice(S,this.state.pos),g+=this.jsxReadEntity(),S=this.state.pos;break;case 62:case 125:default:St(_)?(g+=this.input.slice(S,this.state.pos),g+=this.jsxReadNewLine(!0),S=this.state.pos):++this.state.pos}}}jsxReadNewLine(g){let S=this.input.charCodeAt(this.state.pos),_;return++this.state.pos,S===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,_=g?` +- Did you mean \`import { "${x}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:x})=>`\`import()\` requires exactly ${x===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:x})=>`Expected number in radix ${x}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:x})=>`Escape sequence in keyword ${x}.`,InvalidIdentifier:({identifierName:x})=>`Invalid identifier ${x}.`,InvalidLhs:({ancestor:x})=>`Invalid left-hand side in ${l(x)}.`,InvalidLhsBinding:({ancestor:x})=>`Binding invalid left-hand side in ${l(x)}.`,InvalidLhsOptionalChaining:({ancestor:x})=>`Invalid optional chaining in the left-hand side of ${l(x)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:x})=>`Unexpected character '${x}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:x})=>`Private name #${x} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:x})=>`Label '${x}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:x})=>`This experimental syntax requires enabling the parser plugin: ${x.map(g=>JSON.stringify(g)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:x})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${x.map(g=>JSON.stringify(g)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:x})=>`Duplicate key "${x}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:x})=>`An export name cannot include a lone surrogate, found '\\u${x.toString(16)}'.`,ModuleExportUndefined:({localName:x})=>`Export '${x}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:x})=>`Private names are only allowed in property accesses (\`obj.#${x}\`) or in \`in\` expressions (\`#${x} in obj\`).`,PrivateNameRedeclaration:({identifierName:x})=>`Duplicate private name #${x}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:x})=>`Unexpected keyword '${x}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:x})=>`Unexpected reserved word '${x}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:x,unexpected:g})=>`Unexpected token${g?` '${g}'.`:""}${x?`, expected "${x}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:x,onlyValidPropertyName:g})=>`The only valid meta property for ${x} is ${x}.${g}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:x})=>`Identifier '${x}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},c={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:x})=>`Assigning to '${x}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:x})=>`Binding '${x}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),d={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:x})=>`Invalid topic token ${x}. In order to use ${x} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${x}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:x})=>`Hack-style pipe body cannot be an unparenthesized ${l({type:x})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},f=["toMessage"],p=["message"];function m(x,g,S){Object.defineProperty(x,g,{enumerable:!1,configurable:!0,value:S})}function y(x){let{toMessage:g}=x,S=t(x,f);return function $(N,H){let q=new SyntaxError;return Object.assign(q,S,{loc:N,pos:N.index}),"missingPlugin"in H&&Object.assign(q,{missingPlugin:H.missingPlugin}),m(q,"clone",function(Z={}){var ie;let{line:ne,column:Se,index:Be}=(ie=Z.loc)!=null?ie:N;return $(new r(ne,Se,Be),Object.assign({},H,Z.details))}),m(q,"details",H),Object.defineProperty(q,"message",{configurable:!0,get(){let Z=`${g(H)} (${N.line}:${N.column})`;return this.message=Z,Z},set(Z){Object.defineProperty(this,"message",{value:Z,writable:!0})}}),q}}function b(x,g){if(Array.isArray(x))return $=>b($,x[0]);let S={};for(let $ of Object.keys(x)){let N=x[$],H=typeof N=="string"?{message:()=>N}:typeof N=="function"?{message:N}:N,{message:q}=H,Z=t(H,p),ie=typeof q=="string"?()=>q:q;S[$]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:$,toMessage:ie},g?{syntaxPlugin:g}:{},Z))}return S}var v=Object.assign({},b(o),b(u),b(c),b`pipelineOperator`(d)),{defineProperty:E}=Object,D=(x,g)=>{x&&E(x,g,{enumerable:!1,value:x[g]})};function C(x){return D(x.loc.start,"index"),D(x.loc.end,"index"),x}var w=x=>class extends x{parse(){let g=C(super.parse());return this.options.tokens&&(g.tokens=g.tokens.map(C)),g}parseRegExpLiteral({pattern:g,flags:S}){let $=null;try{$=new RegExp(g,S)}catch{}let N=this.estreeParseLiteral($);return N.regex={pattern:g,flags:S},N}parseBigIntLiteral(g){let S;try{S=BigInt(g)}catch{S=null}let $=this.estreeParseLiteral(S);return $.bigint=String($.value||g),$}parseDecimalLiteral(g){let S=this.estreeParseLiteral(null);return S.decimal=String(S.value||g),S}estreeParseLiteral(g){return this.parseLiteral(g,"Literal")}parseStringLiteral(g){return this.estreeParseLiteral(g)}parseNumericLiteral(g){return this.estreeParseLiteral(g)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(g){return this.estreeParseLiteral(g)}directiveToStmt(g){let S=g.value;delete g.value,S.type="Literal",S.raw=S.extra.raw,S.value=S.extra.expressionValue;let $=g;return $.type="ExpressionStatement",$.expression=S,$.directive=S.extra.rawValue,delete S.extra,$}initFunction(g,S){super.initFunction(g,S),g.expression=!1}checkDeclaration(g){g!=null&&this.isObjectProperty(g)?this.checkDeclaration(g.value):super.checkDeclaration(g)}getObjectOrClassMethodParams(g){return g.value.params}isValidDirective(g){var S;return g.type==="ExpressionStatement"&&g.expression.type==="Literal"&&typeof g.expression.value=="string"&&!((S=g.expression.extra)!=null&&S.parenthesized)}parseBlockBody(g,S,$,N,H){super.parseBlockBody(g,S,$,N,H);let q=g.directives.map(Z=>this.directiveToStmt(Z));g.body=q.concat(g.body),delete g.directives}pushClassMethod(g,S,$,N,H,q){this.parseMethod(S,$,N,H,q,"ClassMethod",!0),S.typeParameters&&(S.value.typeParameters=S.typeParameters,delete S.typeParameters),g.body.push(S)}parsePrivateName(){let g=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(g):g}convertPrivateNameToPrivateIdentifier(g){let S=super.getPrivateNameSV(g);return g=g,delete g.id,g.name=S,g.type="PrivateIdentifier",g}isPrivateName(g){return this.getPluginOption("estree","classFeatures")?g.type==="PrivateIdentifier":super.isPrivateName(g)}getPrivateNameSV(g){return this.getPluginOption("estree","classFeatures")?g.name:super.getPrivateNameSV(g)}parseLiteral(g,S){let $=super.parseLiteral(g,S);return $.raw=$.extra.raw,delete $.extra,$}parseFunctionBody(g,S,$=!1){super.parseFunctionBody(g,S,$),g.expression=g.body.type!=="BlockStatement"}parseMethod(g,S,$,N,H,q,Z=!1){let ie=this.startNode();return ie.kind=g.kind,ie=super.parseMethod(ie,S,$,N,H,q,Z),ie.type="FunctionExpression",delete ie.kind,g.value=ie,q==="ClassPrivateMethod"&&(g.computed=!1),this.finishNode(g,"MethodDefinition")}nameIsConstructor(g){return g.type==="Literal"?g.value==="constructor":super.nameIsConstructor(g)}parseClassProperty(...g){let S=super.parseClassProperty(...g);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition"),S}parseClassPrivateProperty(...g){let S=super.parseClassPrivateProperty(...g);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition",S.computed=!1),S}parseObjectMethod(g,S,$,N,H){let q=super.parseObjectMethod(g,S,$,N,H);return q&&(q.type="Property",q.kind==="method"&&(q.kind="init"),q.shorthand=!1),q}parseObjectProperty(g,S,$,N){let H=super.parseObjectProperty(g,S,$,N);return H&&(H.kind="init",H.type="Property"),H}isValidLVal(g,S,$){return g==="Property"?"value":super.isValidLVal(g,S,$)}isAssignable(g,S){return g!=null&&this.isObjectProperty(g)?this.isAssignable(g.value,S):super.isAssignable(g,S)}toAssignable(g,S=!1){if(g!=null&&this.isObjectProperty(g)){let{key:$,value:N}=g;this.isPrivateName($)&&this.classScope.usePrivateName(this.getPrivateNameSV($),$.loc.start),this.toAssignable(N,S)}else super.toAssignable(g,S)}toAssignableObjectExpressionProp(g,S,$){g.type==="Property"&&(g.kind==="get"||g.kind==="set")?this.raise(v.PatternHasAccessor,g.key):g.type==="Property"&&g.method?this.raise(v.PatternHasMethod,g.key):super.toAssignableObjectExpressionProp(g,S,$)}finishCallExpression(g,S){let $=super.finishCallExpression(g,S);if($.callee.type==="Import"){if($.type="ImportExpression",$.source=$.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var N,H;$.options=(N=$.arguments[1])!=null?N:null,$.attributes=(H=$.arguments[1])!=null?H:null}delete $.arguments,delete $.callee}return $}toReferencedArguments(g){g.type!=="ImportExpression"&&super.toReferencedArguments(g)}parseExport(g,S){let $=this.state.lastTokStartLoc,N=super.parseExport(g,S);switch(N.type){case"ExportAllDeclaration":N.exported=null;break;case"ExportNamedDeclaration":N.specifiers.length===1&&N.specifiers[0].type==="ExportNamespaceSpecifier"&&(N.type="ExportAllDeclaration",N.exported=N.specifiers[0].exported,delete N.specifiers);case"ExportDefaultDeclaration":{var H;let{declaration:q}=N;(q==null?void 0:q.type)==="ClassDeclaration"&&((H=q.decorators)==null?void 0:H.length)>0&&q.start===N.start&&this.resetStartLocation(N,$)}break}return N}parseSubscript(g,S,$,N){let H=super.parseSubscript(g,S,$,N);if(N.optionalChainMember){if((H.type==="OptionalMemberExpression"||H.type==="OptionalCallExpression")&&(H.type=H.type.substring(8)),N.stop){let q=this.startNodeAtNode(H);return q.expression=H,this.finishNode(q,"ChainExpression")}}else(H.type==="MemberExpression"||H.type==="CallExpression")&&(H.optional=!1);return H}isOptionalMemberExpression(g){return g.type==="ChainExpression"?g.expression.type==="MemberExpression":super.isOptionalMemberExpression(g)}hasPropertyAsPrivateName(g){return g.type==="ChainExpression"&&(g=g.expression),super.hasPropertyAsPrivateName(g)}isObjectProperty(g){return g.type==="Property"&&g.kind==="init"&&!g.method}isObjectMethod(g){return g.type==="Property"&&(g.method||g.kind==="get"||g.kind==="set")}finishNodeAt(g,S,$){return C(super.finishNodeAt(g,S,$))}resetStartLocation(g,S){super.resetStartLocation(g,S),C(g)}resetEndLocation(g,S=this.state.lastTokEndLoc){super.resetEndLocation(g,S),C(g)}},T=class{constructor(x,g){this.token=void 0,this.preserveSpace=void 0,this.token=x,this.preserveSpace=!!g}},k={brace:new T("{"),j_oTag:new T("...",!0)};k.template=new T("`",!0);var O=!0,P=!0,I=!0,F=!0,L=!0,_=!0,A=class{constructor(x,g={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=x,this.keyword=g.keyword,this.beforeExpr=!!g.beforeExpr,this.startsExpr=!!g.startsExpr,this.rightAssociative=!!g.rightAssociative,this.isLoop=!!g.isLoop,this.isAssign=!!g.isAssign,this.prefix=!!g.prefix,this.postfix=!!g.postfix,this.binop=g.binop!=null?g.binop:null,this.updateContext=null}},M=new Map;function R(x,g={}){g.keyword=x;let S=X(x,g);return M.set(x,S),S}function B(x,g){return X(x,{beforeExpr:O,binop:g})}var U=-1,V=[],K=[],J=[],G=[],Y=[],Q=[];function X(x,g={}){var S,$,N,H;return++U,K.push(x),J.push((S=g.binop)!=null?S:-1),G.push(($=g.beforeExpr)!=null?$:!1),Y.push((N=g.startsExpr)!=null?N:!1),Q.push((H=g.prefix)!=null?H:!1),V.push(new A(x,g)),U}function le(x,g={}){var S,$,N,H;return++U,M.set(x,U),K.push(x),J.push((S=g.binop)!=null?S:-1),G.push(($=g.beforeExpr)!=null?$:!1),Y.push((N=g.startsExpr)!=null?N:!1),Q.push((H=g.prefix)!=null?H:!1),V.push(new A("name",g)),U}var be={bracketL:X("[",{beforeExpr:O,startsExpr:P}),bracketHashL:X("#[",{beforeExpr:O,startsExpr:P}),bracketBarL:X("[|",{beforeExpr:O,startsExpr:P}),bracketR:X("]"),bracketBarR:X("|]"),braceL:X("{",{beforeExpr:O,startsExpr:P}),braceBarL:X("{|",{beforeExpr:O,startsExpr:P}),braceHashL:X("#{",{beforeExpr:O,startsExpr:P}),braceR:X("}"),braceBarR:X("|}"),parenL:X("(",{beforeExpr:O,startsExpr:P}),parenR:X(")"),comma:X(",",{beforeExpr:O}),semi:X(";",{beforeExpr:O}),colon:X(":",{beforeExpr:O}),doubleColon:X("::",{beforeExpr:O}),dot:X("."),question:X("?",{beforeExpr:O}),questionDot:X("?."),arrow:X("=>",{beforeExpr:O}),template:X("template"),ellipsis:X("...",{beforeExpr:O}),backQuote:X("`",{startsExpr:P}),dollarBraceL:X("${",{beforeExpr:O,startsExpr:P}),templateTail:X("...`",{startsExpr:P}),templateNonTail:X("...${",{beforeExpr:O,startsExpr:P}),at:X("@"),hash:X("#",{startsExpr:P}),interpreterDirective:X("#!..."),eq:X("=",{beforeExpr:O,isAssign:F}),assign:X("_=",{beforeExpr:O,isAssign:F}),slashAssign:X("_=",{beforeExpr:O,isAssign:F}),xorAssign:X("_=",{beforeExpr:O,isAssign:F}),moduloAssign:X("_=",{beforeExpr:O,isAssign:F}),incDec:X("++/--",{prefix:L,postfix:_,startsExpr:P}),bang:X("!",{beforeExpr:O,prefix:L,startsExpr:P}),tilde:X("~",{beforeExpr:O,prefix:L,startsExpr:P}),doubleCaret:X("^^",{startsExpr:P}),doubleAt:X("@@",{startsExpr:P}),pipeline:B("|>",0),nullishCoalescing:B("??",1),logicalOR:B("||",1),logicalAND:B("&&",2),bitwiseOR:B("|",3),bitwiseXOR:B("^",4),bitwiseAND:B("&",5),equality:B("==/!=/===/!==",6),lt:B("/<=/>=",7),gt:B("/<=/>=",7),relational:B("/<=/>=",7),bitShift:B("<>/>>>",8),bitShiftL:B("<>/>>>",8),bitShiftR:B("<>/>>>",8),plusMin:X("+/-",{beforeExpr:O,binop:9,prefix:L,startsExpr:P}),modulo:X("%",{binop:10,startsExpr:P}),star:X("*",{binop:10}),slash:B("/",10),exponent:X("**",{beforeExpr:O,binop:11,rightAssociative:!0}),_in:R("in",{beforeExpr:O,binop:7}),_instanceof:R("instanceof",{beforeExpr:O,binop:7}),_break:R("break"),_case:R("case",{beforeExpr:O}),_catch:R("catch"),_continue:R("continue"),_debugger:R("debugger"),_default:R("default",{beforeExpr:O}),_else:R("else",{beforeExpr:O}),_finally:R("finally"),_function:R("function",{startsExpr:P}),_if:R("if"),_return:R("return",{beforeExpr:O}),_switch:R("switch"),_throw:R("throw",{beforeExpr:O,prefix:L,startsExpr:P}),_try:R("try"),_var:R("var"),_const:R("const"),_with:R("with"),_new:R("new",{beforeExpr:O,startsExpr:P}),_this:R("this",{startsExpr:P}),_super:R("super",{startsExpr:P}),_class:R("class",{startsExpr:P}),_extends:R("extends",{beforeExpr:O}),_export:R("export"),_import:R("import",{startsExpr:P}),_null:R("null",{startsExpr:P}),_true:R("true",{startsExpr:P}),_false:R("false",{startsExpr:P}),_typeof:R("typeof",{beforeExpr:O,prefix:L,startsExpr:P}),_void:R("void",{beforeExpr:O,prefix:L,startsExpr:P}),_delete:R("delete",{beforeExpr:O,prefix:L,startsExpr:P}),_do:R("do",{isLoop:I,beforeExpr:O}),_for:R("for",{isLoop:I}),_while:R("while",{isLoop:I}),_as:le("as",{startsExpr:P}),_assert:le("assert",{startsExpr:P}),_async:le("async",{startsExpr:P}),_await:le("await",{startsExpr:P}),_defer:le("defer",{startsExpr:P}),_from:le("from",{startsExpr:P}),_get:le("get",{startsExpr:P}),_let:le("let",{startsExpr:P}),_meta:le("meta",{startsExpr:P}),_of:le("of",{startsExpr:P}),_sent:le("sent",{startsExpr:P}),_set:le("set",{startsExpr:P}),_source:le("source",{startsExpr:P}),_static:le("static",{startsExpr:P}),_using:le("using",{startsExpr:P}),_yield:le("yield",{startsExpr:P}),_asserts:le("asserts",{startsExpr:P}),_checks:le("checks",{startsExpr:P}),_exports:le("exports",{startsExpr:P}),_global:le("global",{startsExpr:P}),_implements:le("implements",{startsExpr:P}),_intrinsic:le("intrinsic",{startsExpr:P}),_infer:le("infer",{startsExpr:P}),_is:le("is",{startsExpr:P}),_mixins:le("mixins",{startsExpr:P}),_proto:le("proto",{startsExpr:P}),_require:le("require",{startsExpr:P}),_satisfies:le("satisfies",{startsExpr:P}),_keyof:le("keyof",{startsExpr:P}),_readonly:le("readonly",{startsExpr:P}),_unique:le("unique",{startsExpr:P}),_abstract:le("abstract",{startsExpr:P}),_declare:le("declare",{startsExpr:P}),_enum:le("enum",{startsExpr:P}),_module:le("module",{startsExpr:P}),_namespace:le("namespace",{startsExpr:P}),_interface:le("interface",{startsExpr:P}),_type:le("type",{startsExpr:P}),_opaque:le("opaque",{startsExpr:P}),name:X("name",{startsExpr:P}),string:X("string",{startsExpr:P}),num:X("num",{startsExpr:P}),bigint:X("bigint",{startsExpr:P}),decimal:X("decimal",{startsExpr:P}),regexp:X("regexp",{startsExpr:P}),privateName:X("#name",{startsExpr:P}),eof:X("eof"),jsxName:X("jsxName"),jsxText:X("jsxText",{beforeExpr:!0}),jsxTagStart:X("jsxTagStart",{startsExpr:!0}),jsxTagEnd:X("jsxTagEnd"),placeholder:X("%%",{startsExpr:!0})};function ce(x){return x>=93&&x<=132}function xe(x){return x<=92}function ke(x){return x>=58&&x<=132}function Re(x){return x>=58&&x<=136}function Pt(x){return G[x]}function yt(x){return Y[x]}function W(x){return x>=29&&x<=33}function ye(x){return x>=129&&x<=131}function pe(x){return x>=90&&x<=92}function re(x){return x>=58&&x<=92}function ee(x){return x>=39&&x<=59}function ue(x){return x===34}function De(x){return Q[x]}function Ce(x){return x>=121&&x<=123}function fe(x){return x>=124&&x<=130}function Ee(x){return K[x]}function je(x){return J[x]}function ae(x){return x===57}function ve(x){return x>=24&&x<=25}function Te(x){return V[x]}V[8].updateContext=x=>{x.pop()},V[5].updateContext=V[7].updateContext=V[23].updateContext=x=>{x.push(k.brace)},V[22].updateContext=x=>{x[x.length-1]===k.template?x.pop():x.push(k.template)},V[142].updateContext=x=>{x.push(k.j_expr,k.j_oTag)};var ze="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",at="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",xt=new RegExp("["+ze+"]"),pt=new RegExp("["+ze+at+"]");ze=at=null;var kt=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],nt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function ht(x,g){let S=65536;for(let $=0,N=g.length;$x)return!1;if(S+=g[$+1],S>=x)return!0}return!1}function It(x){return x<65?x===36:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&xt.test(String.fromCharCode(x)):ht(x,kt)}function sr(x){return x<48?x===36:x<58?!0:x<65?!1:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&pt.test(String.fromCharCode(x)):ht(x,kt)||ht(x,nt)}var ln={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},_i=new Set(ln.keyword),$n=new Set(ln.strict),ds=new Set(ln.strictBind);function mr(x,g){return g&&x==="await"||x==="enum"}function Zr(x,g){return mr(x,g)||$n.has(x)}function ui(x){return ds.has(x)}function $i(x,g){return Zr(x,g)||ui(x)}function Li(x){return _i.has(x)}function Ki(x,g,S){return x===64&&g===64&&It(S)}var bo=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Ms(x){return bo.has(x)}var se=class{constructor(x){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=x}},de=class{constructor(x,g){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=x,this.inModule=g}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let x=this.currentThisScopeFlags();return(x&64)>0&&(x&2)===0}get inStaticBlock(){for(let x=this.scopeStack.length-1;;x--){let{flags:g}=this.scopeStack[x];if(g&128)return!0;if(g&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(x){return new se(x)}enter(x){this.scopeStack.push(this.createScope(x))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(x){return!!(x.flags&130||!this.parser.inModule&&x.flags&1)}declareName(x,g,S){let $=this.currentScope();if(g&8||g&16){this.checkRedeclarationInScope($,x,g,S);let N=$.names.get(x)||0;g&16?N=N|4:($.firstLexicalName||($.firstLexicalName=x),N=N|2),$.names.set(x,N),g&8&&this.maybeExportDefined($,x)}else if(g&4)for(let N=this.scopeStack.length-1;N>=0&&($=this.scopeStack[N],this.checkRedeclarationInScope($,x,g,S),$.names.set(x,($.names.get(x)||0)|1),this.maybeExportDefined($,x),!($.flags&387));--N);this.parser.inModule&&$.flags&1&&this.undefinedExports.delete(x)}maybeExportDefined(x,g){this.parser.inModule&&x.flags&1&&this.undefinedExports.delete(g)}checkRedeclarationInScope(x,g,S,$){this.isRedeclaredInScope(x,g,S)&&this.parser.raise(v.VarRedeclaration,$,{identifierName:g})}isRedeclaredInScope(x,g,S){if(!(S&1))return!1;if(S&8)return x.names.has(g);let $=x.names.get(g);return S&16?($&2)>0||!this.treatFunctionsAsVarInScope(x)&&($&1)>0:($&2)>0&&!(x.flags&8&&x.firstLexicalName===g)||!this.treatFunctionsAsVarInScope(x)&&($&4)>0}checkLocalExport(x){let{name:g}=x;this.scopeStack[0].names.has(g)||this.undefinedExports.set(g,x.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:g}=this.scopeStack[x];if(g&387)return g}}currentThisScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:g}=this.scopeStack[x];if(g&451&&!(g&4))return g}}},ge=class extends se{constructor(...x){super(...x),this.declareFunctions=new Set}},we=class extends de{createScope(x){return new ge(x)}declareName(x,g,S){let $=this.currentScope();if(g&2048){this.checkRedeclarationInScope($,x,g,S),this.maybeExportDefined($,x),$.declareFunctions.add(x);return}super.declareName(x,g,S)}isRedeclaredInScope(x,g,S){if(super.isRedeclaredInScope(x,g,S))return!0;if(S&2048&&!x.declareFunctions.has(g)){let $=x.names.get(g);return($&4)>0||($&2)>0}return!1}checkLocalExport(x){this.scopeStack[0].declareFunctions.has(x.name)||super.checkLocalExport(x)}},Ve=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(x){if(typeof x=="string")return this.plugins.has(x);{let[g,S]=x;if(!this.hasPlugin(g))return!1;let $=this.plugins.get(g);for(let N of Object.keys(S))if(($==null?void 0:$[N])!==S[N])return!1;return!0}}getPluginOption(x,g){var S;return(S=this.plugins.get(x))==null?void 0:S[g]}};function rt(x,g){x.trailingComments===void 0?x.trailingComments=g:x.trailingComments.unshift(...g)}function ct(x,g){x.leadingComments===void 0?x.leadingComments=g:x.leadingComments.unshift(...g)}function He(x,g){x.innerComments===void 0?x.innerComments=g:x.innerComments.unshift(...g)}function Ge(x,g,S){let $=null,N=g.length;for(;$===null&&N>0;)$=g[--N];$===null||$.start>S.start?He(x,S.comments):rt($,S.comments)}var Ue=class extends Ve{addComment(x){this.filename&&(x.loc.filename=this.filename);let{commentsLen:g}=this.state;this.comments.length!==g&&(this.comments.length=g),this.comments.push(x),this.state.commentsLen++}processComment(x){let{commentStack:g}=this.state,S=g.length;if(S===0)return;let $=S-1,N=g[$];N.start===x.end&&(N.leadingNode=x,$--);let{start:H}=x;for(;$>=0;$--){let q=g[$],Z=q.end;if(Z>H)q.containingNode=x,this.finalizeComment(q),g.splice($,1);else{Z===H&&(q.trailingNode=x);break}}}finalizeComment(x){let{comments:g}=x;if(x.leadingNode!==null||x.trailingNode!==null)x.leadingNode!==null&&rt(x.leadingNode,g),x.trailingNode!==null&&ct(x.trailingNode,g);else{let{containingNode:S,start:$}=x;if(this.input.charCodeAt($-1)===44)switch(S.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Ge(S,S.properties,x);break;case"CallExpression":case"OptionalCallExpression":Ge(S,S.arguments,x);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ge(S,S.params,x);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Ge(S,S.elements,x);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ge(S,S.specifiers,x);break;default:He(S,g)}else He(S,g)}}finalizeRemainingComments(){let{commentStack:x}=this.state;for(let g=x.length-1;g>=0;g--)this.finalizeComment(x[g]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(x){let{commentStack:g}=this.state,{length:S}=g;if(S===0)return;let $=g[S-1];$.leadingNode===x&&($.leadingNode=null)}resetPreviousIdentifierLeadingComments(x){let{commentStack:g}=this.state,{length:S}=g;S!==0&&(g[S-1].trailingNode===x?g[S-1].trailingNode=null:S>=2&&g[S-2].trailingNode===x&&(g[S-2].trailingNode=null))}takeSurroundingComments(x,g,S){let{commentStack:$}=this.state,N=$.length;if(N===0)return;let H=N-1;for(;H>=0;H--){let q=$[H],Z=q.end;if(q.start===S)q.leadingNode=x;else if(Z===g)q.trailingNode=x;else if(Z0}set strict(g){g?this.flags|=1:this.flags&=-2}init({strictMode:g,sourceType:S,startLine:$,startColumn:N}){this.strict=g===!1?!1:g===!0?!0:S==="module",this.curLine=$,this.lineStart=-N,this.startLoc=this.endLoc=new r($,N,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(g){g?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(g){g?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(g){g?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(g){g?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(g){g?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(g){g?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(g){g?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(g){g?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(g){g?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(g){g?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(g){g?this.flags|=2048:this.flags&=-2049}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let g=new lj;return g.flags=this.flags,g.curLine=this.curLine,g.lineStart=this.lineStart,g.startLoc=this.startLoc,g.endLoc=this.endLoc,g.errors=this.errors.slice(),g.potentialArrowAt=this.potentialArrowAt,g.noArrowAt=this.noArrowAt.slice(),g.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),g.topicContext=this.topicContext,g.labels=this.labels.slice(),g.commentsLen=this.commentsLen,g.commentStack=this.commentStack.slice(),g.pos=this.pos,g.type=this.type,g.value=this.value,g.start=this.start,g.end=this.end,g.lastTokEndLoc=this.lastTokEndLoc,g.lastTokStartLoc=this.lastTokStartLoc,g.context=this.context.slice(),g.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,g.strictErrors=this.strictErrors,g.tokensLength=this.tokensLength,g}},Ke=function(x){return x>=48&&x<=57},vt={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Xt={bin:x=>x===48||x===49,oct:x=>x>=48&&x<=55,dec:x=>x>=48&&x<=57,hex:x=>x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102};function Dr(x,g,S,$,N,H){let q=S,Z=$,ie=N,ne="",Se=null,Be=S,{length:qe}=g;for(;;){if(S>=qe){H.unterminated(q,Z,ie),ne+=g.slice(Be,S);break}let Qe=g.charCodeAt(S);if(Or(x,Qe,g,S)){ne+=g.slice(Be,S);break}if(Qe===92){ne+=g.slice(Be,S);let lr=Vr(g,S,$,N,x==="template",H);lr.ch===null&&!Se?Se={pos:S,lineStart:$,curLine:N}:ne+=lr.ch,{pos:S,lineStart:$,curLine:N}=lr,Be=S}else Qe===8232||Qe===8233?(++S,++N,$=S):Qe===10||Qe===13?x==="template"?(ne+=g.slice(Be,S)+` +`,++S,Qe===13&&g.charCodeAt(S)===10&&++S,++N,Be=$=S):H.unterminated(q,Z,ie):++S}return{pos:S,str:ne,firstInvalidLoc:Se,lineStart:$,curLine:N,containsInvalid:!!Se}}function Or(x,g,S,$){return x==="template"?g===96||g===36&&S.charCodeAt($+1)===123:g===(x==="double"?34:39)}function Vr(x,g,S,$,N,H){let q=!N;g++;let Z=ne=>({pos:g,ch:ne,lineStart:S,curLine:$}),ie=x.charCodeAt(g++);switch(ie){case 110:return Z(` +`);case 114:return Z("\r");case 120:{let ne;return{code:ne,pos:g}=Gn(x,g,S,$,2,!1,q,H),Z(ne===null?null:String.fromCharCode(ne))}case 117:{let ne;return{code:ne,pos:g}=Ft(x,g,S,$,q,H),Z(ne===null?null:String.fromCodePoint(ne))}case 116:return Z(" ");case 98:return Z("\b");case 118:return Z("\v");case 102:return Z("\f");case 13:x.charCodeAt(g)===10&&++g;case 10:S=g,++$;case 8232:case 8233:return Z("");case 56:case 57:if(N)return Z(null);H.strictNumericEscape(g-1,S,$);default:if(ie>=48&&ie<=55){let ne=g-1,Se=/^[0-7]+/.exec(x.slice(ne,g+2))[0],Be=parseInt(Se,8);Be>255&&(Se=Se.slice(0,-1),Be=parseInt(Se,8)),g+=Se.length-1;let qe=x.charCodeAt(g);if(Se!=="0"||qe===56||qe===57){if(N)return Z(null);H.strictNumericEscape(ne,S,$)}return Z(String.fromCharCode(Be))}return Z(String.fromCharCode(ie))}}function Gn(x,g,S,$,N,H,q,Z){let ie=g,ne;return{n:ne,pos:g}=yr(x,g,S,$,16,N,H,!1,Z,!q),ne===null&&(q?Z.invalidEscapeSequence(ie,S,$):g=ie-1),{code:ne,pos:g}}function yr(x,g,S,$,N,H,q,Z,ie,ne){let Se=g,Be=N===16?vt.hex:vt.decBinOct,qe=N===16?Xt.hex:N===10?Xt.dec:N===8?Xt.oct:Xt.bin,Qe=!1,lr=0;for(let dn=0,wr=H??1/0;dn=97?Ji=Yr-97+10:Yr>=65?Ji=Yr-65+10:Ke(Yr)?Ji=Yr-48:Ji=1/0,Ji>=N){if(Ji<=9&&ne)return{n:null,pos:g};if(Ji<=9&&ie.invalidDigit(g,S,$,N))Ji=0;else if(q)Ji=0,Qe=!0;else break}++g,lr=lr*N+Ji}return g===Se||H!=null&&g-Se!==H||Qe?{n:null,pos:g}:{n:lr,pos:g}}function Ft(x,g,S,$,N,H){let q=x.charCodeAt(g),Z;if(q===123){if(++g,{code:Z,pos:g}=Gn(x,g,S,$,x.indexOf("}",g)-g,!0,N,H),++g,Z!==null&&Z>1114111)if(N)H.invalidCodePoint(g,S,$);else return{code:null,pos:g}}else({code:Z,pos:g}=Gn(x,g,S,$,4,!1,N,H));return{code:Z,pos:g}}function tr(x,g,S){return new r(S,x-g,x)}var Ln=new Set([103,109,115,105,121,117,100,118]),qn=class{constructor(x){this.type=x.type,this.value=x.value,this.start=x.start,this.end=x.end,this.loc=new n(x.startLoc,x.endLoc)}},Ir=class extends Ue{constructor(x,g){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(S,$,N,H)=>this.options.errorRecovery?(this.raise(v.InvalidDigit,tr(S,$,N),{radix:H}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(S,$,N)=>{this.recordStrictModeErrors(v.StrictNumericEscape,tr(S,$,N))},unterminated:(S,$,N)=>{throw this.raise(v.UnterminatedString,tr(S-1,$,N))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(S,$,N)=>{throw this.raise(v.UnterminatedTemplate,tr(S,$,N))}}),this.state=new Pe,this.state.init(x),this.input=g,this.length=g.length,this.comments=[],this.isLookahead=!1}pushToken(x){this.tokens.length=this.state.tokensLength,this.tokens.push(x),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new qn(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(x){return this.match(x)?(this.next(),!0):!1}match(x){return this.state.type===x}createLookaheadState(x){return{pos:x.pos,value:null,type:x.type,start:x.start,end:x.end,context:[this.curContext()],inType:x.inType,startLoc:x.startLoc,lastTokEndLoc:x.lastTokEndLoc,curLine:x.curLine,lineStart:x.lineStart,curPosition:x.curPosition}}lookahead(){let x=this.state;this.state=this.createLookaheadState(x),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let g=this.state;return this.state=x,g}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(x){return Jt.lastIndex=x,Jt.test(this.input)?Jt.lastIndex:x}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(x){return Gt.lastIndex=x,Gt.test(this.input)?Gt.lastIndex:x}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(x){let g=this.input.charCodeAt(x);if((g&64512)===55296&&++xthis.raise(g,S)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(x){let g;this.isLookahead||(g=this.state.curPosition());let S=this.state.pos,$=this.input.indexOf(x,S+2);if($===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=$+x.length,wt.lastIndex=S+2;wt.test(this.input)&&wt.lastIndex<=$;)++this.state.curLine,this.state.lineStart=wt.lastIndex;if(this.isLookahead)return;let N={type:"CommentBlock",value:this.input.slice(S+2,$),start:S,end:$+x.length,loc:new n(g,this.state.curPosition())};return this.options.tokens&&this.pushToken(N),N}skipLineComment(x){let g=this.state.pos,S;this.isLookahead||(S=this.state.curPosition());let $=this.input.charCodeAt(this.state.pos+=x);if(this.state.posx)){let N=this.skipLineComment(3);N!==void 0&&(this.addComment(N),this.options.attachComment&&g.push(N))}else break e}else if(S===60&&!this.inModule&&this.options.annexB){let $=this.state.pos;if(this.input.charCodeAt($+1)===33&&this.input.charCodeAt($+2)===45&&this.input.charCodeAt($+3)===45){let N=this.skipLineComment(4);N!==void 0&&(this.addComment(N),this.options.attachComment&&g.push(N))}else break e}else break e}}if(g.length>0){let S=this.state.pos,$={start:x,end:S,comments:g,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push($)}}finishToken(x,g){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let S=this.state.type;this.state.type=x,this.state.value=g,this.isLookahead||this.updateContext(S)}replaceToken(x){this.state.type=x,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let x=this.state.pos+1,g=this.codePointAtPos(x);if(g>=48&&g<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(g===123||g===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(g===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,g===123?this.finishToken(7):this.finishToken(1)}else It(g)?(++this.state.pos,this.finishToken(138,this.readWord1(g))):g===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let x=this.input.charCodeAt(this.state.pos+1);if(x>=48&&x<=57){this.readNumber(!0);return}x===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let x=this.input.charCodeAt(this.state.pos+1);if(x!==33)return!1;let g=this.state.pos;for(this.state.pos+=1;!Et(x)&&++this.state.pos=48&&g<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(x){switch(x){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let g=this.input.charCodeAt(this.state.pos+1);if(g===120||g===88){this.readRadixNumber(16);return}if(g===111||g===79){this.readRadixNumber(8);return}if(g===98||g===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(x);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(x);return;case 124:case 38:this.readToken_pipe_amp(x);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(x);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(x);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(It(x)){this.readWord(x);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(x)})}finishOp(x,g){let S=this.input.slice(this.state.pos,this.state.pos+g);this.state.pos+=g,this.finishToken(x,S)}readRegexp(){let x=this.state.startLoc,g=this.state.start+1,S,$,{pos:N}=this.state;for(;;++N){if(N>=this.length)throw this.raise(v.UnterminatedRegExp,i(x,1));let ie=this.input.charCodeAt(N);if(Et(ie))throw this.raise(v.UnterminatedRegExp,i(x,1));if(S)S=!1;else{if(ie===91)$=!0;else if(ie===93&&$)$=!1;else if(ie===47&&!$)break;S=ie===92}}let H=this.input.slice(g,N);++N;let q="",Z=()=>i(x,N+2-g);for(;N=2&&this.input.charCodeAt(g)===48;if(ie){let qe=this.input.slice(g,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,S),!this.state.strict){let Qe=qe.indexOf("_");Qe>0&&this.raise(v.ZeroDigitNumericSeparator,i(S,Qe))}Z=ie&&!/[89]/.test(qe)}let ne=this.input.charCodeAt(this.state.pos);if(ne===46&&!Z&&(++this.state.pos,this.readInt(10),$=!0,ne=this.input.charCodeAt(this.state.pos)),(ne===69||ne===101)&&!Z&&(ne=this.input.charCodeAt(++this.state.pos),(ne===43||ne===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,S),$=!0,q=!0,ne=this.input.charCodeAt(this.state.pos)),ne===110&&(($||ie)&&this.raise(v.InvalidBigIntLiteral,S),++this.state.pos,N=!0),ne===109&&(this.expectPlugin("decimal",this.state.curPosition()),(q||ie)&&this.raise(v.InvalidDecimal,S),++this.state.pos,H=!0),It(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());let Se=this.input.slice(g,this.state.pos).replace(/[_mn]/g,"");if(N){this.finishToken(135,Se);return}if(H){this.finishToken(136,Se);return}let Be=Z?parseInt(Se,8):parseFloat(Se);this.finishToken(134,Be)}readCodePoint(x){let{code:g,pos:S}=Ft(this.input,this.state.pos,this.state.lineStart,this.state.curLine,x,this.errorHandlers_readCodePoint);return this.state.pos=S,g}readString(x){let{str:g,pos:S,curLine:$,lineStart:N}=Dr(x===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=S+1,this.state.lineStart=N,this.state.curLine=$,this.finishToken(133,g)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let x=this.input[this.state.pos],{str:g,firstInvalidLoc:S,pos:$,curLine:N,lineStart:H}=Dr("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=$+1,this.state.lineStart=H,this.state.curLine=N,S&&(this.state.firstInvalidTemplateEscapePos=new r(S.curLine,S.pos-S.lineStart,S.pos)),this.input.codePointAt($)===96?this.finishToken(24,S?null:x+g+"`"):(this.state.pos++,this.finishToken(25,S?null:x+g+"${"))}recordStrictModeErrors(x,g){let S=g.index;this.state.strict&&!this.state.strictErrors.has(S)?this.raise(x,g):this.state.strictErrors.set(S,[x,g])}readWord1(x){this.state.containsEsc=!1;let g="",S=this.state.pos,$=this.state.pos;for(x!==void 0&&(this.state.pos+=x<=65535?1:2);this.state.pos=0;q--){let Z=H[q];if(Z.loc.index===N)return H[q]=x($,S);if(Z.loc.indexthis.hasPlugin(g)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:x})}errorBuilder(x){return(g,S,$)=>{this.raise(x,tr(g,S,$))}}},xo=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},qc=class{constructor(x){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=x}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new xo)}exit(){let x=this.stack.pop(),g=this.current();for(let[S,$]of Array.from(x.undefinedPrivateNames))g?g.undefinedPrivateNames.has(S)||g.undefinedPrivateNames.set(S,$):this.parser.raise(v.InvalidPrivateFieldResolution,$,{identifierName:S})}declarePrivateName(x,g,S){let{privateNames:$,loneAccessors:N,undefinedPrivateNames:H}=this.current(),q=$.has(x);if(g&3){let Z=q&&N.get(x);if(Z){let ie=Z&4,ne=g&4,Se=Z&3,Be=g&3;q=Se===Be||ie!==ne,q||N.delete(x)}else q||N.set(x,g)}q&&this.parser.raise(v.PrivateNameRedeclaration,S,{identifierName:x}),$.add(x),H.delete(x)}usePrivateName(x,g){let S;for(S of this.stack)if(S.privateNames.has(x))return;S?S.undefinedPrivateNames.set(x,g):this.parser.raise(v.InvalidPrivateFieldResolution,g,{identifierName:x})}},za=class{constructor(x=0){this.type=x}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},hm=class extends za{constructor(x){super(x),this.declarationErrors=new Map}recordDeclarationError(x,g){let S=g.index;this.declarationErrors.set(S,[x,g])}clearDeclarationError(x){this.declarationErrors.delete(x)}iterateErrors(x){this.declarationErrors.forEach(x)}},Kc=class{constructor(x){this.parser=void 0,this.stack=[new za],this.parser=x}enter(x){this.stack.push(x)}exit(){this.stack.pop()}recordParameterInitializerError(x,g){let S=g.loc.start,{stack:$}=this,N=$.length-1,H=$[N];for(;!H.isCertainlyParameterDeclaration();){if(H.canBeArrowParameterDeclaration())H.recordDeclarationError(x,S);else return;H=$[--N]}this.parser.raise(x,S)}recordArrowParameterBindingError(x,g){let{stack:S}=this,$=S[S.length-1],N=g.loc.start;if($.isCertainlyParameterDeclaration())this.parser.raise(x,N);else if($.canBeArrowParameterDeclaration())$.recordDeclarationError(x,N);else return}recordAsyncArrowParametersError(x){let{stack:g}=this,S=g.length-1,$=g[S];for(;$.canBeArrowParameterDeclaration();)$.type===2&&$.recordDeclarationError(v.AwaitBindingIdentifier,x),$=g[--S]}validateAsPattern(){let{stack:x}=this,g=x[x.length-1];g.canBeArrowParameterDeclaration()&&g.iterateErrors(([S,$])=>{this.parser.raise(S,$);let N=x.length-2,H=x[N];for(;H.canBeArrowParameterDeclaration();)H.clearDeclarationError($.index),H=x[--N]})}};function V1(){return new za(3)}function hu(){return new hm(1)}function dm(){return new hm(2)}function gf(){return new za}var G1=class{constructor(){this.stacks=[]}enter(x){this.stacks.push(x)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function Jc(x,g){return(x?2:0)|(g?1:0)}var q1=class extends Ir{addExtra(x,g,S,$=!0){if(!x)return;let N=x.extra=x.extra||{};$?N[g]=S:Object.defineProperty(N,g,{enumerable:$,value:S})}isContextual(x){return this.state.type===x&&!this.state.containsEsc}isUnparsedContextual(x,g){let S=x+g.length;if(this.input.slice(x,S)===g){let $=this.input.charCodeAt(S);return!(sr($)||($&64512)===55296)}return!1}isLookaheadContextual(x){let g=this.nextTokenStart();return this.isUnparsedContextual(g,x)}eatContextual(x){return this.isContextual(x)?(this.next(),!0):!1}expectContextual(x,g){if(!this.eatContextual(x)){if(g!=null)throw this.raise(g,this.state.startLoc);this.unexpected(null,x)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return it.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Ie.lastIndex=this.state.end,Ie.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(x=!0){(x?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(x,g){this.eat(x)||this.unexpected(g,x)}tryParse(x,g=this.state.clone()){let S={node:null};try{let $=x((N=null)=>{throw S.node=N,S});if(this.state.errors.length>g.errors.length){let N=this.state;return this.state=g,this.state.tokensLength=N.tokensLength,{node:$,error:N.errors[g.errors.length],thrown:!1,aborted:!1,failState:N}}return{node:$,error:null,thrown:!1,aborted:!1,failState:null}}catch($){let N=this.state;if(this.state=g,$ instanceof SyntaxError)return{node:null,error:$,thrown:!0,aborted:!1,failState:N};if($===S)return{node:S.node,error:null,thrown:!1,aborted:!0,failState:N};throw $}}checkExpressionErrors(x,g){if(!x)return!1;let{shorthandAssignLoc:S,doubleProtoLoc:$,privateKeyLoc:N,optionalParametersLoc:H}=x,q=!!S||!!$||!!H||!!N;if(!g)return q;S!=null&&this.raise(v.InvalidCoverInitializedName,S),$!=null&&this.raise(v.DuplicateProto,$),N!=null&&this.raise(v.UnexpectedPrivateField,N),H!=null&&this.unexpected(H)}isLiteralPropertyName(){return Re(this.state.type)}isPrivateName(x){return x.type==="PrivateName"}getPrivateNameSV(x){return x.id.name}hasPropertyAsPrivateName(x){return(x.type==="MemberExpression"||x.type==="OptionalMemberExpression")&&this.isPrivateName(x.property)}isObjectProperty(x){return x.type==="ObjectProperty"}isObjectMethod(x){return x.type==="ObjectMethod"}initializeScopes(x=this.options.sourceType==="module"){let g=this.state.labels;this.state.labels=[];let S=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let $=this.inModule;this.inModule=x;let N=this.scope,H=this.getScopeHandler();this.scope=new H(this,x);let q=this.prodParam;this.prodParam=new G1;let Z=this.classScope;this.classScope=new qc(this);let ie=this.expressionScope;return this.expressionScope=new Kc(this),()=>{this.state.labels=g,this.exportedIdentifiers=S,this.inModule=$,this.scope=N,this.prodParam=q,this.classScope=Z,this.expressionScope=ie}}enterInitialScopes(){let x=0;this.inModule&&(x|=2),this.scope.enter(1),this.prodParam.enter(x)}checkDestructuringPrivate(x){let{privateKeyLoc:g}=x;g!==null&&this.expectPlugin("destructuringPrivate",g)}},Xc=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},du=class{constructor(x,g,S){this.type="",this.start=g,this.end=0,this.loc=new n(S),x!=null&&x.options.ranges&&(this.range=[g,0]),x!=null&&x.filename&&(this.loc.filename=x.filename)}},mf=du.prototype;mf.__clone=function(){let x=new du(void 0,this.start,this.loc.start),g=Object.keys(this);for(let S=0,$=g.length;S<$;S++){let N=g[S];N!=="leadingComments"&&N!=="trailingComments"&&N!=="innerComments"&&(x[N]=this[N])}return x};function K1(x){return fs(x)}function fs(x){let{type:g,start:S,end:$,loc:N,range:H,extra:q,name:Z}=x,ie=Object.create(mf);return ie.type=g,ie.start=S,ie.end=$,ie.loc=N,ie.range=H,ie.extra=q,ie.name=Z,g==="Placeholder"&&(ie.expectedNode=x.expectedNode),ie}function Yc(x){let{type:g,start:S,end:$,loc:N,range:H,extra:q}=x;if(g==="Placeholder")return K1(x);let Z=Object.create(mf);return Z.type=g,Z.start=S,Z.end=$,Z.loc=N,Z.range=H,x.raw!==void 0?Z.raw=x.raw:Z.extra=q,Z.value=x.value,Z}var Ha=class extends q1{startNode(){let x=this.state.startLoc;return new du(this,x.index,x)}startNodeAt(x){return new du(this,x.index,x)}startNodeAtNode(x){return this.startNodeAt(x.loc.start)}finishNode(x,g){return this.finishNodeAt(x,g,this.state.lastTokEndLoc)}finishNodeAt(x,g,S){return x.type=g,x.end=S.index,x.loc.end=S,this.options.ranges&&(x.range[1]=S.index),this.options.attachComment&&this.processComment(x),x}resetStartLocation(x,g){x.start=g.index,x.loc.start=g,this.options.ranges&&(x.range[0]=g.index)}resetEndLocation(x,g=this.state.lastTokEndLoc){x.end=g.index,x.loc.end=g,this.options.ranges&&(x.range[1]=g.index)}resetStartLocationFromNode(x,g){this.resetStartLocation(x,g.loc.start)}},J1=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),lt=b`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:x})=>`Cannot overwrite reserved type ${x}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:x,enumName:g})=>`Boolean enum members need to be initialized. Use either \`${x} = true,\` or \`${x} = false,\` in enum \`${g}\`.`,EnumDuplicateMemberName:({memberName:x,enumName:g})=>`Enum member names need to be unique, but the name \`${x}\` has already been used before in enum \`${g}\`.`,EnumInconsistentMemberValues:({enumName:x})=>`Enum \`${x}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:x,enumName:g})=>`Enum type \`${x}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${g}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:x})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${x}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:x,memberName:g,explicitType:S})=>`Enum \`${x}\` has type \`${S}\`, so the initializer of \`${g}\` needs to be a ${S} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:x,memberName:g})=>`Symbol enum members cannot be initialized. Use \`${g},\` in enum \`${x}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:x,memberName:g})=>`The enum member initializer for \`${g}\` needs to be a literal (either a boolean, number, or string) in enum \`${x}\`.`,EnumInvalidMemberName:({enumName:x,memberName:g,suggestion:S})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${g}\`, consider using \`${S}\`, in enum \`${x}\`.`,EnumNumberMemberNotInitialized:({enumName:x,memberName:g})=>`Number enum members need to be initialized, e.g. \`${g} = 1\` in enum \`${x}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:x})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${x}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:x})=>`Unexpected reserved type ${x}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:x,suggestion:g})=>`\`declare export ${x}\` is not supported. Use \`${g}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function wo(x){return x.type==="DeclareExportAllDeclaration"||x.type==="DeclareExportDeclaration"&&(!x.declaration||x.declaration.type!=="TypeAlias"&&x.declaration.type!=="InterfaceDeclaration")}function fm(x){return x.importKind==="type"||x.importKind==="typeof"}var X1={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Y1(x,g){let S=[],$=[];for(let N=0;Nclass extends x{constructor(...g){super(...g),this.flowPragma=void 0}getScopeHandler(){return we}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(g,S){g!==133&&g!==13&&g!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(g,S)}addComment(g){if(this.flowPragma===void 0){let S=Q1.exec(g.value);if(S)if(S[1]==="flow")this.flowPragma="flow";else if(S[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(g)}flowParseTypeInitialiser(g){let S=this.state.inType;this.state.inType=!0,this.expect(g||14);let $=this.flowParseType();return this.state.inType=S,$}flowParsePredicate(){let g=this.startNode(),S=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>S.index+1&&this.raise(lt.UnexpectedSpaceBetweenModuloChecks,S),this.eat(10)?(g.value=super.parseExpression(),this.expect(11),this.finishNode(g,"DeclaredPredicate")):this.finishNode(g,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let g=this.state.inType;this.state.inType=!0,this.expect(14);let S=null,$=null;return this.match(54)?(this.state.inType=g,$=this.flowParsePredicate()):(S=this.flowParseType(),this.state.inType=g,this.match(54)&&($=this.flowParsePredicate())),[S,$]}flowParseDeclareClass(g){return this.next(),this.flowParseInterfaceish(g,!0),this.finishNode(g,"DeclareClass")}flowParseDeclareFunction(g){this.next();let S=g.id=this.parseIdentifier(),$=this.startNode(),N=this.startNode();this.match(47)?$.typeParameters=this.flowParseTypeParameterDeclaration():$.typeParameters=null,this.expect(10);let H=this.flowParseFunctionTypeParams();return $.params=H.params,$.rest=H.rest,$.this=H._this,this.expect(11),[$.returnType,g.predicate]=this.flowParseTypeAndPredicateInitialiser(),N.typeAnnotation=this.finishNode($,"FunctionTypeAnnotation"),S.typeAnnotation=this.finishNode(N,"TypeAnnotation"),this.resetEndLocation(S),this.semicolon(),this.scope.declareName(g.id.name,2048,g.id.loc.start),this.finishNode(g,"DeclareFunction")}flowParseDeclare(g,S){if(this.match(80))return this.flowParseDeclareClass(g);if(this.match(68))return this.flowParseDeclareFunction(g);if(this.match(74))return this.flowParseDeclareVariable(g);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(g):(S&&this.raise(lt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(g));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(g);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(g);if(this.isContextual(129))return this.flowParseDeclareInterface(g);if(this.match(82))return this.flowParseDeclareExportDeclaration(g,S);this.unexpected()}flowParseDeclareVariable(g){return this.next(),g.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(g.id.name,5,g.id.loc.start),this.semicolon(),this.finishNode(g,"DeclareVariable")}flowParseDeclareModule(g){this.scope.enter(0),this.match(133)?g.id=super.parseExprAtom():g.id=this.parseIdentifier();let S=g.body=this.startNode(),$=S.body=[];for(this.expect(5);!this.match(8);){let q=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(lt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(q)):(this.expectContextual(125,lt.UnsupportedStatementInDeclareModule),q=this.flowParseDeclare(q,!0)),$.push(q)}this.scope.exit(),this.expect(8),this.finishNode(S,"BlockStatement");let N=null,H=!1;return $.forEach(q=>{wo(q)?(N==="CommonJS"&&this.raise(lt.AmbiguousDeclareModuleKind,q),N="ES"):q.type==="DeclareModuleExports"&&(H&&this.raise(lt.DuplicateDeclareModuleExports,q),N==="ES"&&this.raise(lt.AmbiguousDeclareModuleKind,q),N="CommonJS",H=!0)}),g.kind=N||"CommonJS",this.finishNode(g,"DeclareModule")}flowParseDeclareExportDeclaration(g,S){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?g.declaration=this.flowParseDeclare(this.startNode()):(g.declaration=this.flowParseType(),this.semicolon()),g.default=!0,this.finishNode(g,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!S){let $=this.state.value;throw this.raise(lt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:$,suggestion:X1[$]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return g.declaration=this.flowParseDeclare(this.startNode()),g.default=!1,this.finishNode(g,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return g=this.parseExport(g,null),g.type==="ExportNamedDeclaration"&&(g.type="ExportDeclaration",g.default=!1,delete g.exportKind),g.type="Declare"+g.type,g;this.unexpected()}flowParseDeclareModuleExports(g){return this.next(),this.expectContextual(111),g.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(g,"DeclareModuleExports")}flowParseDeclareTypeAlias(g){this.next();let S=this.flowParseTypeAlias(g);return S.type="DeclareTypeAlias",S}flowParseDeclareOpaqueType(g){this.next();let S=this.flowParseOpaqueType(g,!0);return S.type="DeclareOpaqueType",S}flowParseDeclareInterface(g){return this.next(),this.flowParseInterfaceish(g,!1),this.finishNode(g,"DeclareInterface")}flowParseInterfaceish(g,S){if(g.id=this.flowParseRestrictedIdentifier(!S,!0),this.scope.declareName(g.id.name,S?17:8201,g.id.loc.start),this.match(47)?g.typeParameters=this.flowParseTypeParameterDeclaration():g.typeParameters=null,g.extends=[],this.eat(81))do g.extends.push(this.flowParseInterfaceExtends());while(!S&&this.eat(12));if(S){if(g.implements=[],g.mixins=[],this.eatContextual(117))do g.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do g.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}g.body=this.flowParseObjectType({allowStatic:S,allowExact:!1,allowSpread:!1,allowProto:S,allowInexact:!1})}flowParseInterfaceExtends(){let g=this.startNode();return g.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?g.typeParameters=this.flowParseTypeParameterInstantiation():g.typeParameters=null,this.finishNode(g,"InterfaceExtends")}flowParseInterface(g){return this.flowParseInterfaceish(g,!1),this.finishNode(g,"InterfaceDeclaration")}checkNotUnderscore(g){g==="_"&&this.raise(lt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(g,S,$){J1.has(g)&&this.raise($?lt.AssignReservedType:lt.UnexpectedReservedType,S,{reservedType:g})}flowParseRestrictedIdentifier(g,S){return this.checkReservedType(this.state.value,this.state.startLoc,S),this.parseIdentifier(g)}flowParseTypeAlias(g){return g.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(g.id.name,8201,g.id.loc.start),this.match(47)?g.typeParameters=this.flowParseTypeParameterDeclaration():g.typeParameters=null,g.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(g,"TypeAlias")}flowParseOpaqueType(g,S){return this.expectContextual(130),g.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(g.id.name,8201,g.id.loc.start),this.match(47)?g.typeParameters=this.flowParseTypeParameterDeclaration():g.typeParameters=null,g.supertype=null,this.match(14)&&(g.supertype=this.flowParseTypeInitialiser(14)),g.impltype=null,S||(g.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(g,"OpaqueType")}flowParseTypeParameter(g=!1){let S=this.state.startLoc,$=this.startNode(),N=this.flowParseVariance(),H=this.flowParseTypeAnnotatableIdentifier();return $.name=H.name,$.variance=N,$.bound=H.typeAnnotation,this.match(29)?(this.eat(29),$.default=this.flowParseType()):g&&this.raise(lt.MissingTypeParamDefault,S),this.finishNode($,"TypeParameter")}flowParseTypeParameterDeclaration(){let g=this.state.inType,S=this.startNode();S.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let $=!1;do{let N=this.flowParseTypeParameter($);S.params.push(N),N.default&&($=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=g,this.finishNode(S,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let g=this.startNode(),S=this.state.inType;g.params=[],this.state.inType=!0,this.expect(47);let $=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)g.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=$,this.expect(48),this.state.inType=S,this.finishNode(g,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let g=this.startNode(),S=this.state.inType;for(g.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)g.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=S,this.finishNode(g,"TypeParameterInstantiation")}flowParseInterfaceType(){let g=this.startNode();if(this.expectContextual(129),g.extends=[],this.eat(81))do g.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return g.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(g,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(g,S,$){return g.static=S,this.lookahead().type===14?(g.id=this.flowParseObjectPropertyKey(),g.key=this.flowParseTypeInitialiser()):(g.id=null,g.key=this.flowParseType()),this.expect(3),g.value=this.flowParseTypeInitialiser(),g.variance=$,this.finishNode(g,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(g,S){return g.static=S,g.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(g.method=!0,g.optional=!1,g.value=this.flowParseObjectTypeMethodish(this.startNodeAt(g.loc.start))):(g.method=!1,this.eat(17)&&(g.optional=!0),g.value=this.flowParseTypeInitialiser()),this.finishNode(g,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(g){for(g.params=[],g.rest=null,g.typeParameters=null,g.this=null,this.match(47)&&(g.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(g.this=this.flowParseFunctionTypeParam(!0),g.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)g.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(g.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),g.returnType=this.flowParseTypeInitialiser(),this.finishNode(g,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(g,S){let $=this.startNode();return g.static=S,g.value=this.flowParseObjectTypeMethodish($),this.finishNode(g,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:g,allowExact:S,allowSpread:$,allowProto:N,allowInexact:H}){let q=this.state.inType;this.state.inType=!0;let Z=this.startNode();Z.callProperties=[],Z.properties=[],Z.indexers=[],Z.internalSlots=[];let ie,ne,Se=!1;for(S&&this.match(6)?(this.expect(6),ie=9,ne=!0):(this.expect(5),ie=8,ne=!1),Z.exact=ne;!this.match(ie);){let qe=!1,Qe=null,lr=null,dn=this.startNode();if(N&&this.isContextual(118)){let Yr=this.lookahead();Yr.type!==14&&Yr.type!==17&&(this.next(),Qe=this.state.startLoc,g=!1)}if(g&&this.isContextual(106)){let Yr=this.lookahead();Yr.type!==14&&Yr.type!==17&&(this.next(),qe=!0)}let wr=this.flowParseVariance();if(this.eat(0))Qe!=null&&this.unexpected(Qe),this.eat(0)?(wr&&this.unexpected(wr.loc.start),Z.internalSlots.push(this.flowParseObjectTypeInternalSlot(dn,qe))):Z.indexers.push(this.flowParseObjectTypeIndexer(dn,qe,wr));else if(this.match(10)||this.match(47))Qe!=null&&this.unexpected(Qe),wr&&this.unexpected(wr.loc.start),Z.callProperties.push(this.flowParseObjectTypeCallProperty(dn,qe));else{let Yr="init";if(this.isContextual(99)||this.isContextual(104)){let ix=this.lookahead();Re(ix.type)&&(Yr=this.state.value,this.next())}let Ji=this.flowParseObjectTypeProperty(dn,qe,Qe,wr,Yr,$,H??!ne);Ji===null?(Se=!0,lr=this.state.lastTokStartLoc):Z.properties.push(Ji)}this.flowObjectTypeSemicolon(),lr&&!this.match(8)&&!this.match(9)&&this.raise(lt.UnexpectedExplicitInexactInObject,lr)}this.expect(ie),$&&(Z.inexact=Se);let Be=this.finishNode(Z,"ObjectTypeAnnotation");return this.state.inType=q,Be}flowParseObjectTypeProperty(g,S,$,N,H,q,Z){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(q?Z||this.raise(lt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(lt.InexactInsideNonObject,this.state.lastTokStartLoc),N&&this.raise(lt.InexactVariance,N),null):(q||this.raise(lt.UnexpectedSpreadType,this.state.lastTokStartLoc),$!=null&&this.unexpected($),N&&this.raise(lt.SpreadVariance,N),g.argument=this.flowParseType(),this.finishNode(g,"ObjectTypeSpreadProperty"));{g.key=this.flowParseObjectPropertyKey(),g.static=S,g.proto=$!=null,g.kind=H;let ie=!1;return this.match(47)||this.match(10)?(g.method=!0,$!=null&&this.unexpected($),N&&this.unexpected(N.loc.start),g.value=this.flowParseObjectTypeMethodish(this.startNodeAt(g.loc.start)),(H==="get"||H==="set")&&this.flowCheckGetterSetterParams(g),!q&&g.key.name==="constructor"&&g.value.this&&this.raise(lt.ThisParamBannedInConstructor,g.value.this)):(H!=="init"&&this.unexpected(),g.method=!1,this.eat(17)&&(ie=!0),g.value=this.flowParseTypeInitialiser(),g.variance=N),g.optional=ie,this.finishNode(g,"ObjectTypeProperty")}}flowCheckGetterSetterParams(g){let S=g.kind==="get"?0:1,$=g.value.params.length+(g.value.rest?1:0);g.value.this&&this.raise(g.kind==="get"?lt.GetterMayNotHaveThisParam:lt.SetterMayNotHaveThisParam,g.value.this),$!==S&&this.raise(g.kind==="get"?v.BadGetterArity:v.BadSetterArity,g),g.kind==="set"&&g.value.rest&&this.raise(v.BadSetterRestParameter,g)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(g,S){g!=null||(g=this.state.startLoc);let $=S||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let N=this.startNodeAt(g);N.qualification=$,N.id=this.flowParseRestrictedIdentifier(!0),$=this.finishNode(N,"QualifiedTypeIdentifier")}return $}flowParseGenericType(g,S){let $=this.startNodeAt(g);return $.typeParameters=null,$.id=this.flowParseQualifiedTypeIdentifier(g,S),this.match(47)&&($.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode($,"GenericTypeAnnotation")}flowParseTypeofType(){let g=this.startNode();return this.expect(87),g.argument=this.flowParsePrimaryType(),this.finishNode(g,"TypeofTypeAnnotation")}flowParseTupleType(){let g=this.startNode();for(g.types=[],this.expect(0);this.state.possuper.parseFunctionBody(g,!0,$));return}super.parseFunctionBody(g,!1,$)}parseFunctionBodyAndFinish(g,S,$=!1){if(this.match(14)){let N=this.startNode();[N.typeAnnotation,g.predicate]=this.flowParseTypeAndPredicateInitialiser(),g.returnType=N.typeAnnotation?this.finishNode(N,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(g,S,$)}parseStatementLike(g){if(this.state.strict&&this.isContextual(129)){let $=this.lookahead();if(ke($.type)){let N=this.startNode();return this.next(),this.flowParseInterface(N)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let $=this.startNode();return this.next(),this.flowParseEnumDeclaration($)}let S=super.parseStatementLike(g);return this.flowPragma===void 0&&!this.isValidDirective(S)&&(this.flowPragma=null),S}parseExpressionStatement(g,S,$){if(S.type==="Identifier"){if(S.name==="declare"){if(this.match(80)||ce(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(g)}else if(ce(this.state.type)){if(S.name==="interface")return this.flowParseInterface(g);if(S.name==="type")return this.flowParseTypeAlias(g);if(S.name==="opaque")return this.flowParseOpaqueType(g,!1)}}return super.parseExpressionStatement(g,S,$)}shouldParseExportDeclaration(){let{type:g}=this.state;return ye(g)||this.shouldParseEnums()&&g===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:g}=this.state;return ye(g)||this.shouldParseEnums()&&g===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let g=this.startNode();return this.next(),this.flowParseEnumDeclaration(g)}return super.parseExportDefaultExpression()}parseConditional(g,S,$){if(!this.match(17))return g;if(this.state.maybeInArrowParameters){let Be=this.lookaheadCharCode();if(Be===44||Be===61||Be===58||Be===41)return this.setOptionalParametersError($),g}this.expect(17);let N=this.state.clone(),H=this.state.noArrowAt,q=this.startNodeAt(S),{consequent:Z,failed:ie}=this.tryParseConditionalConsequent(),[ne,Se]=this.getArrowLikeExpressions(Z);if(ie||Se.length>0){let Be=[...H];if(Se.length>0){this.state=N,this.state.noArrowAt=Be;for(let qe=0;qe1&&this.raise(lt.AmbiguousConditionalArrow,N.startLoc),ie&&ne.length===1&&(this.state=N,Be.push(ne[0].start),this.state.noArrowAt=Be,{consequent:Z,failed:ie}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(Z,!0),this.state.noArrowAt=H,this.expect(14),q.test=g,q.consequent=Z,q.alternate=this.forwardNoArrowParamsConversionAt(q,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(q,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let g=this.parseMaybeAssignAllowIn(),S=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:g,failed:S}}getArrowLikeExpressions(g,S){let $=[g],N=[];for(;$.length!==0;){let H=$.pop();H.type==="ArrowFunctionExpression"&&H.body.type!=="BlockStatement"?(H.typeParameters||!H.returnType?this.finishArrowValidation(H):N.push(H),$.push(H.body)):H.type==="ConditionalExpression"&&($.push(H.consequent),$.push(H.alternate))}return S?(N.forEach(H=>this.finishArrowValidation(H)),[N,[]]):Y1(N,H=>H.params.every(q=>this.isAssignable(q,!0)))}finishArrowValidation(g){var S;this.toAssignableList(g.params,(S=g.extra)==null?void 0:S.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(g,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(g,S){let $;return this.state.noArrowParamsConversionAt.includes(g.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),$=S(),this.state.noArrowParamsConversionAt.pop()):$=S(),$}parseParenItem(g,S){let $=super.parseParenItem(g,S);if(this.eat(17)&&($.optional=!0,this.resetEndLocation(g)),this.match(14)){let N=this.startNodeAt(S);return N.expression=$,N.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(N,"TypeCastExpression")}return $}assertModuleNodeAllowed(g){g.type==="ImportDeclaration"&&(g.importKind==="type"||g.importKind==="typeof")||g.type==="ExportNamedDeclaration"&&g.exportKind==="type"||g.type==="ExportAllDeclaration"&&g.exportKind==="type"||super.assertModuleNodeAllowed(g)}parseExportDeclaration(g){if(this.isContextual(130)){g.exportKind="type";let S=this.startNode();return this.next(),this.match(5)?(g.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(g),null):this.flowParseTypeAlias(S)}else if(this.isContextual(131)){g.exportKind="type";let S=this.startNode();return this.next(),this.flowParseOpaqueType(S,!1)}else if(this.isContextual(129)){g.exportKind="type";let S=this.startNode();return this.next(),this.flowParseInterface(S)}else if(this.shouldParseEnums()&&this.isContextual(126)){g.exportKind="value";let S=this.startNode();return this.next(),this.flowParseEnumDeclaration(S)}else return super.parseExportDeclaration(g)}eatExportStar(g){return super.eatExportStar(g)?!0:this.isContextual(130)&&this.lookahead().type===55?(g.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(g){let{startLoc:S}=this.state,$=super.maybeParseExportNamespaceSpecifier(g);return $&&g.exportKind==="type"&&this.unexpected(S),$}parseClassId(g,S,$){super.parseClassId(g,S,$),this.match(47)&&(g.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(g,S,$){let{startLoc:N}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(g,S))return;S.declare=!0}super.parseClassMember(g,S,$),S.declare&&(S.type!=="ClassProperty"&&S.type!=="ClassPrivateProperty"&&S.type!=="PropertyDefinition"?this.raise(lt.DeclareClassElement,N):S.value&&this.raise(lt.DeclareClassFieldInitializer,S.value))}isIterator(g){return g==="iterator"||g==="asyncIterator"}readIterator(){let g=super.readWord1(),S="@@"+g;(!this.isIterator(g)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:S}),this.finishToken(132,S)}getTokenFromCode(g){let S=this.input.charCodeAt(this.state.pos+1);g===123&&S===124?this.finishOp(6,2):this.state.inType&&(g===62||g===60)?this.finishOp(g===62?48:47,1):this.state.inType&&g===63?S===46?this.finishOp(18,2):this.finishOp(17,1):Ki(g,S,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(g)}isAssignable(g,S){return g.type==="TypeCastExpression"?this.isAssignable(g.expression,S):super.isAssignable(g,S)}toAssignable(g,S=!1){!S&&g.type==="AssignmentExpression"&&g.left.type==="TypeCastExpression"&&(g.left=this.typeCastToParameter(g.left)),super.toAssignable(g,S)}toAssignableList(g,S,$){for(let N=0;N1||!S)&&this.raise(lt.TypeCastInPattern,H.typeAnnotation)}return g}parseArrayLike(g,S,$,N){let H=super.parseArrayLike(g,S,$,N);return S&&!this.state.maybeInArrowParameters&&this.toReferencedList(H.elements),H}isValidLVal(g,S,$){return g==="TypeCastExpression"||super.isValidLVal(g,S,$)}parseClassProperty(g){return this.match(14)&&(g.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(g)}parseClassPrivateProperty(g){return this.match(14)&&(g.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(g)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(g){return!this.match(14)&&super.isNonstaticConstructor(g)}pushClassMethod(g,S,$,N,H,q){if(S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(g,S,$,N,H,q),S.params&&H){let Z=S.params;Z.length>0&&this.isThisParam(Z[0])&&this.raise(lt.ThisParamBannedInConstructor,S)}else if(S.type==="MethodDefinition"&&H&&S.value.params){let Z=S.value.params;Z.length>0&&this.isThisParam(Z[0])&&this.raise(lt.ThisParamBannedInConstructor,S)}}pushClassPrivateMethod(g,S,$,N){S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(g,S,$,N)}parseClassSuper(g){if(super.parseClassSuper(g),g.superClass&&this.match(47)&&(g.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let S=g.implements=[];do{let $=this.startNode();$.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?$.typeParameters=this.flowParseTypeParameterInstantiation():$.typeParameters=null,S.push(this.finishNode($,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(g){super.checkGetterSetterParams(g);let S=this.getObjectOrClassMethodParams(g);if(S.length>0){let $=S[0];this.isThisParam($)&&g.kind==="get"?this.raise(lt.GetterMayNotHaveThisParam,$):this.isThisParam($)&&this.raise(lt.SetterMayNotHaveThisParam,$)}}parsePropertyNamePrefixOperator(g){g.variance=this.flowParseVariance()}parseObjPropValue(g,S,$,N,H,q,Z){g.variance&&this.unexpected(g.variance.loc.start),delete g.variance;let ie;this.match(47)&&!q&&(ie=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let ne=super.parseObjPropValue(g,S,$,N,H,q,Z);return ie&&((ne.value||ne).typeParameters=ie),ne}parseAssignableListItemTypes(g){return this.eat(17)&&(g.type!=="Identifier"&&this.raise(lt.PatternIsOptional,g),this.isThisParam(g)&&this.raise(lt.ThisParamMayNotBeOptional,g),g.optional=!0),this.match(14)?g.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(g)&&this.raise(lt.ThisParamAnnotationRequired,g),this.match(29)&&this.isThisParam(g)&&this.raise(lt.ThisParamNoDefault,g),this.resetEndLocation(g),g}parseMaybeDefault(g,S){let $=super.parseMaybeDefault(g,S);return $.type==="AssignmentPattern"&&$.typeAnnotation&&$.right.start<$.typeAnnotation.start&&this.raise(lt.TypeBeforeInitializer,$.typeAnnotation),$}checkImportReflection(g){super.checkImportReflection(g),g.module&&g.importKind!=="value"&&this.raise(lt.ImportReflectionHasImportType,g.specifiers[0].loc.start)}parseImportSpecifierLocal(g,S,$){S.local=fm(g)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),g.specifiers.push(this.finishImportSpecifier(S,$))}isPotentialImportPhase(g){if(super.isPotentialImportPhase(g))return!0;if(this.isContextual(130)){if(!g)return!0;let S=this.lookaheadCharCode();return S===123||S===42}return!g&&this.isContextual(87)}applyImportPhase(g,S,$,N){if(super.applyImportPhase(g,S,$,N),S){if(!$&&this.match(65))return;g.exportKind=$==="type"?$:"value"}else $==="type"&&this.match(55)&&this.unexpected(),g.importKind=$==="type"||$==="typeof"?$:"value"}parseImportSpecifier(g,S,$,N,H){let q=g.imported,Z=null;q.type==="Identifier"&&(q.name==="type"?Z="type":q.name==="typeof"&&(Z="typeof"));let ie=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let Se=this.parseIdentifier(!0);Z!==null&&!ke(this.state.type)?(g.imported=Se,g.importKind=Z,g.local=fs(Se)):(g.imported=q,g.importKind=null,g.local=this.parseIdentifier())}else{if(Z!==null&&ke(this.state.type))g.imported=this.parseIdentifier(!0),g.importKind=Z;else{if(S)throw this.raise(v.ImportBindingIsString,g,{importName:q.value});g.imported=q,g.importKind=null}this.eatContextual(93)?g.local=this.parseIdentifier():(ie=!0,g.local=fs(g.imported))}let ne=fm(g);return $&&ne&&this.raise(lt.ImportTypeShorthandOnlyInPureImport,g),($||ne)&&this.checkReservedType(g.local.name,g.local.loc.start,!0),ie&&!$&&!ne&&this.checkReservedWord(g.local.name,g.loc.start,!0,!0),this.finishImportSpecifier(g,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(g,S){let $=g.kind;$!=="get"&&$!=="set"&&this.match(47)&&(g.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(g,S)}parseVarId(g,S){super.parseVarId(g,S),this.match(14)&&(g.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(g.id))}parseAsyncArrowFromCallExpression(g,S){if(this.match(14)){let $=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,g.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=$}return super.parseAsyncArrowFromCallExpression(g,S)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(g,S){var $;let N=null,H;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(N=this.state.clone(),H=this.tryParse(()=>super.parseMaybeAssign(g,S),N),!H.error)return H.node;let{context:ie}=this.state,ne=ie[ie.length-1];(ne===k.j_oTag||ne===k.j_expr)&&ie.pop()}if(($=H)!=null&&$.error||this.match(47)){var q,Z;N=N||this.state.clone();let ie,ne=this.tryParse(Be=>{var qe;ie=this.flowParseTypeParameterDeclaration();let Qe=this.forwardNoArrowParamsConversionAt(ie,()=>{let dn=super.parseMaybeAssign(g,S);return this.resetStartLocationFromNode(dn,ie),dn});(qe=Qe.extra)!=null&&qe.parenthesized&&Be();let lr=this.maybeUnwrapTypeCastExpression(Qe);return lr.type!=="ArrowFunctionExpression"&&Be(),lr.typeParameters=ie,this.resetStartLocationFromNode(lr,ie),Qe},N),Se=null;if(ne.node&&this.maybeUnwrapTypeCastExpression(ne.node).type==="ArrowFunctionExpression"){if(!ne.error&&!ne.aborted)return ne.node.async&&this.raise(lt.UnexpectedTypeParameterBeforeAsyncArrowFunction,ie),ne.node;Se=ne.node}if((q=H)!=null&&q.node)return this.state=H.failState,H.node;if(Se)return this.state=ne.failState,Se;throw(Z=H)!=null&&Z.thrown?H.error:ne.thrown?ne.error:this.raise(lt.UnexpectedTokenAfterTypeParameter,ie)}return super.parseMaybeAssign(g,S)}parseArrow(g){if(this.match(14)){let S=this.tryParse(()=>{let $=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let N=this.startNode();return[N.typeAnnotation,g.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=$,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),N});if(S.thrown)return null;S.error&&(this.state=S.failState),g.returnType=S.node.typeAnnotation?this.finishNode(S.node,"TypeAnnotation"):null}return super.parseArrow(g)}shouldParseArrow(g){return this.match(14)||super.shouldParseArrow(g)}setArrowFunctionParameters(g,S){this.state.noArrowParamsConversionAt.includes(g.start)?g.params=S:super.setArrowFunctionParameters(g,S)}checkParams(g,S,$,N=!0){if(!($&&this.state.noArrowParamsConversionAt.includes(g.start))){for(let H=0;H0&&this.raise(lt.ThisParamMustBeFirst,g.params[H]);super.checkParams(g,S,$,N)}}parseParenAndDistinguishExpression(g){return super.parseParenAndDistinguishExpression(g&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(g,S,$){if(g.type==="Identifier"&&g.name==="async"&&this.state.noArrowAt.includes(S.index)){this.next();let N=this.startNodeAt(S);N.callee=g,N.arguments=super.parseCallExpressionArguments(11,!1),g=this.finishNode(N,"CallExpression")}else if(g.type==="Identifier"&&g.name==="async"&&this.match(47)){let N=this.state.clone(),H=this.tryParse(Z=>this.parseAsyncArrowWithTypeParameters(S)||Z(),N);if(!H.error&&!H.aborted)return H.node;let q=this.tryParse(()=>super.parseSubscripts(g,S,$),N);if(q.node&&!q.error)return q.node;if(H.node)return this.state=H.failState,H.node;if(q.node)return this.state=q.failState,q.node;throw H.error||q.error}return super.parseSubscripts(g,S,$)}parseSubscript(g,S,$,N){if(this.match(18)&&this.isLookaheadToken_lt()){if(N.optionalChainMember=!0,$)return N.stop=!0,g;this.next();let H=this.startNodeAt(S);return H.callee=g,H.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),H.arguments=this.parseCallExpressionArguments(11,!1),H.optional=!0,this.finishCallExpression(H,!0)}else if(!$&&this.shouldParseTypes()&&this.match(47)){let H=this.startNodeAt(S);H.callee=g;let q=this.tryParse(()=>(H.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),H.arguments=super.parseCallExpressionArguments(11,!1),N.optionalChainMember&&(H.optional=!1),this.finishCallExpression(H,N.optionalChainMember)));if(q.node)return q.error&&(this.state=q.failState),q.node}return super.parseSubscript(g,S,$,N)}parseNewCallee(g){super.parseNewCallee(g);let S=null;this.shouldParseTypes()&&this.match(47)&&(S=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),g.typeArguments=S}parseAsyncArrowWithTypeParameters(g){let S=this.startNodeAt(g);if(this.parseFunctionParams(S,!1),!!this.parseArrow(S))return super.parseArrowExpression(S,void 0,!0)}readToken_mult_modulo(g){let S=this.input.charCodeAt(this.state.pos+1);if(g===42&&S===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(g)}readToken_pipe_amp(g){let S=this.input.charCodeAt(this.state.pos+1);if(g===124&&S===125){this.finishOp(9,2);return}super.readToken_pipe_amp(g)}parseTopLevel(g,S){let $=super.parseTopLevel(g,S);return this.state.hasFlowComment&&this.raise(lt.UnterminatedFlowComment,this.state.curPosition()),$}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(lt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let g=this.skipFlowComment();g&&(this.state.pos+=g,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:g}=this.state,S=2;for(;[32,9].includes(this.input.charCodeAt(g+S));)S++;let $=this.input.charCodeAt(S+g),N=this.input.charCodeAt(S+g+1);return $===58&&N===58?S+2:this.input.slice(S+g,S+g+12)==="flow-include"?S+12:$===58&&N!==58?S:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(g,{enumName:S,memberName:$}){this.raise(lt.EnumBooleanMemberNotInitialized,g,{memberName:$,enumName:S})}flowEnumErrorInvalidMemberInitializer(g,S){return this.raise(S.explicitType?S.explicitType==="symbol"?lt.EnumInvalidMemberInitializerSymbolType:lt.EnumInvalidMemberInitializerPrimaryType:lt.EnumInvalidMemberInitializerUnknownType,g,S)}flowEnumErrorNumberMemberNotInitialized(g,S){this.raise(lt.EnumNumberMemberNotInitialized,g,S)}flowEnumErrorStringMemberInconsistentlyInitialized(g,S){this.raise(lt.EnumStringMemberInconsistentlyInitialized,g,S)}flowEnumMemberInit(){let g=this.state.startLoc,S=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let $=this.parseNumericLiteral(this.state.value);return S()?{type:"number",loc:$.loc.start,value:$}:{type:"invalid",loc:g}}case 133:{let $=this.parseStringLiteral(this.state.value);return S()?{type:"string",loc:$.loc.start,value:$}:{type:"invalid",loc:g}}case 85:case 86:{let $=this.parseBooleanLiteral(this.match(85));return S()?{type:"boolean",loc:$.loc.start,value:$}:{type:"invalid",loc:g}}default:return{type:"invalid",loc:g}}}flowEnumMemberRaw(){let g=this.state.startLoc,S=this.parseIdentifier(!0),$=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:g};return{id:S,init:$}}flowEnumCheckExplicitTypeMismatch(g,S,$){let{explicitType:N}=S;N!==null&&N!==$&&this.flowEnumErrorInvalidMemberInitializer(g,S)}flowEnumMembers({enumName:g,explicitType:S}){let $=new Set,N={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},H=!1;for(;!this.match(8);){if(this.eat(21)){H=!0;break}let q=this.startNode(),{id:Z,init:ie}=this.flowEnumMemberRaw(),ne=Z.name;if(ne==="")continue;/^[a-z]/.test(ne)&&this.raise(lt.EnumInvalidMemberName,Z,{memberName:ne,suggestion:ne[0].toUpperCase()+ne.slice(1),enumName:g}),$.has(ne)&&this.raise(lt.EnumDuplicateMemberName,Z,{memberName:ne,enumName:g}),$.add(ne);let Se={enumName:g,explicitType:S,memberName:ne};switch(q.id=Z,ie.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(ie.loc,Se,"boolean"),q.init=ie.value,N.booleanMembers.push(this.finishNode(q,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(ie.loc,Se,"number"),q.init=ie.value,N.numberMembers.push(this.finishNode(q,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(ie.loc,Se,"string"),q.init=ie.value,N.stringMembers.push(this.finishNode(q,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(ie.loc,Se);case"none":switch(S){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(ie.loc,Se);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(ie.loc,Se);break;default:N.defaultedMembers.push(this.finishNode(q,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:N,hasUnknownMembers:H}}flowEnumStringMembers(g,S,{enumName:$}){if(g.length===0)return S;if(S.length===0)return g;if(S.length>g.length){for(let N of g)this.flowEnumErrorStringMemberInconsistentlyInitialized(N,{enumName:$});return S}else{for(let N of S)this.flowEnumErrorStringMemberInconsistentlyInitialized(N,{enumName:$});return g}}flowEnumParseExplicitType({enumName:g}){if(!this.eatContextual(102))return null;if(!ce(this.state.type))throw this.raise(lt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:g});let{value:S}=this.state;return this.next(),S!=="boolean"&&S!=="number"&&S!=="string"&&S!=="symbol"&&this.raise(lt.EnumInvalidExplicitType,this.state.startLoc,{enumName:g,invalidEnumType:S}),S}flowEnumBody(g,S){let $=S.name,N=S.loc.start,H=this.flowEnumParseExplicitType({enumName:$});this.expect(5);let{members:q,hasUnknownMembers:Z}=this.flowEnumMembers({enumName:$,explicitType:H});switch(g.hasUnknownMembers=Z,H){case"boolean":return g.explicitType=!0,g.members=q.booleanMembers,this.expect(8),this.finishNode(g,"EnumBooleanBody");case"number":return g.explicitType=!0,g.members=q.numberMembers,this.expect(8),this.finishNode(g,"EnumNumberBody");case"string":return g.explicitType=!0,g.members=this.flowEnumStringMembers(q.stringMembers,q.defaultedMembers,{enumName:$}),this.expect(8),this.finishNode(g,"EnumStringBody");case"symbol":return g.members=q.defaultedMembers,this.expect(8),this.finishNode(g,"EnumSymbolBody");default:{let ie=()=>(g.members=[],this.expect(8),this.finishNode(g,"EnumStringBody"));g.explicitType=!1;let ne=q.booleanMembers.length,Se=q.numberMembers.length,Be=q.stringMembers.length,qe=q.defaultedMembers.length;if(!ne&&!Se&&!Be&&!qe)return ie();if(!ne&&!Se)return g.members=this.flowEnumStringMembers(q.stringMembers,q.defaultedMembers,{enumName:$}),this.expect(8),this.finishNode(g,"EnumStringBody");if(!Se&&!Be&&ne>=qe){for(let Qe of q.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(Qe.loc.start,{enumName:$,memberName:Qe.id.name});return g.members=q.booleanMembers,this.expect(8),this.finishNode(g,"EnumBooleanBody")}else if(!ne&&!Be&&Se>=qe){for(let Qe of q.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(Qe.loc.start,{enumName:$,memberName:Qe.id.name});return g.members=q.numberMembers,this.expect(8),this.finishNode(g,"EnumNumberBody")}else return this.raise(lt.EnumInconsistentMemberValues,N,{enumName:$}),ie()}}}flowParseEnumDeclaration(g){let S=this.parseIdentifier();return g.id=S,g.body=this.flowEnumBody(this.startNode(),S),this.finishNode(g,"EnumDeclaration")}isLookaheadToken_lt(){let g=this.nextTokenStart();if(this.input.charCodeAt(g)===60){let S=this.input.charCodeAt(g+1);return S!==60&&S!==61}return!1}maybeUnwrapTypeCastExpression(g){return g.type==="TypeCastExpression"?g.expression:g}},ci=b`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:x})=>`Expected corresponding JSX closing tag for <${x}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:x,HTMLEntity:g})=>`Unexpected token \`${x}\`. Did you mean \`${g}\` or \`{'${x}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function Ns(x){return x?x.type==="JSXOpeningFragment"||x.type==="JSXClosingFragment":!1}function Ua(x){if(x.type==="JSXIdentifier")return x.name;if(x.type==="JSXNamespacedName")return x.namespace.name+":"+x.name.name;if(x.type==="JSXMemberExpression")return Ua(x.object)+"."+Ua(x.property);throw new Error("Node had unexpected type: "+x.type)}var Qc=x=>class extends x{jsxReadToken(){let g="",S=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ci.UnterminatedJsxContent,this.state.startLoc);let $=this.input.charCodeAt(this.state.pos);switch($){case 60:case 123:if(this.state.pos===this.state.start){$===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode($);return}g+=this.input.slice(S,this.state.pos),this.finishToken(141,g);return;case 38:g+=this.input.slice(S,this.state.pos),g+=this.jsxReadEntity(),S=this.state.pos;break;case 62:case 125:default:Et($)?(g+=this.input.slice(S,this.state.pos),g+=this.jsxReadNewLine(!0),S=this.state.pos):++this.state.pos}}}jsxReadNewLine(g){let S=this.input.charCodeAt(this.state.pos),$;return++this.state.pos,S===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,$=g?` `:`\r -`):_=String.fromCharCode(S),++this.state.curLine,this.state.lineStart=this.state.pos,_}jsxReadString(g){let S="",_=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);let I=this.input.charCodeAt(this.state.pos);if(I===g)break;I===38?(S+=this.input.slice(_,this.state.pos),S+=this.jsxReadEntity(),_=this.state.pos):St(I)?(S+=this.input.slice(_,this.state.pos),S+=this.jsxReadNewLine(!1),_=this.state.pos):++this.state.pos}S+=this.input.slice(_,this.state.pos++),this.finishToken(133,S)}jsxReadEntity(){let g=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let S=10;this.codePointAtPos(this.state.pos)===120&&(S=16,++this.state.pos);let _=this.readInt(S,void 0,!1,"bail");if(_!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(_)}else{let S=0,_=!1;for(;S++<10&&this.state.pos1){for(let _=0;_0){if(S&256){let I=!!(S&512),H=(_&4)>0;return I!==H}return!0}return S&128&&(_&8)>0?x.names.get(g)&2?!!(S&1):!1:S&2&&(_&1)>0?!0:super.isRedeclaredInScope(x,g,S)}checkLocalExport(x){let{name:g}=x;if(this.hasImport(g))return;let S=this.scopeStack.length;for(let _=S-1;_>=0;_--){let I=this.scopeStack[_].tsNames.get(g);if((I&1)>0||(I&16)>0)return}super.checkLocalExport(x)}},nx=(x,g)=>hasOwnProperty.call(x,g)&&x[g],mf=x=>x.type==="ParenthesizedExpression"?mf(x.expression):x,pm=class extends ja{toAssignable(x,g=!1){var S,_;let I;switch((x.type==="ParenthesizedExpression"||(S=x.extra)!=null&&S.parenthesized)&&(I=mf(x),g?I.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,x):I.type!=="MemberExpression"&&!this.isOptionalMemberExpression(I)&&this.raise(v.InvalidParenthesizedAssignment,x):this.raise(v.InvalidParenthesizedAssignment,x)),x.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":x.type="ObjectPattern";for(let q=0,Z=x.properties.length,ie=Z-1;q_.type!=="ObjectMethod"&&(I===S||_.type!=="SpreadElement")&&this.isAssignable(_))}case"ObjectProperty":return this.isAssignable(x.value);case"SpreadElement":return this.isAssignable(x.argument);case"ArrayExpression":return x.elements.every(S=>S===null||this.isAssignable(S));case"AssignmentExpression":return x.operator==="=";case"ParenthesizedExpression":return this.isAssignable(x.expression);case"MemberExpression":case"OptionalMemberExpression":return!g;default:return!1}}toReferencedList(x,g){return x}toReferencedListDeep(x,g){this.toReferencedList(x,g);for(let S of x)(S==null?void 0:S.type)==="ArrayExpression"&&this.toReferencedListDeep(S.elements)}parseSpread(x){let g=this.startNode();return this.next(),g.argument=this.parseMaybeAssignAllowIn(x,void 0),this.finishNode(g,"SpreadElement")}parseRestBinding(){let x=this.startNode();return this.next(),x.argument=this.parseBindingAtom(),this.finishNode(x,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let x=this.startNode();return this.next(),x.elements=this.parseBindingList(3,93,1),this.finishNode(x,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(x,g,S){let _=S&1,I=[],H=!0;for(;!this.eat(x);)if(H?H=!1:this.expect(12),_&&this.match(12))I.push(null);else{if(this.eat(x))break;if(this.match(21)){if(I.push(this.parseAssignableListItemTypes(this.parseRestBinding(),S)),!this.checkCommaAfterRest(g)){this.expect(x);break}}else{let q=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)q.push(this.parseDecorator());I.push(this.parseAssignableListItem(S,q))}}return I}parseBindingRestProperty(x){return this.next(),x.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(x,"RestElement")}parseBindingProperty(){let{type:x,startLoc:g}=this.state;if(x===21)return this.parseBindingRestProperty(this.startNode());let S=this.startNode();return x===138?(this.expectPlugin("destructuringPrivate",g),this.classScope.usePrivateName(this.state.value,g),S.key=this.parsePrivateName()):this.parsePropertyName(S),S.method=!1,this.parseObjPropValue(S,g,!1,!1,!0,!1)}parseAssignableListItem(x,g){let S=this.parseMaybeDefault();this.parseAssignableListItemTypes(S,x);let _=this.parseMaybeDefault(S.loc.start,S);return g.length&&(S.decorators=g),_}parseAssignableListItemTypes(x,g){return x}parseMaybeDefault(x,g){var S;if(x!=null||(x=this.state.startLoc),g=(S=g)!=null?S:this.parseBindingAtom(),!this.eat(29))return g;let _=this.startNodeAt(x);return _.left=g,_.right=this.parseMaybeAssignAllowIn(),this.finishNode(_,"AssignmentPattern")}isValidLVal(x,g,S){return nx({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},x)}isOptionalMemberExpression(x){return x.type==="OptionalMemberExpression"}checkLVal(x,{in:g,binding:S=64,checkClashes:_=!1,strictModeChanged:I=!1,hasParenthesizedAncestor:H=!1}){var q;let Z=x.type;if(this.isObjectMethod(x))return;let ie=this.isOptionalMemberExpression(x);if(ie||Z==="MemberExpression"){ie&&(this.expectPlugin("optionalChainingAssign",x.loc.start),g.type!=="AssignmentExpression"&&this.raise(v.InvalidLhsOptionalChaining,x,{ancestor:g})),S!==64&&this.raise(v.InvalidPropertyBindingPattern,x);return}if(Z==="Identifier"){this.checkIdentifier(x,S,I);let{name:Qe}=x;_&&(_.has(Qe)?this.raise(v.ParamDupe,x):_.add(Qe));return}let ne=this.isValidLVal(Z,!(H||(q=x.extra)!=null&&q.parenthesized)&&g.type==="AssignmentExpression",S);if(ne===!0)return;if(ne===!1){let Qe=S===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(Qe,x,{ancestor:g});return}let[Se,Be]=Array.isArray(ne)?ne:[ne,Z==="ParenthesizedExpression"],qe=Z==="ArrayPattern"||Z==="ObjectPattern"?{type:Z}:g;for(let Qe of[].concat(x[Se]))Qe&&this.checkLVal(Qe,{in:qe,binding:S,checkClashes:_,strictModeChanged:I,hasParenthesizedAncestor:Be})}checkIdentifier(x,g,S=!1){this.state.strict&&(S?Ti(x.name,this.inModule):oi(x.name))&&(g===64?this.raise(v.StrictEvalArguments,x,{referenceName:x.name}):this.raise(v.StrictEvalArgumentsBinding,x,{bindingName:x.name})),g&8192&&x.name==="let"&&this.raise(v.LetInLexicalBinding,x),g&64||this.declareNameFromIdentifier(x,g)}declareNameFromIdentifier(x,g){this.scope.declareName(x.name,g,x.loc.start)}checkToRestConversion(x,g){switch(x.type){case"ParenthesizedExpression":this.checkToRestConversion(x.expression,g);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(g)break;default:this.raise(v.InvalidRestAssignmentPattern,x)}}checkCommaAfterRest(x){return this.match(12)?(this.raise(this.lookaheadCharCode()===x?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}},gm=(x,g)=>hasOwnProperty.call(x,g)&&x[g];function hu(x){if(x==null)throw new Error(`Unexpected ${x} value.`);return x}function yf(x){if(!x)throw new Error("Assert fail")}var Ze=b`typescript`({AbstractMethodHasImplementation:({methodName:x})=>`Method '${x}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:x})=>`Property '${x}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:x})=>`'declare' is not allowed in ${x}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:x})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:x})=>`Duplicate modifier: '${x}'.`,EmptyHeritageClauseType:({token:x})=>`'${x}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:x})=>`'${x[0]}' modifier cannot be used with '${x[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:x})=>`Index signatures cannot have an accessibility modifier ('${x}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:x})=>`'${x}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:x})=>`'${x}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:x})=>`'${x}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:x})=>`'${x[0]}' modifier must precede '${x[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:x})=>`Private elements cannot have an accessibility modifier ('${x}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:x})=>`Single type parameter ${x} should have a trailing comma. Example usage: <${x},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:x})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${x}.`});function ix(x){switch(x){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function mm(x){return x==="private"||x==="public"||x==="protected"}function te(x){return x==="in"||x==="out"}var he=x=>class extends x{constructor(...g){super(...g),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Ze.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Ze.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Ze.InvalidModifierOnTypeParameter})}getScopeHandler(){return gf}tsIsIdentifier(){return ce(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(g,S){if(!ce(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let _=this.state.value;if(g.includes(_)){if(S&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return _}}tsParseModifiers({allowedModifiers:g,disallowedModifiers:S,stopOnStartOfClassStaticBlock:_,errorTemplate:I=Ze.InvalidModifierOnTypeMember},H){let q=(ie,ne,Se,Be)=>{ne===Se&&H[Be]&&this.raise(Ze.InvalidModifiersOrder,ie,{orderedModifiers:[Se,Be]})},Z=(ie,ne,Se,Be)=>{(H[Se]&&ne===Be||H[Be]&&ne===Se)&&this.raise(Ze.IncompatibleModifiers,ie,{modifiers:[Se,Be]})};for(;;){let{startLoc:ie}=this.state,ne=this.tsParseModifier(g.concat(S??[]),_);if(!ne)break;mm(ne)?H.accessibility?this.raise(Ze.DuplicateAccessibilityModifier,ie,{modifier:ne}):(q(ie,ne,ne,"override"),q(ie,ne,ne,"static"),q(ie,ne,ne,"readonly"),H.accessibility=ne):te(ne)?(H[ne]&&this.raise(Ze.DuplicateModifier,ie,{modifier:ne}),H[ne]=!0,q(ie,ne,"in","out")):(hasOwnProperty.call(H,ne)?this.raise(Ze.DuplicateModifier,ie,{modifier:ne}):(q(ie,ne,"static","readonly"),q(ie,ne,"static","override"),q(ie,ne,"override","readonly"),q(ie,ne,"abstract","override"),Z(ie,ne,"declare","override"),Z(ie,ne,"static","abstract")),H[ne]=!0),S!=null&&S.includes(ne)&&this.raise(I,ie,{modifier:ne})}}tsIsListTerminator(g){switch(g){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(g,S){let _=[];for(;!this.tsIsListTerminator(g);)_.push(S());return _}tsParseDelimitedList(g,S,_){return hu(this.tsParseDelimitedListWorker(g,S,!0,_))}tsParseDelimitedListWorker(g,S,_,I){let H=[],q=-1;for(;!this.tsIsListTerminator(g);){q=-1;let Z=S();if(Z==null)return;if(H.push(Z),this.eat(12)){q=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(g))break;_&&this.expect(12);return}return I&&(I.value=q),H}tsParseBracketedList(g,S,_,I,H){I||(_?this.expect(0):this.expect(47));let q=this.tsParseDelimitedList(g,S,H);return _?this.expect(3):this.expect(48),q}tsParseImportType(){let g=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(Ze.UnsupportedImportTypeArgument,this.state.startLoc),g.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(g.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(g.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(g.qualifier=this.tsParseEntityName()),this.match(47)&&(g.typeParameters=this.tsParseTypeArguments()),this.finishNode(g,"TSImportType")}tsParseEntityName(g=!0){let S=this.parseIdentifier(g);for(;this.eat(16);){let _=this.startNodeAtNode(S);_.left=S,_.right=this.parseIdentifier(g),S=this.finishNode(_,"TSQualifiedName")}return S}tsParseTypeReference(){let g=this.startNode();return g.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(g.typeParameters=this.tsParseTypeArguments()),this.finishNode(g,"TSTypeReference")}tsParseThisTypePredicate(g){this.next();let S=this.startNodeAtNode(g);return S.parameterName=g,S.typeAnnotation=this.tsParseTypeAnnotation(!1),S.asserts=!1,this.finishNode(S,"TSTypePredicate")}tsParseThisTypeNode(){let g=this.startNode();return this.next(),this.finishNode(g,"TSThisType")}tsParseTypeQuery(){let g=this.startNode();return this.expect(87),this.match(83)?g.exprName=this.tsParseImportType():g.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(g.typeParameters=this.tsParseTypeArguments()),this.finishNode(g,"TSTypeQuery")}tsParseTypeParameter(g){let S=this.startNode();return g(S),S.name=this.tsParseTypeParameterName(),S.constraint=this.tsEatThenParseType(81),S.default=this.tsEatThenParseType(29),this.finishNode(S,"TSTypeParameter")}tsTryParseTypeParameters(g){if(this.match(47))return this.tsParseTypeParameters(g)}tsParseTypeParameters(g){let S=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let _={value:-1};return S.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,g),!1,!0,_),S.params.length===0&&this.raise(Ze.EmptyTypeParameters,S),_.value!==-1&&this.addExtra(S,"trailingComma",_.value),this.finishNode(S,"TSTypeParameterDeclaration")}tsFillSignature(g,S){let _=g===19,I="parameters",H="typeAnnotation";S.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),S[I]=this.tsParseBindingListForSignature(),_?S[H]=this.tsParseTypeOrTypePredicateAnnotation(g):this.match(g)&&(S[H]=this.tsParseTypeOrTypePredicateAnnotation(g))}tsParseBindingListForSignature(){let g=super.parseBindingList(11,41,2);for(let S of g){let{type:_}=S;(_==="AssignmentPattern"||_==="TSParameterProperty")&&this.raise(Ze.UnsupportedSignatureParameterKind,S,{type:_})}return g}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(g,S){return this.tsFillSignature(14,S),this.tsParseTypeMemberSemicolon(),this.finishNode(S,g)}tsIsUnambiguouslyIndexSignature(){return this.next(),ce(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(g){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let S=this.parseIdentifier();S.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(S),this.expect(3),g.parameters=[S];let _=this.tsTryParseTypeAnnotation();return _&&(g.typeAnnotation=_),this.tsParseTypeMemberSemicolon(),this.finishNode(g,"TSIndexSignature")}tsParsePropertyOrMethodSignature(g,S){this.eat(17)&&(g.optional=!0);let _=g;if(this.match(10)||this.match(47)){S&&this.raise(Ze.ReadonlyForMethodSignature,g);let I=_;I.kind&&this.match(47)&&this.raise(Ze.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,I),this.tsParseTypeMemberSemicolon();let H="parameters",q="typeAnnotation";if(I.kind==="get")I[H].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(I[H][0])&&this.raise(Ze.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(I.kind==="set"){if(I[H].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{let Z=I[H][0];this.isThisParam(Z)&&this.raise(Ze.AccesorCannotDeclareThisParameter,this.state.curPosition()),Z.type==="Identifier"&&Z.optional&&this.raise(Ze.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),Z.type==="RestElement"&&this.raise(Ze.SetAccesorCannotHaveRestParameter,this.state.curPosition())}I[q]&&this.raise(Ze.SetAccesorCannotHaveReturnType,I[q])}else I.kind="method";return this.finishNode(I,"TSMethodSignature")}else{let I=_;S&&(I.readonly=!0);let H=this.tsTryParseTypeAnnotation();return H&&(I.typeAnnotation=H),this.tsParseTypeMemberSemicolon(),this.finishNode(I,"TSPropertySignature")}}tsParseTypeMember(){let g=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",g);if(this.match(77)){let _=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",g):(g.key=this.createIdentifier(_,"new"),this.tsParsePropertyOrMethodSignature(g,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},g),this.tsTryParseIndexSignature(g)||(super.parsePropertyName(g),!g.computed&&g.key.type==="Identifier"&&(g.key.name==="get"||g.key.name==="set")&&this.tsTokenCanFollowModifier()&&(g.kind=g.key.name,super.parsePropertyName(g)),this.tsParsePropertyOrMethodSignature(g,!!g.readonly))}tsParseTypeLiteral(){let g=this.startNode();return g.members=this.tsParseObjectTypeMembers(),this.finishNode(g,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let g=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),g}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let g=this.startNode();return g.name=this.tsParseTypeParameterName(),g.constraint=this.tsExpectThenParseType(58),this.finishNode(g,"TSTypeParameter")}tsParseMappedType(){let g=this.startNode();return this.expect(5),this.match(53)?(g.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(g.readonly=!0),this.expect(0),g.typeParameter=this.tsParseMappedTypeParameter(),g.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(g.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(g.optional=!0),g.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(g,"TSMappedType")}tsParseTupleType(){let g=this.startNode();g.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let S=!1;return g.elementTypes.forEach(_=>{let{type:I}=_;S&&I!=="TSRestType"&&I!=="TSOptionalType"&&!(I==="TSNamedTupleMember"&&_.optional)&&this.raise(Ze.OptionalTypeBeforeRequired,_),S||(S=I==="TSNamedTupleMember"&&_.optional||I==="TSOptionalType")}),this.finishNode(g,"TSTupleType")}tsParseTupleElementType(){let{startLoc:g}=this.state,S=this.eat(21),_,I,H,q,Z=ke(this.state.type)?this.lookaheadCharCode():null;if(Z===58)_=!0,H=!1,I=this.parseIdentifier(!0),this.expect(14),q=this.tsParseType();else if(Z===63){H=!0;let ie=this.state.startLoc,ne=this.state.value,Se=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(_=!0,I=this.createIdentifier(this.startNodeAt(ie),ne),this.expect(17),this.expect(14),q=this.tsParseType()):(_=!1,q=Se,this.expect(17))}else q=this.tsParseType(),H=this.eat(17),_=this.eat(14);if(_){let ie;I?(ie=this.startNodeAtNode(I),ie.optional=H,ie.label=I,ie.elementType=q,this.eat(17)&&(ie.optional=!0,this.raise(Ze.TupleOptionalAfterType,this.state.lastTokStartLoc))):(ie=this.startNodeAtNode(q),ie.optional=H,this.raise(Ze.InvalidTupleMemberLabel,q),ie.label=q,ie.elementType=this.tsParseType()),q=this.finishNode(ie,"TSNamedTupleMember")}else if(H){let ie=this.startNodeAtNode(q);ie.typeAnnotation=q,q=this.finishNode(ie,"TSOptionalType")}if(S){let ie=this.startNodeAt(g);ie.typeAnnotation=q,q=this.finishNode(ie,"TSRestType")}return q}tsParseParenthesizedType(){let g=this.startNode();return this.expect(10),g.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(g,"TSParenthesizedType")}tsParseFunctionOrConstructorType(g,S){let _=this.startNode();return g==="TSConstructorType"&&(_.abstract=!!S,S&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,_)),this.finishNode(_,g)}tsParseLiteralTypeNode(){let g=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:g.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(g,"TSLiteralType")}tsParseTemplateLiteralType(){let g=this.startNode();return g.literal=super.parseTemplate(!1),this.finishNode(g,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let g=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(g):g}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let g=this.startNode(),S=this.lookahead();return S.type!==134&&S.type!==135&&this.unexpected(),g.literal=this.parseMaybeUnary(),this.finishNode(g,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:g}=this.state;if(ce(g)||g===88||g===84){let S=g===88?"TSVoidKeyword":g===84?"TSNullKeyword":ix(this.state.value);if(S!==void 0&&this.lookaheadCharCode()!==46){let _=this.startNode();return this.next(),this.finishNode(_,S)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let g=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let S=this.startNodeAtNode(g);S.elementType=g,this.expect(3),g=this.finishNode(S,"TSArrayType")}else{let S=this.startNodeAtNode(g);S.objectType=g,S.indexType=this.tsParseType(),this.expect(3),g=this.finishNode(S,"TSIndexedAccessType")}return g}tsParseTypeOperator(){let g=this.startNode(),S=this.state.value;return this.next(),g.operator=S,g.typeAnnotation=this.tsParseTypeOperatorOrHigher(),S==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(g),this.finishNode(g,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(g){switch(g.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Ze.UnexpectedReadonly,g)}}tsParseInferType(){let g=this.startNode();this.expectContextual(115);let S=this.startNode();return S.name=this.tsParseTypeParameterName(),S.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),g.typeParameter=this.finishNode(S,"TSTypeParameter"),this.finishNode(g,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let g=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return g}}tsParseTypeOperatorOrHigher(){return Ce(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(g,S,_){let I=this.startNode(),H=this.eat(_),q=[];do q.push(S());while(this.eat(_));return q.length===1&&!H?q[0]:(I.types=q,this.finishNode(I,g))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(ce(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:g}=this.state,S=g.length;try{return this.parseObjectLike(8,!0),g.length===S}catch{return!1}}if(this.match(0)){this.next();let{errors:g}=this.state,S=g.length;try{return super.parseBindingList(3,93,1),g.length===S}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(g){return this.tsInType(()=>{let S=this.startNode();this.expect(g);let _=this.startNode(),I=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(I&&this.match(78)){let Z=this.tsParseThisTypeOrThisTypePredicate();return Z.type==="TSThisType"?(_.parameterName=Z,_.asserts=!0,_.typeAnnotation=null,Z=this.finishNode(_,"TSTypePredicate")):(this.resetStartLocationFromNode(Z,_),Z.asserts=!0),S.typeAnnotation=Z,this.finishNode(S,"TSTypeAnnotation")}let H=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!H)return I?(_.parameterName=this.parseIdentifier(),_.asserts=I,_.typeAnnotation=null,S.typeAnnotation=this.finishNode(_,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,S);let q=this.tsParseTypeAnnotation(!1);return _.parameterName=H,_.typeAnnotation=q,_.asserts=I,S.typeAnnotation=this.finishNode(_,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let g=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),g}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let g=this.state.containsEsc;return this.next(),!ce(this.state.type)&&!this.match(78)?!1:(g&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(g=!0,S=this.startNode()){return this.tsInType(()=>{g&&this.expect(14),S.typeAnnotation=this.tsParseType()}),this.finishNode(S,"TSTypeAnnotation")}tsParseType(){yf(this.state.inType);let g=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return g;let S=this.startNodeAtNode(g);return S.checkType=g,S.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),S.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),S.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(S,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Ze.ReservedTypeAssertion,this.state.startLoc);let g=this.startNode();return g.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),g.expression=this.parseMaybeUnary(),this.finishNode(g,"TSTypeAssertion")}tsParseHeritageClause(g){let S=this.state.startLoc,_=this.tsParseDelimitedList("HeritageClauseElement",()=>{let I=this.startNode();return I.expression=this.tsParseEntityName(),this.match(47)&&(I.typeParameters=this.tsParseTypeArguments()),this.finishNode(I,"TSExpressionWithTypeArguments")});return _.length||this.raise(Ze.EmptyHeritageClauseType,S,{token:g}),_}tsParseInterfaceDeclaration(g,S={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),S.declare&&(g.declare=!0),ce(this.state.type)?(g.id=this.parseIdentifier(),this.checkIdentifier(g.id,130)):(g.id=null,this.raise(Ze.MissingInterfaceName,this.state.startLoc)),g.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(g.extends=this.tsParseHeritageClause("extends"));let _=this.startNode();return _.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),g.body=this.finishNode(_,"TSInterfaceBody"),this.finishNode(g,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(g){return g.id=this.parseIdentifier(),this.checkIdentifier(g.id,2),g.typeAnnotation=this.tsInType(()=>{if(g.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let S=this.startNode();return this.next(),this.finishNode(S,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(g,"TSTypeAliasDeclaration")}tsInNoContext(g){let S=this.state.context;this.state.context=[S[0]];try{return g()}finally{this.state.context=S}}tsInType(g){let S=this.state.inType;this.state.inType=!0;try{return g()}finally{this.state.inType=S}}tsInDisallowConditionalTypesContext(g){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return g()}finally{this.state.inDisallowConditionalTypesContext=S}}tsInAllowConditionalTypesContext(g){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return g()}finally{this.state.inDisallowConditionalTypesContext=S}}tsEatThenParseType(g){if(this.match(g))return this.tsNextThenParseType()}tsExpectThenParseType(g){return this.tsInType(()=>(this.expect(g),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let g=this.startNode();return g.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(g.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(g,"TSEnumMember")}tsParseEnumDeclaration(g,S={}){return S.const&&(g.const=!0),S.declare&&(g.declare=!0),this.expectContextual(126),g.id=this.parseIdentifier(),this.checkIdentifier(g.id,g.const?8971:8459),this.expect(5),g.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(g,"TSEnumDeclaration")}tsParseModuleBlock(){let g=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(g.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(g,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(g,S=!1){if(g.id=this.parseIdentifier(),S||this.checkIdentifier(g.id,1024),this.eat(16)){let _=this.startNode();this.tsParseModuleOrNamespaceDeclaration(_,!0),g.body=_}else this.scope.enter(256),this.prodParam.enter(0),g.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(g,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(g){return this.isContextual(112)?(g.global=!0,g.id=this.parseIdentifier()):this.match(133)?g.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),g.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(g,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(g,S,_){g.isExport=_||!1,g.id=S||this.parseIdentifier(),this.checkIdentifier(g.id,4096),this.expect(29);let I=this.tsParseModuleReference();return g.importKind==="type"&&I.type!=="TSExternalModuleReference"&&this.raise(Ze.ImportAliasHasImportType,I),g.moduleReference=I,this.semicolon(),this.finishNode(g,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let g=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),g.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(g,"TSExternalModuleReference")}tsLookAhead(g){let S=this.state.clone(),_=g();return this.state=S,_}tsTryParseAndCatch(g){let S=this.tryParse(_=>g()||_());if(!(S.aborted||!S.node))return S.error&&(this.state=S.failState),S.node}tsTryParse(g){let S=this.state.clone(),_=g();if(_!==void 0&&_!==!1)return _;this.state=S}tsTryParseDeclare(g){if(this.isLineTerminator())return;let S=this.state.type,_;return this.isContextual(100)&&(S=74,_="let"),this.tsInAmbientContext(()=>{switch(S){case 68:return g.declare=!0,super.parseFunctionStatement(g,!1,!1);case 80:return g.declare=!0,this.parseClass(g,!0,!1);case 126:return this.tsParseEnumDeclaration(g,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(g);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(g.declare=!0,this.parseVarStatement(g,_||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(g,{const:!0,declare:!0}));case 129:{let I=this.tsParseInterfaceDeclaration(g,{declare:!0});if(I)return I}default:if(ce(S))return this.tsParseDeclaration(g,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(g,S,_){switch(S.name){case"declare":{let I=this.tsTryParseDeclare(g);return I&&(I.declare=!0),I}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let I=g;return I.global=!0,I.id=S,I.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(I,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(g,S.name,!1,_)}}tsParseDeclaration(g,S,_,I){switch(S){case"abstract":if(this.tsCheckLineTerminator(_)&&(this.match(80)||ce(this.state.type)))return this.tsParseAbstractDeclaration(g,I);break;case"module":if(this.tsCheckLineTerminator(_)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(g);if(ce(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(g)}break;case"namespace":if(this.tsCheckLineTerminator(_)&&ce(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(g);break;case"type":if(this.tsCheckLineTerminator(_)&&ce(this.state.type))return this.tsParseTypeAliasDeclaration(g);break}}tsCheckLineTerminator(g){return g?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(g){if(!this.match(47))return;let S=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let _=this.tsTryParseAndCatch(()=>{let I=this.startNodeAt(g);return I.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(I),I.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),I});if(this.state.maybeInArrowParameters=S,!!_)return super.parseArrowExpression(_,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let g=this.startNode();return g.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),g.params.length===0?this.raise(Ze.EmptyTypeArguments,g):!this.state.inType&&this.curContext()===$.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(g,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return fe(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(g,S){let _=this.state.startLoc,I={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},I);let H=I.accessibility,q=I.override,Z=I.readonly;!(g&4)&&(H||Z||q)&&this.raise(Ze.UnexpectedParameterModifier,_);let ie=this.parseMaybeDefault();this.parseAssignableListItemTypes(ie,g);let ne=this.parseMaybeDefault(ie.loc.start,ie);if(H||Z||q){let Se=this.startNodeAt(_);return S.length&&(Se.decorators=S),H&&(Se.accessibility=H),Z&&(Se.readonly=Z),q&&(Se.override=q),ne.type!=="Identifier"&&ne.type!=="AssignmentPattern"&&this.raise(Ze.UnsupportedParameterPropertyKind,Se),Se.parameter=ne,this.finishNode(Se,"TSParameterProperty")}return S.length&&(ie.decorators=S),ne}isSimpleParameter(g){return g.type==="TSParameterProperty"&&super.isSimpleParameter(g.parameter)||super.isSimpleParameter(g)}tsDisallowOptionalPattern(g){for(let S of g.params)S.type!=="Identifier"&&S.optional&&!this.state.isAmbientContext&&this.raise(Ze.PatternIsOptional,S)}setArrowFunctionParameters(g,S,_){super.setArrowFunctionParameters(g,S,_),this.tsDisallowOptionalPattern(g)}parseFunctionBodyAndFinish(g,S,_=!1){this.match(14)&&(g.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let I=S==="FunctionDeclaration"?"TSDeclareFunction":S==="ClassMethod"||S==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return I&&!this.match(5)&&this.isLineTerminator()?this.finishNode(g,I):I==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Ze.DeclareFunctionHasImplementation,g),g.declare)?super.parseFunctionBodyAndFinish(g,I,_):(this.tsDisallowOptionalPattern(g),super.parseFunctionBodyAndFinish(g,S,_))}registerFunctionStatementId(g){!g.body&&g.id?this.checkIdentifier(g.id,1024):super.registerFunctionStatementId(g)}tsCheckForInvalidTypeCasts(g){g.forEach(S=>{(S==null?void 0:S.type)==="TSTypeCastExpression"&&this.raise(Ze.UnexpectedTypeAnnotation,S.typeAnnotation)})}toReferencedList(g,S){return this.tsCheckForInvalidTypeCasts(g),g}parseArrayLike(g,S,_,I){let H=super.parseArrayLike(g,S,_,I);return H.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(H.elements),H}parseSubscript(g,S,_,I){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let q=this.startNodeAt(S);return q.expression=g,this.finishNode(q,"TSNonNullExpression")}let H=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(_)return I.stop=!0,g;I.optionalChainMember=H=!0,this.next()}if(this.match(47)||this.match(51)){let q,Z=this.tsTryParseAndCatch(()=>{if(!_&&this.atPossibleAsyncArrow(g)){let Be=this.tsTryParseGenericAsyncArrowFunction(S);if(Be)return Be}let ie=this.tsParseTypeArgumentsInExpression();if(!ie)return;if(H&&!this.match(10)){q=this.state.curPosition();return}if(ve(this.state.type)){let Be=super.parseTaggedTemplateExpression(g,S,I);return Be.typeParameters=ie,Be}if(!_&&this.eat(10)){let Be=this.startNodeAt(S);return Be.callee=g,Be.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(Be.arguments),Be.typeParameters=ie,I.optionalChainMember&&(Be.optional=H),this.finishCallExpression(Be,I.optionalChainMember)}let ne=this.state.type;if(ne===48||ne===52||ne!==10&&mt(ne)&&!this.hasPrecedingLineBreak())return;let Se=this.startNodeAt(S);return Se.expression=g,Se.typeParameters=ie,this.finishNode(Se,"TSInstantiationExpression")});if(q&&this.unexpected(q,10),Z)return Z.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Ze.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),Z}return super.parseSubscript(g,S,_,I)}parseNewCallee(g){var S;super.parseNewCallee(g);let{callee:_}=g;_.type==="TSInstantiationExpression"&&!((S=_.extra)!=null&&S.parenthesized)&&(g.typeParameters=_.typeParameters,g.callee=_.expression)}parseExprOp(g,S,_){let I;if(je(58)>_&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(I=this.isContextual(120)))){let H=this.startNodeAt(S);return H.expression=g,H.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(I&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(H,I?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(H,S,_)}return super.parseExprOp(g,S,_)}checkReservedWord(g,S,_,I){this.state.isAmbientContext||super.checkReservedWord(g,S,_,I)}checkImportReflection(g){super.checkImportReflection(g),g.module&&g.importKind!=="value"&&this.raise(Ze.ImportReflectionHasImportType,g.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(g){if(super.isPotentialImportPhase(g))return!0;if(this.isContextual(130)){let S=this.lookaheadCharCode();return g?S===123||S===42:S!==61}return!g&&this.isContextual(87)}applyImportPhase(g,S,_,I){super.applyImportPhase(g,S,_,I),S?g.exportKind=_==="type"?"type":"value":g.importKind=_==="type"||_==="typeof"?_:"value"}parseImport(g){if(this.match(133))return g.importKind="value",super.parseImport(g);let S;if(ce(this.state.type)&&this.lookaheadCharCode()===61)return g.importKind="value",this.tsParseImportEqualsDeclaration(g);if(this.isContextual(130)){let _=this.parseMaybeImportPhase(g,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(g,_);S=super.parseImportSpecifiersAndAfter(g,_)}else S=super.parseImport(g);return S.importKind==="type"&&S.specifiers.length>1&&S.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Ze.TypeImportCannotSpecifyDefaultAndNamed,S),S}parseExport(g,S){if(this.match(83)){this.next();let _=g,I=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?I=this.parseMaybeImportPhase(_,!1):_.importKind="value",this.tsParseImportEqualsDeclaration(_,I,!0)}else if(this.eat(29)){let _=g;return _.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(_,"TSExportAssignment")}else if(this.eatContextual(93)){let _=g;return this.expectContextual(128),_.id=this.parseIdentifier(),this.semicolon(),this.finishNode(_,"TSNamespaceExportDeclaration")}else return super.parseExport(g,S)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let g=this.startNode();return this.next(),g.abstract=!0,this.parseClass(g,!0,!0)}if(this.match(129)){let g=this.tsParseInterfaceDeclaration(this.startNode());if(g)return g}return super.parseExportDefaultExpression()}parseVarStatement(g,S,_=!1){let{isAmbientContext:I}=this.state,H=super.parseVarStatement(g,S,_||I);if(!I)return H;for(let{id:q,init:Z}of H.declarations)Z&&(S!=="const"||q.typeAnnotation?this.raise(Ze.InitializerNotAllowedInAmbientContext,Z):Xe(Z,this.hasPlugin("estree"))||this.raise(Ze.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,Z));return H}parseStatementContent(g,S){if(this.match(75)&&this.isLookaheadContextual("enum")){let _=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(_,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let _=this.tsParseInterfaceDeclaration(this.startNode());if(_)return _}return super.parseStatementContent(g,S)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(g,S){return S.some(_=>mm(_)?g.accessibility===_:!!g[_])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(g,S,_){let I=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:I,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Ze.InvalidModifierOnTypeParameterPositions},S);let H=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(S,I)&&this.raise(Ze.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(g,S)):this.parseClassMemberWithIsStatic(g,S,_,!!S.static)};S.declare?this.tsInAmbientContext(H):H()}parseClassMemberWithIsStatic(g,S,_,I){let H=this.tsTryParseIndexSignature(S);if(H){g.body.push(H),S.abstract&&this.raise(Ze.IndexSignatureHasAbstract,S),S.accessibility&&this.raise(Ze.IndexSignatureHasAccessibility,S,{modifier:S.accessibility}),S.declare&&this.raise(Ze.IndexSignatureHasDeclare,S),S.override&&this.raise(Ze.IndexSignatureHasOverride,S);return}!this.state.inAbstractClass&&S.abstract&&this.raise(Ze.NonAbstractClassHasAbstractMethod,S),S.override&&(_.hadSuperClass||this.raise(Ze.OverrideNotInSubClass,S)),super.parseClassMemberWithIsStatic(g,S,_,I)}parsePostMemberNameModifiers(g){this.eat(17)&&(g.optional=!0),g.readonly&&this.match(10)&&this.raise(Ze.ClassMethodHasReadonly,g),g.declare&&this.match(10)&&this.raise(Ze.ClassMethodHasDeclare,g)}parseExpressionStatement(g,S,_){return(S.type==="Identifier"?this.tsParseExpressionStatement(g,S,_):void 0)||super.parseExpressionStatement(g,S,_)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(g,S,_){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(g,S,_);let I=this.tryParse(()=>super.parseConditional(g,S));return I.node?(I.error&&(this.state=I.failState),I.node):(I.error&&super.setOptionalParametersError(_,I.error),g)}parseParenItem(g,S){let _=super.parseParenItem(g,S);if(this.eat(17)&&(_.optional=!0,this.resetEndLocation(g)),this.match(14)){let I=this.startNodeAt(S);return I.expression=g,I.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(I,"TSTypeCastExpression")}return g}parseExportDeclaration(g){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(g));let S=this.state.startLoc,_=this.eatContextual(125);if(_&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Ze.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let I=ce(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(g);return I?((I.type==="TSInterfaceDeclaration"||I.type==="TSTypeAliasDeclaration"||_)&&(g.exportKind="type"),_&&(this.resetStartLocation(I,S),I.declare=!0),I):null}parseClassId(g,S,_,I){if((!S||_)&&this.isContextual(113))return;super.parseClassId(g,S,_,g.declare?1024:8331);let H=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);H&&(g.typeParameters=H)}parseClassPropertyAnnotation(g){g.optional||(this.eat(35)?g.definite=!0:this.eat(17)&&(g.optional=!0));let S=this.tsTryParseTypeAnnotation();S&&(g.typeAnnotation=S)}parseClassProperty(g){if(this.parseClassPropertyAnnotation(g),this.state.isAmbientContext&&!(g.readonly&&!g.typeAnnotation)&&this.match(29)&&this.raise(Ze.DeclareClassFieldHasInitializer,this.state.startLoc),g.abstract&&this.match(29)){let{key:S}=g;this.raise(Ze.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:S.type==="Identifier"&&!g.computed?S.name:`[${this.input.slice(S.start,S.end)}]`})}return super.parseClassProperty(g)}parseClassPrivateProperty(g){return g.abstract&&this.raise(Ze.PrivateElementHasAbstract,g),g.accessibility&&this.raise(Ze.PrivateElementHasAccessibility,g,{modifier:g.accessibility}),this.parseClassPropertyAnnotation(g),super.parseClassPrivateProperty(g)}parseClassAccessorProperty(g){return this.parseClassPropertyAnnotation(g),g.optional&&this.raise(Ze.AccessorCannotBeOptional,g),super.parseClassAccessorProperty(g)}pushClassMethod(g,S,_,I,H,q){let Z=this.tsTryParseTypeParameters(this.tsParseConstModifier);Z&&H&&this.raise(Ze.ConstructorHasTypeParameters,Z);let{declare:ie=!1,kind:ne}=S;ie&&(ne==="get"||ne==="set")&&this.raise(Ze.DeclareAccessor,S,{kind:ne}),Z&&(S.typeParameters=Z),super.pushClassMethod(g,S,_,I,H,q)}pushClassPrivateMethod(g,S,_,I){let H=this.tsTryParseTypeParameters(this.tsParseConstModifier);H&&(S.typeParameters=H),super.pushClassPrivateMethod(g,S,_,I)}declareClassPrivateMethodInScope(g,S){g.type!=="TSDeclareMethod"&&(g.type==="MethodDefinition"&&!hasOwnProperty.call(g.value,"body")||super.declareClassPrivateMethodInScope(g,S))}parseClassSuper(g){super.parseClassSuper(g),g.superClass&&(this.match(47)||this.match(51))&&(g.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(g.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(g,S,_,I,H,q,Z){let ie=this.tsTryParseTypeParameters(this.tsParseConstModifier);return ie&&(g.typeParameters=ie),super.parseObjPropValue(g,S,_,I,H,q,Z)}parseFunctionParams(g,S){let _=this.tsTryParseTypeParameters(this.tsParseConstModifier);_&&(g.typeParameters=_),super.parseFunctionParams(g,S)}parseVarId(g,S){super.parseVarId(g,S),g.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(g.definite=!0);let _=this.tsTryParseTypeAnnotation();_&&(g.id.typeAnnotation=_,this.resetEndLocation(g.id))}parseAsyncArrowFromCallExpression(g,S){return this.match(14)&&(g.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(g,S)}parseMaybeAssign(g,S){var _,I,H,q,Z;let ie,ne,Se;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(ie=this.state.clone(),ne=this.tryParse(()=>super.parseMaybeAssign(g,S),ie),!ne.error)return ne.node;let{context:Qe}=this.state,sr=Qe[Qe.length-1];(sr===$.j_oTag||sr===$.j_expr)&&Qe.pop()}if(!((_=ne)!=null&&_.error)&&!this.match(47))return super.parseMaybeAssign(g,S);(!ie||ie===this.state)&&(ie=this.state.clone());let Be,qe=this.tryParse(Qe=>{var sr,un;Be=this.tsParseTypeParameters(this.tsParseConstModifier);let vr=super.parseMaybeAssign(g,S);return(vr.type!=="ArrowFunctionExpression"||(sr=vr.extra)!=null&&sr.parenthesized)&&Qe(),((un=Be)==null?void 0:un.params.length)!==0&&this.resetStartLocationFromNode(vr,Be),vr.typeParameters=Be,vr},ie);if(!qe.error&&!qe.aborted)return Be&&this.reportReservedArrowTypeParam(Be),qe.node;if(!ne&&(yf(!this.hasPlugin("jsx")),Se=this.tryParse(()=>super.parseMaybeAssign(g,S),ie),!Se.error))return Se.node;if((I=ne)!=null&&I.node)return this.state=ne.failState,ne.node;if(qe.node)return this.state=qe.failState,Be&&this.reportReservedArrowTypeParam(Be),qe.node;if((H=Se)!=null&&H.node)return this.state=Se.failState,Se.node;throw((q=ne)==null?void 0:q.error)||qe.error||((Z=Se)==null?void 0:Z.error)}reportReservedArrowTypeParam(g){var S;g.params.length===1&&!g.params[0].constraint&&!((S=g.extra)!=null&&S.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Ze.ReservedArrowTypeParam,g)}parseMaybeUnary(g,S){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(g,S)}parseArrow(g){if(this.match(14)){let S=this.tryParse(_=>{let I=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&_(),I});if(S.aborted)return;S.thrown||(S.error&&(this.state=S.failState),g.returnType=S.node)}return super.parseArrow(g)}parseAssignableListItemTypes(g,S){if(!(S&2))return g;this.eat(17)&&(g.optional=!0);let _=this.tsTryParseTypeAnnotation();return _&&(g.typeAnnotation=_),this.resetEndLocation(g),g}isAssignable(g,S){switch(g.type){case"TSTypeCastExpression":return this.isAssignable(g.expression,S);case"TSParameterProperty":return!0;default:return super.isAssignable(g,S)}}toAssignable(g,S=!1){switch(g.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(g,S);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":S?this.expressionScope.recordArrowParameterBindingError(Ze.UnexpectedTypeCastInParameter,g):this.raise(Ze.UnexpectedTypeCastInParameter,g),this.toAssignable(g.expression,S);break;case"AssignmentExpression":!S&&g.left.type==="TSTypeCastExpression"&&(g.left=this.typeCastToParameter(g.left));default:super.toAssignable(g,S)}}toAssignableParenthesizedExpression(g,S){switch(g.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(g.expression,S);break;default:super.toAssignable(g,S)}}checkToRestConversion(g,S){switch(g.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(g.expression,!1);break;default:super.checkToRestConversion(g,S)}}isValidLVal(g,S,_){return gm({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSInstantiationExpression:"expression",TSAsExpression:(_!==64||!S)&&["expression",!0],TSSatisfiesExpression:(_!==64||!S)&&["expression",!0],TSTypeAssertion:(_!==64||!S)&&["expression",!0]},g)||super.isValidLVal(g,S,_)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(g){if(this.match(47)||this.match(51)){let S=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let _=super.parseMaybeDecoratorArguments(g);return _.typeParameters=S,_}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(g)}checkCommaAfterRest(g){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===g?(this.next(),!1):super.checkCommaAfterRest(g)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(g,S){let _=super.parseMaybeDefault(g,S);return _.type==="AssignmentPattern"&&_.typeAnnotation&&_.right.start<_.typeAnnotation.start&&this.raise(Ze.TypeAnnotationAfterAssign,_.typeAnnotation),_}getTokenFromCode(g){if(this.state.inType){if(g===62){this.finishOp(48,1);return}if(g===60){this.finishOp(47,1);return}}super.getTokenFromCode(g)}reScan_lt_gt(){let{type:g}=this.state;g===47?(this.state.pos-=1,this.readToken_lt()):g===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:g}=this.state;return g===51?(this.state.pos-=2,this.finishOp(47,1),47):g}toAssignableList(g,S,_){for(let I=0;Ithis.isAssignable(S,!0)):super.shouldParseArrow(g)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(g){if(this.match(47)||this.match(51)){let S=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());S&&(g.typeParameters=S)}return super.jsxParseOpeningElementAfterName(g)}getGetterSetterExpectedParamCount(g){let S=super.getGetterSetterExpectedParamCount(g),_=this.getObjectOrClassMethodParams(g)[0];return _&&this.isThisParam(_)?S+1:S}parseCatchClauseParam(){let g=super.parseCatchClauseParam(),S=this.tsTryParseTypeAnnotation();return S&&(g.typeAnnotation=S,this.resetEndLocation(g)),g}tsInAmbientContext(g){let{isAmbientContext:S,strict:_}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return g()}finally{this.state.isAmbientContext=S,this.state.strict=_}}parseClass(g,S,_){let I=this.state.inAbstractClass;this.state.inAbstractClass=!!g.abstract;try{return super.parseClass(g,S,_)}finally{this.state.inAbstractClass=I}}tsParseAbstractDeclaration(g,S){if(this.match(80))return g.abstract=!0,this.maybeTakeDecorators(S,this.parseClass(g,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return g.abstract=!0,this.raise(Ze.NonClassMethodPropertyHasAbstractModifer,g),this.tsParseInterfaceDeclaration(g)}else this.unexpected(null,80)}parseMethod(g,S,_,I,H,q,Z){let ie=super.parseMethod(g,S,_,I,H,q,Z);if(ie.abstract&&(this.hasPlugin("estree")?ie.value.body:ie.body)){let{key:ne}=ie;this.raise(Ze.AbstractMethodHasImplementation,ie,{methodName:ne.type==="Identifier"&&!ie.computed?ne.name:`[${this.input.slice(ne.start,ne.end)}]`})}return ie}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(g,S,_,I){return!S&&I?(this.parseTypeOnlyImportExportSpecifier(g,!1,_),this.finishNode(g,"ExportSpecifier")):(g.exportKind="value",super.parseExportSpecifier(g,S,_,I))}parseImportSpecifier(g,S,_,I,H){return!S&&I?(this.parseTypeOnlyImportExportSpecifier(g,!0,_),this.finishNode(g,"ImportSpecifier")):(g.importKind="value",super.parseImportSpecifier(g,S,_,I,_?4098:4096))}parseTypeOnlyImportExportSpecifier(g,S,_){let I=S?"imported":"local",H=S?"local":"exported",q=g[I],Z,ie=!1,ne=!0,Se=q.loc.start;if(this.isContextual(93)){let qe=this.parseIdentifier();if(this.isContextual(93)){let Qe=this.parseIdentifier();ke(this.state.type)?(ie=!0,q=qe,Z=S?this.parseIdentifier():this.parseModuleExportName(),ne=!1):(Z=Qe,ne=!1)}else ke(this.state.type)?(ne=!1,Z=S?this.parseIdentifier():this.parseModuleExportName()):(ie=!0,q=qe)}else ke(this.state.type)&&(ie=!0,S?(q=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(q.name,q.loc.start,!0,!0)):q=this.parseModuleExportName());ie&&_&&this.raise(S?Ze.TypeModifierIsUsedInTypeImports:Ze.TypeModifierIsUsedInTypeExports,Se),g[I]=q,g[H]=Z;let Be=S?"importKind":"exportKind";g[Be]=ie?"type":"value",ne&&this.eatContextual(93)&&(g[H]=S?this.parseIdentifier():this.parseModuleExportName()),g[H]||(g[H]=cs(g[I])),S&&this.checkIdentifier(g[H],ie?4098:4096)}};function Te(x){if(x.type!=="MemberExpression")return!1;let{computed:g,property:S}=x;return g&&S.type!=="StringLiteral"&&(S.type!=="TemplateLiteral"||S.expressions.length>0)?!1:Dr(x.object)}function Xe(x,g){var S;let{type:_}=x;if((S=x.extra)!=null&&S.parenthesized)return!1;if(g){if(_==="Literal"){let{value:I}=x;if(typeof I=="string"||typeof I=="boolean")return!0}}else if(_==="StringLiteral"||_==="BooleanLiteral")return!0;return!!(gr(x,g)||Et(x,g)||_==="TemplateLiteral"&&x.expressions.length===0||Te(x))}function gr(x,g){return g?x.type==="Literal"&&(typeof x.value=="number"||"bigint"in x):x.type==="NumericLiteral"||x.type==="BigIntLiteral"}function Et(x,g){if(x.type==="UnaryExpression"){let{operator:S,argument:_}=x;if(S==="-"&&gr(_,g))return!0}return!1}function Dr(x){return x.type==="Identifier"?!0:x.type!=="MemberExpression"||x.computed?!1:Dr(x.object)}var Kr=b`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),on=x=>class extends x{parsePlaceholder(g){if(this.match(144)){let S=this.startNode();return this.next(),this.assertNoSpace(),S.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(S,g)}}finishPlaceholder(g,S){let _=g;return(!_.expectedNode||!_.type)&&(_=this.finishNode(_,"Placeholder")),_.expectedNode=S,_}getTokenFromCode(g){g===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(g)}parseExprAtom(g){return this.parsePlaceholder("Expression")||super.parseExprAtom(g)}parseIdentifier(g){return this.parsePlaceholder("Identifier")||super.parseIdentifier(g)}checkReservedWord(g,S,_,I){g!==void 0&&super.checkReservedWord(g,S,_,I)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(g,S,_){return g==="Placeholder"||super.isValidLVal(g,S,_)}toAssignable(g,S){g&&g.type==="Placeholder"&&g.expectedNode==="Expression"?g.expectedNode="Pattern":super.toAssignable(g,S)}chStartsBindingIdentifier(g,S){return!!(super.chStartsBindingIdentifier(g,S)||this.lookahead().type===144)}verifyBreakContinue(g,S){g.label&&g.label.type==="Placeholder"||super.verifyBreakContinue(g,S)}parseExpressionStatement(g,S){var _;if(S.type!=="Placeholder"||(_=S.extra)!=null&&_.parenthesized)return super.parseExpressionStatement(g,S);if(this.match(14)){let H=g;return H.label=this.finishPlaceholder(S,"Identifier"),this.next(),H.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(H,"LabeledStatement")}this.semicolon();let I=g;return I.name=S.name,this.finishPlaceholder(I,"Statement")}parseBlock(g,S,_){return this.parsePlaceholder("BlockStatement")||super.parseBlock(g,S,_)}parseFunctionId(g){return this.parsePlaceholder("Identifier")||super.parseFunctionId(g)}parseClass(g,S,_){let I=S?"ClassDeclaration":"ClassExpression";this.next();let H=this.state.strict,q=this.parsePlaceholder("Identifier");if(q)if(this.match(81)||this.match(144)||this.match(5))g.id=q;else{if(_||!S)return g.id=null,g.body=this.finishPlaceholder(q,"ClassBody"),this.finishNode(g,I);throw this.raise(Kr.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(g,S,_);return super.parseClassSuper(g),g.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!g.superClass,H),this.finishNode(g,I)}parseExport(g,S){let _=this.parsePlaceholder("Identifier");if(!_)return super.parseExport(g,S);let I=g;if(!this.isContextual(98)&&!this.match(12))return I.specifiers=[],I.source=null,I.declaration=this.finishPlaceholder(_,"Declaration"),this.finishNode(I,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let H=this.startNode();return H.exported=_,I.specifiers=[this.finishNode(H,"ExportDefaultSpecifier")],super.parseExport(I,S)}isExportDefaultSpecifier(){if(this.match(65)){let g=this.nextTokenStart();if(this.isUnparsedContextual(g,"from")&&this.input.startsWith(Ee(144),this.nextTokenStartSince(g+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(g,S){var _;return(_=g.specifiers)!=null&&_.length?!0:super.maybeParseExportDefaultSpecifier(g,S)}checkExport(g){let{specifiers:S}=g;S!=null&&S.length&&(g.specifiers=S.filter(_=>_.exported.type==="Placeholder")),super.checkExport(g),g.specifiers=S}parseImport(g){let S=this.parsePlaceholder("Identifier");if(!S)return super.parseImport(g);if(g.specifiers=[],!this.isContextual(98)&&!this.match(12))return g.source=this.finishPlaceholder(S,"StringLiteral"),this.semicolon(),this.finishNode(g,"ImportDeclaration");let _=this.startNodeAtNode(S);return _.local=S,g.specifiers.push(this.finishNode(_,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(g)||this.parseNamedImportSpecifiers(g)),this.expectContextual(98),g.source=this.parseImportSource(),this.semicolon(),this.finishNode(g,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Kr.UnexpectedSpace,this.state.lastTokEndLoc)}},Er=x=>class extends x{parseV8Intrinsic(){if(this.match(54)){let g=this.state.startLoc,S=this.startNode();if(this.next(),ce(this.state.type)){let _=this.parseIdentifierName(),I=this.createIdentifier(S,_);if(I.type="V8IntrinsicIdentifier",this.match(10))return I}this.unexpected(g)}}parseExprAtom(g){return this.parseV8Intrinsic()||super.parseExprAtom(g)}};function Kt(x,g){let[S,_]=typeof g=="string"?[g,{}]:g,I=Object.keys(_),H=I.length===0;return x.some(q=>{if(typeof q=="string")return H&&q===S;{let[Z,ie]=q;if(Z!==S)return!1;for(let ne of I)if(ie[ne]!==_[ne])return!1;return!0}})}function an(x,g,S){let _=x.find(I=>Array.isArray(I)?I[0]===g:I===g);return _&&Array.isArray(_)&&_.length>1?_[1][S]:null}var ln=["minimal","fsharp","hack","smart"],li=["^^","@@","^","%","#"];function _i(x){if(Kt(x,"decorators")){if(Kt(x,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let g=an(x,"decorators","decoratorsBeforeExport");if(g!=null&&typeof g!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let S=an(x,"decorators","allowCallParenthesized");if(S!=null&&typeof S!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Kt(x,"flow")&&Kt(x,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Kt(x,"placeholders")&&Kt(x,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Kt(x,"pipelineOperator")){let g=an(x,"pipelineOperator","proposal");if(!ln.includes(g)){let I=ln.map(H=>`"${H}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${I}.`)}let S=["recordAndTuple",{syntaxType:"hash"}],_=Kt(x,S);if(g==="hack"){if(Kt(x,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Kt(x,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let I=an(x,"pipelineOperator","topicToken");if(!li.includes(I)){let H=li.map(q=>`"${q}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${H}.`)}if(I==="#"&&_)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(S)}\`.`)}else if(g==="smart"&&_)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(S)}\`.`)}if(Kt(x,"moduleAttributes")){if(Kt(x,"importAssertions")||Kt(x,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(an(x,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Kt(x,"importAssertions")&&Kt(x,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Kt(x,"recordAndTuple")){let g=an(x,"recordAndTuple","syntaxType");if(g!=null){let S=["hash","bar"];if(!S.includes(g))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+S.map(_=>`'${_}'`).join(", "))}}if(Kt(x,"asyncDoExpressions")&&!Kt(x,"doExpressions")){let g=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw g.missingPlugins="doExpressions",g}if(Kt(x,"optionalChainingAssign")&&an(x,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Ns={estree:w,jsx:Xc,flow:tx,typescript:he,v8intrinsic:Er,placeholders:on},Ms=Object.keys(Ns),Is={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function ym(x){if(x==null)return Object.assign({},Is);if(x.annexB!=null&&x.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let g={};for(let _ of Object.keys(Is)){var S;g[_]=(S=x[_])!=null?S:Is[_]}return g}var Yc=class extends pm{checkProto(x,g,S,_){if(x.type==="SpreadElement"||this.isObjectMethod(x)||x.computed||x.shorthand)return;let I=x.key;if((I.type==="Identifier"?I.name:I.value)==="__proto__"){if(g){this.raise(v.RecordNoProto,I);return}S.used&&(_?_.doubleProtoLoc===null&&(_.doubleProtoLoc=I.loc.start):this.raise(v.DuplicateProto,I)),S.used=!0}}shouldExitDescending(x,g){return x.type==="ArrowFunctionExpression"&&x.start===g}getExpression(){this.enterInitialScopes(),this.nextToken();let x=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),x.comments=this.comments,x.errors=this.state.errors,this.options.tokens&&(x.tokens=this.tokens),x}parseExpression(x,g){return x?this.disallowInAnd(()=>this.parseExpressionBase(g)):this.allowInAnd(()=>this.parseExpressionBase(g))}parseExpressionBase(x){let g=this.state.startLoc,S=this.parseMaybeAssign(x);if(this.match(12)){let _=this.startNodeAt(g);for(_.expressions=[S];this.eat(12);)_.expressions.push(this.parseMaybeAssign(x));return this.toReferencedList(_.expressions),this.finishNode(_,"SequenceExpression")}return S}parseMaybeAssignDisallowIn(x,g){return this.disallowInAnd(()=>this.parseMaybeAssign(x,g))}parseMaybeAssignAllowIn(x,g){return this.allowInAnd(()=>this.parseMaybeAssign(x,g))}setOptionalParametersError(x,g){var S;x.optionalParametersLoc=(S=g==null?void 0:g.loc)!=null?S:this.state.startLoc}parseMaybeAssign(x,g){let S=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let q=this.parseYield();return g&&(q=g.call(this,q,S)),q}let _;x?_=!1:(x=new Kc,_=!0);let{type:I}=this.state;(I===10||ce(I))&&(this.state.potentialArrowAt=this.state.start);let H=this.parseMaybeConditional(x);if(g&&(H=g.call(this,H,S)),W(this.state.type)){let q=this.startNodeAt(S),Z=this.state.value;if(q.operator=Z,this.match(29)){this.toAssignable(H,!0),q.left=H;let ie=S.index;x.doubleProtoLoc!=null&&x.doubleProtoLoc.index>=ie&&(x.doubleProtoLoc=null),x.shorthandAssignLoc!=null&&x.shorthandAssignLoc.index>=ie&&(x.shorthandAssignLoc=null),x.privateKeyLoc!=null&&x.privateKeyLoc.index>=ie&&(this.checkDestructuringPrivate(x),x.privateKeyLoc=null)}else q.left=H;return this.next(),q.right=this.parseMaybeAssign(),this.checkLVal(H,{in:this.finishNode(q,"AssignmentExpression")}),q}else _&&this.checkExpressionErrors(x,!0);return H}parseMaybeConditional(x){let g=this.state.startLoc,S=this.state.potentialArrowAt,_=this.parseExprOps(x);return this.shouldExitDescending(_,S)?_:this.parseConditional(_,g,x)}parseConditional(x,g,S){if(this.eat(17)){let _=this.startNodeAt(g);return _.test=x,_.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),_.alternate=this.parseMaybeAssign(),this.finishNode(_,"ConditionalExpression")}return x}parseMaybeUnaryOrPrivate(x){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(x)}parseExprOps(x){let g=this.state.startLoc,S=this.state.potentialArrowAt,_=this.parseMaybeUnaryOrPrivate(x);return this.shouldExitDescending(_,S)?_:this.parseExprOp(_,g,-1)}parseExprOp(x,g,S){if(this.isPrivateName(x)){let I=this.getPrivateNameSV(x);(S>=je(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,x,{identifierName:I}),this.classScope.usePrivateName(I,x.loc.start)}let _=this.state.type;if(ee(_)&&(this.prodParam.hasIn||!this.match(58))){let I=je(_);if(I>S){if(_===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return x;this.checkPipelineAtInfixOperator(x,g)}let H=this.startNodeAt(g);H.left=x,H.operator=this.state.value;let q=_===41||_===42,Z=_===40;if(Z&&(I=je(42)),this.next(),_===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);H.right=this.parseExprOpRightExpr(_,I);let ie=this.finishNode(H,q||Z?"LogicalExpression":"BinaryExpression"),ne=this.state.type;if(Z&&(ne===41||ne===42)||q&&ne===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(ie,g,S)}}return x}parseExprOpRightExpr(x,g){let S=this.state.startLoc;switch(x){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(x,g),S)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(g))}default:return this.parseExprOpBaseRightExpr(x,g)}}parseExprOpBaseRightExpr(x,g){let S=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),S,ae(x)?g-1:g)}parseHackPipeBody(){var x;let{startLoc:g}=this.state,S=this.parseMaybeAssign();return h.has(S.type)&&!((x=S.extra)!=null&&x.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,g,{type:S.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,g),S}checkExponentialAfterUnary(x){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,x.argument)}parseMaybeUnary(x,g){let S=this.state.startLoc,_=this.isContextual(96);if(_&&this.isAwaitAllowed()){this.next();let Z=this.parseAwait(S);return g||this.checkExponentialAfterUnary(Z),Z}let I=this.match(34),H=this.startNode();if(De(this.state.type)){H.operator=this.state.value,H.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let Z=this.match(89);if(this.next(),H.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(x,!0),this.state.strict&&Z){let ie=H.argument;ie.type==="Identifier"?this.raise(v.StrictDelete,H):this.hasPropertyAsPrivateName(ie)&&this.raise(v.DeletePrivateField,H)}if(!I)return g||this.checkExponentialAfterUnary(H),this.finishNode(H,"UnaryExpression")}let q=this.parseUpdate(H,I,x);if(_){let{type:Z}=this.state;if((this.hasPlugin("v8intrinsic")?mt(Z):mt(Z)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,S),this.parseAwait(S)}return q}parseUpdate(x,g,S){if(g){let H=x;return this.checkLVal(H.argument,{in:this.finishNode(H,"UpdateExpression")}),x}let _=this.state.startLoc,I=this.parseExprSubscripts(S);if(this.checkExpressionErrors(S,!1))return I;for(;ue(this.state.type)&&!this.canInsertSemicolon();){let H=this.startNodeAt(_);H.operator=this.state.value,H.prefix=!1,H.argument=I,this.next(),this.checkLVal(I,{in:I=this.finishNode(H,"UpdateExpression")})}return I}parseExprSubscripts(x){let g=this.state.startLoc,S=this.state.potentialArrowAt,_=this.parseExprAtom(x);return this.shouldExitDescending(_,S)?_:this.parseSubscripts(_,g)}parseSubscripts(x,g,S){let _={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(x),stop:!1};do x=this.parseSubscript(x,g,S,_),_.maybeAsyncArrow=!1;while(!_.stop);return x}parseSubscript(x,g,S,_){let{type:I}=this.state;if(!S&&I===15)return this.parseBind(x,g,S,_);if(ve(I))return this.parseTaggedTemplateExpression(x,g,_);let H=!1;if(I===18){if(S&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return _.stop=!0,x;_.optionalChainMember=H=!0,this.next()}if(!S&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(x,g,_,H);{let q=this.eat(0);return q||H||this.eat(16)?this.parseMember(x,g,_,q,H):(_.stop=!0,x)}}parseMember(x,g,S,_,I){let H=this.startNodeAt(g);return H.object=x,H.computed=_,_?(H.property=this.parseExpression(),this.expect(3)):this.match(138)?(x.type==="Super"&&this.raise(v.SuperPrivateField,g),this.classScope.usePrivateName(this.state.value,this.state.startLoc),H.property=this.parsePrivateName()):H.property=this.parseIdentifier(!0),S.optionalChainMember?(H.optional=I,this.finishNode(H,"OptionalMemberExpression")):this.finishNode(H,"MemberExpression")}parseBind(x,g,S,_){let I=this.startNodeAt(g);return I.object=x,this.next(),I.callee=this.parseNoCallExpr(),_.stop=!0,this.parseSubscripts(this.finishNode(I,"BindExpression"),g,S)}parseCoverCallAndAsyncArrowHead(x,g,S,_){let I=this.state.maybeInArrowParameters,H=null;this.state.maybeInArrowParameters=!0,this.next();let q=this.startNodeAt(g);q.callee=x;let{maybeAsyncArrow:Z,optionalChainMember:ie}=S;Z&&(this.expressionScope.enter(dm()),H=new Kc),ie&&(q.optional=_),_?q.arguments=this.parseCallExpressionArguments(11):q.arguments=this.parseCallExpressionArguments(11,x.type==="Import",x.type!=="Super",q,H);let ne=this.finishCallExpression(q,ie);return Z&&this.shouldParseAsyncArrow()&&!_?(S.stop=!0,this.checkDestructuringPrivate(H),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),ne=this.parseAsyncArrowFromCallExpression(this.startNodeAt(g),ne)):(Z&&(this.checkExpressionErrors(H,!0),this.expressionScope.exit()),this.toReferencedArguments(ne)),this.state.maybeInArrowParameters=I,ne}toReferencedArguments(x,g){this.toReferencedListDeep(x.arguments,g)}parseTaggedTemplateExpression(x,g,S){let _=this.startNodeAt(g);return _.tag=x,_.quasi=this.parseTemplate(!0),S.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,g),this.finishNode(_,"TaggedTemplateExpression")}atPossibleAsyncArrow(x){return x.type==="Identifier"&&x.name==="async"&&this.state.lastTokEndLoc.index===x.end&&!this.canInsertSemicolon()&&x.end-x.start===5&&x.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(x,g){if(x.callee.type==="Import")if(x.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),x.arguments.length===0||x.arguments.length>2)this.raise(v.ImportCallArity,x,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let S of x.arguments)S.type==="SpreadElement"&&this.raise(v.ImportCallSpreadArgument,S);return this.finishNode(x,g?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(x,g,S,_,I){let H=[],q=!0,Z=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(x);){if(q)q=!1;else if(this.expect(12),this.match(x)){g&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),_&&this.addTrailingCommaExtraToNode(_),this.next();break}H.push(this.parseExprListItem(!1,I,S))}return this.state.inFSharpPipelineDirectBody=Z,H}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(x,g){var S;return this.resetPreviousNodeTrailingComments(g),this.expect(19),this.parseArrowExpression(x,g.arguments,!0,(S=g.extra)==null?void 0:S.trailingCommaLoc),g.innerComments&&He(x,g.innerComments),g.callee.trailingComments&&He(x,g.callee.trailingComments),x}parseNoCallExpr(){let x=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),x,!0)}parseExprAtom(x){let g,S=null,{type:_}=this.state;switch(_){case 79:return this.parseSuper();case 83:return g=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(g):this.match(10)?this.options.createImportExpressions?this.parseImportCall(g):this.finishNode(g,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(g,"Import"));case 78:return g=this.startNode(),this.next(),this.finishNode(g,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let I=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(I)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,x);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,x);case 68:return this.parseFunctionOrFunctionSent();case 26:S=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(S,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{g=this.startNode(),this.next(),g.object=null;let I=g.callee=this.parseNoCallExpr();if(I.type==="MemberExpression")return this.finishNode(g,"BindExpression");throw this.raise(v.UnsupportedBind,I)}case 138:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let I=this.getPluginOption("pipelineOperator","proposal");if(I)return this.parseTopicReference(I);this.unexpected();break}case 47:{let I=this.input.codePointAt(this.nextTokenStart());Ft(I)||I===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(ce(_)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let I=this.state.potentialArrowAt===this.state.start,H=this.state.containsEsc,q=this.parseIdentifier();if(!H&&q.name==="async"&&!this.canInsertSemicolon()){let{type:Z}=this.state;if(Z===68)return this.resetPreviousNodeTrailingComments(q),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(q));if(ce(Z))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(q)):q;if(Z===90)return this.resetPreviousNodeTrailingComments(q),this.parseDo(this.startNodeAtNode(q),!0)}return I&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(q),[q],!1)):q}else this.unexpected()}}parseTopicReferenceThenEqualsSign(x,g){let S=this.getPluginOption("pipelineOperator","proposal");if(S)return this.state.type=x,this.state.value=g,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(S);this.unexpected()}parseTopicReference(x){let g=this.startNode(),S=this.state.startLoc,_=this.state.type;return this.next(),this.finishTopicReference(g,S,x,_)}finishTopicReference(x,g,S,_){if(this.testTopicReferenceConfiguration(S,g,_)){let I=S==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(S==="smart"?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,g),this.registerTopicReference(),this.finishNode(x,I)}else throw this.raise(v.PipeTopicUnconfiguredToken,g,{token:Ee(_)})}testTopicReferenceConfiguration(x,g,S){switch(x){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ee(S)}]);case"smart":return S===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,g)}}parseAsyncArrowUnaryFunction(x){this.prodParam.enter(qc(!0,this.prodParam.hasYield));let g=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(x,g,!0)}parseDo(x,g){this.expectPlugin("doExpressions"),g&&this.expectPlugin("asyncDoExpressions"),x.async=g,this.next();let S=this.state.labels;return this.state.labels=[],g?(this.prodParam.enter(2),x.body=this.parseBlock(),this.prodParam.exit()):x.body=this.parseBlock(),this.state.labels=S,this.finishNode(x,"DoExpression")}parseSuper(){let x=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(v.SuperNotAllowed,x):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,x),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,x),this.finishNode(x,"Super")}parsePrivateName(){let x=this.startNode(),g=this.startNodeAt(i(this.state.startLoc,1)),S=this.state.value;return this.next(),x.id=this.createIdentifier(g,S),this.finishNode(x,"PrivateName")}parseFunctionOrFunctionSent(){let x=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let g=this.createIdentifier(this.startNodeAtNode(x),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(x,g,"sent")}return this.parseFunction(x)}parseMetaProperty(x,g,S){x.meta=g;let _=this.state.containsEsc;return x.property=this.parseIdentifier(!0),(x.property.name!==S||_)&&this.raise(v.UnsupportedMetaProperty,x.property,{target:g.name,onlyValidPropertyName:S}),this.finishNode(x,"MetaProperty")}parseImportMetaProperty(x){let g=this.createIdentifier(this.startNodeAtNode(x),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(v.ImportMetaOutsideModule,g),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let S=this.isContextual(105);if(S||this.unexpected(),this.expectPlugin(S?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(v.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),x.phase=S?"source":"defer",this.parseImportCall(x)}return this.parseMetaProperty(x,g,"meta")}parseLiteralAtNode(x,g,S){return this.addExtra(S,"rawValue",x),this.addExtra(S,"raw",this.input.slice(S.start,this.state.end)),S.value=x,this.next(),this.finishNode(S,g)}parseLiteral(x,g){let S=this.startNode();return this.parseLiteralAtNode(x,g,S)}parseStringLiteral(x){return this.parseLiteral(x,"StringLiteral")}parseNumericLiteral(x){return this.parseLiteral(x,"NumericLiteral")}parseBigIntLiteral(x){return this.parseLiteral(x,"BigIntLiteral")}parseDecimalLiteral(x){return this.parseLiteral(x,"DecimalLiteral")}parseRegExpLiteral(x){let g=this.startNode();return this.addExtra(g,"raw",this.input.slice(g.start,this.state.end)),g.pattern=x.pattern,g.flags=x.flags,this.next(),this.finishNode(g,"RegExpLiteral")}parseBooleanLiteral(x){let g=this.startNode();return g.value=x,this.next(),this.finishNode(g,"BooleanLiteral")}parseNullLiteral(){let x=this.startNode();return this.next(),this.finishNode(x,"NullLiteral")}parseParenAndDistinguishExpression(x){let g=this.state.startLoc,S;this.next(),this.expressionScope.enter(uu());let _=this.state.maybeInArrowParameters,I=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let H=this.state.startLoc,q=[],Z=new Kc,ie=!0,ne,Se;for(;!this.match(11);){if(ie)ie=!1;else if(this.expect(12,Z.optionalParametersLoc===null?null:Z.optionalParametersLoc),this.match(11)){Se=this.state.startLoc;break}if(this.match(21)){let Qe=this.state.startLoc;if(ne=this.state.startLoc,q.push(this.parseParenItem(this.parseRestBinding(),Qe)),!this.checkCommaAfterRest(41))break}else q.push(this.parseMaybeAssignAllowIn(Z,this.parseParenItem))}let Be=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=_,this.state.inFSharpPipelineDirectBody=I;let qe=this.startNodeAt(g);return x&&this.shouldParseArrow(q)&&(qe=this.parseArrow(qe))?(this.checkDestructuringPrivate(Z),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(qe,q,!1),qe):(this.expressionScope.exit(),q.length||this.unexpected(this.state.lastTokStartLoc),Se&&this.unexpected(Se),ne&&this.unexpected(ne),this.checkExpressionErrors(Z,!0),this.toReferencedListDeep(q,!0),q.length>1?(S=this.startNodeAt(H),S.expressions=q,this.finishNode(S,"SequenceExpression"),this.resetEndLocation(S,Be)):S=q[0],this.wrapParenthesis(g,S))}wrapParenthesis(x,g){if(!this.options.createParenthesizedExpressions)return this.addExtra(g,"parenthesized",!0),this.addExtra(g,"parenStart",x.index),this.takeSurroundingComments(g,x.index,this.state.lastTokEndLoc.index),g;let S=this.startNodeAt(x);return S.expression=g,this.finishNode(S,"ParenthesizedExpression")}shouldParseArrow(x){return!this.canInsertSemicolon()}parseArrow(x){if(this.eat(19))return x}parseParenItem(x,g){return x}parseNewOrNewTarget(){let x=this.startNode();if(this.next(),this.match(16)){let g=this.createIdentifier(this.startNodeAtNode(x),"new");this.next();let S=this.parseMetaProperty(x,g,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,S),S}return this.parseNew(x)}parseNew(x){if(this.parseNewCallee(x),this.eat(10)){let g=this.parseExprList(11);this.toReferencedList(g),x.arguments=g}else x.arguments=[];return this.finishNode(x,"NewExpression")}parseNewCallee(x){let g=this.match(83),S=this.parseNoCallExpr();x.callee=S,g&&(S.type==="Import"||S.type==="ImportExpression")&&this.raise(v.ImportCallNotNewExpression,S)}parseTemplateElement(x){let{start:g,startLoc:S,end:_,value:I}=this.state,H=g+1,q=this.startNodeAt(i(S,1));I===null&&(x||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));let Z=this.match(24),ie=Z?-1:-2,ne=_+ie;q.value={raw:this.input.slice(H,ne).replace(/\r\n?/g,` -`),cooked:I===null?null:I.slice(1,ie)},q.tail=Z,this.next();let Se=this.finishNode(q,"TemplateElement");return this.resetEndLocation(Se,i(this.state.lastTokEndLoc,ie)),Se}parseTemplate(x){let g=this.startNode(),S=this.parseTemplateElement(x),_=[S],I=[];for(;!S.tail;)I.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),_.push(S=this.parseTemplateElement(x));return g.expressions=I,g.quasis=_,this.finishNode(g,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(x,g,S,_){S&&this.expectPlugin("recordAndTuple");let I=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let H=Object.create(null),q=!0,Z=this.startNode();for(Z.properties=[],this.next();!this.match(x);){if(q)q=!1;else if(this.expect(12),this.match(x)){this.addTrailingCommaExtraToNode(Z);break}let ne;g?ne=this.parseBindingProperty():(ne=this.parsePropertyDefinition(_),this.checkProto(ne,S,H,_)),S&&!this.isObjectProperty(ne)&&ne.type!=="SpreadElement"&&this.raise(v.InvalidRecordProperty,ne),ne.shorthand&&this.addExtra(ne,"shorthand",!0),Z.properties.push(ne)}this.next(),this.state.inFSharpPipelineDirectBody=I;let ie="ObjectExpression";return g?ie="ObjectPattern":S&&(ie="RecordExpression"),this.finishNode(Z,ie)}addTrailingCommaExtraToNode(x){this.addExtra(x,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(x,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(x){return!x.computed&&x.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(x){let g=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)g.push(this.parseDecorator());let S=this.startNode(),_=!1,I=!1,H;if(this.match(21))return g.length&&this.unexpected(),this.parseSpread();g.length&&(S.decorators=g,g=[]),S.method=!1,x&&(H=this.state.startLoc);let q=this.eat(55);this.parsePropertyNamePrefixOperator(S);let Z=this.state.containsEsc;if(this.parsePropertyName(S,x),!q&&!Z&&this.maybeAsyncOrAccessorProp(S)){let{key:ie}=S,ne=ie.name;ne==="async"&&!this.hasPrecedingLineBreak()&&(_=!0,this.resetPreviousNodeTrailingComments(ie),q=this.eat(55),this.parsePropertyName(S)),(ne==="get"||ne==="set")&&(I=!0,this.resetPreviousNodeTrailingComments(ie),S.kind=ne,this.match(55)&&(q=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:ne}),this.next()),this.parsePropertyName(S))}return this.parseObjPropValue(S,H,q,_,!1,I,x)}getGetterSetterExpectedParamCount(x){return x.kind==="get"?0:1}getObjectOrClassMethodParams(x){return x.params}checkGetterSetterParams(x){var g;let S=this.getGetterSetterExpectedParamCount(x),_=this.getObjectOrClassMethodParams(x);_.length!==S&&this.raise(x.kind==="get"?v.BadGetterArity:v.BadSetterArity,x),x.kind==="set"&&((g=_[_.length-1])==null?void 0:g.type)==="RestElement"&&this.raise(v.BadSetterRestParameter,x)}parseObjectMethod(x,g,S,_,I){if(I){let H=this.parseMethod(x,g,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(H),H}if(S||g||this.match(10))return _&&this.unexpected(),x.kind="method",x.method=!0,this.parseMethod(x,g,S,!1,!1,"ObjectMethod")}parseObjectProperty(x,g,S,_){if(x.shorthand=!1,this.eat(14))return x.value=S?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(_),this.finishNode(x,"ObjectProperty");if(!x.computed&&x.key.type==="Identifier"){if(this.checkReservedWord(x.key.name,x.key.loc.start,!0,!1),S)x.value=this.parseMaybeDefault(g,cs(x.key));else if(this.match(29)){let I=this.state.startLoc;_!=null?_.shorthandAssignLoc===null&&(_.shorthandAssignLoc=I):this.raise(v.InvalidCoverInitializedName,I),x.value=this.parseMaybeDefault(g,cs(x.key))}else x.value=cs(x.key);return x.shorthand=!0,this.finishNode(x,"ObjectProperty")}}parseObjPropValue(x,g,S,_,I,H,q){let Z=this.parseObjectMethod(x,S,_,I,H)||this.parseObjectProperty(x,g,I,q);return Z||this.unexpected(),Z}parsePropertyName(x,g){if(this.eat(0))x.computed=!0,x.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:S,value:_}=this.state,I;if(ke(S))I=this.parseIdentifier(!0);else switch(S){case 134:I=this.parseNumericLiteral(_);break;case 133:I=this.parseStringLiteral(_);break;case 135:I=this.parseBigIntLiteral(_);break;case 136:I=this.parseDecimalLiteral(_);break;case 138:{let H=this.state.startLoc;g!=null?g.privateKeyLoc===null&&(g.privateKeyLoc=H):this.raise(v.UnexpectedPrivateField,H),I=this.parsePrivateName();break}default:this.unexpected()}x.key=I,S!==138&&(x.computed=!1)}}initFunction(x,g){x.id=null,x.generator=!1,x.async=g}parseMethod(x,g,S,_,I,H,q=!1){this.initFunction(x,S),x.generator=g,this.scope.enter(18|(q?64:0)|(I?32:0)),this.prodParam.enter(qc(S,x.generator)),this.parseFunctionParams(x,_);let Z=this.parseFunctionBodyAndFinish(x,H,!0);return this.prodParam.exit(),this.scope.exit(),Z}parseArrayLike(x,g,S,_){S&&this.expectPlugin("recordAndTuple");let I=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let H=this.startNode();return this.next(),H.elements=this.parseExprList(x,!S,_,H),this.state.inFSharpPipelineDirectBody=I,this.finishNode(H,S?"TupleExpression":"ArrayExpression")}parseArrowExpression(x,g,S,_){this.scope.enter(6);let I=qc(S,!1);!this.match(5)&&this.prodParam.hasIn&&(I|=8),this.prodParam.enter(I),this.initFunction(x,S);let H=this.state.maybeInArrowParameters;return g&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(x,g,_)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(x,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=H,this.finishNode(x,"ArrowFunctionExpression")}setArrowFunctionParameters(x,g,S){this.toAssignableList(g,S,!1),x.params=g}parseFunctionBodyAndFinish(x,g,S=!1){return this.parseFunctionBody(x,!1,S),this.finishNode(x,g)}parseFunctionBody(x,g,S=!1){let _=g&&!this.match(5);if(this.expressionScope.enter(ff()),_)x.body=this.parseMaybeAssign(),this.checkParams(x,!1,g,!1);else{let I=this.state.strict,H=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),x.body=this.parseBlock(!0,!1,q=>{let Z=!this.isSimpleParamList(x.params);q&&Z&&this.raise(v.IllegalLanguageModeDirective,(x.kind==="method"||x.kind==="constructor")&&x.key?x.key.loc.end:x);let ie=!I&&this.state.strict;this.checkParams(x,!this.state.strict&&!g&&!S&&!Z,g,ie),this.state.strict&&x.id&&this.checkIdentifier(x.id,65,ie)}),this.prodParam.exit(),this.state.labels=H}this.expressionScope.exit()}isSimpleParameter(x){return x.type==="Identifier"}isSimpleParamList(x){for(let g=0,S=x.length;g10||!Fs(x))){if(S&&ki(x)){this.raise(v.UnexpectedKeyword,g,{keyword:x});return}if((this.state.strict?_?Ti:Yr:fr)(x,this.inModule)){this.raise(v.UnexpectedReservedWord,g,{reservedWord:x});return}else if(x==="yield"){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,g);return}}else if(x==="await"){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,g);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,g);return}this.expressionScope.recordAsyncArrowParametersError(g)}else if(x==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,g);return}}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(x){let g=this.startNodeAt(x);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,g),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,g),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(g.argument=this.parseMaybeUnary(null,!0)),this.finishNode(g,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:x}=this.state;return x===53||x===10||x===0||ve(x)||x===102&&!this.state.containsEsc||x===137||x===56||this.hasPlugin("v8intrinsic")&&x===54}parseYield(){let x=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,x),this.next();let g=!1,S=null;if(!this.hasPrecedingLineBreak())switch(g=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!g)break;default:S=this.parseMaybeAssign()}return x.delegate=g,x.argument=S,this.finishNode(x,"YieldExpression")}parseImportCall(x){return this.next(),x.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(x.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(x.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(x,"ImportExpression")}checkPipelineAtInfixOperator(x,g){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&x.type==="SequenceExpression"&&this.raise(v.PipelineHeadSequenceExpression,g)}parseSmartPipelineBodyInStyle(x,g){if(this.isSimpleReference(x)){let S=this.startNodeAt(g);return S.callee=x,this.finishNode(S,"PipelineBareFunction")}else{let S=this.startNodeAt(g);return this.checkSmartPipeTopicBodyEarlyErrors(g),S.expression=x,this.finishNode(S,"PipelineTopicExpression")}}isSimpleReference(x){switch(x.type){case"MemberExpression":return!x.computed&&this.isSimpleReference(x.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(x){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,x)}withTopicBindingContext(x){let g=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=g}}withSmartMixTopicForbiddingContext(x){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let g=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=g}}else return x()}withSoloAwaitPermittingContext(x){let g=this.state.soloAwait;this.state.soloAwait=!0;try{return x()}finally{this.state.soloAwait=g}}allowInAnd(x){let g=this.prodParam.currentFlags();if(8&~g){this.prodParam.enter(g|8);try{return x()}finally{this.prodParam.exit()}}return x()}disallowInAnd(x){let g=this.prodParam.currentFlags();if(8&g){this.prodParam.enter(g&-9);try{return x()}finally{this.prodParam.exit()}}return x()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(x){let g=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let _=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),g,x);return this.state.inFSharpPipelineDirectBody=S,_}parseModuleExpression(){this.expectPlugin("moduleBlocks");let x=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let g=this.startNodeAt(this.state.endLoc);this.next();let S=this.initializeScopes(!0);this.enterInitialScopes();try{x.body=this.parseProgram(g,8,"module")}finally{S()}return this.finishNode(x,"ModuleExpression")}parsePropertyNamePrefixOperator(x){}},Ha={kind:1},qU={kind:2},KU=/[\uD800-\uDFFF]/u,sx=/in(?:stanceof)?/y;function JU(x,g){for(let S=0;S0)for(let[I,H]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,H,{localName:I});let _;return g===139?_=this.finishNode(x,"Program"):_=this.finishNodeAt(x,"Program",i(this.state.startLoc,-1)),_}stmtToDirective(x){let g=x;g.type="Directive",g.value=g.expression,delete g.expression;let S=g.value,_=S.value,I=this.input.slice(S.start,S.end),H=S.value=I.slice(1,-1);return this.addExtra(S,"raw",I),this.addExtra(S,"rawValue",H),this.addExtra(S,"expressionValue",_),S.type="DirectiveLiteral",g}parseInterpreterDirective(){if(!this.match(28))return null;let x=this.startNode();return x.value=this.state.value,this.next(),this.finishNode(x,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(x,g){if(Ft(x)){if(sx.lastIndex=g,sx.test(this.input)){let S=this.codePointAtPos(sx.lastIndex);if(!rr(S)&&S!==92)return!1}return!0}else return x===92}chStartsBindingPattern(x){return x===91||x===123}hasFollowingBindingAtom(){let x=this.nextTokenStart(),g=this.codePointAtPos(x);return this.chStartsBindingPattern(g)||this.chStartsBindingIdentifier(g,x)}hasInLineFollowingBindingIdentifierOrBrace(){let x=this.nextTokenInLineStart(),g=this.codePointAtPos(x);return g===123||this.chStartsBindingIdentifier(g,x)}startsUsingForOf(){let{type:x,containsEsc:g}=this.lookahead();if(x===102&&!g)return!1;if(ce(x)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let x=this.nextTokenInLineStart();if(this.isUnparsedContextual(x,"using")){x=this.nextTokenInLineStartSince(x+5);let g=this.codePointAtPos(x);if(this.chStartsBindingIdentifier(g,x))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(x=!1){let g=0;return this.options.annexB&&!this.state.strict&&(g|=4,x&&(g|=8)),this.parseStatementLike(g)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(x){let g=null;return this.match(26)&&(g=this.parseDecorators(!0)),this.parseStatementContent(x,g)}parseStatementContent(x,g){let S=this.state.type,_=this.startNode(),I=!!(x&2),H=!!(x&4),q=x&1;switch(S){case 60:return this.parseBreakContinueStatement(_,!0);case 63:return this.parseBreakContinueStatement(_,!1);case 64:return this.parseDebuggerStatement(_);case 90:return this.parseDoWhileStatement(_);case 91:return this.parseForStatement(_);case 68:if(this.lookaheadCharCode()===46)break;return H||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(_,!1,!I&&H);case 80:return I||this.unexpected(),this.parseClass(this.maybeTakeDecorators(g,_),!0);case 69:return this.parseIfStatement(_);case 70:return this.parseReturnStatement(_);case 71:return this.parseSwitchStatement(_);case 72:return this.parseThrowStatement(_);case 73:return this.parseTryStatement(_);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?I||this.raise(v.UnexpectedLexicalDeclaration,_):this.raise(v.AwaitUsingNotInAsyncContext,_),this.next(),this.parseVarStatement(_,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc):I||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(_,"using");case 100:{if(this.state.containsEsc)break;let ne=this.nextTokenStart(),Se=this.codePointAtPos(ne);if(Se!==91&&(!I&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(Se,ne)&&Se!==123))break}case 75:I||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let ne=this.state.value;return this.parseVarStatement(_,ne)}case 92:return this.parseWhileStatement(_);case 76:return this.parseWithStatement(_);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(_);case 83:{let ne=this.lookaheadCharCode();if(ne===40||ne===46)break}case 82:{!this.options.allowImportExportEverywhere&&!q&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let ne;return S===83?(ne=this.parseImport(_),ne.type==="ImportDeclaration"&&(!ne.importKind||ne.importKind==="value")&&(this.sawUnambiguousESM=!0)):(ne=this.parseExport(_,g),(ne.type==="ExportNamedDeclaration"&&(!ne.exportKind||ne.exportKind==="value")||ne.type==="ExportAllDeclaration"&&(!ne.exportKind||ne.exportKind==="value")||ne.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(ne),ne}default:if(this.isAsyncFunction())return I||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(_,!0,!I&&H)}let Z=this.state.value,ie=this.parseExpression();return ce(S)&&ie.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(_,Z,ie,x):this.parseExpressionStatement(_,ie,g)}assertModuleNodeAllowed(x){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,x)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(x,g,S){return x&&(g.decorators&&g.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(v.DecoratorsBeforeAfterExport,g.decorators[0]),g.decorators.unshift(...x)):g.decorators=x,this.resetStartLocationFromNode(g,x[0]),S&&this.resetStartLocationFromNode(S,g)),g}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(x){let g=[];do g.push(this.parseDecorator());while(this.match(26));if(this.match(82))x||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return g}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let x=this.startNode();if(this.next(),this.hasPlugin("decorators")){let g=this.state.startLoc,S;if(this.match(10)){let _=this.state.startLoc;this.next(),S=this.parseExpression(),this.expect(11),S=this.wrapParenthesis(_,S);let I=this.state.startLoc;x.expression=this.parseMaybeDecoratorArguments(S),this.getPluginOption("decorators","allowCallParenthesized")===!1&&x.expression!==S&&this.raise(v.DecoratorArgumentsOutsideParentheses,I)}else{for(S=this.parseIdentifier(!1);this.eat(16);){let _=this.startNodeAt(g);_.object=S,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),_.property=this.parsePrivateName()):_.property=this.parseIdentifier(!0),_.computed=!1,S=this.finishNode(_,"MemberExpression")}x.expression=this.parseMaybeDecoratorArguments(S)}}else x.expression=this.parseExprSubscripts();return this.finishNode(x,"Decorator")}parseMaybeDecoratorArguments(x){if(this.eat(10)){let g=this.startNodeAtNode(x);return g.callee=x,g.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(g.arguments),this.finishNode(g,"CallExpression")}return x}parseBreakContinueStatement(x,g){return this.next(),this.isLineTerminator()?x.label=null:(x.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(x,g),this.finishNode(x,g?"BreakStatement":"ContinueStatement")}verifyBreakContinue(x,g){let S;for(S=0;Sthis.parseStatement()),this.state.labels.pop(),this.expect(92),x.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(x,"DoWhileStatement")}parseForStatement(x){this.next(),this.state.labels.push(Ha);let g=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(g=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return g!==null&&this.unexpected(g),this.parseFor(x,null);let S=this.isContextual(100);{let Z=this.isContextual(96)&&this.startsAwaitUsing(),ie=Z||this.isContextual(107)&&this.startsUsingForOf(),ne=S&&this.hasFollowingBindingAtom()||ie;if(this.match(74)||this.match(75)||ne){let Se=this.startNode(),Be;Z?(Be="await using",this.isAwaitAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):Be=this.state.value,this.next(),this.parseVar(Se,!0,Be);let qe=this.finishNode(Se,"VariableDeclaration"),Qe=this.match(58);return Qe&&ie&&this.raise(v.ForInUsing,qe),(Qe||this.isContextual(102))&&qe.declarations.length===1?this.parseForIn(x,qe,g):(g!==null&&this.unexpected(g),this.parseFor(x,qe))}}let _=this.isContextual(95),I=new Kc,H=this.parseExpression(!0,I),q=this.isContextual(102);if(q&&(S&&this.raise(v.ForOfLet,H),g===null&&_&&H.type==="Identifier"&&this.raise(v.ForOfAsync,H)),q||this.match(58)){this.checkDestructuringPrivate(I),this.toAssignable(H,!0);let Z=q?"ForOfStatement":"ForInStatement";return this.checkLVal(H,{in:{type:Z}}),this.parseForIn(x,H,g)}else this.checkExpressionErrors(I,!0);return g!==null&&this.unexpected(g),this.parseFor(x,H)}parseFunctionStatement(x,g,S){return this.next(),this.parseFunction(x,1|(S?2:0)|(g?8:0))}parseIfStatement(x){return this.next(),x.test=this.parseHeaderExpression(),x.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),x.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(x,"IfStatement")}parseReturnStatement(x){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?x.argument=null:(x.argument=this.parseExpression(),this.semicolon()),this.finishNode(x,"ReturnStatement")}parseSwitchStatement(x){this.next(),x.discriminant=this.parseHeaderExpression();let g=x.cases=[];this.expect(5),this.state.labels.push(qU),this.scope.enter(0);let S;for(let _;!this.match(8);)if(this.match(61)||this.match(65)){let I=this.match(61);S&&this.finishNode(S,"SwitchCase"),g.push(S=this.startNode()),S.consequent=[],this.next(),I?S.test=this.parseExpression():(_&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),_=!0,S.test=null),this.expect(14)}else S?S.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),S&&this.finishNode(S,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(x,"SwitchStatement")}parseThrowStatement(x){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),x.argument=this.parseExpression(),this.semicolon(),this.finishNode(x,"ThrowStatement")}parseCatchClauseParam(){let x=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&x.type==="Identifier"?8:0),this.checkLVal(x,{in:{type:"CatchClause"},binding:9}),x}parseTryStatement(x){if(this.next(),x.block=this.parseBlock(),x.handler=null,this.match(62)){let g=this.startNode();this.next(),this.match(10)?(this.expect(10),g.param=this.parseCatchClauseParam(),this.expect(11)):(g.param=null,this.scope.enter(0)),g.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),x.handler=this.finishNode(g,"CatchClause")}return x.finalizer=this.eat(67)?this.parseBlock():null,!x.handler&&!x.finalizer&&this.raise(v.NoCatchOrFinally,x),this.finishNode(x,"TryStatement")}parseVarStatement(x,g,S=!1){return this.next(),this.parseVar(x,!1,g,S),this.semicolon(),this.finishNode(x,"VariableDeclaration")}parseWhileStatement(x){return this.next(),x.test=this.parseHeaderExpression(),this.state.labels.push(Ha),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(x,"WhileStatement")}parseWithStatement(x){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),x.object=this.parseHeaderExpression(),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(x,"WithStatement")}parseEmptyStatement(x){return this.next(),this.finishNode(x,"EmptyStatement")}parseLabeledStatement(x,g,S,_){for(let H of this.state.labels)H.name===g&&this.raise(v.LabelRedeclaration,S,{labelName:g});let I=pe(this.state.type)?1:this.match(71)?2:null;for(let H=this.state.labels.length-1;H>=0;H--){let q=this.state.labels[H];if(q.statementStart===x.start)q.statementStart=this.state.start,q.kind=I;else break}return this.state.labels.push({name:g,kind:I,statementStart:this.state.start}),x.body=_&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),x.label=S,this.finishNode(x,"LabeledStatement")}parseExpressionStatement(x,g,S){return x.expression=g,this.semicolon(),this.finishNode(x,"ExpressionStatement")}parseBlock(x=!1,g=!0,S){let _=this.startNode();return x&&this.state.strictErrors.clear(),this.expect(5),g&&this.scope.enter(0),this.parseBlockBody(_,x,!1,8,S),g&&this.scope.exit(),this.finishNode(_,"BlockStatement")}isValidDirective(x){return x.type==="ExpressionStatement"&&x.expression.type==="StringLiteral"&&!x.expression.extra.parenthesized}parseBlockBody(x,g,S,_,I){let H=x.body=[],q=x.directives=[];this.parseBlockOrModuleBlockBody(H,g?q:void 0,S,_,I)}parseBlockOrModuleBlockBody(x,g,S,_,I){let H=this.state.strict,q=!1,Z=!1;for(;!this.match(_);){let ie=S?this.parseModuleItem():this.parseStatementListItem();if(g&&!Z){if(this.isValidDirective(ie)){let ne=this.stmtToDirective(ie);g.push(ne),!q&&ne.value.value==="use strict"&&(q=!0,this.setStrict(!0));continue}Z=!0,this.state.strictErrors.clear()}x.push(ie)}I==null||I.call(this,q),H||this.setStrict(!1),this.next()}parseFor(x,g){return x.init=g,this.semicolon(!1),x.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),x.update=this.match(11)?null:this.parseExpression(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,"ForStatement")}parseForIn(x,g,S){let _=this.match(58);return this.next(),_?S!==null&&this.unexpected(S):x.await=S!==null,g.type==="VariableDeclaration"&&g.declarations[0].init!=null&&(!_||!this.options.annexB||this.state.strict||g.kind!=="var"||g.declarations[0].id.type!=="Identifier")&&this.raise(v.ForInOfLoopInitializer,g,{type:_?"ForInStatement":"ForOfStatement"}),g.type==="AssignmentPattern"&&this.raise(v.InvalidLhs,g,{ancestor:{type:"ForStatement"}}),x.left=g,x.right=_?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,_?"ForInStatement":"ForOfStatement")}parseVar(x,g,S,_=!1){let I=x.declarations=[];for(x.kind=S;;){let H=this.startNode();if(this.parseVarId(H,S),H.init=this.eat(29)?g?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,H.init===null&&!_&&(H.id.type!=="Identifier"&&!(g&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(S==="const"||S==="using"||S==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:S})),I.push(this.finishNode(H,"VariableDeclarator")),!this.eat(12))break}return x}parseVarId(x,g){let S=this.parseBindingAtom();(g==="using"||g==="await using")&&(S.type==="ArrayPattern"||S.type==="ObjectPattern")&&this.raise(v.UsingDeclarationHasBindingPattern,S.loc.start),this.checkLVal(S,{in:{type:"VariableDeclarator"},binding:g==="var"?5:8201}),x.id=S}parseAsyncFunctionExpression(x){return this.parseFunction(x,8)}parseFunction(x,g=0){let S=g&2,_=!!(g&1),I=_&&!(g&4),H=!!(g&8);this.initFunction(x,H),this.match(55)&&(S&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),x.generator=!0),_&&(x.id=this.parseFunctionId(I));let q=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(qc(H,x.generator)),_||(x.id=this.parseFunctionId()),this.parseFunctionParams(x,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(x,_?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),_&&!S&&this.registerFunctionStatementId(x),this.state.maybeInArrowParameters=q,x}parseFunctionId(x){return x||ce(this.state.type)?this.parseIdentifier():null}parseFunctionParams(x,g){this.expect(10),this.expressionScope.enter(q1()),x.params=this.parseBindingList(11,41,2|(g?4:0)),this.expressionScope.exit()}registerFunctionStatementId(x){x.id&&this.scope.declareName(x.id.name,!this.options.annexB||this.state.strict||x.generator||x.async?this.scope.treatFunctionsAsVar?5:8201:17,x.id.loc.start)}parseClass(x,g,S){this.next();let _=this.state.strict;return this.state.strict=!0,this.parseClassId(x,g,S),this.parseClassSuper(x),x.body=this.parseClassBody(!!x.superClass,_),this.finishNode(x,g?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(x){return x.type==="Identifier"&&x.name==="constructor"||x.type==="StringLiteral"&&x.value==="constructor"}isNonstaticConstructor(x){return!x.computed&&!x.static&&this.nameIsConstructor(x.key)}parseClassBody(x,g){this.classScope.enter();let S={hadConstructor:!1,hadSuperClass:x},_=[],I=this.startNode();if(I.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(_.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){_.push(this.parseDecorator());continue}let H=this.startNode();_.length&&(H.decorators=_,this.resetStartLocationFromNode(H,_[0]),_=[]),this.parseClassMember(I,H,S),H.kind==="constructor"&&H.decorators&&H.decorators.length>0&&this.raise(v.DecoratorConstructor,H)}}),this.state.strict=g,this.next(),_.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(I,"ClassBody")}parseClassMemberFromModifier(x,g){let S=this.parseIdentifier(!0);if(this.isClassMethod()){let _=g;return _.kind="method",_.computed=!1,_.key=S,_.static=!1,this.pushClassMethod(x,_,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let _=g;return _.computed=!1,_.key=S,_.static=!1,x.body.push(this.parseClassProperty(_)),!0}return this.resetPreviousNodeTrailingComments(S),!1}parseClassMember(x,g,S){let _=this.isContextual(106);if(_){if(this.parseClassMemberFromModifier(x,g))return;if(this.eat(5)){this.parseClassStaticBlock(x,g);return}}this.parseClassMemberWithIsStatic(x,g,S,_)}parseClassMemberWithIsStatic(x,g,S,_){let I=g,H=g,q=g,Z=g,ie=g,ne=I,Se=I;if(g.static=_,this.parsePropertyNamePrefixOperator(g),this.eat(55)){ne.kind="method";let vr=this.match(138);if(this.parseClassElementName(ne),vr){this.pushClassPrivateMethod(x,H,!0,!1);return}this.isNonstaticConstructor(I)&&this.raise(v.ConstructorIsGenerator,I.key),this.pushClassMethod(x,I,!0,!1,!1,!1);return}let Be=!this.state.containsEsc&&ce(this.state.type),qe=this.parseClassElementName(g),Qe=Be?qe.name:null,sr=this.isPrivateName(qe),un=this.state.startLoc;if(this.parsePostMemberNameModifiers(Se),this.isClassMethod()){if(ne.kind="method",sr){this.pushClassPrivateMethod(x,H,!1,!1);return}let vr=this.isNonstaticConstructor(I),Jr=!1;vr&&(I.kind="constructor",S.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,qe),vr&&this.hasPlugin("typescript")&&g.override&&this.raise(v.OverrideOnConstructor,qe),S.hadConstructor=!0,Jr=S.hadSuperClass),this.pushClassMethod(x,I,!1,!1,vr,Jr)}else if(this.isClassProperty())sr?this.pushClassPrivateProperty(x,Z):this.pushClassProperty(x,q);else if(Qe==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(qe);let vr=this.eat(55);Se.optional&&this.unexpected(un),ne.kind="method";let Jr=this.match(138);this.parseClassElementName(ne),this.parsePostMemberNameModifiers(Se),Jr?this.pushClassPrivateMethod(x,H,vr,!0):(this.isNonstaticConstructor(I)&&this.raise(v.ConstructorIsAsync,I.key),this.pushClassMethod(x,I,vr,!0,!1,!1))}else if((Qe==="get"||Qe==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(qe),ne.kind=Qe;let vr=this.match(138);this.parseClassElementName(I),vr?this.pushClassPrivateMethod(x,H,!1,!1):(this.isNonstaticConstructor(I)&&this.raise(v.ConstructorIsAccessor,I.key),this.pushClassMethod(x,I,!1,!1,!1,!1)),this.checkGetterSetterParams(I)}else if(Qe==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(qe);let vr=this.match(138);this.parseClassElementName(q),this.pushClassAccessorProperty(x,ie,vr)}else this.isLineTerminator()?sr?this.pushClassPrivateProperty(x,Z):this.pushClassProperty(x,q):this.unexpected()}parseClassElementName(x){let{type:g,value:S}=this.state;if((g===132||g===133)&&x.static&&S==="prototype"&&this.raise(v.StaticPrototype,this.state.startLoc),g===138){S==="constructor"&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);let _=this.parsePrivateName();return x.key=_,_}return this.parsePropertyName(x),x.key}parseClassStaticBlock(x,g){var S;this.scope.enter(208);let _=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let I=g.body=[];this.parseBlockOrModuleBlockBody(I,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=_,x.body.push(this.finishNode(g,"StaticBlock")),(S=g.decorators)!=null&&S.length&&this.raise(v.DecoratorStaticBlock,g)}pushClassProperty(x,g){!g.computed&&this.nameIsConstructor(g.key)&&this.raise(v.ConstructorClassField,g.key),x.body.push(this.parseClassProperty(g))}pushClassPrivateProperty(x,g){let S=this.parseClassPrivateProperty(g);x.body.push(S),this.classScope.declarePrivateName(this.getPrivateNameSV(S.key),0,S.key.loc.start)}pushClassAccessorProperty(x,g,S){!S&&!g.computed&&this.nameIsConstructor(g.key)&&this.raise(v.ConstructorClassField,g.key);let _=this.parseClassAccessorProperty(g);x.body.push(_),S&&this.classScope.declarePrivateName(this.getPrivateNameSV(_.key),0,_.key.loc.start)}pushClassMethod(x,g,S,_,I,H){x.body.push(this.parseMethod(g,S,_,I,H,"ClassMethod",!0))}pushClassPrivateMethod(x,g,S,_){let I=this.parseMethod(g,S,_,!1,!1,"ClassPrivateMethod",!0);x.body.push(I);let H=I.kind==="get"?I.static?6:2:I.kind==="set"?I.static?5:1:0;this.declareClassPrivateMethodInScope(I,H)}declareClassPrivateMethodInScope(x,g){this.classScope.declarePrivateName(this.getPrivateNameSV(x.key),g,x.key.loc.start)}parsePostMemberNameModifiers(x){}parseClassPrivateProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassPrivateProperty")}parseClassProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassProperty")}parseClassAccessorProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassAccessorProperty")}parseInitializer(x){this.scope.enter(80),this.expressionScope.enter(ff()),this.prodParam.enter(0),x.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(x,g,S,_=8331){if(ce(this.state.type))x.id=this.parseIdentifier(),g&&this.declareNameFromIdentifier(x.id,_);else if(S||!g)x.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(x){x.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(x,g){let S=this.parseMaybeImportPhase(x,!0),_=this.maybeParseExportDefaultSpecifier(x,S),I=!_||this.eat(12),H=I&&this.eatExportStar(x),q=H&&this.maybeParseExportNamespaceSpecifier(x),Z=I&&(!q||this.eat(12)),ie=_||H;if(H&&!q){if(_&&this.unexpected(),g)throw this.raise(v.UnsupportedDecoratorExport,x);return this.parseExportFrom(x,!0),this.finishNode(x,"ExportAllDeclaration")}let ne=this.maybeParseExportNamedSpecifiers(x);_&&I&&!H&&!ne&&this.unexpected(null,5),q&&Z&&this.unexpected(null,98);let Se;if(ie||ne){if(Se=!1,g)throw this.raise(v.UnsupportedDecoratorExport,x);this.parseExportFrom(x,ie)}else Se=this.maybeParseExportDeclaration(x);if(ie||ne||Se){var Be;let qe=x;if(this.checkExport(qe,!0,!1,!!qe.source),((Be=qe.declaration)==null?void 0:Be.type)==="ClassDeclaration")this.maybeTakeDecorators(g,qe.declaration,qe);else if(g)throw this.raise(v.UnsupportedDecoratorExport,x);return this.finishNode(qe,"ExportNamedDeclaration")}if(this.eat(65)){let qe=x,Qe=this.parseExportDefaultExpression();if(qe.declaration=Qe,Qe.type==="ClassDeclaration")this.maybeTakeDecorators(g,Qe,qe);else if(g)throw this.raise(v.UnsupportedDecoratorExport,x);return this.checkExport(qe,!0,!0),this.finishNode(qe,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(x){return this.eat(55)}maybeParseExportDefaultSpecifier(x,g){if(g||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",g==null?void 0:g.loc.start);let S=g||this.parseIdentifier(!0),_=this.startNodeAtNode(S);return _.exported=S,x.specifiers=[this.finishNode(_,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(x){if(this.isContextual(93)){var g;(g=x).specifiers!=null||(g.specifiers=[]);let S=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),S.exported=this.parseModuleExportName(),x.specifiers.push(this.finishNode(S,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(x){if(this.match(5)){let g=x;g.specifiers||(g.specifiers=[]);let S=g.exportKind==="type";return g.specifiers.push(...this.parseExportSpecifiers(S)),g.source=null,g.declaration=null,this.hasPlugin("importAssertions")&&(g.assertions=[]),!0}return!1}maybeParseExportDeclaration(x){return this.shouldParseExportDeclaration()?(x.specifiers=[],x.source=null,this.hasPlugin("importAssertions")&&(x.assertions=[]),x.declaration=this.parseExportDeclaration(x),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let x=this.nextTokenInLineStart();return this.isUnparsedContextual(x,"function")}parseExportDefaultExpression(){let x=this.startNode();if(this.match(68))return this.next(),this.parseFunction(x,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(x,13);if(this.match(80))return this.parseClass(x,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);let g=this.parseMaybeAssignAllowIn();return this.semicolon(),g}parseExportDeclaration(x){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:x}=this.state;if(ce(x)){if(x===95&&!this.state.containsEsc||x===100)return!1;if((x===130||x===129)&&!this.state.containsEsc){let{type:_}=this.lookahead();if(ce(_)&&_!==98||_===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let g=this.nextTokenStart(),S=this.isUnparsedContextual(g,"from");if(this.input.charCodeAt(g)===44||ce(this.state.type)&&S)return!0;if(this.match(65)&&S){let _=this.input.charCodeAt(this.nextTokenStartSince(g+4));return _===34||_===39}return!1}parseExportFrom(x,g){this.eatContextual(98)?(x.source=this.parseImportSource(),this.checkExport(x),this.maybeParseImportAttributes(x),this.checkJSONModuleImport(x)):g&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:x}=this.state;return x===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):x===74||x===75||x===68||x===80||this.isLet()||this.isAsyncFunction()}checkExport(x,g,S,_){if(g){var I;if(S){if(this.checkDuplicateExports(x,"default"),this.hasPlugin("exportDefaultFrom")){var H;let q=x.declaration;q.type==="Identifier"&&q.name==="from"&&q.end-q.start===4&&!((H=q.extra)!=null&&H.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,q)}}else if((I=x.specifiers)!=null&&I.length)for(let q of x.specifiers){let{exported:Z}=q,ie=Z.type==="Identifier"?Z.name:Z.value;if(this.checkDuplicateExports(q,ie),!_&&q.local){let{local:ne}=q;ne.type!=="Identifier"?this.raise(v.ExportBindingIsString,q,{localName:ne.value,exportName:ie}):(this.checkReservedWord(ne.name,ne.loc.start,!0,!1),this.scope.checkLocalExport(ne))}}else if(x.declaration){let q=x.declaration;if(q.type==="FunctionDeclaration"||q.type==="ClassDeclaration"){let{id:Z}=q;if(!Z)throw new Error("Assertion failure");this.checkDuplicateExports(x,Z.name)}else if(q.type==="VariableDeclaration")for(let Z of q.declarations)this.checkDeclaration(Z.id)}}}checkDeclaration(x){if(x.type==="Identifier")this.checkDuplicateExports(x,x.name);else if(x.type==="ObjectPattern")for(let g of x.properties)this.checkDeclaration(g);else if(x.type==="ArrayPattern")for(let g of x.elements)g&&this.checkDeclaration(g);else x.type==="ObjectProperty"?this.checkDeclaration(x.value):x.type==="RestElement"?this.checkDeclaration(x.argument):x.type==="AssignmentPattern"&&this.checkDeclaration(x.left)}checkDuplicateExports(x,g){this.exportedIdentifiers.has(g)&&(g==="default"?this.raise(v.DuplicateDefaultExport,x):this.raise(v.DuplicateExport,x,{exportName:g})),this.exportedIdentifiers.add(g)}parseExportSpecifiers(x){let g=[],S=!0;for(this.expect(5);!this.eat(8);){if(S)S=!1;else if(this.expect(12),this.eat(8))break;let _=this.isContextual(130),I=this.match(133),H=this.startNode();H.local=this.parseModuleExportName(),g.push(this.parseExportSpecifier(H,I,x,_))}return g}parseExportSpecifier(x,g,S,_){return this.eatContextual(93)?x.exported=this.parseModuleExportName():g?x.exported=Jc(x.local):x.exported||(x.exported=cs(x.local)),this.finishNode(x,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let x=this.parseStringLiteral(this.state.value),g=KU.exec(x.value);return g&&this.raise(v.ModuleExportNameHasLoneSurrogate,x,{surrogateCharCode:g[0].charCodeAt(0)}),x}return this.parseIdentifier(!0)}isJSONModuleImport(x){return x.assertions!=null?x.assertions.some(({key:g,value:S})=>S.value==="json"&&(g.type==="Identifier"?g.name==="type":g.value==="type")):!1}checkImportReflection(x){let{specifiers:g}=x,S=g.length===1?g[0].type:null;if(x.phase==="source")S!=="ImportDefaultSpecifier"&&this.raise(v.SourcePhaseImportRequiresDefault,g[0].loc.start);else if(x.phase==="defer")S!=="ImportNamespaceSpecifier"&&this.raise(v.DeferImportRequiresNamespace,g[0].loc.start);else if(x.module){var _;S!=="ImportDefaultSpecifier"&&this.raise(v.ImportReflectionNotBinding,g[0].loc.start),((_=x.assertions)==null?void 0:_.length)>0&&this.raise(v.ImportReflectionHasAssertion,g[0].loc.start)}}checkJSONModuleImport(x){if(this.isJSONModuleImport(x)&&x.type!=="ExportAllDeclaration"){let{specifiers:g}=x;if(g!=null){let S=g.find(_=>{let I;if(_.type==="ExportSpecifier"?I=_.local:_.type==="ImportSpecifier"&&(I=_.imported),I!==void 0)return I.type==="Identifier"?I.name!=="default":I.value!=="default"});S!==void 0&&this.raise(v.ImportJSONBindingNotDefault,S.loc.start)}}}isPotentialImportPhase(x){return x?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(x,g,S,_){g||(S==="module"?(this.expectPlugin("importReflection",_),x.module=!0):this.hasPlugin("importReflection")&&(x.module=!1),S==="source"?(this.expectPlugin("sourcePhaseImports",_),x.phase="source"):S==="defer"?(this.expectPlugin("deferredImportEvaluation",_),x.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(x.phase=null))}parseMaybeImportPhase(x,g){if(!this.isPotentialImportPhase(g))return this.applyImportPhase(x,g,null),null;let S=this.parseIdentifier(!0),{type:_}=this.state;return(ke(_)?_!==98||this.lookaheadCharCode()===102:_!==12)?(this.resetPreviousIdentifierLeadingComments(S),this.applyImportPhase(x,g,S.name,S.loc.start),null):(this.applyImportPhase(x,g,null),S)}isPrecedingIdImportPhase(x){let{type:g}=this.state;return ce(g)?g!==98||this.lookaheadCharCode()===102:g!==12}parseImport(x){return this.match(133)?this.parseImportSourceAndAttributes(x):this.parseImportSpecifiersAndAfter(x,this.parseMaybeImportPhase(x,!1))}parseImportSpecifiersAndAfter(x,g){x.specifiers=[];let S=!this.maybeParseDefaultImportSpecifier(x,g)||this.eat(12),_=S&&this.maybeParseStarImportSpecifier(x);return S&&!_&&this.parseNamedImportSpecifiers(x),this.expectContextual(98),this.parseImportSourceAndAttributes(x)}parseImportSourceAndAttributes(x){return x.specifiers!=null||(x.specifiers=[]),x.source=this.parseImportSource(),this.maybeParseImportAttributes(x),this.checkImportReflection(x),this.checkJSONModuleImport(x),this.semicolon(),this.finishNode(x,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(x,g,S){g.local=this.parseIdentifier(),x.specifiers.push(this.finishImportSpecifier(g,S))}finishImportSpecifier(x,g,S=8201){return this.checkLVal(x.local,{in:{type:g},binding:S}),this.finishNode(x,g)}parseImportAttributes(){this.expect(5);let x=[],g=new Set;do{if(this.match(8))break;let S=this.startNode(),_=this.state.value;if(g.has(_)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:_}),g.add(_),this.match(133)?S.key=this.parseStringLiteral(_):S.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return this.expect(8),x}parseModuleAttributes(){let x=[],g=new Set;do{let S=this.startNode();if(S.key=this.parseIdentifier(!0),S.key.name!=="type"&&this.raise(v.ModuleAttributeDifferentFromType,S.key),g.has(S.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,S.key,{key:S.key.name}),g.add(S.key.name),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return x}maybeParseImportAttributes(x){let g,S=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?g=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),g=this.parseImportAttributes()),S=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(x,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),g=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))g=[];else if(this.hasPlugin("moduleAttributes"))g=[];else return;!S&&this.hasPlugin("importAssertions")?x.assertions=g:x.attributes=g}maybeParseDefaultImportSpecifier(x,g){if(g){let S=this.startNodeAtNode(g);return S.local=g,x.specifiers.push(this.finishImportSpecifier(S,"ImportDefaultSpecifier")),!0}else if(ke(this.state.type))return this.parseImportSpecifierLocal(x,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(x){if(this.match(55)){let g=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(x,g,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(x){let g=!0;for(this.expect(5);!this.eat(8);){if(g)g=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let S=this.startNode(),_=this.match(133),I=this.isContextual(130);S.imported=this.parseModuleExportName();let H=this.parseImportSpecifier(S,_,x.importKind==="type"||x.importKind==="typeof",I,void 0);x.specifiers.push(H)}}parseImportSpecifier(x,g,S,_,I){if(this.eatContextual(93))x.local=this.parseIdentifier();else{let{imported:H}=x;if(g)throw this.raise(v.ImportBindingIsString,x,{importName:H.value});this.checkReservedWord(H.name,x.loc.start,!0,!0),x.local||(x.local=cs(H))}return this.finishImportSpecifier(x,"ImportSpecifier",I)}isThisParam(x){return x.type==="Identifier"&&x.name==="this"}},j_=class extends XU{constructor(x,g){x=ym(x),super(x,g),this.options=x,this.initializeScopes(),this.plugins=YU(this.options.plugins),this.filename=x.sourceFilename}getScopeHandler(){return de}parse(){this.enterInitialScopes();let x=this.startNode(),g=this.startNode();return this.nextToken(),x.errors=null,this.parseTopLevel(x,g),x.errors=this.state.errors,x.comments.length=this.state.commentsLen,x}};function YU(x){let g=new Map;for(let S of x){let[_,I]=Array.isArray(S)?S:[S,{}];g.has(_)||g.set(_,I||{})}return g}function QU(x,g){var S;if(((S=g)==null?void 0:S.sourceType)==="unambiguous"){g=Object.assign({},g);try{g.sourceType="module";let _=vf(g,x),I=_.parse();if(_.sawUnambiguousESM)return I;if(_.ambiguousScriptDifferentAst)try{return g.sourceType="script",vf(g,x).parse()}catch{}else I.program.sourceType="script";return I}catch(_){try{return g.sourceType="script",vf(g,x).parse()}catch{}throw _}}else return vf(g,x).parse()}function ZU(x,g){let S=vf(g,x);return S.options.strictMode&&(S.state.strict=!0),S.getExpression()}function eW(x){let g={};for(let S of Object.keys(x))g[S]=Ae(x[S]);return g}var tW=eW(be);function vf(x,g){let S=j_;return x!=null&&x.plugins&&(_i(x.plugins),S=rW(x.plugins)),new S(x,g)}var z_={};function rW(x){let g=Ms.filter(I=>Kt(x,I)),S=g.join("/"),_=z_[S];if(!_){_=j_;for(let I of g)_=Ns[I](_);z_[S]=_}return _}e.parse=QU,e.parseExpression=ZU,e.tokTypes=tW}),aj={};lhe(aj,{parsers:()=>gde});var DO=ij(sj());function lj(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);let N=this.input.charCodeAt(this.state.pos);if(N===g)break;N===38?(S+=this.input.slice($,this.state.pos),S+=this.jsxReadEntity(),$=this.state.pos):Et(N)?(S+=this.input.slice($,this.state.pos),S+=this.jsxReadNewLine(!1),$=this.state.pos):++this.state.pos}S+=this.input.slice($,this.state.pos++),this.finishToken(133,S)}jsxReadEntity(){let g=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let S=10;this.codePointAtPos(this.state.pos)===120&&(S=16,++this.state.pos);let $=this.readInt(S,void 0,!1,"bail");if($!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint($)}else{let S=0,$=!1;for(;S++<10&&this.state.pos1){for(let $=0;$0){if(S&256){let N=!!(S&512),H=($&4)>0;return N!==H}return!0}return S&128&&($&8)>0?x.names.get(g)&2?!!(S&1):!1:S&2&&($&1)>0?!0:super.isRedeclaredInScope(x,g,S)}checkLocalExport(x){let{name:g}=x;if(this.hasImport(g))return;let S=this.scopeStack.length;for(let $=S-1;$>=0;$--){let N=this.scopeStack[$].tsNames.get(g);if((N&1)>0||(N&16)>0)return}super.checkLocalExport(x)}},tx=(x,g)=>hasOwnProperty.call(x,g)&&x[g],vf=x=>x.type==="ParenthesizedExpression"?vf(x.expression):x,pm=class extends Ha{toAssignable(x,g=!1){var S,$;let N;switch((x.type==="ParenthesizedExpression"||(S=x.extra)!=null&&S.parenthesized)&&(N=vf(x),g?N.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,x):N.type!=="MemberExpression"&&!this.isOptionalMemberExpression(N)&&this.raise(v.InvalidParenthesizedAssignment,x):this.raise(v.InvalidParenthesizedAssignment,x)),x.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":x.type="ObjectPattern";for(let q=0,Z=x.properties.length,ie=Z-1;q$.type!=="ObjectMethod"&&(N===S||$.type!=="SpreadElement")&&this.isAssignable($))}case"ObjectProperty":return this.isAssignable(x.value);case"SpreadElement":return this.isAssignable(x.argument);case"ArrayExpression":return x.elements.every(S=>S===null||this.isAssignable(S));case"AssignmentExpression":return x.operator==="=";case"ParenthesizedExpression":return this.isAssignable(x.expression);case"MemberExpression":case"OptionalMemberExpression":return!g;default:return!1}}toReferencedList(x,g){return x}toReferencedListDeep(x,g){this.toReferencedList(x,g);for(let S of x)(S==null?void 0:S.type)==="ArrayExpression"&&this.toReferencedListDeep(S.elements)}parseSpread(x){let g=this.startNode();return this.next(),g.argument=this.parseMaybeAssignAllowIn(x,void 0),this.finishNode(g,"SpreadElement")}parseRestBinding(){let x=this.startNode();return this.next(),x.argument=this.parseBindingAtom(),this.finishNode(x,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let x=this.startNode();return this.next(),x.elements=this.parseBindingList(3,93,1),this.finishNode(x,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(x,g,S){let $=S&1,N=[],H=!0;for(;!this.eat(x);)if(H?H=!1:this.expect(12),$&&this.match(12))N.push(null);else{if(this.eat(x))break;if(this.match(21)){if(N.push(this.parseAssignableListItemTypes(this.parseRestBinding(),S)),!this.checkCommaAfterRest(g)){this.expect(x);break}}else{let q=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)q.push(this.parseDecorator());N.push(this.parseAssignableListItem(S,q))}}return N}parseBindingRestProperty(x){return this.next(),x.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(x,"RestElement")}parseBindingProperty(){let{type:x,startLoc:g}=this.state;if(x===21)return this.parseBindingRestProperty(this.startNode());let S=this.startNode();return x===138?(this.expectPlugin("destructuringPrivate",g),this.classScope.usePrivateName(this.state.value,g),S.key=this.parsePrivateName()):this.parsePropertyName(S),S.method=!1,this.parseObjPropValue(S,g,!1,!1,!0,!1)}parseAssignableListItem(x,g){let S=this.parseMaybeDefault();this.parseAssignableListItemTypes(S,x);let $=this.parseMaybeDefault(S.loc.start,S);return g.length&&(S.decorators=g),$}parseAssignableListItemTypes(x,g){return x}parseMaybeDefault(x,g){var S;if(x!=null||(x=this.state.startLoc),g=(S=g)!=null?S:this.parseBindingAtom(),!this.eat(29))return g;let $=this.startNodeAt(x);return $.left=g,$.right=this.parseMaybeAssignAllowIn(),this.finishNode($,"AssignmentPattern")}isValidLVal(x,g,S){return tx({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},x)}isOptionalMemberExpression(x){return x.type==="OptionalMemberExpression"}checkLVal(x,{in:g,binding:S=64,checkClashes:$=!1,strictModeChanged:N=!1,hasParenthesizedAncestor:H=!1}){var q;let Z=x.type;if(this.isObjectMethod(x))return;let ie=this.isOptionalMemberExpression(x);if(ie||Z==="MemberExpression"){ie&&(this.expectPlugin("optionalChainingAssign",x.loc.start),g.type!=="AssignmentExpression"&&this.raise(v.InvalidLhsOptionalChaining,x,{ancestor:g})),S!==64&&this.raise(v.InvalidPropertyBindingPattern,x);return}if(Z==="Identifier"){this.checkIdentifier(x,S,N);let{name:Qe}=x;$&&($.has(Qe)?this.raise(v.ParamDupe,x):$.add(Qe));return}let ne=this.isValidLVal(Z,!(H||(q=x.extra)!=null&&q.parenthesized)&&g.type==="AssignmentExpression",S);if(ne===!0)return;if(ne===!1){let Qe=S===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(Qe,x,{ancestor:g});return}let[Se,Be]=Array.isArray(ne)?ne:[ne,Z==="ParenthesizedExpression"],qe=Z==="ArrayPattern"||Z==="ObjectPattern"?{type:Z}:g;for(let Qe of[].concat(x[Se]))Qe&&this.checkLVal(Qe,{in:qe,binding:S,checkClashes:$,strictModeChanged:N,hasParenthesizedAncestor:Be})}checkIdentifier(x,g,S=!1){this.state.strict&&(S?$i(x.name,this.inModule):ui(x.name))&&(g===64?this.raise(v.StrictEvalArguments,x,{referenceName:x.name}):this.raise(v.StrictEvalArgumentsBinding,x,{bindingName:x.name})),g&8192&&x.name==="let"&&this.raise(v.LetInLexicalBinding,x),g&64||this.declareNameFromIdentifier(x,g)}declareNameFromIdentifier(x,g){this.scope.declareName(x.name,g,x.loc.start)}checkToRestConversion(x,g){switch(x.type){case"ParenthesizedExpression":this.checkToRestConversion(x.expression,g);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(g)break;default:this.raise(v.InvalidRestAssignmentPattern,x)}}checkCommaAfterRest(x){return this.match(12)?(this.raise(this.lookaheadCharCode()===x?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}},gm=(x,g)=>hasOwnProperty.call(x,g)&&x[g];function fu(x){if(x==null)throw new Error(`Unexpected ${x} value.`);return x}function bf(x){if(!x)throw new Error("Assert fail")}var Ze=b`typescript`({AbstractMethodHasImplementation:({methodName:x})=>`Method '${x}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:x})=>`Property '${x}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:x})=>`'declare' is not allowed in ${x}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:x})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:x})=>`Duplicate modifier: '${x}'.`,EmptyHeritageClauseType:({token:x})=>`'${x}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:x})=>`'${x[0]}' modifier cannot be used with '${x[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:x})=>`Index signatures cannot have an accessibility modifier ('${x}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:x})=>`'${x}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:x})=>`'${x}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:x})=>`'${x}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:x})=>`'${x[0]}' modifier must precede '${x[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:x})=>`Private elements cannot have an accessibility modifier ('${x}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:x})=>`Single type parameter ${x} should have a trailing comma. Example usage: <${x},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:x})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${x}.`});function rx(x){switch(x){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function mm(x){return x==="private"||x==="public"||x==="protected"}function te(x){return x==="in"||x==="out"}var he=x=>class extends x{constructor(...g){super(...g),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Ze.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Ze.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Ze.InvalidModifierOnTypeParameter})}getScopeHandler(){return yf}tsIsIdentifier(){return ce(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(g,S){if(!ce(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let $=this.state.value;if(g.includes($)){if(S&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return $}}tsParseModifiers({allowedModifiers:g,disallowedModifiers:S,stopOnStartOfClassStaticBlock:$,errorTemplate:N=Ze.InvalidModifierOnTypeMember},H){let q=(ie,ne,Se,Be)=>{ne===Se&&H[Be]&&this.raise(Ze.InvalidModifiersOrder,ie,{orderedModifiers:[Se,Be]})},Z=(ie,ne,Se,Be)=>{(H[Se]&&ne===Be||H[Be]&&ne===Se)&&this.raise(Ze.IncompatibleModifiers,ie,{modifiers:[Se,Be]})};for(;;){let{startLoc:ie}=this.state,ne=this.tsParseModifier(g.concat(S??[]),$);if(!ne)break;mm(ne)?H.accessibility?this.raise(Ze.DuplicateAccessibilityModifier,ie,{modifier:ne}):(q(ie,ne,ne,"override"),q(ie,ne,ne,"static"),q(ie,ne,ne,"readonly"),H.accessibility=ne):te(ne)?(H[ne]&&this.raise(Ze.DuplicateModifier,ie,{modifier:ne}),H[ne]=!0,q(ie,ne,"in","out")):(hasOwnProperty.call(H,ne)?this.raise(Ze.DuplicateModifier,ie,{modifier:ne}):(q(ie,ne,"static","readonly"),q(ie,ne,"static","override"),q(ie,ne,"override","readonly"),q(ie,ne,"abstract","override"),Z(ie,ne,"declare","override"),Z(ie,ne,"static","abstract")),H[ne]=!0),S!=null&&S.includes(ne)&&this.raise(N,ie,{modifier:ne})}}tsIsListTerminator(g){switch(g){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(g,S){let $=[];for(;!this.tsIsListTerminator(g);)$.push(S());return $}tsParseDelimitedList(g,S,$){return fu(this.tsParseDelimitedListWorker(g,S,!0,$))}tsParseDelimitedListWorker(g,S,$,N){let H=[],q=-1;for(;!this.tsIsListTerminator(g);){q=-1;let Z=S();if(Z==null)return;if(H.push(Z),this.eat(12)){q=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(g))break;$&&this.expect(12);return}return N&&(N.value=q),H}tsParseBracketedList(g,S,$,N,H){N||($?this.expect(0):this.expect(47));let q=this.tsParseDelimitedList(g,S,H);return $?this.expect(3):this.expect(48),q}tsParseImportType(){let g=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(Ze.UnsupportedImportTypeArgument,this.state.startLoc),g.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(g.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(g.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(g.qualifier=this.tsParseEntityName()),this.match(47)&&(g.typeParameters=this.tsParseTypeArguments()),this.finishNode(g,"TSImportType")}tsParseEntityName(g=!0){let S=this.parseIdentifier(g);for(;this.eat(16);){let $=this.startNodeAtNode(S);$.left=S,$.right=this.parseIdentifier(g),S=this.finishNode($,"TSQualifiedName")}return S}tsParseTypeReference(){let g=this.startNode();return g.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(g.typeParameters=this.tsParseTypeArguments()),this.finishNode(g,"TSTypeReference")}tsParseThisTypePredicate(g){this.next();let S=this.startNodeAtNode(g);return S.parameterName=g,S.typeAnnotation=this.tsParseTypeAnnotation(!1),S.asserts=!1,this.finishNode(S,"TSTypePredicate")}tsParseThisTypeNode(){let g=this.startNode();return this.next(),this.finishNode(g,"TSThisType")}tsParseTypeQuery(){let g=this.startNode();return this.expect(87),this.match(83)?g.exprName=this.tsParseImportType():g.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(g.typeParameters=this.tsParseTypeArguments()),this.finishNode(g,"TSTypeQuery")}tsParseTypeParameter(g){let S=this.startNode();return g(S),S.name=this.tsParseTypeParameterName(),S.constraint=this.tsEatThenParseType(81),S.default=this.tsEatThenParseType(29),this.finishNode(S,"TSTypeParameter")}tsTryParseTypeParameters(g){if(this.match(47))return this.tsParseTypeParameters(g)}tsParseTypeParameters(g){let S=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let $={value:-1};return S.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,g),!1,!0,$),S.params.length===0&&this.raise(Ze.EmptyTypeParameters,S),$.value!==-1&&this.addExtra(S,"trailingComma",$.value),this.finishNode(S,"TSTypeParameterDeclaration")}tsFillSignature(g,S){let $=g===19,N="parameters",H="typeAnnotation";S.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),S[N]=this.tsParseBindingListForSignature(),$?S[H]=this.tsParseTypeOrTypePredicateAnnotation(g):this.match(g)&&(S[H]=this.tsParseTypeOrTypePredicateAnnotation(g))}tsParseBindingListForSignature(){let g=super.parseBindingList(11,41,2);for(let S of g){let{type:$}=S;($==="AssignmentPattern"||$==="TSParameterProperty")&&this.raise(Ze.UnsupportedSignatureParameterKind,S,{type:$})}return g}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(g,S){return this.tsFillSignature(14,S),this.tsParseTypeMemberSemicolon(),this.finishNode(S,g)}tsIsUnambiguouslyIndexSignature(){return this.next(),ce(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(g){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let S=this.parseIdentifier();S.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(S),this.expect(3),g.parameters=[S];let $=this.tsTryParseTypeAnnotation();return $&&(g.typeAnnotation=$),this.tsParseTypeMemberSemicolon(),this.finishNode(g,"TSIndexSignature")}tsParsePropertyOrMethodSignature(g,S){this.eat(17)&&(g.optional=!0);let $=g;if(this.match(10)||this.match(47)){S&&this.raise(Ze.ReadonlyForMethodSignature,g);let N=$;N.kind&&this.match(47)&&this.raise(Ze.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,N),this.tsParseTypeMemberSemicolon();let H="parameters",q="typeAnnotation";if(N.kind==="get")N[H].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(N[H][0])&&this.raise(Ze.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(N.kind==="set"){if(N[H].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{let Z=N[H][0];this.isThisParam(Z)&&this.raise(Ze.AccesorCannotDeclareThisParameter,this.state.curPosition()),Z.type==="Identifier"&&Z.optional&&this.raise(Ze.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),Z.type==="RestElement"&&this.raise(Ze.SetAccesorCannotHaveRestParameter,this.state.curPosition())}N[q]&&this.raise(Ze.SetAccesorCannotHaveReturnType,N[q])}else N.kind="method";return this.finishNode(N,"TSMethodSignature")}else{let N=$;S&&(N.readonly=!0);let H=this.tsTryParseTypeAnnotation();return H&&(N.typeAnnotation=H),this.tsParseTypeMemberSemicolon(),this.finishNode(N,"TSPropertySignature")}}tsParseTypeMember(){let g=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",g);if(this.match(77)){let $=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",g):(g.key=this.createIdentifier($,"new"),this.tsParsePropertyOrMethodSignature(g,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},g),this.tsTryParseIndexSignature(g)||(super.parsePropertyName(g),!g.computed&&g.key.type==="Identifier"&&(g.key.name==="get"||g.key.name==="set")&&this.tsTokenCanFollowModifier()&&(g.kind=g.key.name,super.parsePropertyName(g)),this.tsParsePropertyOrMethodSignature(g,!!g.readonly))}tsParseTypeLiteral(){let g=this.startNode();return g.members=this.tsParseObjectTypeMembers(),this.finishNode(g,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let g=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),g}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let g=this.startNode();return g.name=this.tsParseTypeParameterName(),g.constraint=this.tsExpectThenParseType(58),this.finishNode(g,"TSTypeParameter")}tsParseMappedType(){let g=this.startNode();return this.expect(5),this.match(53)?(g.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(g.readonly=!0),this.expect(0),g.typeParameter=this.tsParseMappedTypeParameter(),g.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(g.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(g.optional=!0),g.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(g,"TSMappedType")}tsParseTupleType(){let g=this.startNode();g.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let S=!1;return g.elementTypes.forEach($=>{let{type:N}=$;S&&N!=="TSRestType"&&N!=="TSOptionalType"&&!(N==="TSNamedTupleMember"&&$.optional)&&this.raise(Ze.OptionalTypeBeforeRequired,$),S||(S=N==="TSNamedTupleMember"&&$.optional||N==="TSOptionalType")}),this.finishNode(g,"TSTupleType")}tsParseTupleElementType(){let{startLoc:g}=this.state,S=this.eat(21),$,N,H,q,Z=ke(this.state.type)?this.lookaheadCharCode():null;if(Z===58)$=!0,H=!1,N=this.parseIdentifier(!0),this.expect(14),q=this.tsParseType();else if(Z===63){H=!0;let ie=this.state.startLoc,ne=this.state.value,Se=this.tsParseNonArrayType();this.lookaheadCharCode()===58?($=!0,N=this.createIdentifier(this.startNodeAt(ie),ne),this.expect(17),this.expect(14),q=this.tsParseType()):($=!1,q=Se,this.expect(17))}else q=this.tsParseType(),H=this.eat(17),$=this.eat(14);if($){let ie;N?(ie=this.startNodeAtNode(N),ie.optional=H,ie.label=N,ie.elementType=q,this.eat(17)&&(ie.optional=!0,this.raise(Ze.TupleOptionalAfterType,this.state.lastTokStartLoc))):(ie=this.startNodeAtNode(q),ie.optional=H,this.raise(Ze.InvalidTupleMemberLabel,q),ie.label=q,ie.elementType=this.tsParseType()),q=this.finishNode(ie,"TSNamedTupleMember")}else if(H){let ie=this.startNodeAtNode(q);ie.typeAnnotation=q,q=this.finishNode(ie,"TSOptionalType")}if(S){let ie=this.startNodeAt(g);ie.typeAnnotation=q,q=this.finishNode(ie,"TSRestType")}return q}tsParseParenthesizedType(){let g=this.startNode();return this.expect(10),g.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(g,"TSParenthesizedType")}tsParseFunctionOrConstructorType(g,S){let $=this.startNode();return g==="TSConstructorType"&&($.abstract=!!S,S&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,$)),this.finishNode($,g)}tsParseLiteralTypeNode(){let g=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:g.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(g,"TSLiteralType")}tsParseTemplateLiteralType(){let g=this.startNode();return g.literal=super.parseTemplate(!1),this.finishNode(g,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let g=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(g):g}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let g=this.startNode(),S=this.lookahead();return S.type!==134&&S.type!==135&&this.unexpected(),g.literal=this.parseMaybeUnary(),this.finishNode(g,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:g}=this.state;if(ce(g)||g===88||g===84){let S=g===88?"TSVoidKeyword":g===84?"TSNullKeyword":rx(this.state.value);if(S!==void 0&&this.lookaheadCharCode()!==46){let $=this.startNode();return this.next(),this.finishNode($,S)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let g=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let S=this.startNodeAtNode(g);S.elementType=g,this.expect(3),g=this.finishNode(S,"TSArrayType")}else{let S=this.startNodeAtNode(g);S.objectType=g,S.indexType=this.tsParseType(),this.expect(3),g=this.finishNode(S,"TSIndexedAccessType")}return g}tsParseTypeOperator(){let g=this.startNode(),S=this.state.value;return this.next(),g.operator=S,g.typeAnnotation=this.tsParseTypeOperatorOrHigher(),S==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(g),this.finishNode(g,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(g){switch(g.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Ze.UnexpectedReadonly,g)}}tsParseInferType(){let g=this.startNode();this.expectContextual(115);let S=this.startNode();return S.name=this.tsParseTypeParameterName(),S.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),g.typeParameter=this.finishNode(S,"TSTypeParameter"),this.finishNode(g,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let g=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return g}}tsParseTypeOperatorOrHigher(){return Ce(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(g,S,$){let N=this.startNode(),H=this.eat($),q=[];do q.push(S());while(this.eat($));return q.length===1&&!H?q[0]:(N.types=q,this.finishNode(N,g))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(ce(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:g}=this.state,S=g.length;try{return this.parseObjectLike(8,!0),g.length===S}catch{return!1}}if(this.match(0)){this.next();let{errors:g}=this.state,S=g.length;try{return super.parseBindingList(3,93,1),g.length===S}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(g){return this.tsInType(()=>{let S=this.startNode();this.expect(g);let $=this.startNode(),N=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(N&&this.match(78)){let Z=this.tsParseThisTypeOrThisTypePredicate();return Z.type==="TSThisType"?($.parameterName=Z,$.asserts=!0,$.typeAnnotation=null,Z=this.finishNode($,"TSTypePredicate")):(this.resetStartLocationFromNode(Z,$),Z.asserts=!0),S.typeAnnotation=Z,this.finishNode(S,"TSTypeAnnotation")}let H=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!H)return N?($.parameterName=this.parseIdentifier(),$.asserts=N,$.typeAnnotation=null,S.typeAnnotation=this.finishNode($,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,S);let q=this.tsParseTypeAnnotation(!1);return $.parameterName=H,$.typeAnnotation=q,$.asserts=N,S.typeAnnotation=this.finishNode($,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let g=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),g}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let g=this.state.containsEsc;return this.next(),!ce(this.state.type)&&!this.match(78)?!1:(g&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(g=!0,S=this.startNode()){return this.tsInType(()=>{g&&this.expect(14),S.typeAnnotation=this.tsParseType()}),this.finishNode(S,"TSTypeAnnotation")}tsParseType(){bf(this.state.inType);let g=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return g;let S=this.startNodeAtNode(g);return S.checkType=g,S.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),S.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),S.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(S,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Ze.ReservedTypeAssertion,this.state.startLoc);let g=this.startNode();return g.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),g.expression=this.parseMaybeUnary(),this.finishNode(g,"TSTypeAssertion")}tsParseHeritageClause(g){let S=this.state.startLoc,$=this.tsParseDelimitedList("HeritageClauseElement",()=>{let N=this.startNode();return N.expression=this.tsParseEntityName(),this.match(47)&&(N.typeParameters=this.tsParseTypeArguments()),this.finishNode(N,"TSExpressionWithTypeArguments")});return $.length||this.raise(Ze.EmptyHeritageClauseType,S,{token:g}),$}tsParseInterfaceDeclaration(g,S={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),S.declare&&(g.declare=!0),ce(this.state.type)?(g.id=this.parseIdentifier(),this.checkIdentifier(g.id,130)):(g.id=null,this.raise(Ze.MissingInterfaceName,this.state.startLoc)),g.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(g.extends=this.tsParseHeritageClause("extends"));let $=this.startNode();return $.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),g.body=this.finishNode($,"TSInterfaceBody"),this.finishNode(g,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(g){return g.id=this.parseIdentifier(),this.checkIdentifier(g.id,2),g.typeAnnotation=this.tsInType(()=>{if(g.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let S=this.startNode();return this.next(),this.finishNode(S,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(g,"TSTypeAliasDeclaration")}tsInNoContext(g){let S=this.state.context;this.state.context=[S[0]];try{return g()}finally{this.state.context=S}}tsInType(g){let S=this.state.inType;this.state.inType=!0;try{return g()}finally{this.state.inType=S}}tsInDisallowConditionalTypesContext(g){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return g()}finally{this.state.inDisallowConditionalTypesContext=S}}tsInAllowConditionalTypesContext(g){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return g()}finally{this.state.inDisallowConditionalTypesContext=S}}tsEatThenParseType(g){if(this.match(g))return this.tsNextThenParseType()}tsExpectThenParseType(g){return this.tsInType(()=>(this.expect(g),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let g=this.startNode();return g.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(g.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(g,"TSEnumMember")}tsParseEnumDeclaration(g,S={}){return S.const&&(g.const=!0),S.declare&&(g.declare=!0),this.expectContextual(126),g.id=this.parseIdentifier(),this.checkIdentifier(g.id,g.const?8971:8459),this.expect(5),g.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(g,"TSEnumDeclaration")}tsParseModuleBlock(){let g=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(g.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(g,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(g,S=!1){if(g.id=this.parseIdentifier(),S||this.checkIdentifier(g.id,1024),this.eat(16)){let $=this.startNode();this.tsParseModuleOrNamespaceDeclaration($,!0),g.body=$}else this.scope.enter(256),this.prodParam.enter(0),g.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(g,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(g){return this.isContextual(112)?(g.global=!0,g.id=this.parseIdentifier()):this.match(133)?g.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),g.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(g,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(g,S,$){g.isExport=$||!1,g.id=S||this.parseIdentifier(),this.checkIdentifier(g.id,4096),this.expect(29);let N=this.tsParseModuleReference();return g.importKind==="type"&&N.type!=="TSExternalModuleReference"&&this.raise(Ze.ImportAliasHasImportType,N),g.moduleReference=N,this.semicolon(),this.finishNode(g,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let g=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),g.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(g,"TSExternalModuleReference")}tsLookAhead(g){let S=this.state.clone(),$=g();return this.state=S,$}tsTryParseAndCatch(g){let S=this.tryParse($=>g()||$());if(!(S.aborted||!S.node))return S.error&&(this.state=S.failState),S.node}tsTryParse(g){let S=this.state.clone(),$=g();if($!==void 0&&$!==!1)return $;this.state=S}tsTryParseDeclare(g){if(this.isLineTerminator())return;let S=this.state.type,$;return this.isContextual(100)&&(S=74,$="let"),this.tsInAmbientContext(()=>{switch(S){case 68:return g.declare=!0,super.parseFunctionStatement(g,!1,!1);case 80:return g.declare=!0,this.parseClass(g,!0,!1);case 126:return this.tsParseEnumDeclaration(g,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(g);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(g.declare=!0,this.parseVarStatement(g,$||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(g,{const:!0,declare:!0}));case 129:{let N=this.tsParseInterfaceDeclaration(g,{declare:!0});if(N)return N}default:if(ce(S))return this.tsParseDeclaration(g,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(g,S,$){switch(S.name){case"declare":{let N=this.tsTryParseDeclare(g);return N&&(N.declare=!0),N}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let N=g;return N.global=!0,N.id=S,N.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(N,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(g,S.name,!1,$)}}tsParseDeclaration(g,S,$,N){switch(S){case"abstract":if(this.tsCheckLineTerminator($)&&(this.match(80)||ce(this.state.type)))return this.tsParseAbstractDeclaration(g,N);break;case"module":if(this.tsCheckLineTerminator($)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(g);if(ce(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(g)}break;case"namespace":if(this.tsCheckLineTerminator($)&&ce(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(g);break;case"type":if(this.tsCheckLineTerminator($)&&ce(this.state.type))return this.tsParseTypeAliasDeclaration(g);break}}tsCheckLineTerminator(g){return g?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(g){if(!this.match(47))return;let S=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let $=this.tsTryParseAndCatch(()=>{let N=this.startNodeAt(g);return N.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(N),N.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),N});if(this.state.maybeInArrowParameters=S,!!$)return super.parseArrowExpression($,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let g=this.startNode();return g.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),g.params.length===0?this.raise(Ze.EmptyTypeArguments,g):!this.state.inType&&this.curContext()===k.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(g,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return fe(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(g,S){let $=this.state.startLoc,N={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},N);let H=N.accessibility,q=N.override,Z=N.readonly;!(g&4)&&(H||Z||q)&&this.raise(Ze.UnexpectedParameterModifier,$);let ie=this.parseMaybeDefault();this.parseAssignableListItemTypes(ie,g);let ne=this.parseMaybeDefault(ie.loc.start,ie);if(H||Z||q){let Se=this.startNodeAt($);return S.length&&(Se.decorators=S),H&&(Se.accessibility=H),Z&&(Se.readonly=Z),q&&(Se.override=q),ne.type!=="Identifier"&&ne.type!=="AssignmentPattern"&&this.raise(Ze.UnsupportedParameterPropertyKind,Se),Se.parameter=ne,this.finishNode(Se,"TSParameterProperty")}return S.length&&(ie.decorators=S),ne}isSimpleParameter(g){return g.type==="TSParameterProperty"&&super.isSimpleParameter(g.parameter)||super.isSimpleParameter(g)}tsDisallowOptionalPattern(g){for(let S of g.params)S.type!=="Identifier"&&S.optional&&!this.state.isAmbientContext&&this.raise(Ze.PatternIsOptional,S)}setArrowFunctionParameters(g,S,$){super.setArrowFunctionParameters(g,S,$),this.tsDisallowOptionalPattern(g)}parseFunctionBodyAndFinish(g,S,$=!1){this.match(14)&&(g.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let N=S==="FunctionDeclaration"?"TSDeclareFunction":S==="ClassMethod"||S==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return N&&!this.match(5)&&this.isLineTerminator()?this.finishNode(g,N):N==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Ze.DeclareFunctionHasImplementation,g),g.declare)?super.parseFunctionBodyAndFinish(g,N,$):(this.tsDisallowOptionalPattern(g),super.parseFunctionBodyAndFinish(g,S,$))}registerFunctionStatementId(g){!g.body&&g.id?this.checkIdentifier(g.id,1024):super.registerFunctionStatementId(g)}tsCheckForInvalidTypeCasts(g){g.forEach(S=>{(S==null?void 0:S.type)==="TSTypeCastExpression"&&this.raise(Ze.UnexpectedTypeAnnotation,S.typeAnnotation)})}toReferencedList(g,S){return this.tsCheckForInvalidTypeCasts(g),g}parseArrayLike(g,S,$,N){let H=super.parseArrayLike(g,S,$,N);return H.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(H.elements),H}parseSubscript(g,S,$,N){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let q=this.startNodeAt(S);return q.expression=g,this.finishNode(q,"TSNonNullExpression")}let H=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if($)return N.stop=!0,g;N.optionalChainMember=H=!0,this.next()}if(this.match(47)||this.match(51)){let q,Z=this.tsTryParseAndCatch(()=>{if(!$&&this.atPossibleAsyncArrow(g)){let Be=this.tsTryParseGenericAsyncArrowFunction(S);if(Be)return Be}let ie=this.tsParseTypeArgumentsInExpression();if(!ie)return;if(H&&!this.match(10)){q=this.state.curPosition();return}if(ve(this.state.type)){let Be=super.parseTaggedTemplateExpression(g,S,N);return Be.typeParameters=ie,Be}if(!$&&this.eat(10)){let Be=this.startNodeAt(S);return Be.callee=g,Be.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(Be.arguments),Be.typeParameters=ie,N.optionalChainMember&&(Be.optional=H),this.finishCallExpression(Be,N.optionalChainMember)}let ne=this.state.type;if(ne===48||ne===52||ne!==10&&yt(ne)&&!this.hasPrecedingLineBreak())return;let Se=this.startNodeAt(S);return Se.expression=g,Se.typeParameters=ie,this.finishNode(Se,"TSInstantiationExpression")});if(q&&this.unexpected(q,10),Z)return Z.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Ze.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),Z}return super.parseSubscript(g,S,$,N)}parseNewCallee(g){var S;super.parseNewCallee(g);let{callee:$}=g;$.type==="TSInstantiationExpression"&&!((S=$.extra)!=null&&S.parenthesized)&&(g.typeParameters=$.typeParameters,g.callee=$.expression)}parseExprOp(g,S,$){let N;if(je(58)>$&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(N=this.isContextual(120)))){let H=this.startNodeAt(S);return H.expression=g,H.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(N&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(H,N?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(H,S,$)}return super.parseExprOp(g,S,$)}checkReservedWord(g,S,$,N){this.state.isAmbientContext||super.checkReservedWord(g,S,$,N)}checkImportReflection(g){super.checkImportReflection(g),g.module&&g.importKind!=="value"&&this.raise(Ze.ImportReflectionHasImportType,g.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(g){if(super.isPotentialImportPhase(g))return!0;if(this.isContextual(130)){let S=this.lookaheadCharCode();return g?S===123||S===42:S!==61}return!g&&this.isContextual(87)}applyImportPhase(g,S,$,N){super.applyImportPhase(g,S,$,N),S?g.exportKind=$==="type"?"type":"value":g.importKind=$==="type"||$==="typeof"?$:"value"}parseImport(g){if(this.match(133))return g.importKind="value",super.parseImport(g);let S;if(ce(this.state.type)&&this.lookaheadCharCode()===61)return g.importKind="value",this.tsParseImportEqualsDeclaration(g);if(this.isContextual(130)){let $=this.parseMaybeImportPhase(g,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(g,$);S=super.parseImportSpecifiersAndAfter(g,$)}else S=super.parseImport(g);return S.importKind==="type"&&S.specifiers.length>1&&S.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Ze.TypeImportCannotSpecifyDefaultAndNamed,S),S}parseExport(g,S){if(this.match(83)){this.next();let $=g,N=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?N=this.parseMaybeImportPhase($,!1):$.importKind="value",this.tsParseImportEqualsDeclaration($,N,!0)}else if(this.eat(29)){let $=g;return $.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode($,"TSExportAssignment")}else if(this.eatContextual(93)){let $=g;return this.expectContextual(128),$.id=this.parseIdentifier(),this.semicolon(),this.finishNode($,"TSNamespaceExportDeclaration")}else return super.parseExport(g,S)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let g=this.startNode();return this.next(),g.abstract=!0,this.parseClass(g,!0,!0)}if(this.match(129)){let g=this.tsParseInterfaceDeclaration(this.startNode());if(g)return g}return super.parseExportDefaultExpression()}parseVarStatement(g,S,$=!1){let{isAmbientContext:N}=this.state,H=super.parseVarStatement(g,S,$||N);if(!N)return H;for(let{id:q,init:Z}of H.declarations)Z&&(S!=="const"||q.typeAnnotation?this.raise(Ze.InitializerNotAllowedInAmbientContext,Z):Xe(Z,this.hasPlugin("estree"))||this.raise(Ze.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,Z));return H}parseStatementContent(g,S){if(this.match(75)&&this.isLookaheadContextual("enum")){let $=this.startNode();return this.expect(75),this.tsParseEnumDeclaration($,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let $=this.tsParseInterfaceDeclaration(this.startNode());if($)return $}return super.parseStatementContent(g,S)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(g,S){return S.some($=>mm($)?g.accessibility===$:!!g[$])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(g,S,$){let N=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:N,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Ze.InvalidModifierOnTypeParameterPositions},S);let H=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(S,N)&&this.raise(Ze.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(g,S)):this.parseClassMemberWithIsStatic(g,S,$,!!S.static)};S.declare?this.tsInAmbientContext(H):H()}parseClassMemberWithIsStatic(g,S,$,N){let H=this.tsTryParseIndexSignature(S);if(H){g.body.push(H),S.abstract&&this.raise(Ze.IndexSignatureHasAbstract,S),S.accessibility&&this.raise(Ze.IndexSignatureHasAccessibility,S,{modifier:S.accessibility}),S.declare&&this.raise(Ze.IndexSignatureHasDeclare,S),S.override&&this.raise(Ze.IndexSignatureHasOverride,S);return}!this.state.inAbstractClass&&S.abstract&&this.raise(Ze.NonAbstractClassHasAbstractMethod,S),S.override&&($.hadSuperClass||this.raise(Ze.OverrideNotInSubClass,S)),super.parseClassMemberWithIsStatic(g,S,$,N)}parsePostMemberNameModifiers(g){this.eat(17)&&(g.optional=!0),g.readonly&&this.match(10)&&this.raise(Ze.ClassMethodHasReadonly,g),g.declare&&this.match(10)&&this.raise(Ze.ClassMethodHasDeclare,g)}parseExpressionStatement(g,S,$){return(S.type==="Identifier"?this.tsParseExpressionStatement(g,S,$):void 0)||super.parseExpressionStatement(g,S,$)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(g,S,$){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(g,S,$);let N=this.tryParse(()=>super.parseConditional(g,S));return N.node?(N.error&&(this.state=N.failState),N.node):(N.error&&super.setOptionalParametersError($,N.error),g)}parseParenItem(g,S){let $=super.parseParenItem(g,S);if(this.eat(17)&&($.optional=!0,this.resetEndLocation(g)),this.match(14)){let N=this.startNodeAt(S);return N.expression=g,N.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(N,"TSTypeCastExpression")}return g}parseExportDeclaration(g){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(g));let S=this.state.startLoc,$=this.eatContextual(125);if($&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Ze.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let N=ce(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(g);return N?((N.type==="TSInterfaceDeclaration"||N.type==="TSTypeAliasDeclaration"||$)&&(g.exportKind="type"),$&&(this.resetStartLocation(N,S),N.declare=!0),N):null}parseClassId(g,S,$,N){if((!S||$)&&this.isContextual(113))return;super.parseClassId(g,S,$,g.declare?1024:8331);let H=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);H&&(g.typeParameters=H)}parseClassPropertyAnnotation(g){g.optional||(this.eat(35)?g.definite=!0:this.eat(17)&&(g.optional=!0));let S=this.tsTryParseTypeAnnotation();S&&(g.typeAnnotation=S)}parseClassProperty(g){if(this.parseClassPropertyAnnotation(g),this.state.isAmbientContext&&!(g.readonly&&!g.typeAnnotation)&&this.match(29)&&this.raise(Ze.DeclareClassFieldHasInitializer,this.state.startLoc),g.abstract&&this.match(29)){let{key:S}=g;this.raise(Ze.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:S.type==="Identifier"&&!g.computed?S.name:`[${this.input.slice(S.start,S.end)}]`})}return super.parseClassProperty(g)}parseClassPrivateProperty(g){return g.abstract&&this.raise(Ze.PrivateElementHasAbstract,g),g.accessibility&&this.raise(Ze.PrivateElementHasAccessibility,g,{modifier:g.accessibility}),this.parseClassPropertyAnnotation(g),super.parseClassPrivateProperty(g)}parseClassAccessorProperty(g){return this.parseClassPropertyAnnotation(g),g.optional&&this.raise(Ze.AccessorCannotBeOptional,g),super.parseClassAccessorProperty(g)}pushClassMethod(g,S,$,N,H,q){let Z=this.tsTryParseTypeParameters(this.tsParseConstModifier);Z&&H&&this.raise(Ze.ConstructorHasTypeParameters,Z);let{declare:ie=!1,kind:ne}=S;ie&&(ne==="get"||ne==="set")&&this.raise(Ze.DeclareAccessor,S,{kind:ne}),Z&&(S.typeParameters=Z),super.pushClassMethod(g,S,$,N,H,q)}pushClassPrivateMethod(g,S,$,N){let H=this.tsTryParseTypeParameters(this.tsParseConstModifier);H&&(S.typeParameters=H),super.pushClassPrivateMethod(g,S,$,N)}declareClassPrivateMethodInScope(g,S){g.type!=="TSDeclareMethod"&&(g.type==="MethodDefinition"&&!hasOwnProperty.call(g.value,"body")||super.declareClassPrivateMethodInScope(g,S))}parseClassSuper(g){super.parseClassSuper(g),g.superClass&&(this.match(47)||this.match(51))&&(g.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(g.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(g,S,$,N,H,q,Z){let ie=this.tsTryParseTypeParameters(this.tsParseConstModifier);return ie&&(g.typeParameters=ie),super.parseObjPropValue(g,S,$,N,H,q,Z)}parseFunctionParams(g,S){let $=this.tsTryParseTypeParameters(this.tsParseConstModifier);$&&(g.typeParameters=$),super.parseFunctionParams(g,S)}parseVarId(g,S){super.parseVarId(g,S),g.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(g.definite=!0);let $=this.tsTryParseTypeAnnotation();$&&(g.id.typeAnnotation=$,this.resetEndLocation(g.id))}parseAsyncArrowFromCallExpression(g,S){return this.match(14)&&(g.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(g,S)}parseMaybeAssign(g,S){var $,N,H,q,Z;let ie,ne,Se;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(ie=this.state.clone(),ne=this.tryParse(()=>super.parseMaybeAssign(g,S),ie),!ne.error)return ne.node;let{context:Qe}=this.state,lr=Qe[Qe.length-1];(lr===k.j_oTag||lr===k.j_expr)&&Qe.pop()}if(!(($=ne)!=null&&$.error)&&!this.match(47))return super.parseMaybeAssign(g,S);(!ie||ie===this.state)&&(ie=this.state.clone());let Be,qe=this.tryParse(Qe=>{var lr,dn;Be=this.tsParseTypeParameters(this.tsParseConstModifier);let wr=super.parseMaybeAssign(g,S);return(wr.type!=="ArrowFunctionExpression"||(lr=wr.extra)!=null&&lr.parenthesized)&&Qe(),((dn=Be)==null?void 0:dn.params.length)!==0&&this.resetStartLocationFromNode(wr,Be),wr.typeParameters=Be,wr},ie);if(!qe.error&&!qe.aborted)return Be&&this.reportReservedArrowTypeParam(Be),qe.node;if(!ne&&(bf(!this.hasPlugin("jsx")),Se=this.tryParse(()=>super.parseMaybeAssign(g,S),ie),!Se.error))return Se.node;if((N=ne)!=null&&N.node)return this.state=ne.failState,ne.node;if(qe.node)return this.state=qe.failState,Be&&this.reportReservedArrowTypeParam(Be),qe.node;if((H=Se)!=null&&H.node)return this.state=Se.failState,Se.node;throw((q=ne)==null?void 0:q.error)||qe.error||((Z=Se)==null?void 0:Z.error)}reportReservedArrowTypeParam(g){var S;g.params.length===1&&!g.params[0].constraint&&!((S=g.extra)!=null&&S.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Ze.ReservedArrowTypeParam,g)}parseMaybeUnary(g,S){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(g,S)}parseArrow(g){if(this.match(14)){let S=this.tryParse($=>{let N=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&$(),N});if(S.aborted)return;S.thrown||(S.error&&(this.state=S.failState),g.returnType=S.node)}return super.parseArrow(g)}parseAssignableListItemTypes(g,S){if(!(S&2))return g;this.eat(17)&&(g.optional=!0);let $=this.tsTryParseTypeAnnotation();return $&&(g.typeAnnotation=$),this.resetEndLocation(g),g}isAssignable(g,S){switch(g.type){case"TSTypeCastExpression":return this.isAssignable(g.expression,S);case"TSParameterProperty":return!0;default:return super.isAssignable(g,S)}}toAssignable(g,S=!1){switch(g.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(g,S);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":S?this.expressionScope.recordArrowParameterBindingError(Ze.UnexpectedTypeCastInParameter,g):this.raise(Ze.UnexpectedTypeCastInParameter,g),this.toAssignable(g.expression,S);break;case"AssignmentExpression":!S&&g.left.type==="TSTypeCastExpression"&&(g.left=this.typeCastToParameter(g.left));default:super.toAssignable(g,S)}}toAssignableParenthesizedExpression(g,S){switch(g.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(g.expression,S);break;default:super.toAssignable(g,S)}}checkToRestConversion(g,S){switch(g.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(g.expression,!1);break;default:super.checkToRestConversion(g,S)}}isValidLVal(g,S,$){return gm({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSInstantiationExpression:"expression",TSAsExpression:($!==64||!S)&&["expression",!0],TSSatisfiesExpression:($!==64||!S)&&["expression",!0],TSTypeAssertion:($!==64||!S)&&["expression",!0]},g)||super.isValidLVal(g,S,$)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(g){if(this.match(47)||this.match(51)){let S=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let $=super.parseMaybeDecoratorArguments(g);return $.typeParameters=S,$}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(g)}checkCommaAfterRest(g){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===g?(this.next(),!1):super.checkCommaAfterRest(g)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(g,S){let $=super.parseMaybeDefault(g,S);return $.type==="AssignmentPattern"&&$.typeAnnotation&&$.right.start<$.typeAnnotation.start&&this.raise(Ze.TypeAnnotationAfterAssign,$.typeAnnotation),$}getTokenFromCode(g){if(this.state.inType){if(g===62){this.finishOp(48,1);return}if(g===60){this.finishOp(47,1);return}}super.getTokenFromCode(g)}reScan_lt_gt(){let{type:g}=this.state;g===47?(this.state.pos-=1,this.readToken_lt()):g===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:g}=this.state;return g===51?(this.state.pos-=2,this.finishOp(47,1),47):g}toAssignableList(g,S,$){for(let N=0;Nthis.isAssignable(S,!0)):super.shouldParseArrow(g)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(g){if(this.match(47)||this.match(51)){let S=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());S&&(g.typeParameters=S)}return super.jsxParseOpeningElementAfterName(g)}getGetterSetterExpectedParamCount(g){let S=super.getGetterSetterExpectedParamCount(g),$=this.getObjectOrClassMethodParams(g)[0];return $&&this.isThisParam($)?S+1:S}parseCatchClauseParam(){let g=super.parseCatchClauseParam(),S=this.tsTryParseTypeAnnotation();return S&&(g.typeAnnotation=S,this.resetEndLocation(g)),g}tsInAmbientContext(g){let{isAmbientContext:S,strict:$}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return g()}finally{this.state.isAmbientContext=S,this.state.strict=$}}parseClass(g,S,$){let N=this.state.inAbstractClass;this.state.inAbstractClass=!!g.abstract;try{return super.parseClass(g,S,$)}finally{this.state.inAbstractClass=N}}tsParseAbstractDeclaration(g,S){if(this.match(80))return g.abstract=!0,this.maybeTakeDecorators(S,this.parseClass(g,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return g.abstract=!0,this.raise(Ze.NonClassMethodPropertyHasAbstractModifer,g),this.tsParseInterfaceDeclaration(g)}else this.unexpected(null,80)}parseMethod(g,S,$,N,H,q,Z){let ie=super.parseMethod(g,S,$,N,H,q,Z);if(ie.abstract&&(this.hasPlugin("estree")?ie.value.body:ie.body)){let{key:ne}=ie;this.raise(Ze.AbstractMethodHasImplementation,ie,{methodName:ne.type==="Identifier"&&!ie.computed?ne.name:`[${this.input.slice(ne.start,ne.end)}]`})}return ie}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(g,S,$,N){return!S&&N?(this.parseTypeOnlyImportExportSpecifier(g,!1,$),this.finishNode(g,"ExportSpecifier")):(g.exportKind="value",super.parseExportSpecifier(g,S,$,N))}parseImportSpecifier(g,S,$,N,H){return!S&&N?(this.parseTypeOnlyImportExportSpecifier(g,!0,$),this.finishNode(g,"ImportSpecifier")):(g.importKind="value",super.parseImportSpecifier(g,S,$,N,$?4098:4096))}parseTypeOnlyImportExportSpecifier(g,S,$){let N=S?"imported":"local",H=S?"local":"exported",q=g[N],Z,ie=!1,ne=!0,Se=q.loc.start;if(this.isContextual(93)){let qe=this.parseIdentifier();if(this.isContextual(93)){let Qe=this.parseIdentifier();ke(this.state.type)?(ie=!0,q=qe,Z=S?this.parseIdentifier():this.parseModuleExportName(),ne=!1):(Z=Qe,ne=!1)}else ke(this.state.type)?(ne=!1,Z=S?this.parseIdentifier():this.parseModuleExportName()):(ie=!0,q=qe)}else ke(this.state.type)&&(ie=!0,S?(q=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(q.name,q.loc.start,!0,!0)):q=this.parseModuleExportName());ie&&$&&this.raise(S?Ze.TypeModifierIsUsedInTypeImports:Ze.TypeModifierIsUsedInTypeExports,Se),g[N]=q,g[H]=Z;let Be=S?"importKind":"exportKind";g[Be]=ie?"type":"value",ne&&this.eatContextual(93)&&(g[H]=S?this.parseIdentifier():this.parseModuleExportName()),g[H]||(g[H]=fs(g[N])),S&&this.checkIdentifier(g[H],ie?4098:4096)}};function Ae(x){if(x.type!=="MemberExpression")return!1;let{computed:g,property:S}=x;return g&&S.type!=="StringLiteral"&&(S.type!=="TemplateLiteral"||S.expressions.length>0)?!1:Tr(x.object)}function Xe(x,g){var S;let{type:$}=x;if((S=x.extra)!=null&&S.parenthesized)return!1;if(g){if($==="Literal"){let{value:N}=x;if(typeof N=="string"||typeof N=="boolean")return!0}}else if($==="StringLiteral"||$==="BooleanLiteral")return!0;return!!(vr(x,g)||Tt(x,g)||$==="TemplateLiteral"&&x.expressions.length===0||Ae(x))}function vr(x,g){return g?x.type==="Literal"&&(typeof x.value=="number"||"bigint"in x):x.type==="NumericLiteral"||x.type==="BigIntLiteral"}function Tt(x,g){if(x.type==="UnaryExpression"){let{operator:S,argument:$}=x;if(S==="-"&&vr($,g))return!0}return!1}function Tr(x){return x.type==="Identifier"?!0:x.type!=="MemberExpression"||x.computed?!1:Tr(x.object)}var Xr=b`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),un=x=>class extends x{parsePlaceholder(g){if(this.match(144)){let S=this.startNode();return this.next(),this.assertNoSpace(),S.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(S,g)}}finishPlaceholder(g,S){let $=g;return(!$.expectedNode||!$.type)&&($=this.finishNode($,"Placeholder")),$.expectedNode=S,$}getTokenFromCode(g){g===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(g)}parseExprAtom(g){return this.parsePlaceholder("Expression")||super.parseExprAtom(g)}parseIdentifier(g){return this.parsePlaceholder("Identifier")||super.parseIdentifier(g)}checkReservedWord(g,S,$,N){g!==void 0&&super.checkReservedWord(g,S,$,N)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(g,S,$){return g==="Placeholder"||super.isValidLVal(g,S,$)}toAssignable(g,S){g&&g.type==="Placeholder"&&g.expectedNode==="Expression"?g.expectedNode="Pattern":super.toAssignable(g,S)}chStartsBindingIdentifier(g,S){return!!(super.chStartsBindingIdentifier(g,S)||this.lookahead().type===144)}verifyBreakContinue(g,S){g.label&&g.label.type==="Placeholder"||super.verifyBreakContinue(g,S)}parseExpressionStatement(g,S){var $;if(S.type!=="Placeholder"||($=S.extra)!=null&&$.parenthesized)return super.parseExpressionStatement(g,S);if(this.match(14)){let H=g;return H.label=this.finishPlaceholder(S,"Identifier"),this.next(),H.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(H,"LabeledStatement")}this.semicolon();let N=g;return N.name=S.name,this.finishPlaceholder(N,"Statement")}parseBlock(g,S,$){return this.parsePlaceholder("BlockStatement")||super.parseBlock(g,S,$)}parseFunctionId(g){return this.parsePlaceholder("Identifier")||super.parseFunctionId(g)}parseClass(g,S,$){let N=S?"ClassDeclaration":"ClassExpression";this.next();let H=this.state.strict,q=this.parsePlaceholder("Identifier");if(q)if(this.match(81)||this.match(144)||this.match(5))g.id=q;else{if($||!S)return g.id=null,g.body=this.finishPlaceholder(q,"ClassBody"),this.finishNode(g,N);throw this.raise(Xr.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(g,S,$);return super.parseClassSuper(g),g.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!g.superClass,H),this.finishNode(g,N)}parseExport(g,S){let $=this.parsePlaceholder("Identifier");if(!$)return super.parseExport(g,S);let N=g;if(!this.isContextual(98)&&!this.match(12))return N.specifiers=[],N.source=null,N.declaration=this.finishPlaceholder($,"Declaration"),this.finishNode(N,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let H=this.startNode();return H.exported=$,N.specifiers=[this.finishNode(H,"ExportDefaultSpecifier")],super.parseExport(N,S)}isExportDefaultSpecifier(){if(this.match(65)){let g=this.nextTokenStart();if(this.isUnparsedContextual(g,"from")&&this.input.startsWith(Ee(144),this.nextTokenStartSince(g+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(g,S){var $;return($=g.specifiers)!=null&&$.length?!0:super.maybeParseExportDefaultSpecifier(g,S)}checkExport(g){let{specifiers:S}=g;S!=null&&S.length&&(g.specifiers=S.filter($=>$.exported.type==="Placeholder")),super.checkExport(g),g.specifiers=S}parseImport(g){let S=this.parsePlaceholder("Identifier");if(!S)return super.parseImport(g);if(g.specifiers=[],!this.isContextual(98)&&!this.match(12))return g.source=this.finishPlaceholder(S,"StringLiteral"),this.semicolon(),this.finishNode(g,"ImportDeclaration");let $=this.startNodeAtNode(S);return $.local=S,g.specifiers.push(this.finishNode($,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(g)||this.parseNamedImportSpecifiers(g)),this.expectContextual(98),g.source=this.parseImportSource(),this.semicolon(),this.finishNode(g,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Xr.UnexpectedSpace,this.state.lastTokEndLoc)}},Ar=x=>class extends x{parseV8Intrinsic(){if(this.match(54)){let g=this.state.startLoc,S=this.startNode();if(this.next(),ce(this.state.type)){let $=this.parseIdentifierName(),N=this.createIdentifier(S,$);if(N.type="V8IntrinsicIdentifier",this.match(10))return N}this.unexpected(g)}}parseExprAtom(g){return this.parseV8Intrinsic()||super.parseExprAtom(g)}};function Yt(x,g){let[S,$]=typeof g=="string"?[g,{}]:g,N=Object.keys($),H=N.length===0;return x.some(q=>{if(typeof q=="string")return H&&q===S;{let[Z,ie]=q;if(Z!==S)return!1;for(let ne of N)if(ie[ne]!==$[ne])return!1;return!0}})}function cn(x,g,S){let $=x.find(N=>Array.isArray(N)?N[0]===g:N===g);return $&&Array.isArray($)&&$.length>1?$[1][S]:null}var hn=["minimal","fsharp","hack","smart"],hi=["^^","@@","^","%","#"];function Pi(x){if(Yt(x,"decorators")){if(Yt(x,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let g=cn(x,"decorators","decoratorsBeforeExport");if(g!=null&&typeof g!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let S=cn(x,"decorators","allowCallParenthesized");if(S!=null&&typeof S!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Yt(x,"flow")&&Yt(x,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Yt(x,"placeholders")&&Yt(x,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Yt(x,"pipelineOperator")){let g=cn(x,"pipelineOperator","proposal");if(!hn.includes(g)){let N=hn.map(H=>`"${H}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${N}.`)}let S=["recordAndTuple",{syntaxType:"hash"}],$=Yt(x,S);if(g==="hack"){if(Yt(x,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Yt(x,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let N=cn(x,"pipelineOperator","topicToken");if(!hi.includes(N)){let H=hi.map(q=>`"${q}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${H}.`)}if(N==="#"&&$)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(S)}\`.`)}else if(g==="smart"&&$)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(S)}\`.`)}if(Yt(x,"moduleAttributes")){if(Yt(x,"importAssertions")||Yt(x,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(cn(x,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Yt(x,"importAssertions")&&Yt(x,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Yt(x,"recordAndTuple")){let g=cn(x,"recordAndTuple","syntaxType");if(g!=null){let S=["hash","bar"];if(!S.includes(g))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+S.map($=>`'${$}'`).join(", "))}}if(Yt(x,"asyncDoExpressions")&&!Yt(x,"doExpressions")){let g=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw g.missingPlugins="doExpressions",g}if(Yt(x,"optionalChainingAssign")&&cn(x,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Rs={estree:w,jsx:Qc,flow:Z1,typescript:he,v8intrinsic:Ar,placeholders:un},Bs=Object.keys(Rs),js={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function ym(x){if(x==null)return Object.assign({},js);if(x.annexB!=null&&x.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let g={};for(let $ of Object.keys(js)){var S;g[$]=(S=x[$])!=null?S:js[$]}return g}var Zc=class extends pm{checkProto(x,g,S,$){if(x.type==="SpreadElement"||this.isObjectMethod(x)||x.computed||x.shorthand)return;let N=x.key;if((N.type==="Identifier"?N.name:N.value)==="__proto__"){if(g){this.raise(v.RecordNoProto,N);return}S.used&&($?$.doubleProtoLoc===null&&($.doubleProtoLoc=N.loc.start):this.raise(v.DuplicateProto,N)),S.used=!0}}shouldExitDescending(x,g){return x.type==="ArrowFunctionExpression"&&x.start===g}getExpression(){this.enterInitialScopes(),this.nextToken();let x=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),x.comments=this.comments,x.errors=this.state.errors,this.options.tokens&&(x.tokens=this.tokens),x}parseExpression(x,g){return x?this.disallowInAnd(()=>this.parseExpressionBase(g)):this.allowInAnd(()=>this.parseExpressionBase(g))}parseExpressionBase(x){let g=this.state.startLoc,S=this.parseMaybeAssign(x);if(this.match(12)){let $=this.startNodeAt(g);for($.expressions=[S];this.eat(12);)$.expressions.push(this.parseMaybeAssign(x));return this.toReferencedList($.expressions),this.finishNode($,"SequenceExpression")}return S}parseMaybeAssignDisallowIn(x,g){return this.disallowInAnd(()=>this.parseMaybeAssign(x,g))}parseMaybeAssignAllowIn(x,g){return this.allowInAnd(()=>this.parseMaybeAssign(x,g))}setOptionalParametersError(x,g){var S;x.optionalParametersLoc=(S=g==null?void 0:g.loc)!=null?S:this.state.startLoc}parseMaybeAssign(x,g){let S=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let q=this.parseYield();return g&&(q=g.call(this,q,S)),q}let $;x?$=!1:(x=new Xc,$=!0);let{type:N}=this.state;(N===10||ce(N))&&(this.state.potentialArrowAt=this.state.start);let H=this.parseMaybeConditional(x);if(g&&(H=g.call(this,H,S)),W(this.state.type)){let q=this.startNodeAt(S),Z=this.state.value;if(q.operator=Z,this.match(29)){this.toAssignable(H,!0),q.left=H;let ie=S.index;x.doubleProtoLoc!=null&&x.doubleProtoLoc.index>=ie&&(x.doubleProtoLoc=null),x.shorthandAssignLoc!=null&&x.shorthandAssignLoc.index>=ie&&(x.shorthandAssignLoc=null),x.privateKeyLoc!=null&&x.privateKeyLoc.index>=ie&&(this.checkDestructuringPrivate(x),x.privateKeyLoc=null)}else q.left=H;return this.next(),q.right=this.parseMaybeAssign(),this.checkLVal(H,{in:this.finishNode(q,"AssignmentExpression")}),q}else $&&this.checkExpressionErrors(x,!0);return H}parseMaybeConditional(x){let g=this.state.startLoc,S=this.state.potentialArrowAt,$=this.parseExprOps(x);return this.shouldExitDescending($,S)?$:this.parseConditional($,g,x)}parseConditional(x,g,S){if(this.eat(17)){let $=this.startNodeAt(g);return $.test=x,$.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),$.alternate=this.parseMaybeAssign(),this.finishNode($,"ConditionalExpression")}return x}parseMaybeUnaryOrPrivate(x){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(x)}parseExprOps(x){let g=this.state.startLoc,S=this.state.potentialArrowAt,$=this.parseMaybeUnaryOrPrivate(x);return this.shouldExitDescending($,S)?$:this.parseExprOp($,g,-1)}parseExprOp(x,g,S){if(this.isPrivateName(x)){let N=this.getPrivateNameSV(x);(S>=je(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,x,{identifierName:N}),this.classScope.usePrivateName(N,x.loc.start)}let $=this.state.type;if(ee($)&&(this.prodParam.hasIn||!this.match(58))){let N=je($);if(N>S){if($===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return x;this.checkPipelineAtInfixOperator(x,g)}let H=this.startNodeAt(g);H.left=x,H.operator=this.state.value;let q=$===41||$===42,Z=$===40;if(Z&&(N=je(42)),this.next(),$===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);H.right=this.parseExprOpRightExpr($,N);let ie=this.finishNode(H,q||Z?"LogicalExpression":"BinaryExpression"),ne=this.state.type;if(Z&&(ne===41||ne===42)||q&&ne===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(ie,g,S)}}return x}parseExprOpRightExpr(x,g){let S=this.state.startLoc;switch(x){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(x,g),S)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(g))}default:return this.parseExprOpBaseRightExpr(x,g)}}parseExprOpBaseRightExpr(x,g){let S=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),S,ae(x)?g-1:g)}parseHackPipeBody(){var x;let{startLoc:g}=this.state,S=this.parseMaybeAssign();return h.has(S.type)&&!((x=S.extra)!=null&&x.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,g,{type:S.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,g),S}checkExponentialAfterUnary(x){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,x.argument)}parseMaybeUnary(x,g){let S=this.state.startLoc,$=this.isContextual(96);if($&&this.isAwaitAllowed()){this.next();let Z=this.parseAwait(S);return g||this.checkExponentialAfterUnary(Z),Z}let N=this.match(34),H=this.startNode();if(De(this.state.type)){H.operator=this.state.value,H.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let Z=this.match(89);if(this.next(),H.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(x,!0),this.state.strict&&Z){let ie=H.argument;ie.type==="Identifier"?this.raise(v.StrictDelete,H):this.hasPropertyAsPrivateName(ie)&&this.raise(v.DeletePrivateField,H)}if(!N)return g||this.checkExponentialAfterUnary(H),this.finishNode(H,"UnaryExpression")}let q=this.parseUpdate(H,N,x);if($){let{type:Z}=this.state;if((this.hasPlugin("v8intrinsic")?yt(Z):yt(Z)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,S),this.parseAwait(S)}return q}parseUpdate(x,g,S){if(g){let H=x;return this.checkLVal(H.argument,{in:this.finishNode(H,"UpdateExpression")}),x}let $=this.state.startLoc,N=this.parseExprSubscripts(S);if(this.checkExpressionErrors(S,!1))return N;for(;ue(this.state.type)&&!this.canInsertSemicolon();){let H=this.startNodeAt($);H.operator=this.state.value,H.prefix=!1,H.argument=N,this.next(),this.checkLVal(N,{in:N=this.finishNode(H,"UpdateExpression")})}return N}parseExprSubscripts(x){let g=this.state.startLoc,S=this.state.potentialArrowAt,$=this.parseExprAtom(x);return this.shouldExitDescending($,S)?$:this.parseSubscripts($,g)}parseSubscripts(x,g,S){let $={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(x),stop:!1};do x=this.parseSubscript(x,g,S,$),$.maybeAsyncArrow=!1;while(!$.stop);return x}parseSubscript(x,g,S,$){let{type:N}=this.state;if(!S&&N===15)return this.parseBind(x,g,S,$);if(ve(N))return this.parseTaggedTemplateExpression(x,g,$);let H=!1;if(N===18){if(S&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return $.stop=!0,x;$.optionalChainMember=H=!0,this.next()}if(!S&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(x,g,$,H);{let q=this.eat(0);return q||H||this.eat(16)?this.parseMember(x,g,$,q,H):($.stop=!0,x)}}parseMember(x,g,S,$,N){let H=this.startNodeAt(g);return H.object=x,H.computed=$,$?(H.property=this.parseExpression(),this.expect(3)):this.match(138)?(x.type==="Super"&&this.raise(v.SuperPrivateField,g),this.classScope.usePrivateName(this.state.value,this.state.startLoc),H.property=this.parsePrivateName()):H.property=this.parseIdentifier(!0),S.optionalChainMember?(H.optional=N,this.finishNode(H,"OptionalMemberExpression")):this.finishNode(H,"MemberExpression")}parseBind(x,g,S,$){let N=this.startNodeAt(g);return N.object=x,this.next(),N.callee=this.parseNoCallExpr(),$.stop=!0,this.parseSubscripts(this.finishNode(N,"BindExpression"),g,S)}parseCoverCallAndAsyncArrowHead(x,g,S,$){let N=this.state.maybeInArrowParameters,H=null;this.state.maybeInArrowParameters=!0,this.next();let q=this.startNodeAt(g);q.callee=x;let{maybeAsyncArrow:Z,optionalChainMember:ie}=S;Z&&(this.expressionScope.enter(dm()),H=new Xc),ie&&(q.optional=$),$?q.arguments=this.parseCallExpressionArguments(11):q.arguments=this.parseCallExpressionArguments(11,x.type==="Import",x.type!=="Super",q,H);let ne=this.finishCallExpression(q,ie);return Z&&this.shouldParseAsyncArrow()&&!$?(S.stop=!0,this.checkDestructuringPrivate(H),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),ne=this.parseAsyncArrowFromCallExpression(this.startNodeAt(g),ne)):(Z&&(this.checkExpressionErrors(H,!0),this.expressionScope.exit()),this.toReferencedArguments(ne)),this.state.maybeInArrowParameters=N,ne}toReferencedArguments(x,g){this.toReferencedListDeep(x.arguments,g)}parseTaggedTemplateExpression(x,g,S){let $=this.startNodeAt(g);return $.tag=x,$.quasi=this.parseTemplate(!0),S.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,g),this.finishNode($,"TaggedTemplateExpression")}atPossibleAsyncArrow(x){return x.type==="Identifier"&&x.name==="async"&&this.state.lastTokEndLoc.index===x.end&&!this.canInsertSemicolon()&&x.end-x.start===5&&x.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(x,g){if(x.callee.type==="Import")if(x.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),x.arguments.length===0||x.arguments.length>2)this.raise(v.ImportCallArity,x,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let S of x.arguments)S.type==="SpreadElement"&&this.raise(v.ImportCallSpreadArgument,S);return this.finishNode(x,g?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(x,g,S,$,N){let H=[],q=!0,Z=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(x);){if(q)q=!1;else if(this.expect(12),this.match(x)){g&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),$&&this.addTrailingCommaExtraToNode($),this.next();break}H.push(this.parseExprListItem(!1,N,S))}return this.state.inFSharpPipelineDirectBody=Z,H}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(x,g){var S;return this.resetPreviousNodeTrailingComments(g),this.expect(19),this.parseArrowExpression(x,g.arguments,!0,(S=g.extra)==null?void 0:S.trailingCommaLoc),g.innerComments&&He(x,g.innerComments),g.callee.trailingComments&&He(x,g.callee.trailingComments),x}parseNoCallExpr(){let x=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),x,!0)}parseExprAtom(x){let g,S=null,{type:$}=this.state;switch($){case 79:return this.parseSuper();case 83:return g=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(g):this.match(10)?this.options.createImportExpressions?this.parseImportCall(g):this.finishNode(g,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(g,"Import"));case 78:return g=this.startNode(),this.next(),this.finishNode(g,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let N=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(N)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,x);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,x);case 68:return this.parseFunctionOrFunctionSent();case 26:S=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(S,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{g=this.startNode(),this.next(),g.object=null;let N=g.callee=this.parseNoCallExpr();if(N.type==="MemberExpression")return this.finishNode(g,"BindExpression");throw this.raise(v.UnsupportedBind,N)}case 138:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let N=this.getPluginOption("pipelineOperator","proposal");if(N)return this.parseTopicReference(N);this.unexpected();break}case 47:{let N=this.input.codePointAt(this.nextTokenStart());It(N)||N===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(ce($)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let N=this.state.potentialArrowAt===this.state.start,H=this.state.containsEsc,q=this.parseIdentifier();if(!H&&q.name==="async"&&!this.canInsertSemicolon()){let{type:Z}=this.state;if(Z===68)return this.resetPreviousNodeTrailingComments(q),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(q));if(ce(Z))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(q)):q;if(Z===90)return this.resetPreviousNodeTrailingComments(q),this.parseDo(this.startNodeAtNode(q),!0)}return N&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(q),[q],!1)):q}else this.unexpected()}}parseTopicReferenceThenEqualsSign(x,g){let S=this.getPluginOption("pipelineOperator","proposal");if(S)return this.state.type=x,this.state.value=g,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(S);this.unexpected()}parseTopicReference(x){let g=this.startNode(),S=this.state.startLoc,$=this.state.type;return this.next(),this.finishTopicReference(g,S,x,$)}finishTopicReference(x,g,S,$){if(this.testTopicReferenceConfiguration(S,g,$)){let N=S==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(S==="smart"?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,g),this.registerTopicReference(),this.finishNode(x,N)}else throw this.raise(v.PipeTopicUnconfiguredToken,g,{token:Ee($)})}testTopicReferenceConfiguration(x,g,S){switch(x){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ee(S)}]);case"smart":return S===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,g)}}parseAsyncArrowUnaryFunction(x){this.prodParam.enter(Jc(!0,this.prodParam.hasYield));let g=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(x,g,!0)}parseDo(x,g){this.expectPlugin("doExpressions"),g&&this.expectPlugin("asyncDoExpressions"),x.async=g,this.next();let S=this.state.labels;return this.state.labels=[],g?(this.prodParam.enter(2),x.body=this.parseBlock(),this.prodParam.exit()):x.body=this.parseBlock(),this.state.labels=S,this.finishNode(x,"DoExpression")}parseSuper(){let x=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(v.SuperNotAllowed,x):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,x),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,x),this.finishNode(x,"Super")}parsePrivateName(){let x=this.startNode(),g=this.startNodeAt(i(this.state.startLoc,1)),S=this.state.value;return this.next(),x.id=this.createIdentifier(g,S),this.finishNode(x,"PrivateName")}parseFunctionOrFunctionSent(){let x=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let g=this.createIdentifier(this.startNodeAtNode(x),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(x,g,"sent")}return this.parseFunction(x)}parseMetaProperty(x,g,S){x.meta=g;let $=this.state.containsEsc;return x.property=this.parseIdentifier(!0),(x.property.name!==S||$)&&this.raise(v.UnsupportedMetaProperty,x.property,{target:g.name,onlyValidPropertyName:S}),this.finishNode(x,"MetaProperty")}parseImportMetaProperty(x){let g=this.createIdentifier(this.startNodeAtNode(x),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(v.ImportMetaOutsideModule,g),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let S=this.isContextual(105);if(S||this.unexpected(),this.expectPlugin(S?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(v.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),x.phase=S?"source":"defer",this.parseImportCall(x)}return this.parseMetaProperty(x,g,"meta")}parseLiteralAtNode(x,g,S){return this.addExtra(S,"rawValue",x),this.addExtra(S,"raw",this.input.slice(S.start,this.state.end)),S.value=x,this.next(),this.finishNode(S,g)}parseLiteral(x,g){let S=this.startNode();return this.parseLiteralAtNode(x,g,S)}parseStringLiteral(x){return this.parseLiteral(x,"StringLiteral")}parseNumericLiteral(x){return this.parseLiteral(x,"NumericLiteral")}parseBigIntLiteral(x){return this.parseLiteral(x,"BigIntLiteral")}parseDecimalLiteral(x){return this.parseLiteral(x,"DecimalLiteral")}parseRegExpLiteral(x){let g=this.startNode();return this.addExtra(g,"raw",this.input.slice(g.start,this.state.end)),g.pattern=x.pattern,g.flags=x.flags,this.next(),this.finishNode(g,"RegExpLiteral")}parseBooleanLiteral(x){let g=this.startNode();return g.value=x,this.next(),this.finishNode(g,"BooleanLiteral")}parseNullLiteral(){let x=this.startNode();return this.next(),this.finishNode(x,"NullLiteral")}parseParenAndDistinguishExpression(x){let g=this.state.startLoc,S;this.next(),this.expressionScope.enter(hu());let $=this.state.maybeInArrowParameters,N=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let H=this.state.startLoc,q=[],Z=new Xc,ie=!0,ne,Se;for(;!this.match(11);){if(ie)ie=!1;else if(this.expect(12,Z.optionalParametersLoc===null?null:Z.optionalParametersLoc),this.match(11)){Se=this.state.startLoc;break}if(this.match(21)){let Qe=this.state.startLoc;if(ne=this.state.startLoc,q.push(this.parseParenItem(this.parseRestBinding(),Qe)),!this.checkCommaAfterRest(41))break}else q.push(this.parseMaybeAssignAllowIn(Z,this.parseParenItem))}let Be=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=$,this.state.inFSharpPipelineDirectBody=N;let qe=this.startNodeAt(g);return x&&this.shouldParseArrow(q)&&(qe=this.parseArrow(qe))?(this.checkDestructuringPrivate(Z),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(qe,q,!1),qe):(this.expressionScope.exit(),q.length||this.unexpected(this.state.lastTokStartLoc),Se&&this.unexpected(Se),ne&&this.unexpected(ne),this.checkExpressionErrors(Z,!0),this.toReferencedListDeep(q,!0),q.length>1?(S=this.startNodeAt(H),S.expressions=q,this.finishNode(S,"SequenceExpression"),this.resetEndLocation(S,Be)):S=q[0],this.wrapParenthesis(g,S))}wrapParenthesis(x,g){if(!this.options.createParenthesizedExpressions)return this.addExtra(g,"parenthesized",!0),this.addExtra(g,"parenStart",x.index),this.takeSurroundingComments(g,x.index,this.state.lastTokEndLoc.index),g;let S=this.startNodeAt(x);return S.expression=g,this.finishNode(S,"ParenthesizedExpression")}shouldParseArrow(x){return!this.canInsertSemicolon()}parseArrow(x){if(this.eat(19))return x}parseParenItem(x,g){return x}parseNewOrNewTarget(){let x=this.startNode();if(this.next(),this.match(16)){let g=this.createIdentifier(this.startNodeAtNode(x),"new");this.next();let S=this.parseMetaProperty(x,g,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,S),S}return this.parseNew(x)}parseNew(x){if(this.parseNewCallee(x),this.eat(10)){let g=this.parseExprList(11);this.toReferencedList(g),x.arguments=g}else x.arguments=[];return this.finishNode(x,"NewExpression")}parseNewCallee(x){let g=this.match(83),S=this.parseNoCallExpr();x.callee=S,g&&(S.type==="Import"||S.type==="ImportExpression")&&this.raise(v.ImportCallNotNewExpression,S)}parseTemplateElement(x){let{start:g,startLoc:S,end:$,value:N}=this.state,H=g+1,q=this.startNodeAt(i(S,1));N===null&&(x||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));let Z=this.match(24),ie=Z?-1:-2,ne=$+ie;q.value={raw:this.input.slice(H,ne).replace(/\r\n?/g,` +`),cooked:N===null?null:N.slice(1,ie)},q.tail=Z,this.next();let Se=this.finishNode(q,"TemplateElement");return this.resetEndLocation(Se,i(this.state.lastTokEndLoc,ie)),Se}parseTemplate(x){let g=this.startNode(),S=this.parseTemplateElement(x),$=[S],N=[];for(;!S.tail;)N.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),$.push(S=this.parseTemplateElement(x));return g.expressions=N,g.quasis=$,this.finishNode(g,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(x,g,S,$){S&&this.expectPlugin("recordAndTuple");let N=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let H=Object.create(null),q=!0,Z=this.startNode();for(Z.properties=[],this.next();!this.match(x);){if(q)q=!1;else if(this.expect(12),this.match(x)){this.addTrailingCommaExtraToNode(Z);break}let ne;g?ne=this.parseBindingProperty():(ne=this.parsePropertyDefinition($),this.checkProto(ne,S,H,$)),S&&!this.isObjectProperty(ne)&&ne.type!=="SpreadElement"&&this.raise(v.InvalidRecordProperty,ne),ne.shorthand&&this.addExtra(ne,"shorthand",!0),Z.properties.push(ne)}this.next(),this.state.inFSharpPipelineDirectBody=N;let ie="ObjectExpression";return g?ie="ObjectPattern":S&&(ie="RecordExpression"),this.finishNode(Z,ie)}addTrailingCommaExtraToNode(x){this.addExtra(x,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(x,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(x){return!x.computed&&x.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(x){let g=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)g.push(this.parseDecorator());let S=this.startNode(),$=!1,N=!1,H;if(this.match(21))return g.length&&this.unexpected(),this.parseSpread();g.length&&(S.decorators=g,g=[]),S.method=!1,x&&(H=this.state.startLoc);let q=this.eat(55);this.parsePropertyNamePrefixOperator(S);let Z=this.state.containsEsc;if(this.parsePropertyName(S,x),!q&&!Z&&this.maybeAsyncOrAccessorProp(S)){let{key:ie}=S,ne=ie.name;ne==="async"&&!this.hasPrecedingLineBreak()&&($=!0,this.resetPreviousNodeTrailingComments(ie),q=this.eat(55),this.parsePropertyName(S)),(ne==="get"||ne==="set")&&(N=!0,this.resetPreviousNodeTrailingComments(ie),S.kind=ne,this.match(55)&&(q=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:ne}),this.next()),this.parsePropertyName(S))}return this.parseObjPropValue(S,H,q,$,!1,N,x)}getGetterSetterExpectedParamCount(x){return x.kind==="get"?0:1}getObjectOrClassMethodParams(x){return x.params}checkGetterSetterParams(x){var g;let S=this.getGetterSetterExpectedParamCount(x),$=this.getObjectOrClassMethodParams(x);$.length!==S&&this.raise(x.kind==="get"?v.BadGetterArity:v.BadSetterArity,x),x.kind==="set"&&((g=$[$.length-1])==null?void 0:g.type)==="RestElement"&&this.raise(v.BadSetterRestParameter,x)}parseObjectMethod(x,g,S,$,N){if(N){let H=this.parseMethod(x,g,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(H),H}if(S||g||this.match(10))return $&&this.unexpected(),x.kind="method",x.method=!0,this.parseMethod(x,g,S,!1,!1,"ObjectMethod")}parseObjectProperty(x,g,S,$){if(x.shorthand=!1,this.eat(14))return x.value=S?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn($),this.finishNode(x,"ObjectProperty");if(!x.computed&&x.key.type==="Identifier"){if(this.checkReservedWord(x.key.name,x.key.loc.start,!0,!1),S)x.value=this.parseMaybeDefault(g,fs(x.key));else if(this.match(29)){let N=this.state.startLoc;$!=null?$.shorthandAssignLoc===null&&($.shorthandAssignLoc=N):this.raise(v.InvalidCoverInitializedName,N),x.value=this.parseMaybeDefault(g,fs(x.key))}else x.value=fs(x.key);return x.shorthand=!0,this.finishNode(x,"ObjectProperty")}}parseObjPropValue(x,g,S,$,N,H,q){let Z=this.parseObjectMethod(x,S,$,N,H)||this.parseObjectProperty(x,g,N,q);return Z||this.unexpected(),Z}parsePropertyName(x,g){if(this.eat(0))x.computed=!0,x.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:S,value:$}=this.state,N;if(ke(S))N=this.parseIdentifier(!0);else switch(S){case 134:N=this.parseNumericLiteral($);break;case 133:N=this.parseStringLiteral($);break;case 135:N=this.parseBigIntLiteral($);break;case 136:N=this.parseDecimalLiteral($);break;case 138:{let H=this.state.startLoc;g!=null?g.privateKeyLoc===null&&(g.privateKeyLoc=H):this.raise(v.UnexpectedPrivateField,H),N=this.parsePrivateName();break}default:this.unexpected()}x.key=N,S!==138&&(x.computed=!1)}}initFunction(x,g){x.id=null,x.generator=!1,x.async=g}parseMethod(x,g,S,$,N,H,q=!1){this.initFunction(x,S),x.generator=g,this.scope.enter(18|(q?64:0)|(N?32:0)),this.prodParam.enter(Jc(S,x.generator)),this.parseFunctionParams(x,$);let Z=this.parseFunctionBodyAndFinish(x,H,!0);return this.prodParam.exit(),this.scope.exit(),Z}parseArrayLike(x,g,S,$){S&&this.expectPlugin("recordAndTuple");let N=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let H=this.startNode();return this.next(),H.elements=this.parseExprList(x,!S,$,H),this.state.inFSharpPipelineDirectBody=N,this.finishNode(H,S?"TupleExpression":"ArrayExpression")}parseArrowExpression(x,g,S,$){this.scope.enter(6);let N=Jc(S,!1);!this.match(5)&&this.prodParam.hasIn&&(N|=8),this.prodParam.enter(N),this.initFunction(x,S);let H=this.state.maybeInArrowParameters;return g&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(x,g,$)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(x,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=H,this.finishNode(x,"ArrowFunctionExpression")}setArrowFunctionParameters(x,g,S){this.toAssignableList(g,S,!1),x.params=g}parseFunctionBodyAndFinish(x,g,S=!1){return this.parseFunctionBody(x,!1,S),this.finishNode(x,g)}parseFunctionBody(x,g,S=!1){let $=g&&!this.match(5);if(this.expressionScope.enter(gf()),$)x.body=this.parseMaybeAssign(),this.checkParams(x,!1,g,!1);else{let N=this.state.strict,H=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),x.body=this.parseBlock(!0,!1,q=>{let Z=!this.isSimpleParamList(x.params);q&&Z&&this.raise(v.IllegalLanguageModeDirective,(x.kind==="method"||x.kind==="constructor")&&x.key?x.key.loc.end:x);let ie=!N&&this.state.strict;this.checkParams(x,!this.state.strict&&!g&&!S&&!Z,g,ie),this.state.strict&&x.id&&this.checkIdentifier(x.id,65,ie)}),this.prodParam.exit(),this.state.labels=H}this.expressionScope.exit()}isSimpleParameter(x){return x.type==="Identifier"}isSimpleParamList(x){for(let g=0,S=x.length;g10||!Ms(x))){if(S&&Li(x)){this.raise(v.UnexpectedKeyword,g,{keyword:x});return}if((this.state.strict?$?$i:Zr:mr)(x,this.inModule)){this.raise(v.UnexpectedReservedWord,g,{reservedWord:x});return}else if(x==="yield"){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,g);return}}else if(x==="await"){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,g);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,g);return}this.expressionScope.recordAsyncArrowParametersError(g)}else if(x==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,g);return}}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(x){let g=this.startNodeAt(x);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,g),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,g),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(g.argument=this.parseMaybeUnary(null,!0)),this.finishNode(g,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:x}=this.state;return x===53||x===10||x===0||ve(x)||x===102&&!this.state.containsEsc||x===137||x===56||this.hasPlugin("v8intrinsic")&&x===54}parseYield(){let x=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,x),this.next();let g=!1,S=null;if(!this.hasPrecedingLineBreak())switch(g=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!g)break;default:S=this.parseMaybeAssign()}return x.delegate=g,x.argument=S,this.finishNode(x,"YieldExpression")}parseImportCall(x){return this.next(),x.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(x.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(x.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(x,"ImportExpression")}checkPipelineAtInfixOperator(x,g){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&x.type==="SequenceExpression"&&this.raise(v.PipelineHeadSequenceExpression,g)}parseSmartPipelineBodyInStyle(x,g){if(this.isSimpleReference(x)){let S=this.startNodeAt(g);return S.callee=x,this.finishNode(S,"PipelineBareFunction")}else{let S=this.startNodeAt(g);return this.checkSmartPipeTopicBodyEarlyErrors(g),S.expression=x,this.finishNode(S,"PipelineTopicExpression")}}isSimpleReference(x){switch(x.type){case"MemberExpression":return!x.computed&&this.isSimpleReference(x.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(x){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,x)}withTopicBindingContext(x){let g=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=g}}withSmartMixTopicForbiddingContext(x){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let g=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=g}}else return x()}withSoloAwaitPermittingContext(x){let g=this.state.soloAwait;this.state.soloAwait=!0;try{return x()}finally{this.state.soloAwait=g}}allowInAnd(x){let g=this.prodParam.currentFlags();if(8&~g){this.prodParam.enter(g|8);try{return x()}finally{this.prodParam.exit()}}return x()}disallowInAnd(x){let g=this.prodParam.currentFlags();if(8&g){this.prodParam.enter(g&-9);try{return x()}finally{this.prodParam.exit()}}return x()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(x){let g=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let $=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),g,x);return this.state.inFSharpPipelineDirectBody=S,$}parseModuleExpression(){this.expectPlugin("moduleBlocks");let x=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let g=this.startNodeAt(this.state.endLoc);this.next();let S=this.initializeScopes(!0);this.enterInitialScopes();try{x.body=this.parseProgram(g,8,"module")}finally{S()}return this.finishNode(x,"ModuleExpression")}parsePropertyNamePrefixOperator(x){}},Wa={kind:1},JU={kind:2},XU=/[\uD800-\uDFFF]/u,nx=/in(?:stanceof)?/y;function YU(x,g){for(let S=0;S0)for(let[N,H]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,H,{localName:N});let $;return g===139?$=this.finishNode(x,"Program"):$=this.finishNodeAt(x,"Program",i(this.state.startLoc,-1)),$}stmtToDirective(x){let g=x;g.type="Directive",g.value=g.expression,delete g.expression;let S=g.value,$=S.value,N=this.input.slice(S.start,S.end),H=S.value=N.slice(1,-1);return this.addExtra(S,"raw",N),this.addExtra(S,"rawValue",H),this.addExtra(S,"expressionValue",$),S.type="DirectiveLiteral",g}parseInterpreterDirective(){if(!this.match(28))return null;let x=this.startNode();return x.value=this.state.value,this.next(),this.finishNode(x,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(x,g){if(It(x)){if(nx.lastIndex=g,nx.test(this.input)){let S=this.codePointAtPos(nx.lastIndex);if(!sr(S)&&S!==92)return!1}return!0}else return x===92}chStartsBindingPattern(x){return x===91||x===123}hasFollowingBindingAtom(){let x=this.nextTokenStart(),g=this.codePointAtPos(x);return this.chStartsBindingPattern(g)||this.chStartsBindingIdentifier(g,x)}hasInLineFollowingBindingIdentifierOrBrace(){let x=this.nextTokenInLineStart(),g=this.codePointAtPos(x);return g===123||this.chStartsBindingIdentifier(g,x)}startsUsingForOf(){let{type:x,containsEsc:g}=this.lookahead();if(x===102&&!g)return!1;if(ce(x)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let x=this.nextTokenInLineStart();if(this.isUnparsedContextual(x,"using")){x=this.nextTokenInLineStartSince(x+5);let g=this.codePointAtPos(x);if(this.chStartsBindingIdentifier(g,x))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(x=!1){let g=0;return this.options.annexB&&!this.state.strict&&(g|=4,x&&(g|=8)),this.parseStatementLike(g)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(x){let g=null;return this.match(26)&&(g=this.parseDecorators(!0)),this.parseStatementContent(x,g)}parseStatementContent(x,g){let S=this.state.type,$=this.startNode(),N=!!(x&2),H=!!(x&4),q=x&1;switch(S){case 60:return this.parseBreakContinueStatement($,!0);case 63:return this.parseBreakContinueStatement($,!1);case 64:return this.parseDebuggerStatement($);case 90:return this.parseDoWhileStatement($);case 91:return this.parseForStatement($);case 68:if(this.lookaheadCharCode()===46)break;return H||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement($,!1,!N&&H);case 80:return N||this.unexpected(),this.parseClass(this.maybeTakeDecorators(g,$),!0);case 69:return this.parseIfStatement($);case 70:return this.parseReturnStatement($);case 71:return this.parseSwitchStatement($);case 72:return this.parseThrowStatement($);case 73:return this.parseTryStatement($);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?N||this.raise(v.UnexpectedLexicalDeclaration,$):this.raise(v.AwaitUsingNotInAsyncContext,$),this.next(),this.parseVarStatement($,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc):N||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement($,"using");case 100:{if(this.state.containsEsc)break;let ne=this.nextTokenStart(),Se=this.codePointAtPos(ne);if(Se!==91&&(!N&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(Se,ne)&&Se!==123))break}case 75:N||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let ne=this.state.value;return this.parseVarStatement($,ne)}case 92:return this.parseWhileStatement($);case 76:return this.parseWithStatement($);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement($);case 83:{let ne=this.lookaheadCharCode();if(ne===40||ne===46)break}case 82:{!this.options.allowImportExportEverywhere&&!q&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let ne;return S===83?(ne=this.parseImport($),ne.type==="ImportDeclaration"&&(!ne.importKind||ne.importKind==="value")&&(this.sawUnambiguousESM=!0)):(ne=this.parseExport($,g),(ne.type==="ExportNamedDeclaration"&&(!ne.exportKind||ne.exportKind==="value")||ne.type==="ExportAllDeclaration"&&(!ne.exportKind||ne.exportKind==="value")||ne.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(ne),ne}default:if(this.isAsyncFunction())return N||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement($,!0,!N&&H)}let Z=this.state.value,ie=this.parseExpression();return ce(S)&&ie.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement($,Z,ie,x):this.parseExpressionStatement($,ie,g)}assertModuleNodeAllowed(x){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,x)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(x,g,S){return x&&(g.decorators&&g.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(v.DecoratorsBeforeAfterExport,g.decorators[0]),g.decorators.unshift(...x)):g.decorators=x,this.resetStartLocationFromNode(g,x[0]),S&&this.resetStartLocationFromNode(S,g)),g}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(x){let g=[];do g.push(this.parseDecorator());while(this.match(26));if(this.match(82))x||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return g}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let x=this.startNode();if(this.next(),this.hasPlugin("decorators")){let g=this.state.startLoc,S;if(this.match(10)){let $=this.state.startLoc;this.next(),S=this.parseExpression(),this.expect(11),S=this.wrapParenthesis($,S);let N=this.state.startLoc;x.expression=this.parseMaybeDecoratorArguments(S),this.getPluginOption("decorators","allowCallParenthesized")===!1&&x.expression!==S&&this.raise(v.DecoratorArgumentsOutsideParentheses,N)}else{for(S=this.parseIdentifier(!1);this.eat(16);){let $=this.startNodeAt(g);$.object=S,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),$.property=this.parsePrivateName()):$.property=this.parseIdentifier(!0),$.computed=!1,S=this.finishNode($,"MemberExpression")}x.expression=this.parseMaybeDecoratorArguments(S)}}else x.expression=this.parseExprSubscripts();return this.finishNode(x,"Decorator")}parseMaybeDecoratorArguments(x){if(this.eat(10)){let g=this.startNodeAtNode(x);return g.callee=x,g.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(g.arguments),this.finishNode(g,"CallExpression")}return x}parseBreakContinueStatement(x,g){return this.next(),this.isLineTerminator()?x.label=null:(x.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(x,g),this.finishNode(x,g?"BreakStatement":"ContinueStatement")}verifyBreakContinue(x,g){let S;for(S=0;Sthis.parseStatement()),this.state.labels.pop(),this.expect(92),x.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(x,"DoWhileStatement")}parseForStatement(x){this.next(),this.state.labels.push(Wa);let g=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(g=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return g!==null&&this.unexpected(g),this.parseFor(x,null);let S=this.isContextual(100);{let Z=this.isContextual(96)&&this.startsAwaitUsing(),ie=Z||this.isContextual(107)&&this.startsUsingForOf(),ne=S&&this.hasFollowingBindingAtom()||ie;if(this.match(74)||this.match(75)||ne){let Se=this.startNode(),Be;Z?(Be="await using",this.isAwaitAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):Be=this.state.value,this.next(),this.parseVar(Se,!0,Be);let qe=this.finishNode(Se,"VariableDeclaration"),Qe=this.match(58);return Qe&&ie&&this.raise(v.ForInUsing,qe),(Qe||this.isContextual(102))&&qe.declarations.length===1?this.parseForIn(x,qe,g):(g!==null&&this.unexpected(g),this.parseFor(x,qe))}}let $=this.isContextual(95),N=new Xc,H=this.parseExpression(!0,N),q=this.isContextual(102);if(q&&(S&&this.raise(v.ForOfLet,H),g===null&&$&&H.type==="Identifier"&&this.raise(v.ForOfAsync,H)),q||this.match(58)){this.checkDestructuringPrivate(N),this.toAssignable(H,!0);let Z=q?"ForOfStatement":"ForInStatement";return this.checkLVal(H,{in:{type:Z}}),this.parseForIn(x,H,g)}else this.checkExpressionErrors(N,!0);return g!==null&&this.unexpected(g),this.parseFor(x,H)}parseFunctionStatement(x,g,S){return this.next(),this.parseFunction(x,1|(S?2:0)|(g?8:0))}parseIfStatement(x){return this.next(),x.test=this.parseHeaderExpression(),x.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),x.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(x,"IfStatement")}parseReturnStatement(x){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?x.argument=null:(x.argument=this.parseExpression(),this.semicolon()),this.finishNode(x,"ReturnStatement")}parseSwitchStatement(x){this.next(),x.discriminant=this.parseHeaderExpression();let g=x.cases=[];this.expect(5),this.state.labels.push(JU),this.scope.enter(0);let S;for(let $;!this.match(8);)if(this.match(61)||this.match(65)){let N=this.match(61);S&&this.finishNode(S,"SwitchCase"),g.push(S=this.startNode()),S.consequent=[],this.next(),N?S.test=this.parseExpression():($&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),$=!0,S.test=null),this.expect(14)}else S?S.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),S&&this.finishNode(S,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(x,"SwitchStatement")}parseThrowStatement(x){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),x.argument=this.parseExpression(),this.semicolon(),this.finishNode(x,"ThrowStatement")}parseCatchClauseParam(){let x=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&x.type==="Identifier"?8:0),this.checkLVal(x,{in:{type:"CatchClause"},binding:9}),x}parseTryStatement(x){if(this.next(),x.block=this.parseBlock(),x.handler=null,this.match(62)){let g=this.startNode();this.next(),this.match(10)?(this.expect(10),g.param=this.parseCatchClauseParam(),this.expect(11)):(g.param=null,this.scope.enter(0)),g.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),x.handler=this.finishNode(g,"CatchClause")}return x.finalizer=this.eat(67)?this.parseBlock():null,!x.handler&&!x.finalizer&&this.raise(v.NoCatchOrFinally,x),this.finishNode(x,"TryStatement")}parseVarStatement(x,g,S=!1){return this.next(),this.parseVar(x,!1,g,S),this.semicolon(),this.finishNode(x,"VariableDeclaration")}parseWhileStatement(x){return this.next(),x.test=this.parseHeaderExpression(),this.state.labels.push(Wa),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(x,"WhileStatement")}parseWithStatement(x){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),x.object=this.parseHeaderExpression(),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(x,"WithStatement")}parseEmptyStatement(x){return this.next(),this.finishNode(x,"EmptyStatement")}parseLabeledStatement(x,g,S,$){for(let H of this.state.labels)H.name===g&&this.raise(v.LabelRedeclaration,S,{labelName:g});let N=pe(this.state.type)?1:this.match(71)?2:null;for(let H=this.state.labels.length-1;H>=0;H--){let q=this.state.labels[H];if(q.statementStart===x.start)q.statementStart=this.state.start,q.kind=N;else break}return this.state.labels.push({name:g,kind:N,statementStart:this.state.start}),x.body=$&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),x.label=S,this.finishNode(x,"LabeledStatement")}parseExpressionStatement(x,g,S){return x.expression=g,this.semicolon(),this.finishNode(x,"ExpressionStatement")}parseBlock(x=!1,g=!0,S){let $=this.startNode();return x&&this.state.strictErrors.clear(),this.expect(5),g&&this.scope.enter(0),this.parseBlockBody($,x,!1,8,S),g&&this.scope.exit(),this.finishNode($,"BlockStatement")}isValidDirective(x){return x.type==="ExpressionStatement"&&x.expression.type==="StringLiteral"&&!x.expression.extra.parenthesized}parseBlockBody(x,g,S,$,N){let H=x.body=[],q=x.directives=[];this.parseBlockOrModuleBlockBody(H,g?q:void 0,S,$,N)}parseBlockOrModuleBlockBody(x,g,S,$,N){let H=this.state.strict,q=!1,Z=!1;for(;!this.match($);){let ie=S?this.parseModuleItem():this.parseStatementListItem();if(g&&!Z){if(this.isValidDirective(ie)){let ne=this.stmtToDirective(ie);g.push(ne),!q&&ne.value.value==="use strict"&&(q=!0,this.setStrict(!0));continue}Z=!0,this.state.strictErrors.clear()}x.push(ie)}N==null||N.call(this,q),H||this.setStrict(!1),this.next()}parseFor(x,g){return x.init=g,this.semicolon(!1),x.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),x.update=this.match(11)?null:this.parseExpression(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,"ForStatement")}parseForIn(x,g,S){let $=this.match(58);return this.next(),$?S!==null&&this.unexpected(S):x.await=S!==null,g.type==="VariableDeclaration"&&g.declarations[0].init!=null&&(!$||!this.options.annexB||this.state.strict||g.kind!=="var"||g.declarations[0].id.type!=="Identifier")&&this.raise(v.ForInOfLoopInitializer,g,{type:$?"ForInStatement":"ForOfStatement"}),g.type==="AssignmentPattern"&&this.raise(v.InvalidLhs,g,{ancestor:{type:"ForStatement"}}),x.left=g,x.right=$?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,$?"ForInStatement":"ForOfStatement")}parseVar(x,g,S,$=!1){let N=x.declarations=[];for(x.kind=S;;){let H=this.startNode();if(this.parseVarId(H,S),H.init=this.eat(29)?g?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,H.init===null&&!$&&(H.id.type!=="Identifier"&&!(g&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(S==="const"||S==="using"||S==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:S})),N.push(this.finishNode(H,"VariableDeclarator")),!this.eat(12))break}return x}parseVarId(x,g){let S=this.parseBindingAtom();(g==="using"||g==="await using")&&(S.type==="ArrayPattern"||S.type==="ObjectPattern")&&this.raise(v.UsingDeclarationHasBindingPattern,S.loc.start),this.checkLVal(S,{in:{type:"VariableDeclarator"},binding:g==="var"?5:8201}),x.id=S}parseAsyncFunctionExpression(x){return this.parseFunction(x,8)}parseFunction(x,g=0){let S=g&2,$=!!(g&1),N=$&&!(g&4),H=!!(g&8);this.initFunction(x,H),this.match(55)&&(S&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),x.generator=!0),$&&(x.id=this.parseFunctionId(N));let q=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Jc(H,x.generator)),$||(x.id=this.parseFunctionId()),this.parseFunctionParams(x,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(x,$?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),$&&!S&&this.registerFunctionStatementId(x),this.state.maybeInArrowParameters=q,x}parseFunctionId(x){return x||ce(this.state.type)?this.parseIdentifier():null}parseFunctionParams(x,g){this.expect(10),this.expressionScope.enter(V1()),x.params=this.parseBindingList(11,41,2|(g?4:0)),this.expressionScope.exit()}registerFunctionStatementId(x){x.id&&this.scope.declareName(x.id.name,!this.options.annexB||this.state.strict||x.generator||x.async?this.scope.treatFunctionsAsVar?5:8201:17,x.id.loc.start)}parseClass(x,g,S){this.next();let $=this.state.strict;return this.state.strict=!0,this.parseClassId(x,g,S),this.parseClassSuper(x),x.body=this.parseClassBody(!!x.superClass,$),this.finishNode(x,g?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(x){return x.type==="Identifier"&&x.name==="constructor"||x.type==="StringLiteral"&&x.value==="constructor"}isNonstaticConstructor(x){return!x.computed&&!x.static&&this.nameIsConstructor(x.key)}parseClassBody(x,g){this.classScope.enter();let S={hadConstructor:!1,hadSuperClass:x},$=[],N=this.startNode();if(N.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if($.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){$.push(this.parseDecorator());continue}let H=this.startNode();$.length&&(H.decorators=$,this.resetStartLocationFromNode(H,$[0]),$=[]),this.parseClassMember(N,H,S),H.kind==="constructor"&&H.decorators&&H.decorators.length>0&&this.raise(v.DecoratorConstructor,H)}}),this.state.strict=g,this.next(),$.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(N,"ClassBody")}parseClassMemberFromModifier(x,g){let S=this.parseIdentifier(!0);if(this.isClassMethod()){let $=g;return $.kind="method",$.computed=!1,$.key=S,$.static=!1,this.pushClassMethod(x,$,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let $=g;return $.computed=!1,$.key=S,$.static=!1,x.body.push(this.parseClassProperty($)),!0}return this.resetPreviousNodeTrailingComments(S),!1}parseClassMember(x,g,S){let $=this.isContextual(106);if($){if(this.parseClassMemberFromModifier(x,g))return;if(this.eat(5)){this.parseClassStaticBlock(x,g);return}}this.parseClassMemberWithIsStatic(x,g,S,$)}parseClassMemberWithIsStatic(x,g,S,$){let N=g,H=g,q=g,Z=g,ie=g,ne=N,Se=N;if(g.static=$,this.parsePropertyNamePrefixOperator(g),this.eat(55)){ne.kind="method";let wr=this.match(138);if(this.parseClassElementName(ne),wr){this.pushClassPrivateMethod(x,H,!0,!1);return}this.isNonstaticConstructor(N)&&this.raise(v.ConstructorIsGenerator,N.key),this.pushClassMethod(x,N,!0,!1,!1,!1);return}let Be=!this.state.containsEsc&&ce(this.state.type),qe=this.parseClassElementName(g),Qe=Be?qe.name:null,lr=this.isPrivateName(qe),dn=this.state.startLoc;if(this.parsePostMemberNameModifiers(Se),this.isClassMethod()){if(ne.kind="method",lr){this.pushClassPrivateMethod(x,H,!1,!1);return}let wr=this.isNonstaticConstructor(N),Yr=!1;wr&&(N.kind="constructor",S.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,qe),wr&&this.hasPlugin("typescript")&&g.override&&this.raise(v.OverrideOnConstructor,qe),S.hadConstructor=!0,Yr=S.hadSuperClass),this.pushClassMethod(x,N,!1,!1,wr,Yr)}else if(this.isClassProperty())lr?this.pushClassPrivateProperty(x,Z):this.pushClassProperty(x,q);else if(Qe==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(qe);let wr=this.eat(55);Se.optional&&this.unexpected(dn),ne.kind="method";let Yr=this.match(138);this.parseClassElementName(ne),this.parsePostMemberNameModifiers(Se),Yr?this.pushClassPrivateMethod(x,H,wr,!0):(this.isNonstaticConstructor(N)&&this.raise(v.ConstructorIsAsync,N.key),this.pushClassMethod(x,N,wr,!0,!1,!1))}else if((Qe==="get"||Qe==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(qe),ne.kind=Qe;let wr=this.match(138);this.parseClassElementName(N),wr?this.pushClassPrivateMethod(x,H,!1,!1):(this.isNonstaticConstructor(N)&&this.raise(v.ConstructorIsAccessor,N.key),this.pushClassMethod(x,N,!1,!1,!1,!1)),this.checkGetterSetterParams(N)}else if(Qe==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(qe);let wr=this.match(138);this.parseClassElementName(q),this.pushClassAccessorProperty(x,ie,wr)}else this.isLineTerminator()?lr?this.pushClassPrivateProperty(x,Z):this.pushClassProperty(x,q):this.unexpected()}parseClassElementName(x){let{type:g,value:S}=this.state;if((g===132||g===133)&&x.static&&S==="prototype"&&this.raise(v.StaticPrototype,this.state.startLoc),g===138){S==="constructor"&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);let $=this.parsePrivateName();return x.key=$,$}return this.parsePropertyName(x),x.key}parseClassStaticBlock(x,g){var S;this.scope.enter(208);let $=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let N=g.body=[];this.parseBlockOrModuleBlockBody(N,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=$,x.body.push(this.finishNode(g,"StaticBlock")),(S=g.decorators)!=null&&S.length&&this.raise(v.DecoratorStaticBlock,g)}pushClassProperty(x,g){!g.computed&&this.nameIsConstructor(g.key)&&this.raise(v.ConstructorClassField,g.key),x.body.push(this.parseClassProperty(g))}pushClassPrivateProperty(x,g){let S=this.parseClassPrivateProperty(g);x.body.push(S),this.classScope.declarePrivateName(this.getPrivateNameSV(S.key),0,S.key.loc.start)}pushClassAccessorProperty(x,g,S){!S&&!g.computed&&this.nameIsConstructor(g.key)&&this.raise(v.ConstructorClassField,g.key);let $=this.parseClassAccessorProperty(g);x.body.push($),S&&this.classScope.declarePrivateName(this.getPrivateNameSV($.key),0,$.key.loc.start)}pushClassMethod(x,g,S,$,N,H){x.body.push(this.parseMethod(g,S,$,N,H,"ClassMethod",!0))}pushClassPrivateMethod(x,g,S,$){let N=this.parseMethod(g,S,$,!1,!1,"ClassPrivateMethod",!0);x.body.push(N);let H=N.kind==="get"?N.static?6:2:N.kind==="set"?N.static?5:1:0;this.declareClassPrivateMethodInScope(N,H)}declareClassPrivateMethodInScope(x,g){this.classScope.declarePrivateName(this.getPrivateNameSV(x.key),g,x.key.loc.start)}parsePostMemberNameModifiers(x){}parseClassPrivateProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassPrivateProperty")}parseClassProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassProperty")}parseClassAccessorProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassAccessorProperty")}parseInitializer(x){this.scope.enter(80),this.expressionScope.enter(gf()),this.prodParam.enter(0),x.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(x,g,S,$=8331){if(ce(this.state.type))x.id=this.parseIdentifier(),g&&this.declareNameFromIdentifier(x.id,$);else if(S||!g)x.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(x){x.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(x,g){let S=this.parseMaybeImportPhase(x,!0),$=this.maybeParseExportDefaultSpecifier(x,S),N=!$||this.eat(12),H=N&&this.eatExportStar(x),q=H&&this.maybeParseExportNamespaceSpecifier(x),Z=N&&(!q||this.eat(12)),ie=$||H;if(H&&!q){if($&&this.unexpected(),g)throw this.raise(v.UnsupportedDecoratorExport,x);return this.parseExportFrom(x,!0),this.finishNode(x,"ExportAllDeclaration")}let ne=this.maybeParseExportNamedSpecifiers(x);$&&N&&!H&&!ne&&this.unexpected(null,5),q&&Z&&this.unexpected(null,98);let Se;if(ie||ne){if(Se=!1,g)throw this.raise(v.UnsupportedDecoratorExport,x);this.parseExportFrom(x,ie)}else Se=this.maybeParseExportDeclaration(x);if(ie||ne||Se){var Be;let qe=x;if(this.checkExport(qe,!0,!1,!!qe.source),((Be=qe.declaration)==null?void 0:Be.type)==="ClassDeclaration")this.maybeTakeDecorators(g,qe.declaration,qe);else if(g)throw this.raise(v.UnsupportedDecoratorExport,x);return this.finishNode(qe,"ExportNamedDeclaration")}if(this.eat(65)){let qe=x,Qe=this.parseExportDefaultExpression();if(qe.declaration=Qe,Qe.type==="ClassDeclaration")this.maybeTakeDecorators(g,Qe,qe);else if(g)throw this.raise(v.UnsupportedDecoratorExport,x);return this.checkExport(qe,!0,!0),this.finishNode(qe,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(x){return this.eat(55)}maybeParseExportDefaultSpecifier(x,g){if(g||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",g==null?void 0:g.loc.start);let S=g||this.parseIdentifier(!0),$=this.startNodeAtNode(S);return $.exported=S,x.specifiers=[this.finishNode($,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(x){if(this.isContextual(93)){var g;(g=x).specifiers!=null||(g.specifiers=[]);let S=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),S.exported=this.parseModuleExportName(),x.specifiers.push(this.finishNode(S,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(x){if(this.match(5)){let g=x;g.specifiers||(g.specifiers=[]);let S=g.exportKind==="type";return g.specifiers.push(...this.parseExportSpecifiers(S)),g.source=null,g.declaration=null,this.hasPlugin("importAssertions")&&(g.assertions=[]),!0}return!1}maybeParseExportDeclaration(x){return this.shouldParseExportDeclaration()?(x.specifiers=[],x.source=null,this.hasPlugin("importAssertions")&&(x.assertions=[]),x.declaration=this.parseExportDeclaration(x),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let x=this.nextTokenInLineStart();return this.isUnparsedContextual(x,"function")}parseExportDefaultExpression(){let x=this.startNode();if(this.match(68))return this.next(),this.parseFunction(x,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(x,13);if(this.match(80))return this.parseClass(x,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);let g=this.parseMaybeAssignAllowIn();return this.semicolon(),g}parseExportDeclaration(x){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:x}=this.state;if(ce(x)){if(x===95&&!this.state.containsEsc||x===100)return!1;if((x===130||x===129)&&!this.state.containsEsc){let{type:$}=this.lookahead();if(ce($)&&$!==98||$===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let g=this.nextTokenStart(),S=this.isUnparsedContextual(g,"from");if(this.input.charCodeAt(g)===44||ce(this.state.type)&&S)return!0;if(this.match(65)&&S){let $=this.input.charCodeAt(this.nextTokenStartSince(g+4));return $===34||$===39}return!1}parseExportFrom(x,g){this.eatContextual(98)?(x.source=this.parseImportSource(),this.checkExport(x),this.maybeParseImportAttributes(x),this.checkJSONModuleImport(x)):g&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:x}=this.state;return x===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):x===74||x===75||x===68||x===80||this.isLet()||this.isAsyncFunction()}checkExport(x,g,S,$){if(g){var N;if(S){if(this.checkDuplicateExports(x,"default"),this.hasPlugin("exportDefaultFrom")){var H;let q=x.declaration;q.type==="Identifier"&&q.name==="from"&&q.end-q.start===4&&!((H=q.extra)!=null&&H.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,q)}}else if((N=x.specifiers)!=null&&N.length)for(let q of x.specifiers){let{exported:Z}=q,ie=Z.type==="Identifier"?Z.name:Z.value;if(this.checkDuplicateExports(q,ie),!$&&q.local){let{local:ne}=q;ne.type!=="Identifier"?this.raise(v.ExportBindingIsString,q,{localName:ne.value,exportName:ie}):(this.checkReservedWord(ne.name,ne.loc.start,!0,!1),this.scope.checkLocalExport(ne))}}else if(x.declaration){let q=x.declaration;if(q.type==="FunctionDeclaration"||q.type==="ClassDeclaration"){let{id:Z}=q;if(!Z)throw new Error("Assertion failure");this.checkDuplicateExports(x,Z.name)}else if(q.type==="VariableDeclaration")for(let Z of q.declarations)this.checkDeclaration(Z.id)}}}checkDeclaration(x){if(x.type==="Identifier")this.checkDuplicateExports(x,x.name);else if(x.type==="ObjectPattern")for(let g of x.properties)this.checkDeclaration(g);else if(x.type==="ArrayPattern")for(let g of x.elements)g&&this.checkDeclaration(g);else x.type==="ObjectProperty"?this.checkDeclaration(x.value):x.type==="RestElement"?this.checkDeclaration(x.argument):x.type==="AssignmentPattern"&&this.checkDeclaration(x.left)}checkDuplicateExports(x,g){this.exportedIdentifiers.has(g)&&(g==="default"?this.raise(v.DuplicateDefaultExport,x):this.raise(v.DuplicateExport,x,{exportName:g})),this.exportedIdentifiers.add(g)}parseExportSpecifiers(x){let g=[],S=!0;for(this.expect(5);!this.eat(8);){if(S)S=!1;else if(this.expect(12),this.eat(8))break;let $=this.isContextual(130),N=this.match(133),H=this.startNode();H.local=this.parseModuleExportName(),g.push(this.parseExportSpecifier(H,N,x,$))}return g}parseExportSpecifier(x,g,S,$){return this.eatContextual(93)?x.exported=this.parseModuleExportName():g?x.exported=Yc(x.local):x.exported||(x.exported=fs(x.local)),this.finishNode(x,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let x=this.parseStringLiteral(this.state.value),g=XU.exec(x.value);return g&&this.raise(v.ModuleExportNameHasLoneSurrogate,x,{surrogateCharCode:g[0].charCodeAt(0)}),x}return this.parseIdentifier(!0)}isJSONModuleImport(x){return x.assertions!=null?x.assertions.some(({key:g,value:S})=>S.value==="json"&&(g.type==="Identifier"?g.name==="type":g.value==="type")):!1}checkImportReflection(x){let{specifiers:g}=x,S=g.length===1?g[0].type:null;if(x.phase==="source")S!=="ImportDefaultSpecifier"&&this.raise(v.SourcePhaseImportRequiresDefault,g[0].loc.start);else if(x.phase==="defer")S!=="ImportNamespaceSpecifier"&&this.raise(v.DeferImportRequiresNamespace,g[0].loc.start);else if(x.module){var $;S!=="ImportDefaultSpecifier"&&this.raise(v.ImportReflectionNotBinding,g[0].loc.start),(($=x.assertions)==null?void 0:$.length)>0&&this.raise(v.ImportReflectionHasAssertion,g[0].loc.start)}}checkJSONModuleImport(x){if(this.isJSONModuleImport(x)&&x.type!=="ExportAllDeclaration"){let{specifiers:g}=x;if(g!=null){let S=g.find($=>{let N;if($.type==="ExportSpecifier"?N=$.local:$.type==="ImportSpecifier"&&(N=$.imported),N!==void 0)return N.type==="Identifier"?N.name!=="default":N.value!=="default"});S!==void 0&&this.raise(v.ImportJSONBindingNotDefault,S.loc.start)}}}isPotentialImportPhase(x){return x?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(x,g,S,$){g||(S==="module"?(this.expectPlugin("importReflection",$),x.module=!0):this.hasPlugin("importReflection")&&(x.module=!1),S==="source"?(this.expectPlugin("sourcePhaseImports",$),x.phase="source"):S==="defer"?(this.expectPlugin("deferredImportEvaluation",$),x.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(x.phase=null))}parseMaybeImportPhase(x,g){if(!this.isPotentialImportPhase(g))return this.applyImportPhase(x,g,null),null;let S=this.parseIdentifier(!0),{type:$}=this.state;return(ke($)?$!==98||this.lookaheadCharCode()===102:$!==12)?(this.resetPreviousIdentifierLeadingComments(S),this.applyImportPhase(x,g,S.name,S.loc.start),null):(this.applyImportPhase(x,g,null),S)}isPrecedingIdImportPhase(x){let{type:g}=this.state;return ce(g)?g!==98||this.lookaheadCharCode()===102:g!==12}parseImport(x){return this.match(133)?this.parseImportSourceAndAttributes(x):this.parseImportSpecifiersAndAfter(x,this.parseMaybeImportPhase(x,!1))}parseImportSpecifiersAndAfter(x,g){x.specifiers=[];let S=!this.maybeParseDefaultImportSpecifier(x,g)||this.eat(12),$=S&&this.maybeParseStarImportSpecifier(x);return S&&!$&&this.parseNamedImportSpecifiers(x),this.expectContextual(98),this.parseImportSourceAndAttributes(x)}parseImportSourceAndAttributes(x){return x.specifiers!=null||(x.specifiers=[]),x.source=this.parseImportSource(),this.maybeParseImportAttributes(x),this.checkImportReflection(x),this.checkJSONModuleImport(x),this.semicolon(),this.finishNode(x,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(x,g,S){g.local=this.parseIdentifier(),x.specifiers.push(this.finishImportSpecifier(g,S))}finishImportSpecifier(x,g,S=8201){return this.checkLVal(x.local,{in:{type:g},binding:S}),this.finishNode(x,g)}parseImportAttributes(){this.expect(5);let x=[],g=new Set;do{if(this.match(8))break;let S=this.startNode(),$=this.state.value;if(g.has($)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:$}),g.add($),this.match(133)?S.key=this.parseStringLiteral($):S.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return this.expect(8),x}parseModuleAttributes(){let x=[],g=new Set;do{let S=this.startNode();if(S.key=this.parseIdentifier(!0),S.key.name!=="type"&&this.raise(v.ModuleAttributeDifferentFromType,S.key),g.has(S.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,S.key,{key:S.key.name}),g.add(S.key.name),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return x}maybeParseImportAttributes(x){let g,S=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?g=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),g=this.parseImportAttributes()),S=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(x,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),g=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))g=[];else if(this.hasPlugin("moduleAttributes"))g=[];else return;!S&&this.hasPlugin("importAssertions")?x.assertions=g:x.attributes=g}maybeParseDefaultImportSpecifier(x,g){if(g){let S=this.startNodeAtNode(g);return S.local=g,x.specifiers.push(this.finishImportSpecifier(S,"ImportDefaultSpecifier")),!0}else if(ke(this.state.type))return this.parseImportSpecifierLocal(x,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(x){if(this.match(55)){let g=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(x,g,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(x){let g=!0;for(this.expect(5);!this.eat(8);){if(g)g=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let S=this.startNode(),$=this.match(133),N=this.isContextual(130);S.imported=this.parseModuleExportName();let H=this.parseImportSpecifier(S,$,x.importKind==="type"||x.importKind==="typeof",N,void 0);x.specifiers.push(H)}}parseImportSpecifier(x,g,S,$,N){if(this.eatContextual(93))x.local=this.parseIdentifier();else{let{imported:H}=x;if(g)throw this.raise(v.ImportBindingIsString,x,{importName:H.value});this.checkReservedWord(H.name,x.loc.start,!0,!0),x.local||(x.local=fs(H))}return this.finishImportSpecifier(x,"ImportSpecifier",N)}isThisParam(x){return x.type==="Identifier"&&x.name==="this"}},z_=class extends QU{constructor(x,g){x=ym(x),super(x,g),this.options=x,this.initializeScopes(),this.plugins=ZU(this.options.plugins),this.filename=x.sourceFilename}getScopeHandler(){return de}parse(){this.enterInitialScopes();let x=this.startNode(),g=this.startNode();return this.nextToken(),x.errors=null,this.parseTopLevel(x,g),x.errors=this.state.errors,x.comments.length=this.state.commentsLen,x}};function ZU(x){let g=new Map;for(let S of x){let[$,N]=Array.isArray(S)?S:[S,{}];g.has($)||g.set($,N||{})}return g}function eW(x,g){var S;if(((S=g)==null?void 0:S.sourceType)==="unambiguous"){g=Object.assign({},g);try{g.sourceType="module";let $=xf(g,x),N=$.parse();if($.sawUnambiguousESM)return N;if($.ambiguousScriptDifferentAst)try{return g.sourceType="script",xf(g,x).parse()}catch{}else N.program.sourceType="script";return N}catch($){try{return g.sourceType="script",xf(g,x).parse()}catch{}throw $}}else return xf(g,x).parse()}function tW(x,g){let S=xf(g,x);return S.options.strictMode&&(S.state.strict=!0),S.getExpression()}function rW(x){let g={};for(let S of Object.keys(x))g[S]=Te(x[S]);return g}var nW=rW(be);function xf(x,g){let S=z_;return x!=null&&x.plugins&&(Pi(x.plugins),S=iW(x.plugins)),new S(x,g)}var H_={};function iW(x){let g=Bs.filter(N=>Yt(x,N)),S=g.join("/"),$=H_[S];if(!$){$=z_;for(let N of g)$=Rs[N]($);H_[S]=$}return $}e.parse=eW,e.parseExpression=tW,e.tokTypes=nW}),uj={};uhe(uj,{parsers:()=>mde});var CO=oj(aj());function cj(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},EO=Dhe;function Ehe(e){return Array.isArray(e)&&e.length>0}var n2=Ehe;function Gs(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(Gs(s),i):i}function il(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function Che(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var Ahe=Che,The=Ahe(["Block","CommentBlock","MultiLine"]),CC=The;function khe(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var CO=khe;function _he(e){return CC(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)}var $he=_he,Nf=null;function _p(e){if(Nf!==null&&typeof Nf.property){let t=Nf;return Nf=_p.prototype=null,t}return Nf=_p.prototype=e??Object.create(null),new _p}var Lhe=10;for(let e=0;e<=Lhe;e++)_p();function Phe(e){return _p(e)}function Fhe(e,t="type"){Phe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var Ohe=Fhe,Nhe={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:["members"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]},Mhe=Ohe(Nhe),Ihe=Mhe;function AC(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let n=0;n{var o;(o=s.leadingComments)!=null&&o.some($he)&&i.add(Gs(s))}),e=_S(e,s=>{if(s.type==="ParenthesizedExpression"){let{expression:o}=s;if(o.type==="TypeCastExpression")return o.range=[...s.range],o;let a=Gs(s);if(!i.has(a))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=_S(e,i=>{var s;switch(i.type){case"LogicalExpression":if(cj(i))return TC(i);break;case"VariableDeclaration":{let o=EO(!1,i.declarations,-1);o!=null&&o.init&&n[il(o)]!==";"&&(i.range=[Gs(i),il(o)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let o=Gs(i);i.name={type:"Identifier",name:i.name,range:[o,o+i.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(r==="meriyah"&&((s=i.exported)==null?void 0:s.type)==="Identifier"){let{exported:o}=i,a=n.slice(Gs(o),il(o));(a.startsWith('"')||a.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:a})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),n2(e.comments)){let i=EO(!1,e.comments,-1);for(let s=e.comments.length-2;s>=0;s--){let o=e.comments[s];il(o)===Gs(i)&&CC(o)&&CC(i)&&CO(o)&&CO(i)&&(e.comments.splice(s+1,1),o.value+="*//*"+i.value,o.range=[Gs(o),il(i)]),i=o}}return e.type==="Program"&&(e.range=[0,n.length]),e}function cj(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function TC(e){return cj(e)?TC({type:"LogicalExpression",operator:e.operator,left:TC({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Gs(e.left),il(e.right.left)]}),right:e.right.right,range:[Gs(e),il(e)]}):e}var Bhe=Rhe;function jhe(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var hj=jhe;function zhe(e){let{message:t,loc:{line:r,column:n},reasonCode:i}=e,s=e;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(t="Unexpected token.",s=void 0);let o=` (${r}:${n})`;return t.endsWith(o)&&(t=t.slice(0,-o.length)),hj(t,{loc:{start:{line:r,column:n+1}},cause:s})}var dj=zhe,Hhe=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},sy=Hhe,Uhe=/\*\/$/,Whe=/^\/\*\*?/,Vhe=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Ghe=/(^|\s+)\/\/([^\n\r]*)/g,AO=/^(\r?\n)+/,qhe=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,TO=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Khe=/(\r?\n|^) *\* ?/g,Jhe=[];function Xhe(e){let t=e.match(Vhe);return t?t[0].trimStart():""}function Yhe(e){let t=` -`;e=sy(!1,e.replace(Whe,"").replace(Uhe,""),Khe,"$1");let r="";for(;r!==e;)r=e,e=sy(!1,e,qhe,`${t}$1 $2${t}`);e=e.replace(AO,"").trimEnd();let n=Object.create(null),i=sy(!1,e,TO,"").replace(AO,"").trimEnd(),s;for(;s=TO.exec(e);){let o=sy(!1,s[2],Ghe,"");if(typeof n[s[1]]=="string"||Array.isArray(n[s[1]])){let a=n[s[1]];n[s[1]]=[...Jhe,...Array.isArray(a)?a:[a],o]}else n[s[1]]=o}return{comments:i,pragmas:n}}function Qhe(e){let t=uj(e);t&&(e=e.slice(t.length+1));let r=Xhe(e),{pragmas:n,comments:i}=Yhe(r);return{shebang:t,text:e,pragmas:n,comments:i}}function Zhe(e){let{pragmas:t}=Qhe(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function ede(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:Zhe,locStart:Gs,locEnd:il,...e}}var ip=ede;function tde(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var rde=tde;function nde(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:o}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:o,type:r,node:e,range:[0,i.length],rootMarker:n}}var fj=nde,Vd=e=>ip(lde(e)),ide={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],"recordAndTuple"],tokens:!0,ranges:!0},kO="v8intrinsic",_O=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],Sa=(e,t=ide)=>({...t,plugins:[...t.plugins,...e]}),sde=/@(?:no)?flow\b/u;function ode(e,t){var r;if((r=t.filepath)!=null&&r.endsWith(".js.flow"))return!0;let n=uj(e);n&&(e=e.slice(n.length));let i=bhe(e,0);return i!==!1&&(e=e.slice(0,i)),sde.test(e)}function ade(e,t,r){let n=e(t,r),i=n.errors.find(s=>!ude.has(s.reasonCode));if(i)throw i;return n}function lde({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if((n.parser==="babel"||n.parser==="__babel_estree")&&ode(r,n))return n.parser="babel-flow",gj.parse(r,n);let i=t;(n.__babelSourceType??rde(n))==="script"&&(i=i.map(l=>({...l,sourceType:"script"})));let s=/%[A-Z]/u.test(r);r.includes("|>")?i=(s?[..._O,kO]:_O).flatMap(l=>i.map(u=>Sa([l],u))):s&&(i=i.map(l=>Sa([kO],l)));let o=e?DO.parseExpression:DO.parse,a;try{a=whe(i.map(l=>()=>ade(o,r,l)))}catch({errors:[l]}){throw dj(l)}return e&&(a=fj(a,{text:r,rootMarker:n.rootMarker})),Bhe(a,{parser:"babel",text:r})}}var ude=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),pj=[Sa(["jsx"])],$O=Vd({optionsCombinations:pj}),LO=Vd({optionsCombinations:[Sa(["jsx","typescript"]),Sa(["typescript"])]}),PO=Vd({isExpression:!0,optionsCombinations:[Sa(["jsx"])]}),FO=Vd({isExpression:!0,optionsCombinations:[Sa(["typescript"])]}),gj=Vd({optionsCombinations:[Sa(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),cde=Vd({optionsCombinations:pj.map(e=>Sa(["estree"],e))}),hde={babel:$O,"babel-flow":gj,"babel-ts":LO,__js_expression:PO,__ts_expression:FO,__vue_expression:PO,__vue_ts_expression:FO,__vue_event_binding:$O,__vue_ts_event_binding:LO,__babel_estree:cde},dde=ij(sj());function mj(e={}){let{allowComments:t=!0}=e;return function(r){let n;try{n=(0,dde.parseExpression)(r,{tokens:!0,ranges:!0,attachComment:!1})}catch(i){throw dj(i)}if(!t&&n2(n.comments))throw Xa(n.comments[0],"Comment");return mh(n),fj(n,{type:"JsonRoot",text:r})}}function Xa(e,t){let[r,n]=[e.loc.start,e.loc.end].map(({line:i,column:s})=>({line:i,column:s+1}));return hj(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function mh(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)t!==null&&mh(t);return;case"ObjectExpression":for(let t of e.properties)mh(t);return;case"ObjectProperty":if(e.computed)throw Xa(e.key,"Computed key");if(e.shorthand)throw Xa(e.key,"Shorthand property");e.key.type!=="Identifier"&&mh(e.key),mh(e.value);return;case"UnaryExpression":{let{operator:t,argument:r}=e;if(t!=="+"&&t!=="-")throw Xa(e,`Operator '${e.operator}'`);if(r.type==="NumericLiteral"||r.type==="Identifier"&&(r.name==="Infinity"||r.name==="NaN"))return;throw Xa(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if(e.name!=="Infinity"&&e.name!=="NaN"&&e.name!=="undefined")throw Xa(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(n2(e.expressions))throw Xa(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)mh(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Xa(e,`'${e.type}'`)}}var $S=mj(),fde={json:ip({parse:$S,hasPragma(){return!0}}),json5:ip($S),jsonc:ip($S),"json-stringify":ip({parse:mj({allowComments:!1}),astFormat:"estree-json"})},pde=fde,gde={...hde,...pde},mde=aj,yde=Object.defineProperty,yj=e=>{throw TypeError(e)},qb=(e,t)=>{for(var r in t)yde(e,r,{get:t[r],enumerable:!0})},vj=(e,t,r)=>t.has(e)||yj("Cannot "+r),Wa=(e,t,r)=>(vj(e,t,"read from private field"),t.get(e)),vde=(e,t,r)=>t.has(e)?yj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bde=(e,t,r,n)=>(vj(e,t,"write to private field"),t.set(e,r),r),bj={};qb(bj,{languages:()=>Eve,options:()=>Sve,printers:()=>Dve});var xde=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}],xj={};qb(xj,{canAttachComment:()=>Ape,embed:()=>fge,experimentalFeatures:()=>fve,getCommentChildNodes:()=>Tpe,getVisitorKeys:()=>Dj,handleComments:()=>Wj,insertPragma:()=>Age,isBlockComment:()=>Ls,isGap:()=>kpe,massageAstNode:()=>Cfe,print:()=>dve,printComment:()=>Wfe,willPrintOwnComments:()=>ez});var wde=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},On=wde,Sde=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},nr=Sde;function Dde(e){return e!==null&&typeof e=="object"}var Ede=Dde;function*Cde(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>Ede(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*Ade(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function _de(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function $de(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Lde=e=>!(_de(e)||$de(e)),Pde=/[^\x20-\x7F]/u;function Fde(e){if(!e)return 0;if(!Pde.test(e))return e.length;e=e.replace(kde()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=Lde(n)?1:2)}return t}var pd=Fde;function i2(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},TO=Ehe;function Che(e){return Array.isArray(e)&&e.length>0}var i2=Che;function Js(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(Js(s),i):i}function ol(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function The(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var Ahe=The,khe=Ahe(["Block","CommentBlock","MultiLine"]),EC=khe;function _he(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var AO=_he;function $he(e){return EC(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)}var Lhe=$he,Nf=null;function Lp(e){if(Nf!==null&&typeof Nf.property){let t=Nf;return Nf=Lp.prototype=null,t}return Nf=Lp.prototype=e??Object.create(null),new Lp}var Phe=10;for(let e=0;e<=Phe;e++)Lp();function Fhe(e){return Lp(e)}function Ohe(e,t="type"){Fhe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var Ihe=Ohe,Mhe={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:["members"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]},Nhe=Ihe(Mhe),Rhe=Nhe;function CC(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let n=0;n{var o;(o=s.leadingComments)!=null&&o.some(Lhe)&&i.add(Js(s))}),e=kS(e,s=>{if(s.type==="ParenthesizedExpression"){let{expression:o}=s;if(o.type==="TypeCastExpression")return o.range=[...s.range],o;let a=Js(s);if(!i.has(a))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=kS(e,i=>{var s;switch(i.type){case"LogicalExpression":if(dj(i))return TC(i);break;case"VariableDeclaration":{let o=TO(!1,i.declarations,-1);o!=null&&o.init&&n[ol(o)]!==";"&&(i.range=[Js(i),ol(o)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let o=Js(i);i.name={type:"Identifier",name:i.name,range:[o,o+i.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(r==="meriyah"&&((s=i.exported)==null?void 0:s.type)==="Identifier"){let{exported:o}=i,a=n.slice(Js(o),ol(o));(a.startsWith('"')||a.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:a})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),i2(e.comments)){let i=TO(!1,e.comments,-1);for(let s=e.comments.length-2;s>=0;s--){let o=e.comments[s];ol(o)===Js(i)&&EC(o)&&EC(i)&&AO(o)&&AO(i)&&(e.comments.splice(s+1,1),o.value+="*//*"+i.value,o.range=[Js(o),ol(i)]),i=o}}return e.type==="Program"&&(e.range=[0,n.length]),e}function dj(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function TC(e){return dj(e)?TC({type:"LogicalExpression",operator:e.operator,left:TC({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Js(e.left),ol(e.right.left)]}),right:e.right.right,range:[Js(e),ol(e)]}):e}var jhe=Bhe;function zhe(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var fj=zhe;function Hhe(e){let{message:t,loc:{line:r,column:n},reasonCode:i}=e,s=e;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(t="Unexpected token.",s=void 0);let o=` (${r}:${n})`;return t.endsWith(o)&&(t=t.slice(0,-o.length)),fj(t,{loc:{start:{line:r,column:n+1}},cause:s})}var pj=Hhe,Uhe=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},sy=Uhe,Whe=/\*\/$/,Vhe=/^\/\*\*?/,Ghe=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,qhe=/(^|\s+)\/\/([^\n\r]*)/g,kO=/^(\r?\n)+/,Khe=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,_O=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Jhe=/(\r?\n|^) *\* ?/g,Xhe=[];function Yhe(e){let t=e.match(Ghe);return t?t[0].trimStart():""}function Qhe(e){let t=` +`;e=sy(!1,e.replace(Vhe,"").replace(Whe,""),Jhe,"$1");let r="";for(;r!==e;)r=e,e=sy(!1,e,Khe,`${t}$1 $2${t}`);e=e.replace(kO,"").trimEnd();let n=Object.create(null),i=sy(!1,e,_O,"").replace(kO,"").trimEnd(),s;for(;s=_O.exec(e);){let o=sy(!1,s[2],qhe,"");if(typeof n[s[1]]=="string"||Array.isArray(n[s[1]])){let a=n[s[1]];n[s[1]]=[...Xhe,...Array.isArray(a)?a:[a],o]}else n[s[1]]=o}return{comments:i,pragmas:n}}function Zhe(e){let t=hj(e);t&&(e=e.slice(t.length+1));let r=Yhe(e),{pragmas:n,comments:i}=Qhe(r);return{shebang:t,text:e,pragmas:n,comments:i}}function ede(e){let{pragmas:t}=Zhe(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function tde(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:ede,locStart:Js,locEnd:ol,...e}}var op=tde;function rde(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var nde=rde;function ide(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:o}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:o,type:r,node:e,range:[0,i.length],rootMarker:n}}var gj=ide,qd=e=>op(ude(e)),sde={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],"recordAndTuple"],tokens:!0,ranges:!0},$O="v8intrinsic",LO=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],Ea=(e,t=sde)=>({...t,plugins:[...t.plugins,...e]}),ode=/@(?:no)?flow\b/u;function ade(e,t){var r;if((r=t.filepath)!=null&&r.endsWith(".js.flow"))return!0;let n=hj(e);n&&(e=e.slice(n.length));let i=xhe(e,0);return i!==!1&&(e=e.slice(0,i)),ode.test(e)}function lde(e,t,r){let n=e(t,r),i=n.errors.find(s=>!cde.has(s.reasonCode));if(i)throw i;return n}function ude({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if((n.parser==="babel"||n.parser==="__babel_estree")&&ade(r,n))return n.parser="babel-flow",yj.parse(r,n);let i=t;(n.__babelSourceType??nde(n))==="script"&&(i=i.map(l=>({...l,sourceType:"script"})));let s=/%[A-Z]/u.test(r);r.includes("|>")?i=(s?[...LO,$O]:LO).flatMap(l=>i.map(u=>Ea([l],u))):s&&(i=i.map(l=>Ea([$O],l)));let o=e?CO.parseExpression:CO.parse,a;try{a=She(i.map(l=>()=>lde(o,r,l)))}catch({errors:[l]}){throw pj(l)}return e&&(a=gj(a,{text:r,rootMarker:n.rootMarker})),jhe(a,{parser:"babel",text:r})}}var cde=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),mj=[Ea(["jsx"])],PO=qd({optionsCombinations:mj}),FO=qd({optionsCombinations:[Ea(["jsx","typescript"]),Ea(["typescript"])]}),OO=qd({isExpression:!0,optionsCombinations:[Ea(["jsx"])]}),IO=qd({isExpression:!0,optionsCombinations:[Ea(["typescript"])]}),yj=qd({optionsCombinations:[Ea(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),hde=qd({optionsCombinations:mj.map(e=>Ea(["estree"],e))}),dde={babel:PO,"babel-flow":yj,"babel-ts":FO,__js_expression:OO,__ts_expression:IO,__vue_expression:OO,__vue_ts_expression:IO,__vue_event_binding:PO,__vue_ts_event_binding:FO,__babel_estree:hde},fde=oj(aj());function vj(e={}){let{allowComments:t=!0}=e;return function(r){let n;try{n=(0,fde.parseExpression)(r,{tokens:!0,ranges:!0,attachComment:!1})}catch(i){throw pj(i)}if(!t&&i2(n.comments))throw Qa(n.comments[0],"Comment");return vh(n),gj(n,{type:"JsonRoot",text:r})}}function Qa(e,t){let[r,n]=[e.loc.start,e.loc.end].map(({line:i,column:s})=>({line:i,column:s+1}));return fj(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function vh(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)t!==null&&vh(t);return;case"ObjectExpression":for(let t of e.properties)vh(t);return;case"ObjectProperty":if(e.computed)throw Qa(e.key,"Computed key");if(e.shorthand)throw Qa(e.key,"Shorthand property");e.key.type!=="Identifier"&&vh(e.key),vh(e.value);return;case"UnaryExpression":{let{operator:t,argument:r}=e;if(t!=="+"&&t!=="-")throw Qa(e,`Operator '${e.operator}'`);if(r.type==="NumericLiteral"||r.type==="Identifier"&&(r.name==="Infinity"||r.name==="NaN"))return;throw Qa(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if(e.name!=="Infinity"&&e.name!=="NaN"&&e.name!=="undefined")throw Qa(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(i2(e.expressions))throw Qa(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)vh(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Qa(e,`'${e.type}'`)}}var _S=vj(),pde={json:op({parse:_S,hasPragma(){return!0}}),json5:op(_S),jsonc:op(_S),"json-stringify":op({parse:vj({allowComments:!1}),astFormat:"estree-json"})},gde=pde,mde={...dde,...gde},yde=uj,vde=Object.defineProperty,bj=e=>{throw TypeError(e)},Gb=(e,t)=>{for(var r in t)vde(e,r,{get:t[r],enumerable:!0})},xj=(e,t,r)=>t.has(e)||bj("Cannot "+r),Ga=(e,t,r)=>(xj(e,t,"read from private field"),t.get(e)),bde=(e,t,r)=>t.has(e)?bj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),xde=(e,t,r,n)=>(xj(e,t,"write to private field"),t.set(e,r),r),wj={};Gb(wj,{languages:()=>Cve,options:()=>Dve,printers:()=>Eve});var wde=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}],Sj={};Gb(Sj,{canAttachComment:()=>Ape,embed:()=>pge,experimentalFeatures:()=>pve,getCommentChildNodes:()=>kpe,getVisitorKeys:()=>Cj,handleComments:()=>Gj,insertPragma:()=>Age,isBlockComment:()=>Os,isGap:()=>_pe,massageAstNode:()=>Tfe,print:()=>fve,printComment:()=>Vfe,willPrintOwnComments:()=>rz});var Sde=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},Nn=Sde,Dde=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},or=Dde;function Ede(e){return e!==null&&typeof e=="object"}var Cde=Ede;function*Tde(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>Cde(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*Ade(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function $de(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Lde(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Pde=e=>!($de(e)||Lde(e)),Fde=/[^\x20-\x7F]/u;function Ode(e){if(!e)return 0;if(!Fde.test(e))return e.length;e=e.replace(_de()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=Pde(n)?1:2)}return t}var md=Ode;function s2(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o0}var ir=zde,oy="'",OO='"';function Hde(e,t){let r=t===!0||t===oy?oy:OO,n=r===oy?OO:oy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var wj=Hde;function Ude(e,t,r){let n=t==='"'?"'":'"',i=On(!1,e,/\\(.)|(["'])/gsu,(s,o,a)=>o===n?o:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return t+i+t}var Wde=Ude;function Vde(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":wj(r,t.singleQuote);return Wde(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var yd=Vde;function Rr(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(Rr(s),i):i}function Xt(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function Kb(e,t){let r=Rr(e);return Number.isInteger(r)&&r===Rr(t)}function Gde(e,t){let r=Xt(e);return Number.isInteger(r)&&r===Xt(t)}function qde(e,t){return Kb(e,t)&&Gde(e,t)}var Mf=null;function $p(e){if(Mf!==null&&typeof Mf.property){let t=Mf;return Mf=$p.prototype=null,t}return Mf=$p.prototype=e??Object.create(null),new $p}var Kde=10;for(let e=0;e<=Kde;e++)$p();function Jde(e){return $p(e)}function Xde(e,t="type"){Jde(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var Sj=Xde,Yde={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:["members"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]},Qde=Sj(Yde),Dj=Qde;function Zde(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var yr=Zde,efe=yr(["Block","CommentBlock","MultiLine"]),Ls=efe,tfe=yr(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Ej=tfe;function rfe(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let i=r[n];if(n===0)return e.type==="Identifier"&&e.name===i;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==i)return!1;e=e.object}}function nfe(e,t){return t.some(r=>rfe(e,r))}var ife=nfe;function sfe({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Cj=sfe;function kC(e,t){return t(e)||Tde(e,{getVisitorKeys:Dj,predicate:t})}function l2(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||Zt(e)||qr(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Ao(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function ofe(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Aj(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var Jb=yr(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),afe=yr(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),jn=yr(["ArrayExpression","TupleExpression"]),lo=yr(["ObjectExpression","RecordExpression"]);function lfe(e){return e.type==="LogicalExpression"&&e.operator==="??"}function Da(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function Tj(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&Da(e.argument)}function vi(e){return!!(e&&(e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"))}function kj(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var u2=yr(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),ufe=yr(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),Il=yr(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),mg=yr(["FunctionExpression","ArrowFunctionExpression"]);function cfe(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function LS(e){return Zt(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var Dn=yr(["JSXElement","JSXFragment"]);function Xb(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function _j(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function hfe(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!Kb(e,e.typeAnnotation)}var Ea=yr(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function yh(e){return qr(e)||e.type==="BindExpression"&&!!e.object}var dfe=yr(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function c2(e){return Cj(e)||Ej(e)||dfe(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters&&!e.typeArguments}function ffe(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}var pfe=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function gfe(e){return ife(e,pfe)}function Yb(e,t){if((e==null?void 0:e.type)!=="CallExpression"||e.optional)return!1;let r=Ps(e);if(r.length===1){if(LS(e)&&Yb(t))return mg(r[0]);if(ffe(e.callee))return LS(r[0])}else if((r.length===2||r.length===3)&&(r[0].type==="TemplateLiteral"||vi(r[0]))&&gfe(e.callee))return r[2]&&!Da(r[2])?!1:(r.length===2?mg(r[1]):cfe(r[1])&&ri(r[1]).length<=1)||LS(r[1]);return!1}var $j=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),Zt=$j(yr(["CallExpression","OptionalCallExpression"])),qr=$j(yr(["MemberExpression","OptionalMemberExpression"]));function NO(e,t=5){return Lj(e,t)<=t}function Lj(e,t){let r=0;for(let n in e){let i=e[n];if(i&&typeof i=="object"&&typeof i.type=="string"&&(r++,r+=Lj(i,t-r)),r>t)return r}return r}var mfe=.25;function h2(e,t){let{printWidth:r}=t;if(We(e))return!1;let n=r*mfe;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Tj(e)&&!We(e.argument))return!0;let i=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return i?i.length<=n:vi(e)?yd(Ts(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` -`):e.type==="UnaryExpression"?h2(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:u2(e)}function ic(e,t){return Dn(t)?Qb(t):We(t,tt.Leading,r=>es(e,Xt(r)))}function MO(e){return e.quasis.some(t=>t.value.raw.includes(` -`))}function Pj(e,t){return(e.type==="TemplateLiteral"&&MO(e)||e.type==="TaggedTemplateExpression"&&MO(e.quasi))&&!es(t,Rr(e),{backwards:!0})}function Fj(e){if(!We(e))return!1;let t=nr(!1,qh(e,tt.Dangling),-1);return t&&!Ls(t)}function yfe(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(mg(r)){if(t+=1,t>1)return!0}else if(Zt(r)){for(let n of Ps(r))if(mg(n))return!0}return!1}function Oj(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&Zt(t)&&Zt(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var vfe=new Set(["!","-","+","~"]);function Ks(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return Ks(e.expression,t);let r=n=>Ks(n,t-1);if(kj(e))return pd(e.pattern??e.regex.pattern)<=5;if(u2(e)||ufe(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` -`))&&e.expressions.every(r);if(lo(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(jn(e))return e.elements.every(n=>n===null||r(n));if(vd(e)){if(e.type==="ImportExpression"||Ks(e.callee,t)){let n=Ps(e);return n.length<=t&&n.every(r)}return!1}return qr(e)?Ks(e.object,t)&&Ks(e.property,t):e.type==="UnaryExpression"&&vfe.has(e.operator)||e.type==="UpdateExpression"?Ks(e.argument,t):!1}function Ts(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function bfe(e){return e}function Ma(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function fi(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return fi(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return fi(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:fi(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:fi(e.callee,t);case"ConditionalExpression":return fi(e.test,t);case"UpdateExpression":return!e.prefix&&fi(e.argument,t);case"BindExpression":return e.object&&fi(e.object,t);case"SequenceExpression":return fi(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return fi(e.expression,t);default:return t(e)}}var IO={"==":!0,"!=":!0,"===":!0,"!==":!0},ay={"*":!0,"/":!0,"%":!0},_C={">>":!0,">>>":!0,"<<":!0};function d2(e,t){return!(a0(t)!==a0(e)||e==="**"||IO[e]&&IO[t]||t==="%"&&ay[e]||e==="%"&&ay[t]||t!==e&&ay[t]&&ay[e]||_C[e]&&_C[t])}var xfe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function a0(e){return xfe.get(e)}function wfe(e){return!!_C[e]||e==="|"||e==="^"||e==="&"}function Sfe(e){var t;if(e.rest)return!0;let r=ri(e);return((t=nr(!1,r,-1))==null?void 0:t.type)==="RestElement"}var PS=new WeakMap;function ri(e){if(PS.has(e))return PS.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),PS.set(e,t),t}function Dfe(e,t){let{node:r}=e,n=0,i=s=>t(s,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}var FS=new WeakMap;function Ps(e){if(FS.has(e))return FS.get(e);if(e.type==="ChainExpression")return Ps(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),FS.set(e,t),t}function l0(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>l0(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function RO(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function u0(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function Qb(e){return(e==null?void 0:e.prettierIgnore)||We(e,tt.PrettierIgnore)}var tt={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Nj=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,i)=>!(e&tt.Leading&&!r.leading||e&tt.Trailing&&!r.trailing||e&tt.Dangling&&(r.leading||r.trailing)||e&tt.Block&&!Ls(r)||e&tt.Line&&!Jb(r)||e&tt.First&&n!==0||e&tt.Last&&n!==i.length-1||e&tt.PrettierIgnore&&!u0(r)||t&&!t(r))};function We(e,t,r){if(!ir(e==null?void 0:e.comments))return!1;let n=Nj(t,r);return n?e.comments.some(n):!0}function qh(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=Nj(t,r);return n?e.comments.filter(n):e.comments}var Ia=(e,{originalText:t})=>a2(t,Xt(e));function vd(e){return Zt(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Ra(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!Xb(e))}var Ao=yr(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),sc=yr(["UnionTypeAnnotation","TSUnionType"]),Mj=yr(["IntersectionTypeAnnotation","TSIntersectionType"]),Efe=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),ah=e=>{for(let t of e.quasis)delete t.value};function Ij(e,t,r){var n,i;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&e.value&&(t.value=e.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&e.bigint&&(t.bigint=e.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(e.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(e.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty"||e.type==="ImportAttribute")&&e.key&&!e.computed){let{key:o}=e;vi(o)||Da(o)?t.key=String(o.value):o.type==="Identifier"&&(t.key=o.name)}if(e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"))for(let{type:o,expression:a}of t.children)o==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&ah(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&ah(t.value.expression),e.type==="JSXAttribute"&&((n=e.value)==null?void 0:n.type)==="Literal"&&/["']|"|'/u.test(e.value.value)&&(t.value.value=On(!1,e.value.value,/["']|"|'/gu,'"'));let s=e.expression||e.callee;if(e.type==="Decorator"&&s.type==="CallExpression"&&s.callee.name==="Component"&&s.arguments.length===1){let o=e.expression.arguments[0].properties;for(let[a,l]of t.expression.arguments[0].properties.entries())switch(o[a].key.name){case"styles":jn(l.value)&&ah(l.value.elements[0]);break;case"template":l.value.type==="TemplateLiteral"&&ah(l.value);break}}e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&ah(t.quasi),e.type==="TemplateLiteral"&&((i=e.leadingComments)!=null&&i.some(o=>Ls(o)&&["GraphQL","HTML"].some(a=>o.value===` ${a} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&ah(t),e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&(t.type="TSNonNullExpression",t.expression.type="ChainExpression"),e.type==="TSMappedType"&&(delete t.key,delete t.constraint),e.type==="TSEnumDeclaration"&&delete t.body}Ij.ignoredProperties=Efe;var Cfe=Ij,Gd="string",Rl="array",qd="cursor",Tc="indent",kc="align",Kd="trim",ks="group",nu="fill",Lo="if-break",_c="indent-if-break",$c="line-suffix",Lc="line-suffix-boundary",ls="line",iu="label",su="break-parent",Rj=new Set([qd,Tc,kc,Kd,ks,nu,Lo,_c,$c,Lc,ls,iu,su]);function Afe(e){if(typeof e=="string")return Gd;if(Array.isArray(e))return Rl;if(!e)return;let{type:t}=e;if(Rj.has(t))return t}var Jd=Afe,Tfe=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function kfe(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(Jd(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Tfe([...Rj].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var _fe=class extends Error{constructor(r){super(kfe(r));qo(this,"name","InvalidDocError");this.doc=r}},yg=_fe,BO={};function $fe(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===BO){r(i.pop());continue}r&&i.push(s,BO);let o=Jd(s);if(!o)throw new yg(s);if((t==null?void 0:t(s))!==!1)switch(o){case Rl:case nu:{let a=o===Rl?s:s.parts;for(let l=a.length,u=l-1;u>=0;--u)i.push(a[u]);break}case Lo:i.push(s.flatContents,s.breakContents);break;case ks:if(n&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case kc:case Tc:case _c:case iu:case $c:i.push(s.contents);break;case Gd:case qd:case Kd:case Lc:case ls:case su:break;default:throw new yg(s)}}}var Bj=$fe,Lfe=()=>{},Pfe=Lfe;function Le(e){return{type:Tc,contents:e}}function Fo(e,t){return{type:kc,contents:t,n:e}}function me(e,t={}){return Pfe(t.expandedStates),{type:ks,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ffe(e){return Fo(Number.NEGATIVE_INFINITY,e)}function jj(e){return Fo(-1,e)}function $u(e,t){return me(e[0],{...t,expandedStates:e})}function f2(e){return{type:nu,parts:e}}function _t(e,t="",r={}){return{type:Lo,breakContents:e,flatContents:t,groupId:r.groupId}}function Zb(e,t){return{type:_c,contents:e,groupId:t.groupId,negate:t.negate}}function jO(e){return{type:$c,contents:e}}var Ca={type:Lc},Oo={type:su},zj={type:ls,hard:!0},Ofe={type:ls,hard:!0,literal:!0},Ye={type:ls},_e={type:ls,soft:!0},$e=[zj,Oo],Hj=[Ofe,Oo],zO={type:qd};function Wt(e,t){let r=[];for(let n=0;n0){for(let i=0;i0){let t=nr(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ife(e){let t=new Set,r=[];function n(s){if(s.type===su&&HO(r),s.type===ks){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===ks&&r.pop().break&&HO(r)}Bj(e,n,i,!0)}function Rfe(e){return e.type===ls&&!e.hard?e.soft?"":" ":e.type===Lo?e.flatContents:e}function $C(e){return Xd(e,Rfe)}function Bfe(e){switch(Jd(e)){case nu:if(e.parts.every(t=>t===""))return"";break;case ks:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ks&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case kc:case Tc:case _c:case $c:if(!e.contents)return"";break;case Lo:if(!e.flatContents&&!e.breakContents)return"";break;case Rl:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof nr(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Gd:case qd:case Kd:case Lc:case ls:case iu:case su:break;default:throw new yg(e)}return e}function p2(e){return Xd(e,t=>Bfe(t))}function oc(e,t=Hj){return Xd(e,r=>typeof r=="string"?Wt(t,r.split(` -`)):r)}function jfe(e){if(e.type===ls)return!0}function zfe(e){return Uj(e,jfe,!1)}function LC(e,t){return e.type===iu?{...e,contents:t(e.contents)}:t(e)}function Hfe(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Ufe=Hfe;function Wfe(e,t){let r=e.node;if(Jb(r))return t.originalText.slice(Rr(r),Xt(r)).trimEnd();if(Ls(r))return Ufe(r)?Vfe(r):["/*",oc(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Vfe(e){let t=e.value.split(` -`);return["/*",Wt($e,t.map((r,n)=>n===0?r.trimEnd():" "+(nZfe,ownLine:()=>Qfe,remaining:()=>epe});function Gfe(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function g2(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Gfe(e)}function zn(e,t){t.leading=!0,t.trailing=!1,g2(e,t)}function _s(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),g2(e,t)}function zr(e,t){t.leading=!1,t.trailing=!0,g2(e,t)}function qfe(e,t){let r=null,n=t;for(;n!==r;)r=n,n=gd(e,n),n=s2(e,n),n=o2(e,n),n=md(e,n);return n}var Zg=qfe;function Kfe(e,t){let r=Zg(e,t);return r===!1?"":e.charAt(r)}var uo=Kfe;function Jfe(e,t,r){for(let n=t;nt(e))}function Zfe(e){return[tpe,Jj,Gj,Yj,m2,y2,Vj,qj,Xj,dpe,ppe,b2,bpe,v2,Spe,Dpe].some(t=>t(e))}function epe(e){return[Qj,m2,y2,ipe,cpe,Kj,b2,upe,lpe,wpe,v2,xpe].some(t=>t(e))}function Pc(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?zn(r,t):_s(e,t)}function PC(e,t){e.type==="BlockStatement"?Pc(e,t):zn(e,t)}function tpe({comment:e,followingNode:t}){return t&&Yfe(e)?(zn(t,e),!0):!1}function m2({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(uo(i,Xt(e))===")")return zr(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")zr(t,e);else{let s=Jb(e)||e.loc.start.line===e.loc.end.line,o=e.loc.start.line===t.loc.start.line;s&&o?zr(t,e):_s(r,e)}return!0}return n.type==="BlockStatement"?(Pc(n,e),!0):n.type==="IfStatement"?(PC(n.consequent,e),!0):r.consequent===n?(zn(n,e),!0):!1}function y2({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:uo(i,Xt(e))===")"?(zr(t,e),!0):n.type==="BlockStatement"?(Pc(n,e),!0):r.body===n?(zn(n,e),!0):!1}function Vj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(zr(t,e),!0):n.type==="BlockStatement"?(Pc(n,e),!0):n.type==="TryStatement"?(PC(n.finalizer,e),!0):n.type==="CatchClause"?(PC(n.body,e),!0):!1}function rpe({comment:e,enclosingNode:t,followingNode:r}){return qr(t)&&(r==null?void 0:r.type)==="Identifier"?(zn(t,e),!0):!1}function npe({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(_s(t,e),!0):!1}function Gj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i,options:s}){let o=t&&!Bl(i,Xt(t),Rr(e));return(!t||!o)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?s.experimentalTernaries&&r.alternate===n&&!(Ls(e)&&!Bl(s.originalText,Rr(e),Xt(e)))?(_s(r,e),!0):(zn(n,e),!0):!1}function ipe({comment:e,precedingNode:t,enclosingNode:r}){return Ra(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(zr(r.value.left,e),!0):!1}var spe=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function qj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(spe.has(r==null?void 0:r.type)){if(ir(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return zr(nr(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return Pc(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return zr(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?zr(t,e):_s(r,e,i),!0}}return!1}var ope=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Kj({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&uo(n,Xt(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&uo(n,Xt(t))!==":"||(t==null?void 0:t.type)==="Decorator"&&ope.has(r==null?void 0:r.type)?(zr(t,e),!0):!1}var ape=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function lpe({comment:e,precedingNode:t,enclosingNode:r,text:n}){return uo(n,Xt(e))!=="("?!1:t&&ape.has(r==null?void 0:r.type)?(zr(t,e),!0):!1}function upe({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=Zg(r,Xt(e));return n!==!1&&r.slice(n,n+2)==="=>"?(_s(t,e),!0):!1}function cpe({comment:e,enclosingNode:t,text:r}){return uo(r,Xt(e))!==")"?!1:t&&(Zj(t)&&ri(t).length===0||vd(t)&&Ps(t).length===0)?(_s(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&ri(t.value).length===0?(_s(t.value,e),!0):!1}function hpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(t==null?void 0:t.type)==="ComponentTypeParameter"&&((r==null?void 0:r.type)==="DeclareComponent"||(r==null?void 0:r.type)==="ComponentTypeAnnotation")&&(n==null?void 0:n.type)!=="ComponentTypeParameter"||((t==null?void 0:t.type)==="ComponentParameter"||(t==null?void 0:t.type)==="RestElement")&&(r==null?void 0:r.type)==="ComponentDeclaration"&&uo(i,Xt(e))===")"?(zr(t,e),!0):!1}function Jj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"||((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&Zj(r)&&uo(i,Xt(e))===")"?(zr(t,e),!0):!Ls(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&&Zg(i,Xt(e))===Rr(n)?(Pc(n,e),!0):!1}function Xj({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(zn(t,e),!0):!1}function v2({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(zr(t,e),!0):!1}function dpe({comment:e,precedingNode:t,enclosingNode:r}){return Zt(r)&&t&&r.callee===t&&r.arguments.length>0?(zn(r.arguments[0],e),!0):!1}function fpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return sc(r)?(u0(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(zr(t,e),!0):!1):(sc(n)&&u0(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function ppe({comment:e,enclosingNode:t}){return Ra(t)?(zn(t,e),!0):!1}function b2({comment:e,enclosingNode:t,ast:r,isLastComment:n}){var i;return((i=r==null?void 0:r.body)==null?void 0:i.length)===0?(n?_s(r,e):zn(r,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!ir(t.directives)?(n?_s(t,e):zn(t,e),!0):!1}function gpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(zn(t,e),!0):!1}function Yj({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return zn(r,e),!0;let i=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",s=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(i||s)&&es(n,Xt(e))?(zr(t,e),!0):!1}function mpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(zn(t,e),!0):!1}var ype=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),vpe=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function bpe({comment:e,enclosingNode:t,followingNode:r}){return ype.has(t==null?void 0:t.type)&&r&&(vpe.has(r.type)||Ls(e))?(zn(r,e),!0):!1}function xpe({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&uo(n,Xt(e))===";"?(zr(t,e),!0):!1}function Qj({comment:e,enclosingNode:t,followingNode:r}){if(u0(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function wpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(zn(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(zr(t.constraint,e),!0):!1}function Spe({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&Jb(e)?Pc(r,e):_s(t,e),!0)}function Dpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return sc(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||Mj(r))?(zr(nr(!1,t.types,-1),e),!0):!1}function Epe({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if(((t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern")&&(n==null?void 0:n.type)==="TSTypeAnnotation")return r?zr(r,e):_s(t,e),!0}var Zj=yr(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]),Cpe=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function Ape(e){return!Cpe.has(e.type)}function Tpe(e,t){var r;if((t.parser==="typescript"||t.parser==="flow"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree")&&e.type==="MethodDefinition"&&((r=e.value)==null?void 0:r.type)==="FunctionExpression"&&ri(e.value).length===0&&!e.value.returnType&&!ir(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function ez(e){let{node:t,parent:r}=e;return(Dn(t)||r&&(r.type==="JSXSpreadAttribute"||r.type==="JSXSpreadChild"||sc(r)||(r.type==="ClassDeclaration"||r.type==="ClassExpression")&&r.superClass===t))&&(!Qb(t)||sc(r))}function kpe(e,{parser:t}){if(t==="flow"||t==="babel-flow")return e=On(!1,e,/[\s(]/gu,""),e===""||e==="/*"||e==="/*::"}function _pe(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var vd=Nde;function Rde(e,t,r={}){let n=yd(e,r.backwards?t-1:t,r),i=vd(e,n,r);return n!==i}var ns=Rde;function Bde(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r0}var ar=Hde,oy="'",MO='"';function Ude(e,t){let r=t===!0||t===oy?oy:MO,n=r===oy?MO:oy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var Dj=Ude;function Wde(e,t,r){let n=t==='"'?"'":'"',i=Nn(!1,e,/\\(.)|(["'])/gsu,(s,o,a)=>o===n?o:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return t+i+t}var Vde=Wde;function Gde(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Dj(r,t.singleQuote);return Vde(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var bd=Gde;function jr(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(jr(s),i):i}function Zt(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function qb(e,t){let r=jr(e);return Number.isInteger(r)&&r===jr(t)}function qde(e,t){let r=Zt(e);return Number.isInteger(r)&&r===Zt(t)}function Kde(e,t){return qb(e,t)&&qde(e,t)}var Rf=null;function Pp(e){if(Rf!==null&&typeof Rf.property){let t=Rf;return Rf=Pp.prototype=null,t}return Rf=Pp.prototype=e??Object.create(null),new Pp}var Jde=10;for(let e=0;e<=Jde;e++)Pp();function Xde(e){return Pp(e)}function Yde(e,t="type"){Xde(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var Ej=Yde,Qde={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:["members"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]},Zde=Ej(Qde),Cj=Zde;function efe(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var xr=efe,tfe=xr(["Block","CommentBlock","MultiLine"]),Os=tfe,rfe=xr(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Tj=rfe;function nfe(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let i=r[n];if(n===0)return e.type==="Identifier"&&e.name===i;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==i)return!1;e=e.object}}function ife(e,t){return t.some(r=>nfe(e,r))}var sfe=ife;function ofe({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Aj=ofe;function AC(e,t){return t(e)||kde(e,{getVisitorKeys:Cj,predicate:t})}function u2(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||rr(e)||Jr(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||_o(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function afe(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function kj(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var Kb=xr(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),lfe=xr(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Un=xr(["ArrayExpression","TupleExpression"]),ho=xr(["ObjectExpression","RecordExpression"]);function ufe(e){return e.type==="LogicalExpression"&&e.operator==="??"}function Ca(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function _j(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&Ca(e.argument)}function wi(e){return!!(e&&(e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"))}function $j(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var c2=xr(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),cfe=xr(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),Bl=xr(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),mg=xr(["FunctionExpression","ArrowFunctionExpression"]);function hfe(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function $S(e){return rr(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var Tn=xr(["JSXElement","JSXFragment"]);function Jb(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function Lj(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function dfe(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!qb(e,e.typeAnnotation)}var Ta=xr(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function bh(e){return Jr(e)||e.type==="BindExpression"&&!!e.object}var ffe=xr(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function h2(e){return Aj(e)||Tj(e)||ffe(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters&&!e.typeArguments}function pfe(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}var gfe=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function mfe(e){return sfe(e,gfe)}function Xb(e,t){if((e==null?void 0:e.type)!=="CallExpression"||e.optional)return!1;let r=Is(e);if(r.length===1){if($S(e)&&Xb(t))return mg(r[0]);if(pfe(e.callee))return $S(r[0])}else if((r.length===2||r.length===3)&&(r[0].type==="TemplateLiteral"||wi(r[0]))&&mfe(e.callee))return r[2]&&!Ca(r[2])?!1:(r.length===2?mg(r[1]):hfe(r[1])&&si(r[1]).length<=1)||$S(r[1]);return!1}var Pj=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),rr=Pj(xr(["CallExpression","OptionalCallExpression"])),Jr=Pj(xr(["MemberExpression","OptionalMemberExpression"]));function NO(e,t=5){return Fj(e,t)<=t}function Fj(e,t){let r=0;for(let n in e){let i=e[n];if(i&&typeof i=="object"&&typeof i.type=="string"&&(r++,r+=Fj(i,t-r)),r>t)return r}return r}var yfe=.25;function d2(e,t){let{printWidth:r}=t;if(We(e))return!1;let n=r*yfe;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||_j(e)&&!We(e.argument))return!0;let i=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return i?i.length<=n:wi(e)?bd($s(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` +`):e.type==="UnaryExpression"?d2(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:c2(e)}function oc(e,t){return Tn(t)?Yb(t):We(t,tt.Leading,r=>ns(e,Zt(r)))}function RO(e){return e.quasis.some(t=>t.value.raw.includes(` +`))}function Oj(e,t){return(e.type==="TemplateLiteral"&&RO(e)||e.type==="TaggedTemplateExpression"&&RO(e.quasi))&&!ns(t,jr(e),{backwards:!0})}function Ij(e){if(!We(e))return!1;let t=or(!1,Jh(e,tt.Dangling),-1);return t&&!Os(t)}function vfe(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(mg(r)){if(t+=1,t>1)return!0}else if(rr(r)){for(let n of Is(r))if(mg(n))return!0}return!1}function Mj(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&rr(t)&&rr(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var bfe=new Set(["!","-","+","~"]);function Ys(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return Ys(e.expression,t);let r=n=>Ys(n,t-1);if($j(e))return md(e.pattern??e.regex.pattern)<=5;if(c2(e)||cfe(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` +`))&&e.expressions.every(r);if(ho(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(Un(e))return e.elements.every(n=>n===null||r(n));if(xd(e)){if(e.type==="ImportExpression"||Ys(e.callee,t)){let n=Is(e);return n.length<=t&&n.every(r)}return!1}return Jr(e)?Ys(e.object,t)&&Ys(e.property,t):e.type==="UnaryExpression"&&bfe.has(e.operator)||e.type==="UpdateExpression"?Ys(e.argument,t):!1}function $s(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function xfe(e){return e}function Ra(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function mi(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return mi(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return mi(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:mi(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:mi(e.callee,t);case"ConditionalExpression":return mi(e.test,t);case"UpdateExpression":return!e.prefix&&mi(e.argument,t);case"BindExpression":return e.object&&mi(e.object,t);case"SequenceExpression":return mi(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return mi(e.expression,t);default:return t(e)}}var BO={"==":!0,"!=":!0,"===":!0,"!==":!0},ay={"*":!0,"/":!0,"%":!0},kC={">>":!0,">>>":!0,"<<":!0};function f2(e,t){return!(o0(t)!==o0(e)||e==="**"||BO[e]&&BO[t]||t==="%"&&ay[e]||e==="%"&&ay[t]||t!==e&&ay[t]&&ay[e]||kC[e]&&kC[t])}var wfe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function o0(e){return wfe.get(e)}function Sfe(e){return!!kC[e]||e==="|"||e==="^"||e==="&"}function Dfe(e){var t;if(e.rest)return!0;let r=si(e);return((t=or(!1,r,-1))==null?void 0:t.type)==="RestElement"}var LS=new WeakMap;function si(e){if(LS.has(e))return LS.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),LS.set(e,t),t}function Efe(e,t){let{node:r}=e,n=0,i=s=>t(s,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}var PS=new WeakMap;function Is(e){if(PS.has(e))return PS.get(e);if(e.type==="ChainExpression")return Is(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),PS.set(e,t),t}function a0(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>a0(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function jO(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function l0(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function Yb(e){return(e==null?void 0:e.prettierIgnore)||We(e,tt.PrettierIgnore)}var tt={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Nj=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,i)=>!(e&tt.Leading&&!r.leading||e&tt.Trailing&&!r.trailing||e&tt.Dangling&&(r.leading||r.trailing)||e&tt.Block&&!Os(r)||e&tt.Line&&!Kb(r)||e&tt.First&&n!==0||e&tt.Last&&n!==i.length-1||e&tt.PrettierIgnore&&!l0(r)||t&&!t(r))};function We(e,t,r){if(!ar(e==null?void 0:e.comments))return!1;let n=Nj(t,r);return n?e.comments.some(n):!0}function Jh(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=Nj(t,r);return n?e.comments.filter(n):e.comments}var Ba=(e,{originalText:t})=>l2(t,Zt(e));function xd(e){return rr(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function ja(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!Jb(e))}var _o=xr(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),ac=xr(["UnionTypeAnnotation","TSUnionType"]),Rj=xr(["IntersectionTypeAnnotation","TSIntersectionType"]),Cfe=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),uh=e=>{for(let t of e.quasis)delete t.value};function Bj(e,t,r){var n,i;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&e.value&&(t.value=e.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&e.bigint&&(t.bigint=e.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(e.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(e.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty"||e.type==="ImportAttribute")&&e.key&&!e.computed){let{key:o}=e;wi(o)||Ca(o)?t.key=String(o.value):o.type==="Identifier"&&(t.key=o.name)}if(e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"))for(let{type:o,expression:a}of t.children)o==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&uh(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&uh(t.value.expression),e.type==="JSXAttribute"&&((n=e.value)==null?void 0:n.type)==="Literal"&&/["']|"|'/u.test(e.value.value)&&(t.value.value=Nn(!1,e.value.value,/["']|"|'/gu,'"'));let s=e.expression||e.callee;if(e.type==="Decorator"&&s.type==="CallExpression"&&s.callee.name==="Component"&&s.arguments.length===1){let o=e.expression.arguments[0].properties;for(let[a,l]of t.expression.arguments[0].properties.entries())switch(o[a].key.name){case"styles":Un(l.value)&&uh(l.value.elements[0]);break;case"template":l.value.type==="TemplateLiteral"&&uh(l.value);break}}e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&uh(t.quasi),e.type==="TemplateLiteral"&&((i=e.leadingComments)!=null&&i.some(o=>Os(o)&&["GraphQL","HTML"].some(a=>o.value===` ${a} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&uh(t),e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&(t.type="TSNonNullExpression",t.expression.type="ChainExpression"),e.type==="TSMappedType"&&(delete t.key,delete t.constraint),e.type==="TSEnumDeclaration"&&delete t.body}Bj.ignoredProperties=Cfe;var Tfe=Bj,Kd="string",jl="array",Jd="cursor",_c="indent",$c="align",Xd="trim",Ls="group",su="fill",Oo="if-break",Lc="indent-if-break",Pc="line-suffix",Fc="line-suffix-boundary",hs="line",ou="label",au="break-parent",jj=new Set([Jd,_c,$c,Xd,Ls,su,Oo,Lc,Pc,Fc,hs,ou,au]);function Afe(e){if(typeof e=="string")return Kd;if(Array.isArray(e))return jl;if(!e)return;let{type:t}=e;if(jj.has(t))return t}var Yd=Afe,kfe=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function _fe(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(Yd(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=kfe([...jj].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var $fe=class extends Error{constructor(r){super(_fe(r));Jo(this,"name","InvalidDocError");this.doc=r}},yg=$fe,zO={};function Lfe(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===zO){r(i.pop());continue}r&&i.push(s,zO);let o=Yd(s);if(!o)throw new yg(s);if((t==null?void 0:t(s))!==!1)switch(o){case jl:case su:{let a=o===jl?s:s.parts;for(let l=a.length,u=l-1;u>=0;--u)i.push(a[u]);break}case Oo:i.push(s.flatContents,s.breakContents);break;case Ls:if(n&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case $c:case _c:case Lc:case ou:case Pc:i.push(s.contents);break;case Kd:case Jd:case Xd:case Fc:case hs:case au:break;default:throw new yg(s)}}}var zj=Lfe,Pfe=()=>{},Ffe=Pfe;function Le(e){return{type:_c,contents:e}}function Mo(e,t){return{type:$c,contents:t,n:e}}function me(e,t={}){return Ffe(t.expandedStates),{type:Ls,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ofe(e){return Mo(Number.NEGATIVE_INFINITY,e)}function Hj(e){return Mo(-1,e)}function Pu(e,t){return me(e[0],{...t,expandedStates:e})}function p2(e){return{type:su,parts:e}}function Lt(e,t="",r={}){return{type:Oo,breakContents:e,flatContents:t,groupId:r.groupId}}function Qb(e,t){return{type:Lc,contents:e,groupId:t.groupId,negate:t.negate}}function HO(e){return{type:Pc,contents:e}}var Aa={type:Fc},No={type:au},Uj={type:hs,hard:!0},Ife={type:hs,hard:!0,literal:!0},Ye={type:hs},_e={type:hs,soft:!0},$e=[Uj,No],Wj=[Ife,No],UO={type:Jd};function qt(e,t){let r=[];for(let n=0;n0){for(let i=0;i0){let t=or(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Rfe(e){let t=new Set,r=[];function n(s){if(s.type===au&&WO(r),s.type===Ls){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===Ls&&r.pop().break&&WO(r)}zj(e,n,i,!0)}function Bfe(e){return e.type===hs&&!e.hard?e.soft?"":" ":e.type===Oo?e.flatContents:e}function _C(e){return Qd(e,Bfe)}function jfe(e){switch(Yd(e)){case su:if(e.parts.every(t=>t===""))return"";break;case Ls:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Ls&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case $c:case _c:case Lc:case Pc:if(!e.contents)return"";break;case Oo:if(!e.flatContents&&!e.breakContents)return"";break;case jl:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof or(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Kd:case Jd:case Xd:case Fc:case hs:case ou:case au:break;default:throw new yg(e)}return e}function g2(e){return Qd(e,t=>jfe(t))}function lc(e,t=Wj){return Qd(e,r=>typeof r=="string"?qt(t,r.split(` +`)):r)}function zfe(e){if(e.type===hs)return!0}function Hfe(e){return Vj(e,zfe,!1)}function $C(e,t){return e.type===ou?{...e,contents:t(e.contents)}:t(e)}function Ufe(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Wfe=Ufe;function Vfe(e,t){let r=e.node;if(Kb(r))return t.originalText.slice(jr(r),Zt(r)).trimEnd();if(Os(r))return Wfe(r)?Gfe(r):["/*",lc(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Gfe(e){let t=e.value.split(` +`);return["/*",qt($e,t.map((r,n)=>n===0?r.trimEnd():" "+(nepe,ownLine:()=>Zfe,remaining:()=>tpe});function qfe(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function m2(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=qfe(e)}function Wn(e,t){t.leading=!0,t.trailing=!1,m2(e,t)}function Ps(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),m2(e,t)}function Ur(e,t){t.leading=!1,t.trailing=!0,m2(e,t)}function Kfe(e,t){let r=null,n=t;for(;n!==r;)r=n,n=yd(e,n),n=o2(e,n),n=a2(e,n),n=vd(e,n);return n}var Zg=Kfe;function Jfe(e,t){let r=Zg(e,t);return r===!1?"":e.charAt(r)}var fo=Jfe;function Xfe(e,t,r){for(let n=t;nt(e))}function epe(e){return[rpe,Yj,Kj,Zj,y2,v2,qj,Jj,Qj,fpe,gpe,x2,xpe,b2,Dpe,Epe].some(t=>t(e))}function tpe(e){return[ez,y2,v2,spe,hpe,Xj,x2,cpe,upe,Spe,b2,wpe].some(t=>t(e))}function Oc(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?Wn(r,t):Ps(e,t)}function LC(e,t){e.type==="BlockStatement"?Oc(e,t):Wn(e,t)}function rpe({comment:e,followingNode:t}){return t&&Qfe(e)?(Wn(t,e),!0):!1}function y2({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(fo(i,Zt(e))===")")return Ur(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")Ur(t,e);else{let s=Kb(e)||e.loc.start.line===e.loc.end.line,o=e.loc.start.line===t.loc.start.line;s&&o?Ur(t,e):Ps(r,e)}return!0}return n.type==="BlockStatement"?(Oc(n,e),!0):n.type==="IfStatement"?(LC(n.consequent,e),!0):r.consequent===n?(Wn(n,e),!0):!1}function v2({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:fo(i,Zt(e))===")"?(Ur(t,e),!0):n.type==="BlockStatement"?(Oc(n,e),!0):r.body===n?(Wn(n,e),!0):!1}function qj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(Ur(t,e),!0):n.type==="BlockStatement"?(Oc(n,e),!0):n.type==="TryStatement"?(LC(n.finalizer,e),!0):n.type==="CatchClause"?(LC(n.body,e),!0):!1}function npe({comment:e,enclosingNode:t,followingNode:r}){return Jr(t)&&(r==null?void 0:r.type)==="Identifier"?(Wn(t,e),!0):!1}function ipe({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(Ps(t,e),!0):!1}function Kj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i,options:s}){let o=t&&!zl(i,Zt(t),jr(e));return(!t||!o)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?s.experimentalTernaries&&r.alternate===n&&!(Os(e)&&!zl(s.originalText,jr(e),Zt(e)))?(Ps(r,e),!0):(Wn(n,e),!0):!1}function spe({comment:e,precedingNode:t,enclosingNode:r}){return ja(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(Ur(r.value.left,e),!0):!1}var ope=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Jj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(ope.has(r==null?void 0:r.type)){if(ar(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return Ur(or(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return Oc(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return Ur(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?Ur(t,e):Ps(r,e,i),!0}}return!1}var ape=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Xj({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&fo(n,Zt(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&fo(n,Zt(t))!==":"||(t==null?void 0:t.type)==="Decorator"&&ape.has(r==null?void 0:r.type)?(Ur(t,e),!0):!1}var lpe=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function upe({comment:e,precedingNode:t,enclosingNode:r,text:n}){return fo(n,Zt(e))!=="("?!1:t&&lpe.has(r==null?void 0:r.type)?(Ur(t,e),!0):!1}function cpe({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=Zg(r,Zt(e));return n!==!1&&r.slice(n,n+2)==="=>"?(Ps(t,e),!0):!1}function hpe({comment:e,enclosingNode:t,text:r}){return fo(r,Zt(e))!==")"?!1:t&&(tz(t)&&si(t).length===0||xd(t)&&Is(t).length===0)?(Ps(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&si(t.value).length===0?(Ps(t.value,e),!0):!1}function dpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(t==null?void 0:t.type)==="ComponentTypeParameter"&&((r==null?void 0:r.type)==="DeclareComponent"||(r==null?void 0:r.type)==="ComponentTypeAnnotation")&&(n==null?void 0:n.type)!=="ComponentTypeParameter"||((t==null?void 0:t.type)==="ComponentParameter"||(t==null?void 0:t.type)==="RestElement")&&(r==null?void 0:r.type)==="ComponentDeclaration"&&fo(i,Zt(e))===")"?(Ur(t,e),!0):!1}function Yj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"||((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&tz(r)&&fo(i,Zt(e))===")"?(Ur(t,e),!0):!Os(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&&Zg(i,Zt(e))===jr(n)?(Oc(n,e),!0):!1}function Qj({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(Wn(t,e),!0):!1}function b2({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(Ur(t,e),!0):!1}function fpe({comment:e,precedingNode:t,enclosingNode:r}){return rr(r)&&t&&r.callee===t&&r.arguments.length>0?(Wn(r.arguments[0],e),!0):!1}function ppe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return ac(r)?(l0(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(Ur(t,e),!0):!1):(ac(n)&&l0(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function gpe({comment:e,enclosingNode:t}){return ja(t)?(Wn(t,e),!0):!1}function x2({comment:e,enclosingNode:t,ast:r,isLastComment:n}){var i;return((i=r==null?void 0:r.body)==null?void 0:i.length)===0?(n?Ps(r,e):Wn(r,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!ar(t.directives)?(n?Ps(t,e):Wn(t,e),!0):!1}function mpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(Wn(t,e),!0):!1}function Zj({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return Wn(r,e),!0;let i=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",s=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(i||s)&&ns(n,Zt(e))?(Ur(t,e),!0):!1}function ype({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(Wn(t,e),!0):!1}var vpe=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),bpe=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function xpe({comment:e,enclosingNode:t,followingNode:r}){return vpe.has(t==null?void 0:t.type)&&r&&(bpe.has(r.type)||Os(e))?(Wn(r,e),!0):!1}function wpe({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&fo(n,Zt(e))===";"?(Ur(t,e),!0):!1}function ez({comment:e,enclosingNode:t,followingNode:r}){if(l0(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Spe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(Wn(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(Ur(t.constraint,e),!0):!1}function Dpe({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&Kb(e)?Oc(r,e):Ps(t,e),!0)}function Epe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return ac(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||Rj(r))?(Ur(or(!1,t.types,-1),e),!0):!1}function Cpe({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if(((t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern")&&(n==null?void 0:n.type)==="TSTypeAnnotation")return r?Ur(r,e):Ps(t,e),!0}var tz=xr(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]),Tpe=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function Ape(e){return!Tpe.has(e.type)}function kpe(e,t){var r;if((t.parser==="typescript"||t.parser==="flow"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree")&&e.type==="MethodDefinition"&&((r=e.value)==null?void 0:r.type)==="FunctionExpression"&&si(e.value).length===0&&!e.value.returnType&&!ar(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function rz(e){let{node:t,parent:r}=e;return(Tn(t)||r&&(r.type==="JSXSpreadAttribute"||r.type==="JSXSpreadChild"||ac(r)||(r.type==="ClassDeclaration"||r.type==="ClassExpression")&&r.superClass===t))&&(!Yb(t)||ac(r))}function _pe(e,{parser:t}){if(t==="flow"||t==="babel-flow")return e=Nn(!1,e,/[\s(]/gu,""),e===""||e==="/*"||e==="/*::"}function $pe(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}var Fi=Symbol("MODE_BREAK"),wo=Symbol("MODE_FLAT"),Lp=Symbol("cursor");function tz(){return{value:"",length:0,queue:[]}}function $pe(e,t){return FC(e,{type:"indent"},t)}function Lpe(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||tz():t<0?FC(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:FC(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function FC(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let p of n)switch(p.type){case"indent":c(),r.useTabs?l(1):u(r.tabWidth);break;case"stringAlign":c(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,a+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function l(p){i+=" ".repeat(p),s+=r.tabWidth*p}function u(p){i+=" ".repeat(p),s+=p}function c(){r.useTabs?h():d()}function h(){o>0&&l(o),f()}function d(){a>0&&u(a),f()}function f(){o=0,a=0}}function OC(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===Lp){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Lp);return t}function ly(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],l=[];for(;r>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:u,doc:c}=a.pop(),h=Jd(c);switch(h){case Gd:l.push(c),r-=pd(c);break;case Rl:case nu:{let d=h===Rl?c:c.parts;for(let f=d.length-1;f>=0;f--)a.push({mode:u,doc:d[f]});break}case Tc:case kc:case _c:case iu:a.push({mode:u,doc:c.contents});break;case Kd:r+=OC(l);break;case ks:{if(s&&c.break)return!1;let d=c.break?Fi:u,f=c.expandedStates&&d===Fi?nr(!1,c.expandedStates,-1):c.contents;a.push({mode:d,doc:f});break}case Lo:{let d=(c.groupId?i[c.groupId]||wo:u)===Fi?c.breakContents:c.flatContents;d&&a.push({mode:u,doc:d});break}case ls:if(u===Fi||c.hard)return!0;c.soft||(l.push(" "),r--);break;case $c:n=!0;break;case Lc:if(n)return!1;break}}return!1}function rz(e,t){let r={},n=t.printWidth,i=_pe(t.endOfLine),s=0,o=[{ind:tz(),mode:Fi,doc:e}],a=[],l=!1,u=[],c=0;for(Ife(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(Jd(p)){case Gd:{let m=i!==` -`?On(!1,p,` -`,i):p;a.push(m),o.length>0&&(s+=pd(m));break}case Rl:for(let m=p.length-1;m>=0;m--)o.push({ind:d,mode:f,doc:p[m]});break;case qd:if(c>=2)throw new Error("There are too many 'cursor' in doc.");a.push(Lp),c++;break;case Tc:o.push({ind:$pe(d,t),mode:f,doc:p.contents});break;case kc:o.push({ind:Lpe(d,p.n,t),mode:f,doc:p.contents});break;case Kd:s-=OC(a);break;case ks:switch(f){case wo:if(!l){o.push({ind:d,mode:p.break?Fi:wo,doc:p.contents});break}case Fi:{l=!1;let m={ind:d,mode:wo,doc:p.contents},y=n-s,b=u.length>0;if(!p.break&&ly(m,o,y,b,r))o.push(m);else if(p.expandedStates){let v=nr(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:Fi,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:Fi,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:wo,doc:D};if(ly(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:Fi,doc:p.contents});break}}p.id&&(r[p.id]=nr(!1,o,-1).mode);break;case nu:{let m=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:wo,doc:b},D={ind:d,mode:Fi,doc:b},C=ly(E,[],m,u.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:wo,doc:v},A={ind:d,mode:Fi,doc:v};if(y.length===2){C?o.push(w,E):o.push(A,D);break}y.splice(0,2);let $={ind:d,mode:f,doc:f2(y)},O=y[0];ly({ind:d,mode:wo,doc:[b,v,O]},[],m,u.length>0,r,!0)?o.push($,w,E):C?o.push($,A,E):o.push($,A,D);break}case Lo:case _c:{let m=p.groupId?r[p.groupId]:f;if(m===Fi){let y=p.type===Lo?p.breakContents:p.negate?p.contents:Le(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(m===wo){let y=p.type===Lo?p.flatContents:p.negate?Le(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case $c:u.push({ind:d,mode:f,doc:p.contents});break;case Lc:u.length>0&&o.push({ind:d,mode:f,doc:zj});break;case ls:switch(f){case wo:if(p.hard)l=!0;else{p.soft||(a.push(" "),s+=1);break}case Fi:if(u.length>0){o.push({ind:d,mode:f,doc:p},...u.reverse()),u.length=0;break}p.literal?d.root?(a.push(i,d.root.value),s=d.root.length):(a.push(i),s=0):(s-=OC(a),a.push(i+d.value),s=d.length);break}break;case iu:o.push({ind:d,mode:f,doc:p.contents});break;case su:break;default:throw new yg(p)}o.length===0&&u.length>0&&(o.push(...u.reverse()),u.length=0)}let h=a.indexOf(Lp);if(h!==-1){let d=a.indexOf(Lp,h+1),f=a.slice(0,h).join(""),p=a.slice(h+1,d).join(""),m=a.slice(d+1).join("");return{formatted:f+p+m,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:a.join("")}}function Ppe(e,t,r=0){let n=0;for(let i=r;i{if(s.push(t()),u.tail)return;let{tabWidth:c}=r,h=u.value.raw,d=h.includes(` -`)?Npe(h,c):a;a=d;let f=o[l],p=n[i][l],m=Bl(r.originalText,Xt(u),Rr(n.quasis[l+1]));if(!m){let b=rz(f,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;b.includes(` -`)?m=!0:f=b}m&&(We(p)||p.type==="Identifier"||qr(p)||p.type==="ConditionalExpression"||p.type==="SequenceExpression"||Ao(p)||Ea(p))&&(f=[Le([_e,f]),_e]);let y=d===0&&h.endsWith(` -`)?Fo(Number.NEGATIVE_INFINITY,f):Nfe(f,d,c);s.push(me(["${",y,Ca,"}"]))},"quasis"),s.push("`"),s}function Mpe(e,t){let r=t("quasi");return Qg(r.label&&{tagged:!0,...r.label},[t("tag"),t(e.node.typeArguments?"typeArguments":"typeParameters"),Ca,r])}function Ipe(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(i.length>1||i.some(s=>s.length>0)){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let o=[],a=s.map(d=>"${"+rz(d,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),l=[{hasLineBreak:!1,cells:[]}];for(let d=1;d0&&l(o),f()}function d(){a>0&&u(a),f()}function f(){o=0,a=0}}function FC(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===Fp){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Fp);return t}function ly(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],l=[];for(;r>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:u,doc:c}=a.pop(),h=Yd(c);switch(h){case Kd:l.push(c),r-=md(c);break;case jl:case su:{let d=h===jl?c:c.parts;for(let f=d.length-1;f>=0;f--)a.push({mode:u,doc:d[f]});break}case _c:case $c:case Lc:case ou:a.push({mode:u,doc:c.contents});break;case Xd:r+=FC(l);break;case Ls:{if(s&&c.break)return!1;let d=c.break?Mi:u,f=c.expandedStates&&d===Mi?or(!1,c.expandedStates,-1):c.contents;a.push({mode:d,doc:f});break}case Oo:{let d=(c.groupId?i[c.groupId]||Eo:u)===Mi?c.breakContents:c.flatContents;d&&a.push({mode:u,doc:d});break}case hs:if(u===Mi||c.hard)return!0;c.soft||(l.push(" "),r--);break;case Pc:n=!0;break;case Fc:if(n)return!1;break}}return!1}function iz(e,t){let r={},n=t.printWidth,i=$pe(t.endOfLine),s=0,o=[{ind:nz(),mode:Mi,doc:e}],a=[],l=!1,u=[],c=0;for(Rfe(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(Yd(p)){case Kd:{let m=i!==` +`?Nn(!1,p,` +`,i):p;a.push(m),o.length>0&&(s+=md(m));break}case jl:for(let m=p.length-1;m>=0;m--)o.push({ind:d,mode:f,doc:p[m]});break;case Jd:if(c>=2)throw new Error("There are too many 'cursor' in doc.");a.push(Fp),c++;break;case _c:o.push({ind:Lpe(d,t),mode:f,doc:p.contents});break;case $c:o.push({ind:Ppe(d,p.n,t),mode:f,doc:p.contents});break;case Xd:s-=FC(a);break;case Ls:switch(f){case Eo:if(!l){o.push({ind:d,mode:p.break?Mi:Eo,doc:p.contents});break}case Mi:{l=!1;let m={ind:d,mode:Eo,doc:p.contents},y=n-s,b=u.length>0;if(!p.break&&ly(m,o,y,b,r))o.push(m);else if(p.expandedStates){let v=or(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:Mi,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:Mi,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:Eo,doc:D};if(ly(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:Mi,doc:p.contents});break}}p.id&&(r[p.id]=or(!1,o,-1).mode);break;case su:{let m=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:Eo,doc:b},D={ind:d,mode:Mi,doc:b},C=ly(E,[],m,u.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:Eo,doc:v},T={ind:d,mode:Mi,doc:v};if(y.length===2){C?o.push(w,E):o.push(T,D);break}y.splice(0,2);let k={ind:d,mode:f,doc:p2(y)},O=y[0];ly({ind:d,mode:Eo,doc:[b,v,O]},[],m,u.length>0,r,!0)?o.push(k,w,E):C?o.push(k,T,E):o.push(k,T,D);break}case Oo:case Lc:{let m=p.groupId?r[p.groupId]:f;if(m===Mi){let y=p.type===Oo?p.breakContents:p.negate?p.contents:Le(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(m===Eo){let y=p.type===Oo?p.flatContents:p.negate?Le(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case Pc:u.push({ind:d,mode:f,doc:p.contents});break;case Fc:u.length>0&&o.push({ind:d,mode:f,doc:Uj});break;case hs:switch(f){case Eo:if(p.hard)l=!0;else{p.soft||(a.push(" "),s+=1);break}case Mi:if(u.length>0){o.push({ind:d,mode:f,doc:p},...u.reverse()),u.length=0;break}p.literal?d.root?(a.push(i,d.root.value),s=d.root.length):(a.push(i),s=0):(s-=FC(a),a.push(i+d.value),s=d.length);break}break;case ou:o.push({ind:d,mode:f,doc:p.contents});break;case au:break;default:throw new yg(p)}o.length===0&&u.length>0&&(o.push(...u.reverse()),u.length=0)}let h=a.indexOf(Fp);if(h!==-1){let d=a.indexOf(Fp,h+1),f=a.slice(0,h).join(""),p=a.slice(h+1,d).join(""),m=a.slice(d+1).join("");return{formatted:f+p+m,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:a.join("")}}function Fpe(e,t,r=0){let n=0;for(let i=r;i{if(s.push(t()),u.tail)return;let{tabWidth:c}=r,h=u.value.raw,d=h.includes(` +`)?Mpe(h,c):a;a=d;let f=o[l],p=n[i][l],m=zl(r.originalText,Zt(u),jr(n.quasis[l+1]));if(!m){let b=iz(f,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;b.includes(` +`)?m=!0:f=b}m&&(We(p)||p.type==="Identifier"||Jr(p)||p.type==="ConditionalExpression"||p.type==="SequenceExpression"||_o(p)||Ta(p))&&(f=[Le([_e,f]),_e]);let y=d===0&&h.endsWith(` +`)?Mo(Number.NEGATIVE_INFINITY,f):Mfe(f,d,c);s.push(me(["${",y,Aa,"}"]))},"quasis"),s.push("`"),s}function Npe(e,t){let r=t("quasi");return Qg(r.label&&{tagged:!0,...r.label},[t("tag"),t(e.node.typeArguments?"typeArguments":"typeParameters"),Aa,r])}function Rpe(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(i.length>1||i.some(s=>s.length>0)){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let o=[],a=s.map(d=>"${"+iz(d,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),l=[{hasLineBreak:!1,cells:[]}];for(let d=1;dd.cells.length)),c=Array.from({length:u}).fill(0),h=[{cells:i},...l.filter(d=>d.cells.length>0)];for(let{cells:d}of h.filter(f=>!f.hasLineBreak))for(let[f,p]of d.entries())c[f]=Math.max(c[f],pd(p));return o.push(Ca,"`",Le([$e,Wt($e,h.map(d=>Wt(" | ",d.cells.map((f,p)=>d.hasLineBreak?f:f+" ".repeat(c[p]-pd(f))))))]),$e,"`"),o}}function Rpe(e,t){let{node:r}=e,n=t();return We(r)&&(n=me([Le([_e,n]),_e])),["${",n,Ca,"}"]}function x2(e,t){return e.map(r=>Rpe(r,t),"expressions")}function iz(e,t){return Xd(e,r=>typeof r=="string"?t?On(!1,r,/(\\*)`/gu,"$1$1\\`"):sz(r):r)}function sz(e){return On(!1,e,/([\\`]|\$\{)/gu,String.raw`\$1`)}function Bpe({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var NC=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function jpe(e){let t=n=>n.type==="TemplateLiteral",r=(n,i)=>Ra(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&i==="value";return e.match(t,(n,i)=>jn(n)&&i==="elements",r,...NC)||e.match(t,r,...NC)}function zpe(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ra(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...NC)}function OS(e,t){return We(e,tt.Block|tt.Leading,({value:r})=>r===` ${t} `)}function oz({node:e,parent:t},r){return OS(e,r)||Hpe(t)&&OS(t,r)||t.type==="ExpressionStatement"&&OS(t,r)}function Hpe(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Upe(e,t,r){let{node:n}=r,i=n.quasis.map(c=>c.value.raw),s=0,o=i.reduce((c,h,d)=>d===0?h:c+"@prettier-placeholder-"+s+++"-id"+h,""),a=await e(o,{parser:"scss"}),l=x2(r,t),u=Wpe(a,l);if(!u)throw new Error("Couldn't insert all the expressions");return["`",Le([$e,u]),_e,"`"]}function Wpe(e,t){if(!ir(t))return e;let r=0,n=Xd(p2(e),i=>typeof i!="string"||!i.includes("@prettier-placeholder")?i:i.split(/@prettier-placeholder-(\d+)-id/u).map((s,o)=>o%2===0?oc(s):(r++,t[s])));return t.length===r?n:null}function Vpe({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function uy(e){return e.type==="Identifier"&&e.name==="styled"}function UO(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function Gpe({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return uy(t.object)||UO(t);case"CallExpression":return uy(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(uy(t.callee.object.object)||UO(t.callee.object))||t.callee.object.type==="CallExpression"&&uy(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function qpe({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Kpe(e){if(Vpe(e)||Gpe(e)||qpe(e)||jpe(e))return Upe}var Jpe=Kpe;async function Xpe(e,t,r){let{node:n}=r,i=n.quasis.length,s=x2(r,t),o=[];for(let a=0;a2&&d[0].trim()===""&&d[1].trim()==="",y=f>2&&d[f-1].trim()===""&&d[f-2].trim()==="",b=d.every(E=>/^\s*(?:#[^\n\r]*)?$/u.test(E));if(!c&&/#[^\n\r]*$/u.test(d[f-1]))return null;let v=null;b?v=Ype(d):v=await e(h,{parser:"graphql"}),v?(v=iz(v,!1),!u&&m&&o.push(""),o.push(v),!c&&y&&o.push("")):!u&&!c&&m&&o.push(""),p&&o.push(p)}return["`",Le([$e,Wt($e,o)]),$e,"`"]}function Ype(e){let t=[],r=!1,n=e.map(i=>i.trim());for(let[i,s]of n.entries())s!==""&&(n[i-1]===""&&r?t.push([$e,s]):t.push(s),r=!0);return t.length===0?null:Wt($e,t)}function Qpe({node:e,parent:t}){return oz({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function Zpe(e){if(Qpe(e))return Xpe}var ege=Zpe,NS=0;async function az(e,t,r,n,i){let{node:s}=n,o=NS;NS=NS+1>>>0;let a=b=>`PRETTIER_HTML_PLACEHOLDER_${b}_${o}_IN_JS`,l=s.quasis.map((b,v,E)=>v===E.length-1?b.value.cooked:b.value.cooked+a(v)).join(""),u=x2(n,r),c=new RegExp(a(String.raw`(\d+)`),"gu"),h=0,d=await t(l,{parser:e,__onHtmlRoot(b){h=b.children.length}}),f=Xd(d,b=>{if(typeof b!="string")return b;let v=[],E=b.split(c);for(let D=0;D1?Le(me(f)):me(f),m,"`"]))}function tge(e){return oz(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var rge=az.bind(void 0,"html"),nge=az.bind(void 0,"angular");function ige(e){if(tge(e))return rge;if(zpe(e))return nge}var sge=ige;async function oge(e,t,r){let{node:n}=r,i=On(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(l,u)=>"\\".repeat(u.length/2)+"`"),s=age(i),o=s!=="";o&&(i=On(!1,i,new RegExp(`^${s}`,"gmu"),""));let a=iz(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",o?Le([_e,a]):[Hj,Ffe(a)],_e,"`"]}function age(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function lge(e){if(uge(e))return oge}function uge({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var cge=lge;function hge(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||dge(t))return;let r;for(let n of[Jpe,ege,sge,cge])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...i)=>{let s=await r(...i);return s&&Qg({embed:!0,...s.label},s)}}function dge({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var fge=hge,pge=/\*\/$/,gge=/^\/\*\*?/,lz=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,mge=/(^|\s+)\/\/([^\n\r]*)/g,WO=/^(\r?\n)+/,yge=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,VO=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,vge=/(\r?\n|^) *\* ?/g,uz=[];function bge(e){let t=e.match(lz);return t?t[0].trimStart():""}function xge(e){let t=e.match(lz),r=t==null?void 0:t[0];return r==null?e:e.slice(r.length)}function wge(e){let t=` -`;e=On(!1,e.replace(gge,"").replace(pge,""),vge,"$1");let r="";for(;r!==e;)r=e,e=On(!1,e,yge,`${t}$1 $2${t}`);e=e.replace(WO,"").trimEnd();let n=Object.create(null),i=On(!1,e,VO,"").replace(WO,"").trimEnd(),s;for(;s=VO.exec(e);){let o=On(!1,s[2],mge,"");if(typeof n[s[1]]=="string"||Array.isArray(n[s[1]])){let a=n[s[1]];n[s[1]]=[...uz,...Array.isArray(a)?a:[a],o]}else n[s[1]]=o}return{comments:i,pragmas:n}}function Sge({comments:e="",pragmas:t={}}){let r=` -`,n="/**",i=" *",s=" */",o=Object.keys(t),a=o.flatMap(u=>GO(u,t[u])).map(u=>`${i} ${u}${r}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let u=t[o[0]];return`${n} ${GO(o[0],u)[0]}${s}`}}let l=e.split(r).map(u=>`${i} ${u}`).join(r)+r;return n+r+(e?l:"")+(e&&o.length>0?i+r:"")+a+s}function GO(e,t){return[...uz,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}function Dge(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` -`);return t===-1?e:e.slice(0,t)}var Ege=Dge;function Cge(e){let t=Ege(e);t&&(e=e.slice(t.length+1));let r=bge(e),{pragmas:n,comments:i}=wge(r);return{shebang:t,text:e,pragmas:n,comments:i}}function Age(e){let{shebang:t,text:r,pragmas:n,comments:i}=Cge(e),s=xge(r),o=Sge({pragmas:{format:"",...n},comments:i.trimStart()});return(t?`${t} +`)&&l.push({hasLineBreak:!1,cells:[]})}let u=Math.max(i.length,...l.map(d=>d.cells.length)),c=Array.from({length:u}).fill(0),h=[{cells:i},...l.filter(d=>d.cells.length>0)];for(let{cells:d}of h.filter(f=>!f.hasLineBreak))for(let[f,p]of d.entries())c[f]=Math.max(c[f],md(p));return o.push(Aa,"`",Le([$e,qt($e,h.map(d=>qt(" | ",d.cells.map((f,p)=>d.hasLineBreak?f:f+" ".repeat(c[p]-md(f))))))]),$e,"`"),o}}function Bpe(e,t){let{node:r}=e,n=t();return We(r)&&(n=me([Le([_e,n]),_e])),["${",n,Aa,"}"]}function w2(e,t){return e.map(r=>Bpe(r,t),"expressions")}function oz(e,t){return Qd(e,r=>typeof r=="string"?t?Nn(!1,r,/(\\*)`/gu,"$1$1\\`"):az(r):r)}function az(e){return Nn(!1,e,/([\\`]|\$\{)/gu,String.raw`\$1`)}function jpe({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var OC=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function zpe(e){let t=n=>n.type==="TemplateLiteral",r=(n,i)=>ja(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&i==="value";return e.match(t,(n,i)=>Un(n)&&i==="elements",r,...OC)||e.match(t,r,...OC)}function Hpe(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>ja(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...OC)}function FS(e,t){return We(e,tt.Block|tt.Leading,({value:r})=>r===` ${t} `)}function lz({node:e,parent:t},r){return FS(e,r)||Upe(t)&&FS(t,r)||t.type==="ExpressionStatement"&&FS(t,r)}function Upe(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Wpe(e,t,r){let{node:n}=r,i=n.quasis.map(c=>c.value.raw),s=0,o=i.reduce((c,h,d)=>d===0?h:c+"@prettier-placeholder-"+s+++"-id"+h,""),a=await e(o,{parser:"scss"}),l=w2(r,t),u=Vpe(a,l);if(!u)throw new Error("Couldn't insert all the expressions");return["`",Le([$e,u]),_e,"`"]}function Vpe(e,t){if(!ar(t))return e;let r=0,n=Qd(g2(e),i=>typeof i!="string"||!i.includes("@prettier-placeholder")?i:i.split(/@prettier-placeholder-(\d+)-id/u).map((s,o)=>o%2===0?lc(s):(r++,t[s])));return t.length===r?n:null}function Gpe({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function uy(e){return e.type==="Identifier"&&e.name==="styled"}function VO(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function qpe({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return uy(t.object)||VO(t);case"CallExpression":return uy(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(uy(t.callee.object.object)||VO(t.callee.object))||t.callee.object.type==="CallExpression"&&uy(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Kpe({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Jpe(e){if(Gpe(e)||qpe(e)||Kpe(e)||zpe(e))return Wpe}var Xpe=Jpe;async function Ype(e,t,r){let{node:n}=r,i=n.quasis.length,s=w2(r,t),o=[];for(let a=0;a2&&d[0].trim()===""&&d[1].trim()==="",y=f>2&&d[f-1].trim()===""&&d[f-2].trim()==="",b=d.every(E=>/^\s*(?:#[^\n\r]*)?$/u.test(E));if(!c&&/#[^\n\r]*$/u.test(d[f-1]))return null;let v=null;b?v=Qpe(d):v=await e(h,{parser:"graphql"}),v?(v=oz(v,!1),!u&&m&&o.push(""),o.push(v),!c&&y&&o.push("")):!u&&!c&&m&&o.push(""),p&&o.push(p)}return["`",Le([$e,qt($e,o)]),$e,"`"]}function Qpe(e){let t=[],r=!1,n=e.map(i=>i.trim());for(let[i,s]of n.entries())s!==""&&(n[i-1]===""&&r?t.push([$e,s]):t.push(s),r=!0);return t.length===0?null:qt($e,t)}function Zpe({node:e,parent:t}){return lz({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function ege(e){if(Zpe(e))return Ype}var tge=ege,OS=0;async function uz(e,t,r,n,i){let{node:s}=n,o=OS;OS=OS+1>>>0;let a=b=>`PRETTIER_HTML_PLACEHOLDER_${b}_${o}_IN_JS`,l=s.quasis.map((b,v,E)=>v===E.length-1?b.value.cooked:b.value.cooked+a(v)).join(""),u=w2(n,r),c=new RegExp(a(String.raw`(\d+)`),"gu"),h=0,d=await t(l,{parser:e,__onHtmlRoot(b){h=b.children.length}}),f=Qd(d,b=>{if(typeof b!="string")return b;let v=[],E=b.split(c);for(let D=0;D1?Le(me(f)):me(f),m,"`"]))}function rge(e){return lz(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var nge=uz.bind(void 0,"html"),ige=uz.bind(void 0,"angular");function sge(e){if(rge(e))return nge;if(Hpe(e))return ige}var oge=sge;async function age(e,t,r){let{node:n}=r,i=Nn(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(l,u)=>"\\".repeat(u.length/2)+"`"),s=lge(i),o=s!=="";o&&(i=Nn(!1,i,new RegExp(`^${s}`,"gmu"),""));let a=oz(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",o?Le([_e,a]):[Wj,Ofe(a)],_e,"`"]}function lge(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function uge(e){if(cge(e))return age}function cge({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var hge=uge;function dge(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||fge(t))return;let r;for(let n of[Xpe,tge,oge,hge])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...i)=>{let s=await r(...i);return s&&Qg({embed:!0,...s.label},s)}}function fge({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var pge=dge,gge=/\*\/$/,mge=/^\/\*\*?/,cz=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,yge=/(^|\s+)\/\/([^\n\r]*)/g,GO=/^(\r?\n)+/,vge=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,qO=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,bge=/(\r?\n|^) *\* ?/g,hz=[];function xge(e){let t=e.match(cz);return t?t[0].trimStart():""}function wge(e){let t=e.match(cz),r=t==null?void 0:t[0];return r==null?e:e.slice(r.length)}function Sge(e){let t=` +`;e=Nn(!1,e.replace(mge,"").replace(gge,""),bge,"$1");let r="";for(;r!==e;)r=e,e=Nn(!1,e,vge,`${t}$1 $2${t}`);e=e.replace(GO,"").trimEnd();let n=Object.create(null),i=Nn(!1,e,qO,"").replace(GO,"").trimEnd(),s;for(;s=qO.exec(e);){let o=Nn(!1,s[2],yge,"");if(typeof n[s[1]]=="string"||Array.isArray(n[s[1]])){let a=n[s[1]];n[s[1]]=[...hz,...Array.isArray(a)?a:[a],o]}else n[s[1]]=o}return{comments:i,pragmas:n}}function Dge({comments:e="",pragmas:t={}}){let r=` +`,n="/**",i=" *",s=" */",o=Object.keys(t),a=o.flatMap(u=>KO(u,t[u])).map(u=>`${i} ${u}${r}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let u=t[o[0]];return`${n} ${KO(o[0],u)[0]}${s}`}}let l=e.split(r).map(u=>`${i} ${u}`).join(r)+r;return n+r+(e?l:"")+(e&&o.length>0?i+r:"")+a+s}function KO(e,t){return[...hz,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}function Ege(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var Cge=Ege;function Tge(e){let t=Cge(e);t&&(e=e.slice(t.length+1));let r=xge(e),{pragmas:n,comments:i}=Sge(r);return{shebang:t,text:e,pragmas:n,comments:i}}function Age(e){let{shebang:t,text:r,pragmas:n,comments:i}=Tge(e),s=wge(r),o=Dge({pragmas:{format:"",...n},comments:i.trimStart()});return(t?`${t} `:"")+o+(s.startsWith(` `)?` `:` -`)+s}function Tge(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:a}=e,l=i(a),u=s(a);for(let c of n)i(c)>=l&&s(c)<=u&&o.add(c);return r.slice(l,u)}var kge=Tge;function MC(e,t){var r,n,i,s,o,a,l,u,c;if(e.isRoot)return!1;let{node:h,key:d,parent:f}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&Pge(h)&&sp(e))return!0;if(_ge(h))return!1;if(h.type==="Identifier"){if((r=h.extra)!=null&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(h.name)||d==="left"&&(h.name==="async"&&!f.await||h.name==="let")&&f.type==="ForOfStatement")return!0;if(h.name==="let"){let p=(n=e.findAncestor(m=>m.type==="ForOfStatement"))==null?void 0:n.left;if(p&&fi(p,m=>m===h))return!0}if(d==="object"&&h.name==="let"&&f.type==="MemberExpression"&&f.computed&&!f.optional){let p=e.findAncestor(y=>y.type==="ExpressionStatement"||y.type==="ForStatement"||y.type==="ForInStatement"),m=p?p.type==="ExpressionStatement"?p.expression:p.type==="ForStatement"?p.init:p.left:void 0;if(m&&fi(m,y=>y===h))return!0}if(d==="expression")switch(h.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let p=e.findAncestor(m=>!Ao(m));if(p!==f&&p.type==="ExpressionStatement")return!0}}return!1}if(h.type==="ObjectExpression"||h.type==="FunctionExpression"||h.type==="ClassExpression"||h.type==="DoExpression"){let p=(i=e.findAncestor(m=>m.type==="ExpressionStatement"))==null?void 0:i.expression;if(p&&fi(p,m=>m===h))return!0}if(h.type==="ObjectExpression"){let p=(s=e.findAncestor(m=>m.type==="ArrowFunctionExpression"))==null?void 0:s.body;if(p&&p.type!=="SequenceExpression"&&p.type!=="AssignmentExpression"&&fi(p,m=>m===h))return!0}switch(f.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(d==="superClass"&&(h.type==="ArrowFunctionExpression"||h.type==="AssignmentExpression"||h.type==="AwaitExpression"||h.type==="BinaryExpression"||h.type==="ConditionalExpression"||h.type==="LogicalExpression"||h.type==="NewExpression"||h.type==="ObjectExpression"||h.type==="SequenceExpression"||h.type==="TaggedTemplateExpression"||h.type==="UnaryExpression"||h.type==="UpdateExpression"||h.type==="YieldExpression"||h.type==="TSNonNullExpression"||h.type==="ClassExpression"&&ir(h.decorators)))return!0;break;case"ExportDefaultDeclaration":return cz(e,t)||h.type==="SequenceExpression";case"Decorator":if(d==="expression"&&!Oge(h))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(p,m)=>m==="returnType"&&p.type==="ArrowFunctionExpression")&&Lge(h))return!0;break;case"BinaryExpression":if(d==="left"&&(f.operator==="in"||f.operator==="instanceof")&&h.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(d==="init"&&e.match(void 0,void 0,(p,m)=>m==="declarations"&&p.type==="VariableDeclaration",(p,m)=>m==="left"&&p.type==="ForInStatement"))return!0;break}switch(h.type){case"UpdateExpression":if(f.type==="UnaryExpression")return h.prefix&&(h.operator==="++"&&f.operator==="+"||h.operator==="--"&&f.operator==="-");case"UnaryExpression":switch(f.type){case"UnaryExpression":return h.operator===f.operator&&(h.operator==="+"||h.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return d==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"BinaryExpression":return d==="left"&&f.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(f.type==="UpdateExpression"||h.operator==="in"&&$ge(e))return!0;if(h.operator==="|>"&&(o=h.extra)!=null&&o.parenthesized){let p=e.grandparent;if(p.type==="BinaryExpression"&&p.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(f.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ao(h);case"ConditionalExpression":return Ao(h)||lfe(h);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return d==="callee";case"ClassExpression":case"ClassDeclaration":return d==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return d==="object";case"AssignmentExpression":case"AssignmentPattern":return d==="left"&&(h.type==="TSTypeAssertion"||Ao(h));case"LogicalExpression":if(h.type==="LogicalExpression")return f.operator!==h.operator;case"BinaryExpression":{let{operator:p,type:m}=h;if(!p&&m!=="TSTypeAssertion")return!0;let y=a0(p),b=f.operator,v=a0(b);return v>y||d==="right"&&v===y||v===y&&!d2(b,p)?!0:v");default:return!1}case"TSFunctionType":if(e.match(p=>p.type==="TSFunctionType",(p,m)=>m==="typeAnnotation"&&p.type==="TSTypeAnnotation",(p,m)=>m==="returnType"&&p.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(d==="extendsType"&&f.type==="TSConditionalType"){if(h.type==="TSConditionalType")return!0;let{typeAnnotation:p}=h.returnType||h.typeAnnotation;if(p.type==="TSTypePredicate"&&p.typeAnnotation&&(p=p.typeAnnotation.typeAnnotation),p.type==="TSInferType"&&p.typeParameter.constraint)return!0}if(d==="checkType"&&f.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((f.type==="TSUnionType"||f.type==="TSIntersectionType")&&f.types.length>1&&(!h.types||h.types.length>1))return!0;case"TSInferType":if(h.type==="TSInferType"){if(f.type==="TSRestType")return!1;if(d==="types"&&(f.type==="TSUnionType"||f.type==="TSIntersectionType")&&h.typeParameter.type==="TSTypeParameter"&&h.typeParameter.constraint)return!0}case"TSTypeOperator":return f.type==="TSArrayType"||f.type==="TSOptionalType"||f.type==="TSRestType"||d==="objectType"&&f.type==="TSIndexedAccessType"||f.type==="TSTypeOperator"||f.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return d==="objectType"&&f.type==="TSIndexedAccessType"||d==="elementType"&&f.type==="TSArrayType";case"TypeOperator":return f.type==="ArrayTypeAnnotation"||f.type==="NullableTypeAnnotation"||d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType")||f.type==="TypeOperator";case"TypeofTypeAnnotation":return d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType")||d==="elementType"&&f.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return f.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return f.type==="TypeOperator"||f.type==="ArrayTypeAnnotation"||f.type==="NullableTypeAnnotation"||f.type==="IntersectionTypeAnnotation"||f.type==="UnionTypeAnnotation"||d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return f.type==="ArrayTypeAnnotation"||d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType");case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(h.type==="ComponentTypeAnnotation"&&(h.rendersType===null||h.rendersType===void 0))return!1;if(e.match(void 0,(m,y)=>y==="typeAnnotation"&&m.type==="TypeAnnotation",(m,y)=>y==="returnType"&&m.type==="ArrowFunctionExpression")||e.match(void 0,(m,y)=>y==="typeAnnotation"&&m.type==="TypePredicate",(m,y)=>y==="typeAnnotation"&&m.type==="TypeAnnotation",(m,y)=>y==="returnType"&&m.type==="ArrowFunctionExpression"))return!0;let p=f.type==="NullableTypeAnnotation"?e.grandparent:f;return p.type==="UnionTypeAnnotation"||p.type==="IntersectionTypeAnnotation"||p.type==="ArrayTypeAnnotation"||d==="objectType"&&(p.type==="IndexedAccessType"||p.type==="OptionalIndexedAccessType")||d==="checkType"&&f.type==="ConditionalTypeAnnotation"||d==="extendsType"&&f.type==="ConditionalTypeAnnotation"&&((a=h.returnType)==null?void 0:a.type)==="InferTypeAnnotation"&&((l=h.returnType)==null?void 0:l.typeParameter.bound)||p.type==="NullableTypeAnnotation"||f.type==="FunctionTypeParam"&&f.name===null&&ri(h).some(m=>{var y;return((y=m.typeAnnotation)==null?void 0:y.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(d==="extendsType"&&f.type==="ConditionalTypeAnnotation"&&h.type==="ConditionalTypeAnnotation"||d==="checkType"&&f.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return d==="objectType"&&f.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof h.value=="string"&&f.type==="ExpressionStatement"&&!f.directive){let p=e.grandparent;return p.type==="Program"||p.type==="BlockStatement"}return d==="object"&&f.type==="MemberExpression"&&typeof h.value=="number";case"AssignmentExpression":{let p=e.grandparent;return d==="body"&&f.type==="ArrowFunctionExpression"?!0:d==="key"&&(f.type==="ClassProperty"||f.type==="PropertyDefinition")&&f.computed||(d==="init"||d==="update")&&f.type==="ForStatement"?!1:f.type==="ExpressionStatement"?h.left.type==="ObjectPattern":!(d==="key"&&f.type==="TSPropertySignature"||f.type==="AssignmentExpression"||f.type==="SequenceExpression"&&p.type==="ForStatement"&&(p.init===f||p.update===f)||d==="value"&&f.type==="Property"&&p.type==="ObjectPattern"&&p.properties.includes(f)||f.type==="NGChainedExpression")}case"ConditionalExpression":switch(f.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:d==="test";case"MemberExpression":case"OptionalMemberExpression":return d==="object";default:return!1}case"FunctionExpression":switch(f.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(f.type){case"BinaryExpression":return f.operator!=="|>"||((u=h.extra)==null?void 0:u.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"MemberExpression":case"OptionalMemberExpression":return d==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return d==="test";default:return!1}case"ClassExpression":switch(f.type){case"NewExpression":return d==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(Fge(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(d==="callee"&&(f.type==="BindExpression"||f.type==="NewExpression")){let p=h;for(;p;)switch(p.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":p=p.object;break;case"TaggedTemplateExpression":p=p.tag;break;case"TSNonNullExpression":p=p.expression;break;default:return!1}}return!1;case"BindExpression":return d==="callee"&&(f.type==="BindExpression"||f.type==="NewExpression")||d==="object"&&qr(f);case"NGPipeExpression":return!(f.type==="NGRoot"||f.type==="NGMicrosyntaxExpression"||f.type==="ObjectProperty"&&!((c=h.extra)!=null&&c.parenthesized)||jn(f)||d==="arguments"&&Zt(f)||d==="right"&&f.type==="NGPipeExpression"||d==="property"&&f.type==="MemberExpression"||f.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return d==="callee"||d==="left"&&f.type==="BinaryExpression"&&f.operator==="<"||!jn(f)&&f.type!=="ArrowFunctionExpression"&&f.type!=="AssignmentExpression"&&f.type!=="AssignmentPattern"&&f.type!=="BinaryExpression"&&f.type!=="NewExpression"&&f.type!=="ConditionalExpression"&&f.type!=="ExpressionStatement"&&f.type!=="JsExpressionRoot"&&f.type!=="JSXAttribute"&&f.type!=="JSXElement"&&f.type!=="JSXExpressionContainer"&&f.type!=="JSXFragment"&&f.type!=="LogicalExpression"&&!Zt(f)&&!Ra(f)&&f.type!=="ReturnStatement"&&f.type!=="ThrowStatement"&&f.type!=="TypeCastExpression"&&f.type!=="VariableDeclarator"&&f.type!=="YieldExpression";case"TSInstantiationExpression":return d==="object"&&qr(f)}return!1}var _ge=yr(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function $ge(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function Lge(e){return kC(e,t=>t.type==="ObjectTypeAnnotation"&&kC(t,r=>r.type==="FunctionTypeAnnotation"))}function Pge(e){return lo(e)}function sp(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(sp);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(sp);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(sp);break;case"UnaryExpression":if(t.prefix)return e.callParent(sp);break}return!1}function cz(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!MC(e,t):!l2(r)||n.type!=="ExportDefaultDeclaration"&&MC(e,t)?!1:e.call(()=>cz(e,t),...Aj(r))}function Fge(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(i==="object"&&r.type==="MemberExpression"||i==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression")&&(e.match(void 0,void 0,(s,o)=>o==="callee"&&(s.type==="CallExpression"&&!s.optional||s.type==="NewExpression")||o==="object"&&s.type==="MemberExpression"&&!s.optional)||e.match(void 0,void 0,(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))}function IC(e){return e.type==="Identifier"?!0:qr(e)?!e.computed&&!e.optional&&e.property.type==="Identifier"&&IC(e.object):!1}function Oge(e){return e.type==="ChainExpression"&&(e=e.expression),IC(e)||Zt(e)&&!e.optional&&IC(e.callee)}var Fc=MC;function Nge(e,t){let r=t-1;r=gd(e,r,{backwards:!0}),r=md(e,r,{backwards:!0}),r=gd(e,r,{backwards:!0});let n=md(e,r,{backwards:!0});return r!==n}var Mge=Nge,Ige=()=>!0;function w2(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function Rge(e,t){var r;let n=e.node,i=[w2(e,t)],{printer:s,originalText:o,locStart:a,locEnd:l}=t;if((r=s.isBlockComment)!=null&&r.call(s,n)){let c=es(o,l(n))?es(o,a(n),{backwards:!0})?$e:Ye:" ";i.push(c)}else i.push($e);let u=md(o,gd(o,l(n)));return u!==!1&&es(o,u)&&i.push($e),i}function Bge(e,t,r){var n;let i=e.node,s=w2(e,t),{printer:o,originalText:a,locStart:l}=t,u=(n=o.isBlockComment)==null?void 0:n.call(o,i);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||es(a,l(i),{backwards:!0})){let c=Mge(a,l(i));return{doc:jO([$e,c?$e:"",s]),isBlock:u,hasLineSuffix:!0}}return!u||r!=null&&r.hasLineSuffix?{doc:[jO([" ",s]),Oo],isBlock:u,hasLineSuffix:!0}:{doc:[" ",s],isBlock:u,hasLineSuffix:!1}}function Ir(e,t,r={}){let{node:n}=e;if(!ir(n==null?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:o=Ige}=r,a=[];if(e.each(({node:u})=>{u.leading||u.trailing||u.marker!==s||!o(u)||a.push(w2(e,t))},"comments"),a.length===0)return"";let l=Wt($e,a);return i?Le([$e,l]):l}function hz(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(a=>!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:l,trailing:u}=a;l?i.push(Rge(e,t)):u&&(o=Bge(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function no(e,t,r){let{leading:n,trailing:i}=hz(e,r);return!n&&!i?t:LC(t,s=>[n,s,i])}var jge=class extends Error{constructor(r,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(r[i])}.`);qo(this,"name","UnexpectedNodeError");this.node=r}},Yd=jge;function zge(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var js,Hge=class{constructor(t){vde(this,js),bde(this,js,new Set(t))}getLeadingWhitespaceCount(t){let r=Wa(this,js),n=0;for(let i=0;i=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return Wa(this,js).has(t.charAt(0))}hasTrailingWhitespace(t){return Wa(this,js).has(nr(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${zge([...Wa(this,js)].join(""))}]+`,i=new RegExp(r?`(${n})`:n,"u");return t.split(i)}hasWhitespaceCharacter(t){let r=Wa(this,js);return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=Wa(this,js);return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=Wa(this,js);return Array.prototype.every.call(t,n=>r.has(n))}};js=new WeakMap;var Uge=Hge,Zy=new Uge(` -\r `),MS=e=>e===""||e===Ye||e===$e||e===_e;function Wge(e,t,r){var n,i,s;let{node:o}=e;if(o.type==="JSXElement"&&sme(o))return[r("openingElement"),r("closingElement")];let a=o.type==="JSXElement"?r("openingElement"):r("openingFragment"),l=o.type==="JSXElement"?r("closingElement"):r("closingFragment");if(o.children.length===1&&o.children[0].type==="JSXExpressionContainer"&&(o.children[0].expression.type==="TemplateLiteral"||o.children[0].expression.type==="TaggedTemplateExpression"))return[a,...e.map(r,"children"),l];o.children=o.children.map(w=>ome(w)?{type:"JSXText",value:" ",raw:" "}:w);let u=o.children.some(Dn),c=o.children.filter(w=>w.type==="JSXExpressionContainer").length>1,h=o.type==="JSXElement"&&o.openingElement.attributes.length>1,d=gi(a)||u||h||c,f=e.parent.rootMarker==="mdx",p=t.singleQuote?"{' '}":'{" "}',m=f?" ":_t([p,_e]," "),y=((i=(n=o.openingElement)==null?void 0:n.name)==null?void 0:i.name)==="fbt",b=Vge(e,t,r,m,y),v=o.children.some(w=>vg(w));for(let w=b.length-2;w>=0;w--){let A=b[w]===""&&b[w+1]==="",$=b[w]===$e&&b[w+1]===""&&b[w+2]===$e,O=(b[w]===_e||b[w]===$e)&&b[w+1]===""&&b[w+2]===m,P=b[w]===m&&b[w+1]===""&&(b[w+2]===_e||b[w+2]===$e),N=b[w]===m&&b[w+1]===""&&b[w+2]===m,F=b[w]===_e&&b[w+1]===""&&b[w+2]===$e||b[w]===$e&&b[w+1]===""&&b[w+2]===_e;$&&v||A||O||N||F?b.splice(w,2):P&&b.splice(w+1,2)}for(;b.length>0&&MS(nr(!1,b,-1));)b.pop();for(;b.length>1&&MS(b[0])&&MS(b[1]);)b.shift(),b.shift();let E=[];for(let[w,A]of b.entries()){if(A===m){if(w===1&&b[w-1]===""){if(b.length===2){E.push(p);continue}E.push([p,$e]);continue}else if(w===b.length-1){E.push(p);continue}else if(b[w-1]===""&&b[w-2]===$e){E.push(p);continue}}E.push(A),gi(A)&&(d=!0)}let D=v?f2(E):me(E,{shouldBreak:!0});if(((s=t.cursorNode)==null?void 0:s.type)==="JSXText"&&o.children.includes(t.cursorNode)&&(D=[zO,D,zO]),f)return D;let C=me([a,Le([$e,D]),$e,l]);return d?C:$u([me([a,...b,l]),C])}function Vge(e,t,r,n,i){let s=[];return e.each(({node:o,next:a})=>{if(o.type==="JSXText"){let l=Ts(o);if(vg(o)){let u=Zy.split(l,!0);u[0]===""&&(s.push(""),u.shift(),/\n/u.test(u[0])?s.push(KO(i,u[1],o,a)):s.push(n),u.shift());let c;if(nr(!1,u,-1)===""&&(u.pop(),c=u.pop()),u.length===0)return;for(let[h,d]of u.entries())h%2===1?s.push(Ye):s.push(d);c!==void 0?/\n/u.test(c)?s.push(KO(i,nr(!1,s,-1),o,a)):s.push(n):s.push(qO(i,nr(!1,s,-1),o,a))}else/\n/u.test(l)?l.match(/\n/gu).length>1&&s.push("",$e):s.push("",n)}else{let l=r();if(s.push(l),a&&vg(a)){let u=Zy.trim(Ts(a)),[c]=Zy.split(u);s.push(qO(i,c,o,a))}else s.push($e)}},"children"),s}function qO(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?_e:$e:_e}function KO(e,t,r,n){return e?$e:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?$e:_e:$e}var Gge=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function qge(e,t,r){let{parent:n}=e;if(Gge.has(n.type))return t;let i=e.match(void 0,o=>o.type==="ArrowFunctionExpression",Zt,o=>o.type==="JSXExpressionContainer"),s=Fc(e,r);return me([s?"":_t("("),Le([_e,t]),_e,s?"":_t(")")],{shouldBreak:i})}function Kge(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(vi(n.value)){let o=Ts(n.value),a=On(!1,On(!1,o.slice(1,-1),"'","'"),""",'"'),l=wj(a,t.jsxSingleQuote);a=l==='"'?On(!1,a,'"',"""):On(!1,a,"'","'"),s=e.call(()=>no(e,oc(l+a+l),t),"value")}else s=r("value");i.push("=",s)}return i}function Jge(e,t,r){let{node:n}=e,i=(s,o)=>s.type==="JSXEmptyExpression"||!We(s)&&(jn(s)||lo(s)||s.type==="ArrowFunctionExpression"||s.type==="AwaitExpression"&&(i(s.argument,s)||s.argument.type==="JSXElement")||Zt(s)||s.type==="ChainExpression"&&Zt(s.expression)||s.type==="FunctionExpression"||s.type==="TemplateLiteral"||s.type==="TaggedTemplateExpression"||s.type==="DoExpression"||Dn(o)&&(s.type==="ConditionalExpression"||Ea(s)));return i(n.expression,e.parent)?me(["{",r("expression"),Ca,"}"]):me(["{",Le([_e,r("expression")]),_e,Ca,"}"])}function Xge(e,t,r){var n,i;let{node:s}=e,o=We(s.name)||We(s.typeParameters)||We(s.typeArguments);if(s.selfClosing&&s.attributes.length===0&&!o)return["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((n=s.attributes)==null?void 0:n.length)===1&&vi(s.attributes[0].value)&&!s.attributes[0].value.value.includes(` -`)&&!o&&!We(s.attributes[0]))return me(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let a=(i=s.attributes)==null?void 0:i.some(u=>vi(u.value)&&u.value.value.includes(` -`)),l=t.singleAttributePerLine&&s.attributes.length>1?$e:Ye;return me(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters"),Le(e.map(()=>[l,r()],"attributes")),...Yge(s,t,o)],{shouldBreak:a})}function Yge(e,t,r){return e.selfClosing?[Ye,"/>"]:Qge(e,t,r)?[">"]:[_e,">"]}function Qge(e,t,r){let n=e.attributes.length>0&&We(nr(!1,e.attributes,-1),tt.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function Zge(e,t,r){let{node:n}=e,i=[];i.push(""),i}function eme(e,t){let{node:r}=e,n=We(r),i=We(r,tt.Line),s=r.type==="JSXOpeningFragment";return[s?"<":""]}function tme(e,t,r){let n=no(e,Wge(e,t,r),t);return qge(e,n,t)}function rme(e,t){let{node:r}=e,n=We(r,tt.Line);return[Ir(e,t,{indent:n}),n?$e:""]}function nme(e,t,r){let{node:n}=e;return["{",e.call(({node:i})=>{let s=["...",r()];return!We(i)||!ez(e)?s:[Le([_e,no(e,s,t)]),_e]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function ime(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Kge(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return Wt(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return Wt(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return nme(e,t,r);case"JSXExpressionContainer":return Jge(e,t,r);case"JSXFragment":case"JSXElement":return tme(e,t,r);case"JSXOpeningElement":return Xge(e,t,r);case"JSXClosingElement":return Zge(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return eme(e,t);case"JSXEmptyExpression":return rme(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Yd(n,"JSX")}}function sme(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!vg(t)}function vg(e){return e.type==="JSXText"&&(Zy.hasNonWhitespaceCharacter(Ts(e))||!/\n/u.test(Ts(e)))}function ome(e){return e.type==="JSXExpressionContainer"&&vi(e.expression)&&e.expression.value===" "&&!We(e.expression)}function ame(e){let{node:t,parent:r}=e;if(!Dn(t)||!Dn(r))return!1;let{index:n,siblings:i}=e,s;for(let o=n;o>0;o--){let a=i[o-1];if(!(a.type==="JSXText"&&!vg(a))){s=a;break}}return(s==null?void 0:s.type)==="JSXExpressionContainer"&&s.expression.type==="JSXEmptyExpression"&&Qb(s.expression)}function lme(e){return Qb(e.node)||ame(e)}var dz=lme,ume=0;function fz(e,t,r){var n;let{node:i,parent:s,grandparent:o,key:a}=e,l=a!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),u=i.operator==="|>"&&((n=e.root.extra)==null?void 0:n.__isUsingHackPipeline),c=RC(e,r,t,!1,l);if(l)return c;if(u)return me(c);if(Zt(s)&&s.callee===i||s.type==="UnaryExpression"||qr(s)&&!s.computed)return me([Le([_e,...c]),_e]);let h=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&o.type==="JSXAttribute"||i.operator!=="|"&&s.type==="JsExpressionRoot"||i.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&o.type==="NGMicrosyntax"&&o.body.length===1)||i===s.body&&s.type==="ArrowFunctionExpression"||i!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&o.type!=="ReturnStatement"&&o.type!=="ThrowStatement"&&!Zt(o)||s.type==="TemplateLiteral",d=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ra(s),f=Ea(i.left)&&d2(i.operator,i.left.operator);if(h||bg(i)&&!f||!bg(i)&&d)return me(c);if(c.length===0)return"";let p=Dn(i.right),m=c.findIndex(C=>typeof C!="string"&&!Array.isArray(C)&&C.type===ks),y=c.slice(0,m===-1?1:m+1),b=c.slice(y.length,p?-1:void 0),v=Symbol("logicalChain-"+ ++ume),E=me([...y,Le(b)],{id:v});if(!p)return E;let D=nr(!1,c,-1);return me([E,Zb(D,{groupId:v})])}function RC(e,t,r,n,i){var s;let{node:o}=e;if(!Ea(o))return[me(t())];let a=[];d2(o.operator,o.left.operator)?a=e.call(y=>RC(y,t,r,!0,i),"left"):a.push(me(t("left")));let l=bg(o),u=(o.operator==="|>"||o.type==="NGPipeExpression"||cme(e,r))&&!ic(r.originalText,o.right),c=o.type==="NGPipeExpression"?"|":o.operator,h=o.type==="NGPipeExpression"&&o.arguments.length>0?me(Le([_e,": ",Wt([Ye,": "],e.map(()=>Fo(2,me(t())),"arguments"))])):"",d;if(l)d=[c," ",t("right"),h];else{let y=c==="|>"&&((s=e.root.extra)!=null&&s.__isUsingHackPipeline)?e.call(b=>RC(b,t,r,!0,i),"right"):t("right");d=[u?Ye:"",c,u?" ":Ye,y,h]}let{parent:f}=e,p=We(o.left,tt.Trailing|tt.Line),m=p||!(i&&o.type==="LogicalExpression")&&f.type!==o.type&&o.left.type!==o.type&&o.right.type!==o.type;if(a.push(u?"":" ",m?me(d,{shouldBreak:p}):d),n&&We(o)){let y=p2(no(e,a,r));return y.type===nu?y.parts:Array.isArray(y)?y:[y]}return a}function bg(e){return e.type!=="LogicalExpression"?!1:!!(lo(e.right)&&e.right.properties.length>0||jn(e.right)&&e.right.elements.length>0||Dn(e.right))}var JO=e=>e.type==="BinaryExpression"&&e.operator==="|";function cme(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&JO(e.node)&&!e.hasAncestor(r=>!JO(r)&&r.type!=="JsExpressionRoot")}function hme(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),We(n.node)?" //"+qh(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return fz(e,t,r);case"NGChainedExpression":return me(Wt([";",Ye],e.map(()=>fme(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":XO(e)?" ":[";",Ye],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:i,parent:s}=e,o=XO(e)||(i===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(i===2||i===3)&&(n.key.name==="else"&&s.body[i-1].type==="NGMicrosyntaxKeyedExpression"&&s.body[i-1].key.name==="then"||n.key.name==="track"))&&s.body[0].type==="NGMicrosyntaxExpression";return[r("key"),o?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new Yd(n,"Angular")}}function XO({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var dme=yr(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function fme({node:e}){return kC(e,dme)}function pz(e,t,r){let{node:n}=e;return me([Wt(Ye,e.map(r,"decorators")),gz(n,t)?$e:Ye])}function pme(e,t,r){return mz(e.node)?[Wt($e,e.map(r,"declaration","decorators")),$e]:""}function gme(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!ir(s)||mz(i)||dz(e))return"";let o=n.type==="ClassExpression"||n.type==="ClassDeclaration"||gz(n,t);return[e.key==="declaration"&&afe(i)?$e:o?Oo:"",Wt(Ye,e.map(r,"decorators")),Ye]}function gz(e,t){return e.decorators.some(r=>es(t.originalText,Xt(r)))}function mz(e){var t;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let r=(t=e.declaration)==null?void 0:t.decorators;return ir(r)&&Kb(e,r[0])}var c0=class extends Error{constructor(){super(...arguments);qo(this,"name","ArgExpansionBailout")}};function mme(e,t,r){let{node:n}=e,i=Ps(n);if(i.length===0)return["(",Ir(e,t),")"];let s=i.length-1;if(bme(i)){let d=["("];return l0(e,(f,p)=>{d.push(r()),p!==s&&d.push(", ")}),d.push(")"),d}let o=!1,a=[];l0(e,({node:d},f)=>{let p=r();f===s||(Ia(d,t)?(o=!0,p=[p,",",$e,$e]):p=[p,",",Ye]),a.push(p)});let l=n.type==="ImportExpression"||n.callee.type==="Import",u=!t.parser.startsWith("__ng_")&&!l&&Ma(t,"all")?",":"";function c(){return me(["(",Le([Ye,...a]),u,Ye,")"],{shouldBreak:!0})}if(o||e.parent.type!=="Decorator"&&yfe(i))return c();if(vme(i)){let d=a.slice(1);if(d.some(gi))return c();let f;try{f=r(RO(n,0),{expandFirstArg:!0})}catch(p){if(p instanceof c0)return c();throw p}return gi(f)?[Oo,$u([["(",me(f,{shouldBreak:!0}),", ",...d,")"],c()])]:$u([["(",f,", ",...d,")"],["(",me(f,{shouldBreak:!0}),", ",...d,")"],c()])}if(yme(i,a,t)){let d=a.slice(0,-1);if(d.some(gi))return c();let f;try{f=r(RO(n,-1),{expandLastArg:!0})}catch(p){if(p instanceof c0)return c();throw p}return gi(f)?[Oo,$u([["(",...d,me(f,{shouldBreak:!0}),")"],c()])]:$u([["(",...d,f,")"],["(",...d,me(f,{shouldBreak:!0}),")"],c()])}let h=["(",Le([_e,...a]),_t(u),_e,")"];return Oj(e)?h:me(h,{shouldBreak:a.some(gi)||o})}function Pp(e,t=!1){return lo(e)&&(e.properties.length>0||We(e))||jn(e)&&(e.elements.length>0||We(e))||e.type==="TSTypeAssertion"&&Pp(e.expression)||Ao(e)&&Pp(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||xme(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&Pp(e.body,!0)||lo(e.body)||jn(e.body)||!t&&(Zt(e.body)||e.body.type==="ConditionalExpression")||Dn(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function yme(e,t,r){var n,i;let s=nr(!1,e,-1);if(e.length===1){let a=nr(!1,t,-1);if((n=a.label)!=null&&n.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let o=nr(!1,e,-2);return!We(s,tt.Leading)&&!We(s,tt.Trailing)&&Pp(s)&&(!o||o.type!==s.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!jn(s))&&!(e.length>1&&Hz(s,r))}function vme(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&wme(r)?!0:!We(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&yz(r)&&!Pp(r)}function yz(e){if(e.type==="ParenthesizedExpression")return yz(e.expression);if(Ao(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.typeArguments??t.typeParameters;(r==null?void 0:r.params.length)===1&&(t=r.params[0])}return c2(t)&&Ks(e.expression,1)}return vd(e)&&Ps(e).length>1?!1:Ea(e)?Ks(e.left,1)&&Ks(e.right,1):kj(e)||Ks(e)}function bme(e){return e.length===2?YO(e,0):e.length===3?e[0].type==="Identifier"&&YO(e,1):!1}function YO(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&ri(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&!e.some(i=>We(i))}function xme(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||We(e,tt.Dangling))}function wme(e){return e.type==="ObjectExpression"&&e.properties.length===1&&Ra(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&vi(e.properties[0].value)&&e.properties[0].value.value==="module"}var BC=mme,Sme=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),Zt(e)&&Ps(e).length>0);function Dme(e,t,r){var n;let i=r("object"),s=vz(e,t,r),{node:o}=e,a=e.findAncestor(c=>!(qr(c)||c.type==="TSNonNullExpression")),l=e.findAncestor(c=>!(c.type==="ChainExpression"||c.type==="TSNonNullExpression")),u=a&&(a.type==="NewExpression"||a.type==="BindExpression"||a.type==="AssignmentExpression"&&a.left.type!=="Identifier")||o.computed||o.object.type==="Identifier"&&o.property.type==="Identifier"&&!qr(l)||(l.type==="AssignmentExpression"||l.type==="VariableDeclarator")&&(Sme(o.object)||((n=i.label)==null?void 0:n.memberChain));return Qg(i.label,[i,u?s:me(Le([_e,s]))])}function vz(e,t,r){let n=r("property"),{node:i}=e,s=yi(e);return i.computed?!i.property||Da(i.property)?[s,"[",n,"]"]:me([s,"[",Le([_e,n]),_e,"]"]):[s,".",n]}function bz(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>bz(e,t,r),"expression");let{parent:n}=e,i=!n||n.type==="ExpressionStatement",s=[];function o(k){let{originalText:T}=t,M=Zg(T,Xt(k));return T.charAt(M)===")"?M!==!1&&a2(T,M+1):Ia(k,t)}function a(k){let{node:T}=k;if(T.type==="ChainExpression")return k.call(()=>a(k),"expression");if(Zt(T)&&(yh(T.callee)||Zt(T.callee))){let M=o(T);s.unshift({node:T,hasTrailingEmptyLine:M,printed:[no(k,[yi(k),ac(k,t,r),BC(k,t,r)],t),M?$e:""]}),k.call(R=>a(R),"callee")}else yh(T)?(s.unshift({node:T,needsParens:Fc(k,t),printed:no(k,qr(T)?vz(k,t,r):jz(k,t,r),t)}),k.call(M=>a(M),"object")):T.type==="TSNonNullExpression"?(s.unshift({node:T,printed:no(k,"!",t)}),k.call(M=>a(M),"expression")):s.unshift({node:T,printed:r()})}let{node:l}=e;s.unshift({node:l,printed:[yi(e),ac(e,t,r),BC(e,t,r)]}),l.callee&&e.call(k=>a(k),"callee");let u=[],c=[s[0]],h=1;for(;h0&&u.push(c);function f(k){return/^[A-Z]|^[$_]+$/u.test(k)}function p(k){return k.length<=t.tabWidth}function m(k){var T;let M=(T=k[1][0])==null?void 0:T.node.computed;if(k[0].length===1){let B=k[0][0].node;return B.type==="ThisExpression"||B.type==="Identifier"&&(f(B.name)||i&&p(B.name)||M)}let R=nr(!1,k[0],-1).node;return qr(R)&&R.property.type==="Identifier"&&(f(R.property.name)||M)}let y=u.length>=2&&!We(u[1][0].node)&&m(u);function b(k){let T=k.map(M=>M.printed);return k.length>0&&nr(!1,k,-1).needsParens?["(",...T,")"]:T}function v(k){return k.length===0?"":Le([$e,Wt($e,k.map(b))])}let E=u.map(b),D=E,C=y?3:2,w=u.flat(),A=w.slice(1,-1).some(k=>We(k.node,tt.Leading))||w.slice(0,-1).some(k=>We(k.node,tt.Trailing))||u[C]&&We(u[C][0].node,tt.Leading);if(u.length<=C&&!A&&!u.some(k=>nr(!1,k,-1).hasTrailingEmptyLine))return Oj(e)?D:me(D);let $=nr(!1,u[y?1:0],-1).node,O=!Zt($)&&o($),P=[b(u[0]),y?u.slice(1,2).map(b):"",O?$e:"",v(u.slice(y?2:1))],N=s.map(({node:k})=>k).filter(Zt);function F(){let k=nr(!1,nr(!1,u,-1),-1).node,T=nr(!1,E,-1);return Zt(k)&&gi(T)&&N.slice(0,-1).some(M=>M.arguments.some(mg))}let L;return A||N.length>2&&N.some(k=>!k.arguments.every(T=>Ks(T)))||E.slice(0,-1).some(gi)||F()?L=me(P):L=[gi(D)||O?Oo:"",$u([D,P])],Qg({memberChain:!0},L)}var Eme=bz;function xz(e,t,r){var n;let{node:i}=e,s=i.type==="NewExpression",o=i.type==="ImportExpression",a=yi(e),l=Ps(i),u=l.length===1&&Pj(l[0],t.originalText);if(u||Cme(e)||Yb(i,e.parent)){let h=[];if(l0(e,()=>{h.push(r())}),!(u&&(n=h[0].label)!=null&&n.embed))return[s?"new ":"",QO(e,r),a,ac(e,t,r),"(",Wt(", ",h),")"]}if(!o&&!s&&yh(i.callee)&&!e.call(h=>Fc(h,t),"callee",...i.callee.type==="ChainExpression"?["expression"]:[]))return Eme(e,t,r);let c=[s?"new ":"",QO(e,r),a,ac(e,t,r),BC(e,t,r)];return o||Zt(i.callee)?me(c):c}function QO(e,t){let{node:r}=e;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:t("callee")}function Cme(e){let{node:t}=e;if(t.type!=="CallExpression"||t.optional||t.callee.type!=="Identifier")return!1;let r=Ps(t);return t.callee.name==="require"?r.length===1&&vi(r[0])||r.length>1:t.callee.name==="define"&&e.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&vi(r[0])&&r[1].type==="ArrayExpression":!1}function em(e,t,r,n,i,s){let o=kme(e,t,r,n,s),a=s?r(s,{assignmentLayout:o}):"";switch(o){case"break-after-operator":return me([me(n),i,me(Le([Ye,a]))]);case"never-break-after-operator":return me([me(n),i," ",a]);case"fluid":{let l=Symbol("assignment");return me([me(n),i,me(Le(Ye),{id:l}),Ca,Zb(a,{groupId:l})])}case"break-lhs":return me([n,i," ",me(a)]);case"chain":return[me(n),i,Ye,a];case"chain-tail":return[me(n),i,Le([Ye,a])];case"chain-tail-arrow-chain":return[me(n),i,a];case"only-left":return n}}function Ame(e,t,r){let{node:n}=e;return em(e,t,r,r("left"),[" ",n.operator],"right")}function Tme(e,t,r){return em(e,t,r,r("id")," =","init")}function kme(e,t,r,n,i){let{node:s}=e,o=s[i];if(!o)return"only-left";let a=!ev(o);if(e.match(ev,wz,c=>!a||c.type!=="ExpressionStatement"&&c.type!=="VariableDeclaration"))return a?o.type==="ArrowFunctionExpression"&&o.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&ev(o.right)||ic(t.originalText,o))return"break-after-operator";if(s.type==="ImportAttribute"||o.type==="CallExpression"&&o.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let l=zfe(n);if($me(s)||Ome(s)||Sz(s)&&l)return"break-lhs";let u=Mme(s,n,t);return e.call(()=>_me(e,t,r,u),i)?"break-after-operator":Lme(s)?"break-lhs":!l&&(u||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||o.type==="BooleanLiteral"||Da(o)||o.type==="ClassExpression")?"never-break-after-operator":"fluid"}function _me(e,t,r,n){let i=e.node;if(Ea(i)&&!bg(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!Bme(i))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:u}=i;return Ea(u)&&!bg(u)}let{consequent:a,alternate:l}=i;return a.type==="ConditionalExpression"||l.type==="ConditionalExpression"}case"ClassExpression":return ir(i.decorators)}if(n)return!1;let s=i,o=[];for(;;)if(s.type==="UnaryExpression"||s.type==="AwaitExpression"||s.type==="YieldExpression"&&s.argument!==null)s=s.argument,o.push("argument");else if(s.type==="TSNonNullExpression")s=s.expression,o.push("expression");else break;return!!(vi(s)||e.call(()=>Dz(e,t,r),...o))}function $me(e){if(wz(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return Ra(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function ev(e){return e.type==="AssignmentExpression"}function wz(e){return ev(e)||e.type==="VariableDeclarator"}function Lme(e){let t=Fme(e);if(ir(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Pme=yr(["TSTypeAliasDeclaration","TypeAlias"]);function Fme(e){var t;if(Pme(e))return(t=e.typeParameters)==null?void 0:t.params}function Ome(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=ZO(t.typeAnnotation);return ir(r)&&r.length>1&&r.some(n=>ir(ZO(n))||n.type==="TSConditionalType")}function Sz(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var Nme=yr(["TSTypeReference","GenericTypeAnnotation"]);function ZO(e){var t;if(Nme(e))return(t=e.typeArguments??e.typeParameters)==null?void 0:t.params}function Dz(e,t,r,n=!1){var i;let{node:s}=e,o=()=>Dz(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(o,"expression");if(Zt(s)){if((i=xz(e,t,r).label)!=null&&i.memberChain)return!1;let a=Ps(s);return!(a.length===0||a.length===1&&h2(a[0],t))||Ime(s,r)?!1:e.call(o,"callee")}return qr(s)?e.call(o,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function Mme(e,t,r){return Ra(e)?(t=p2(t),typeof t=="string"&&pd(t)1)return!0;if(r.length===1){let i=r[0];if(sc(i)||Mj(i)||i.type==="TSTypeLiteral"||i.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(gi(t(n)))return!0}return!1}function Rme(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function Bme(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!r.typeParameters;case"TSTypeReference":return!!(r.typeArguments??r.typeParameters);default:return!1}}return t(e.checkType)||t(e.extendsType)}function Oc(e,t,r,n,i){let s=e.node,o=ri(s),a=i?ac(e,r,t):"";if(o.length===0)return[a,"(",Ir(e,r,{filter:f=>uo(r.originalText,Xt(f))===")"}),")"];let{parent:l}=e,u=Yb(l),c=Ez(s),h=[];if(Dfe(e,(f,p)=>{let m=p===o.length-1;m&&s.rest&&h.push("..."),h.push(t()),!m&&(h.push(","),u||c?h.push(" "):Ia(o[p],r)?h.push($e,$e):h.push(Ye))}),n&&!zme(e)){if(gi(a)||gi(h))throw new c0;return me([$C(a),"(",$C(h),")"])}let d=o.every(f=>!ir(f.decorators));return c&&d?[a,"(",...h,")"]:u?[a,"(",...h,")"]:(_j(l)||hfe(l)||l.type==="TypeAlias"||l.type==="UnionTypeAnnotation"||l.type==="IntersectionTypeAnnotation"||l.type==="FunctionTypeAnnotation"&&l.returnType===s)&&o.length===1&&o[0].name===null&&s.this!==o[0]&&o[0].typeAnnotation&&s.typeParameters===null&&c2(o[0].typeAnnotation)&&!s.rest?r.arrowParens==="always"||s.type==="HookTypeAnnotation"?["(",...h,")"]:h:[a,"(",Le([_e,...h]),_t(!Sfe(s)&&Ma(r,"all")?",":""),_e,")"]}function Ez(e){if(!e)return!1;let t=ri(e);if(t.length!==1)return!1;let[r]=t;return!We(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Il(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Il(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||lo(r.right)&&r.right.properties.length===0||jn(r.right)&&r.right.elements.length===0))}function jme(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function Qd(e,t){var r;let n=jme(e);if(!n)return!1;let i=(r=e.typeParameters)==null?void 0:r.params;if(i){if(i.length>1)return!1;if(i.length===1){let s=i[0];if(s.constraint||s.default)return!1}}return ri(e).length===1&&(Il(n)||gi(t))}function zme(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function Hme(e){let t=ri(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var Ume=yr(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),Wme=yr(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function Vme(e){let{types:t}=e;if(t.some(n=>We(n)))return!1;let r=t.find(n=>Wme(n));return r?t.every(n=>n===r||Ume(n)):!1}function Cz(e){return c2(e)||Il(e)?!0:sc(e)?Vme(e):!1}function Gme(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Wi(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}function Az(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Wi(e)];s.push("type ",r("id"),r("typeParameters"));let o=i.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[em(e,t,r,s," =",o),n]}function Tz(e,t,r){let n=!1;return me(e.map(({isFirst:i,previous:s,node:o,index:a})=>{let l=r();if(i)return l;let u=Il(o),c=Il(s);return c&&u?[" & ",n?Le(l):l]:!c&&!u?Le([" &",Ye,l]):(a>1&&(n=!0),[" & ",a>1?Le(l):l])},"types"))}function kz(e,t,r){let{node:n}=e,{parent:i}=e,s=i.type!=="TypeParameterInstantiation"&&(i.type!=="TSConditionalType"||!t.experimentalTernaries)&&(i.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&i.type!=="TSTypeParameterInstantiation"&&i.type!=="GenericTypeAnnotation"&&i.type!=="TSTypeReference"&&i.type!=="TSTypeAssertion"&&i.type!=="TupleTypeAnnotation"&&i.type!=="TSTupleType"&&!(i.type==="FunctionTypeParam"&&!i.name&&e.grandparent.this!==i)&&!((i.type==="TypeAlias"||i.type==="VariableDeclarator"||i.type==="TSTypeAliasDeclaration")&&ic(t.originalText,n)),o=Cz(n),a=e.map(c=>{let h=r();return o||(h=Fo(2,h)),no(c,h,t)},"types");if(o)return Wt(" | ",a);let l=s&&!ic(t.originalText,n),u=[_t([l?Ye:"","| "]),Wt([Ye,"| "],a)];return Fc(e,t)?me([Le(u),_e]):(i.type==="TupleTypeAnnotation"||i.type==="TSTupleType")&&i[i.type==="TupleTypeAnnotation"&&i.types?"types":"elementTypes"].length>1?me([Le([_t(["(",_e]),u]),_e,_t(")")]):me(s?Le(u):u)}function qme(e){var t;let{node:r,parent:n}=e;return r.type==="FunctionTypeAnnotation"&&(_j(n)||!((n.type==="ObjectTypeProperty"||n.type==="ObjectTypeInternalSlot")&&!n.variance&&!n.optional&&Kb(n,r)||n.type==="ObjectTypeCallProperty"||((t=e.getParentNode(2))==null?void 0:t.type)==="DeclareFunction"))}function _z(e,t,r){let{node:n}=e,i=[e1(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&i.push("new ");let s=Oc(e,r,t,!1,!0),o=[];return n.type==="FunctionTypeAnnotation"?o.push(qme(e)?" => ":": ",r("returnType")):o.push(Mn(e,r,n.returnType?"returnType":"typeAnnotation")),Qd(n,o)&&(s=me(s)),i.push(s,o),me(i)}function $z(e,t,r){return[r("objectType"),yi(e),"[",r("indexType"),"]"]}function Lz(e,t,r){return["infer ",r("typeParameter")]}function eN(e,t,r){let{node:n}=e;return[n.postfix?"":r,Mn(e,t),n.postfix?r:""]}function Pz(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Fz(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var Kme=new WeakSet;function Mn(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let s=e.call(Oz,r);(s==="=>"||s===":"&&We(n,tt.Leading))&&(i=!0),Kme.add(n)}return i?[" ",t(r)]:t(r)}var Oz=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareHook")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function Nz(e,t,r){let n=Oz(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function Mz(e){return[e("elementType"),"[]"]}function Iz({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TypeofTypeAnnotation"||e.typeArguments?"typeArguments":"typeParameters";return["typeof ",t(r),t(n)]}function Rz(e,t){let{node:r}=e;return[r.type==="TSTypePredicate"&&r.asserts?"asserts ":r.type==="TypePredicate"&&r.kind?`${r.kind} `:"",t("parameterName"),r.typeAnnotation?[" is ",Mn(e,t)]:""]}function yi(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":Zt(t)||qr(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function Bz(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var Jme=new Set(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Wi(e){let{node:t}=e;return t.declare||Jme.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var Xme=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function e1({node:e}){return e.abstract||Xme.has(e.type)?"abstract ":""}function ac(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function jz(e,t,r){return["::",r("callee")]}function Va(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:Le([Ye,t])}function zz(e,t){return["...",t("argument"),Mn(e,t)]}function h0(e){return e.accessibility?e.accessibility+" ":""}function Yme(e,t,r,n){let{node:i}=e,s=i.inexact?"...":"";return We(i,tt.Dangling)?me([r,s,Ir(e,t,{indent:!0}),_e,n]):[r,s,n]}function S2(e,t,r){let{node:n}=e,i=[],s=n.type==="TupleExpression"?"#[":"[",o="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",l=n[a];if(l.length===0)i.push(Yme(e,t,s,o));else{let u=nr(!1,l,-1),c=(u==null?void 0:u.type)!=="RestElement"&&!n.inexact,h=u===null,d=Symbol("array"),f=!t.__inJestEach&&l.length>1&&l.every((y,b,v)=>{let E=y==null?void 0:y.type;if(!jn(y)&&!lo(y))return!1;let D=v[b+1];if(D&&E!==D.type)return!1;let C=jn(y)?"elements":"properties";return y[C]&&y[C].length>1}),p=Hz(n,t),m=c?h?",":Ma(t)?p?_t(",","",{groupId:d}):_t(","):"":"";i.push(me([s,Le([_e,p?Zme(e,t,r,m):[Qme(e,t,a,n.inexact,r),m],Ir(e,t)]),_e,o],{shouldBreak:f,id:d}))}return i.push(yi(e),Mn(e,r)),i}function Hz(e,t){return jn(e)&&e.elements.length>1&&e.elements.every(r=>r&&(Da(r)||Tj(r)&&!We(r.argument))&&!We(r,tt.Trailing|tt.Line,n=>!es(t.originalText,Rr(n),{backwards:!0})))}function Uz({node:e},{originalText:t}){let r=i=>s2(t,o2(t,i)),n=i=>t[i]===","?i:n(r(i+1));return a2(t,n(Xt(e)))}function Qme(e,t,r,n,i){let s=[];return e.each(({node:o,isLast:a})=>{s.push(o?me(i()):""),(!a||n)&&s.push([",",Ye,o&&Uz(e,t)?_e:""])},r),n&&s.push("..."),s}function Zme(e,t,r,n){let i=[];return e.each(({isLast:s,next:o})=>{i.push([r(),s?n:","]),s||i.push(Uz(e,t)?[$e,$e]:We(o,tt.Leading|tt.Line)?$e:Ye)},"elements"),f2(i)}var Wz=new Proxy(()=>{},{get:()=>Wz}),Vz=Wz,eye=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,tye=e=>eye.test(e),rye=tye;function nye(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var cl=nye,tv=new WeakMap;function Gz(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function tN(e,t){return t.parser==="json"||t.parser==="jsonc"||!vi(e.key)||yd(Ts(e.key),t).slice(1,-1)!==e.key.value?!1:!!(rye(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Gz(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!=="ImportAttribute"&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function iye(e,t){let{key:r}=e.node;return(r.type==="Identifier"||Da(r)&&Gz(cl(Ts(r)))&&String(r.value)===cl(Ts(r))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&tv.get(e.parent))}function tm(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if(t.quoteProps==="consistent"&&!tv.has(i)){let o=e.siblings.some(a=>!a.computed&&vi(a.key)&&!tN(a,t));tv.set(i,o)}if(iye(e,t)){let o=yd(JSON.stringify(s.type==="Identifier"?s.name:s.value.toString()),t);return e.call(a=>no(a,o,t),"key")}return tN(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!tv.get(i))?e.call(o=>no(o,/^\d/u.test(s.value)?cl(s.value):s.value,t),"key"):r("key")}function IS(e,t,r){let{node:n}=e;return n.shorthand?r("value"):em(e,t,r,tm(e,t,r),":","value")}var sye=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&Xb(r));function qz(e,t,r,n){if(sye(e))return D2(e,r,t);let{node:i}=e,s=!1;if((i.type==="FunctionDeclaration"||i.type==="FunctionExpression")&&n!=null&&n.expandLastArg){let{parent:c}=e;Zt(c)&&(Ps(c).length>1||ri(i).every(h=>h.type==="Identifier"&&!h.typeAnnotation))&&(s=!0)}let o=[Wi(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],a=Oc(e,t,r,s),l=t1(e,t),u=Qd(i,l);return o.push(ac(e,r,t),me([u?me(a):a,l]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&o.push(";"),o}function jC(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,o=[];return!i||i==="init"||i==="method"||i==="constructor"?s.async&&o.push("async "):(Vz.ok(i==="get"||i==="set"),o.push(i," ")),s.generator&&o.push("*"),o.push(tm(e,t,r),n.optional||n.key.optional?"?":"",n===s?D2(e,t,r):r("value")),o}function D2(e,t,r){let{node:n}=e,i=Oc(e,r,t),s=t1(e,r),o=Hme(n),a=Qd(n,s),l=[ac(e,t,r),me([o?me(i,{shouldBreak:!0}):a?me(i):i,s])];return n.body?l.push(" ",r("body")):l.push(t.semi?";":""),l}function oye(e){let t=ri(e);return t.length===1&&!e.typeParameters&&!We(e,tt.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!We(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Kz(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return oye(r)}return!1}function t1(e,t){let{node:r}=e,n=[Mn(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Jz(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let l=r("argument");uye(t,n.argument)?l=["(",Le([$e,l]),$e,")"]:(Ea(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(l=me([_t("("),Le([_e,l]),_e,_t(")")])),s.push(" ",l)}let o=We(n,tt.Dangling),a=i&&o&&We(n,tt.Last|tt.Line);return a&&s.push(i),o&&s.push(" ",Ir(e,t)),a||s.push(i),s}function aye(e,t,r){return["return",Jz(e,t,r)]}function lye(e,t,r){return["throw",Jz(e,t,r)]}function uye(e,t){if(ic(e.originalText,t)||We(t,tt.Leading,r=>Bl(e.originalText,Rr(r),Xt(r)))&&!Dn(t))return!0;if(l2(t)){let r=t,n;for(;n=ofe(r);)if(r=n,ic(e.originalText,r))return!0}return!1}var RS=new WeakMap;function Xz(e){return RS.has(e)||RS.set(e,e.type==="ConditionalExpression"&&!fi(e,t=>t.type==="ObjectExpression")),RS.get(e)}var Yz=e=>e.type==="SequenceExpression";function cye(e,t,r,n={}){let i=[],s,o=[],a=!1,l=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",u;(function y(){let{node:b}=e,v=hye(e,t,r,n);if(i.length===0)i.push(v);else{let{leading:E,trailing:D}=hz(e,t);i.push([E,v]),o.unshift(D)}l&&(a||(a=b.returnType&&ri(b).length>0||b.typeParameters||ri(b).some(E=>E.type!=="Identifier"))),!l||b.body.type!=="ArrowFunctionExpression"?(s=r("body",n),u=b.body):e.call(y,"body")})();let c=!ic(t.originalText,u)&&(Yz(u)||dye(u,s,t)||!a&&Xz(u)),h=e.key==="callee"&&vd(e.parent),d=Symbol("arrow-chain"),f=fye(e,n,{signatureDocs:i,shouldBreak:a}),p,m=!1;return l&&(h||n.assignmentLayout)&&(m=!0,p=n.assignmentLayout==="chain-tail-arrow-chain"||h&&!c),s=pye(e,t,n,{bodyDoc:s,bodyComments:o,functionBody:u,shouldPutBodyOnSameLine:c}),me([me(m?Le([_e,f]):f,{shouldBreak:p,id:d})," =>",l?Zb(s,{groupId:d}):me(s),l&&h?_t(_e,"",{groupId:d}):""])}function hye(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),Kz(e,t))s.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,l=t1(e,r);if(a){if(gi(l))throw new c0;l=me($C(l))}s.push(me([Oc(e,r,t,a,!0),l]))}let o=Ir(e,t,{filter(a){let l=Zg(t.originalText,Xt(a));return l!==!1&&t.originalText.slice(l,l+2)==="=>"}});return o&&s.push(" ",o),s}function dye(e,t,r){var n,i;return jn(e)||lo(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||Dn(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((i=t.label)==null?void 0:i.embed)||Pj(e,r.originalText))}function fye(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:i,key:s}=e;return s!=="callee"&&vd(i)||Ea(i)?me([r[0]," =>",Le([Ye,Wt([" =>",Ye],r.slice(1))])],{shouldBreak:n}):s==="callee"&&vd(i)||t.assignmentLayout?me(Wt([" =>",Ye],r),{shouldBreak:n}):me(Le(Wt([" =>",Ye],r)),{shouldBreak:n})}function pye(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:o}){let{node:a,parent:l}=e,u=r.expandLastArg&&Ma(t,"all")?_t(","):"",c=(r.expandLastArg||l.type==="JSXExpressionContainer")&&!We(a)?_e:"";return o&&Xz(s)?[" ",me([_t("","("),Le([_e,n]),_t("",")"),u,c]),i]:(Yz(s)&&(n=me(["(",Le([_e,n]),_e,")"])),o?[" ",n,i]:[Le([Ye,n,i]),u,c])}var gye=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},mye=gye;function zC(e,t,r,n){let{node:i}=e,s=[],o=mye(!1,i[n],a=>a.type!=="EmptyStatement");return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(s.push(r()),a!==o&&(s.push($e),Ia(a,t)&&s.push($e)))},n),s}function Qz(e,t,r){let n=yye(e,t,r),{node:i,parent:s}=e;if(i.type==="Program"&&(s==null?void 0:s.type)!=="ModuleExpression")return n?[n,$e]:"";let o=[];if(i.type==="StaticBlock"&&o.push("static "),o.push("{"),n)o.push(Le([$e,n]),$e);else{let a=e.grandparent;s.type==="ArrowFunctionExpression"||s.type==="FunctionExpression"||s.type==="FunctionDeclaration"||s.type==="ComponentDeclaration"||s.type==="HookDeclaration"||s.type==="ObjectMethod"||s.type==="ClassMethod"||s.type==="ClassPrivateMethod"||s.type==="ForStatement"||s.type==="WhileStatement"||s.type==="DoWhileStatement"||s.type==="DoExpression"||s.type==="ModuleExpression"||s.type==="CatchClause"&&!a.finalizer||s.type==="TSModuleDeclaration"||i.type==="StaticBlock"||o.push($e)}return o.push("}"),o}function yye(e,t,r){let{node:n}=e,i=ir(n.directives),s=n.body.some(l=>l.type!=="EmptyStatement"),o=We(n,tt.Dangling);if(!i&&!s&&!o)return"";let a=[];return i&&(a.push(zC(e,t,r,"directives")),(s||o)&&(a.push($e),Ia(nr(!1,n.directives,-1),t)&&a.push($e))),s&&a.push(zC(e,t,r,"body")),o&&a.push(Ir(e,t)),a}function vye(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var Zz=vye;function bye(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function xye(e,t,r){let{node:n}=e;return me([n.variance?r("variance"):"","[",Le([r("keyTparam")," in ",r("sourceType")]),"]",bye(n.optional),": ",r("propType")])}function e7(e,t){return e==="+"||e==="-"?e+t:t}function wye(e,t,r){let{node:n}=e,i=Bl(t.originalText,Rr(n),Rr(n.typeParameter));return me(["{",Le([t.bracketSpacing?Ye:_e,me([r("typeParameter"),n.optional?e7(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?_t(";"):""]),Ir(e,t),t.bracketSpacing?Ye:_e,"}"],{shouldBreak:i})}var E2=Zz("typeParameters");function Sye(e,t,r){let{node:n}=e;return ri(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function Fp(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=Yb(e.grandparent),o=e.match(l=>!(l[n].length===1&&Il(l[n][0])),void 0,(l,u)=>u==="typeAnnotation",l=>l.type==="Identifier",Sz);if(i[n].length===0||!o&&(s||i[n].length===1&&(i[n][0].type==="NullableTypeAnnotation"||Cz(i[n][0]))))return["<",Wt(", ",e.map(r,n)),Dye(e,t),">"];let a=i.type==="TSTypeParameterInstantiation"?"":Sye(e,t,n)?",":Ma(t)?_t(","):"";return me(["<",Le([_e,Wt([",",Ye],e.map(r,n))]),a,_e,">"],{id:E2(i)})}function Dye(e,t){let{node:r}=e;if(!We(r,tt.Dangling))return"";let n=!We(r,tt.Line),i=Ir(e,t,{indent:!n});return n?i:[i,$e]}function t7(e,t,r){let{node:n,parent:i}=e,s=[n.type==="TSTypeParameter"&&n.const?"const ":""],o=n.type==="TSTypeParameter"?r("name"):n.name;if(i.type==="TSMappedType")return i.readonly&&s.push(e7(i.readonly,"readonly")," "),s.push("[",o),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent(()=>r("nameType"))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(o),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(Mn(e,r,"bound"))),n.constraint){let a=Symbol("constraint");s.push(" extends",me(Le(Ye),{id:a}),Ca,Zb(r("constraint"),{groupId:a}))}return n.default&&s.push(" = ",r("default")),me(s)}var r7=yr(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function n7(e,t,r){let{node:n}=e,i=[Wi(e),e1(e),"class"],s=We(n.id,tt.Trailing)||We(n.typeParameters,tt.Trailing)||We(n.superClass)||ir(n.extends)||ir(n.mixins)||ir(n.implements),o=[],a=[];if(n.id&&o.push(" ",r("id")),o.push(r("typeParameters")),n.superClass){let l=[Cye(e,t,r),r(n.superTypeArguments?"superTypeArguments":"superTypeParameters")],u=e.call(c=>["extends ",no(c,l,t)],"superClass");s?a.push(Ye,me(u)):a.push(" ",u)}else a.push(BS(e,t,r,"extends"));if(a.push(BS(e,t,r,"mixins"),BS(e,t,r,"implements")),s){let l;o7(n)?l=[...o,Le(a)]:l=Le([...o,a]),i.push(me(l,{id:i7(n)}))}else i.push(...o,...a);return i.push(" ",r("body")),i}var i7=Zz("heritageGroup");function s7(e){return _t($e,"",{groupId:i7(e)})}function Eye(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function o7(e){return e.typeParameters&&!We(e.typeParameters,tt.Trailing|tt.Line)&&!Eye(e)}function BS(e,t,r,n){let{node:i}=e;if(!ir(i[n]))return"";let s=Ir(e,t,{marker:n});return[o7(i)?_t(" ",Ye,{groupId:E2(i.typeParameters)}):Ye,s,s&&$e,n,me(Le([Ye,Wt([",",Ye],e.map(r,n))]))]}function Cye(e,t,r){let n=r("superClass"),{parent:i}=e;return i.type==="AssignmentExpression"?me(_t(["(",Le([_e,n]),_e,")"],n)):n}function a7(e,t,r){let{node:n}=e,i=[];return ir(n.decorators)&&i.push(pz(e,t,r)),i.push(h0(n)),n.static&&i.push("static "),i.push(e1(e)),n.override&&i.push("override "),i.push(jC(e,t,r)),i}function l7(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";ir(n.decorators)&&i.push(pz(e,t,r)),i.push(h0(n),Wi(e)),n.static&&i.push("static "),i.push(e1(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&i.push("accessor "),i.push(tm(e,t,r),yi(e),Bz(e),Mn(e,r));let o=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[em(e,t,r,i," =",o?void 0:"value"),s]}function Aye(e,t,r){let{node:n}=e,i=[];return e.each(({node:s,next:o,isLast:a})=>{i.push(r()),!t.semi&&r7(s)&&Tye(s,o)&&i.push(";"),a||(i.push($e),Ia(s,t)&&i.push($e))},"body"),We(n,tt.Dangling)&&i.push(Ir(e,t)),[ir(n.body)?s7(e.parent):"","{",i.length>0?[Le([$e,i]),$e]:"","}"]}function Tye(e,t){var r;let{type:n,name:i}=e.key;if(!e.computed&&n==="Identifier"&&(i==="static"||i==="get"||i==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let s=(r=t.key)==null?void 0:r.name;if(s==="in"||s==="instanceof")return!0}if(r7(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let s=t.value?t.value.generator:t.generator;return!!(t.computed||s)}case"TSIndexSignature":return!0}return!1}function kye(e,t){if(t.semi||c7(e,t)||d7(e,t))return!1;let{node:r,key:n,parent:i}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(i.type==="Program"||i.type==="BlockStatement"||i.type==="StaticBlock"||i.type==="TSModuleBlock")||n==="consequent"&&i.type==="SwitchCase")&&e.call(()=>u7(e,t),"expression"))}function u7(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Kz(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:i}=r;if(n&&(i==="+"||i==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(Dn(r))return!0}return Fc(e,t)?!0:l2(r)?e.call(()=>u7(e,t),...Aj(r)):!1}function c7({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&Dn(e.expression)&&t.type==="Program"&&t.body.length===1}function h7(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return h7(e.object)}return!1;case"Identifier":return!0;default:return!1}}function d7({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function _ye(e,t,r){let n=[r("expression")];return d7(e,t)?h7(e.node.expression)&&n.push(";"):c7(e,t)||t.semi&&n.push(";"),n}function $ye(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let i=Wt([",",Ye],n);return t.__isVueForBindingLeft?["(",Le([_e,me(i)]),_e,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return Wt([",",Ye],n)}}function Lye(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return rN(r);case"BigIntLiteral":return HC(r.extra.raw);case"NumericLiteral":return cl(r.extra.raw);case"StringLiteral":return oc(yd(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return cl(r.value)+"m";case"DirectiveLiteral":return nN(r.extra.raw,t);case"Literal":{if(r.regex)return rN(r.regex);if(r.bigint)return HC(r.raw);if(r.decimal)return cl(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?cl(r.raw):typeof n=="string"?Pye(e)?nN(r.raw,t):oc(yd(r.raw,t)):String(n)}}}function Pye(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function HC(e){return e.toLowerCase()}function rN({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function nN(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Fye(e,t,r){let n=e.originalText.slice(t,r);for(let i of e[Symbol.for("comments")]){let s=Rr(i);if(s>r)break;let o=Xt(i);if(oe.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function p7(e,t,r){let{node:n}=e,i=[pme(e,t,r),Wi(e),"export",f7(n)?" default":""],{declaration:s,exported:o}=n;return We(n,tt.Dangling)&&(i.push(" ",Ir(e,t)),Fj(n)&&i.push($e)),s?i.push(" ",r("declaration")):(i.push(Iye(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(i.push(" *"),o&&i.push(" as ",r("exported"))):i.push(y7(e,t,r)),i.push(m7(e,t,r),b7(e,t,r))),i.push(Mye(n,t)),i}var Nye=yr(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);function Mye(e,t){return t.semi&&(!e.declaration||f7(e)&&!Nye(e.declaration))?";":""}function A2(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function g7(e,t){return A2(e.importKind,t)}function Iye(e){return A2(e.exportKind)}function m7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return v7(n,t)&&i.push(" from"),i.push(" ",r("source")),i}function y7(e,t,r){let{node:n}=e;if(!v7(n,t))return"";let i=[" "];if(ir(n.specifiers)){let s=[],o=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")s.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")o.push(r());else throw new Yd(n,"specifier")},"specifiers"),i.push(Wt(", ",s)),o.length>0&&(s.length>0&&i.push(", "),o.length>1||s.length>0||n.specifiers.some(a=>We(a))?i.push(me(["{",Le([t.bracketSpacing?Ye:_e,Wt([",",Ye],o)]),_t(Ma(t)?",":""),t.bracketSpacing?Ye:_e,"}"])):i.push(["{",t.bracketSpacing?" ":"",...o,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function v7(e,t){return e.type!=="ImportDeclaration"||ir(e.specifiers)||e.importKind==="type"?!0:C2(t,Rr(e),Rr(e.source)).trimEnd().endsWith("from")}function Rye(e,t){var r,n;if((r=e.extra)!=null&&r.deprecatedAssertSyntax)return"assert";let i=C2(t,Xt(e.source),(n=e.attributes)!=null&&n[0]?Rr(e.attributes[0]):Xt(e)).trimStart();return i.startsWith("assert")?"assert":i.startsWith("with")||ir(e.attributes)?"with":void 0}function b7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=Rye(n,t);if(!i)return"";let s=[` ${i} {`];return ir(n.attributes)&&(t.bracketSpacing&&s.push(" "),s.push(Wt(", ",e.map(r,"attributes"))),t.bracketSpacing&&s.push(" ")),s.push("}"),s}function Bye(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),o=s?"imported":"local",a=s?"local":"exported",l=n[o],u=n[a],c="",h="";return i==="ExportNamespaceSpecifier"||i==="ImportNamespaceSpecifier"?c="*":l&&(c=r(o)),u&&!jye(n)&&(h=r(a)),[A2(i==="ImportSpecifier"?n.importKind:n.exportKind,!1),c,c&&h?" as ":"",h]}function jye(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!qde(t,r))return!1;if(vi(t))return t.value===r.value&&Ts(t)===Ts(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function r1(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,o=s.type==="ObjectTypeAnnotation",a=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumBigIntBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",l=[s.type==="TSTypeLiteral"||a?"members":s.type==="TSInterfaceBody"?"body":"properties"];o&&l.push("indexers","callProperties","internalSlots");let u=l.flatMap(w=>e.map(({node:A})=>({node:A,printed:r(),loc:Rr(A)}),w));l.length>1&&u.sort((w,A)=>w.loc-A.loc);let{parent:c,key:h}=e,d=o&&h==="body"&&(c.type==="InterfaceDeclaration"||c.type==="DeclareInterface"||c.type==="DeclareClass"),f=s.type==="TSInterfaceBody"||a||d||s.type==="ObjectPattern"&&c.type!=="FunctionDeclaration"&&c.type!=="FunctionExpression"&&c.type!=="ArrowFunctionExpression"&&c.type!=="ObjectMethod"&&c.type!=="ClassMethod"&&c.type!=="ClassPrivateMethod"&&c.type!=="AssignmentPattern"&&c.type!=="CatchClause"&&s.properties.some(w=>w.value&&(w.value.type==="ObjectPattern"||w.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&u.length>0&&Bl(t.originalText,Rr(s),u[0].loc),p=d?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?_t(i,";"):",",m=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",b=[],v=u.map(w=>{let A=[...b,me(w.printed)];return b=[p,Ye],(w.node.type==="TSPropertySignature"||w.node.type==="TSMethodSignature"||w.node.type==="TSConstructSignatureDeclaration"||w.node.type==="TSCallSignatureDeclaration")&&We(w.node,tt.PrettierIgnore)&&b.shift(),Ia(w.node,t)&&b.push($e),A});if(s.inexact||s.hasUnknownMembers){let w;if(We(s,tt.Dangling)){let A=We(s,tt.Line);w=[Ir(e,t),A||es(t.originalText,Xt(nr(!1,qh(s),-1)))?$e:Ye,"..."]}else w=["..."];v.push([...b,...w])}let E=(n=nr(!1,u,-1))==null?void 0:n.node,D=!(s.inexact||s.hasUnknownMembers||E&&(E.type==="RestElement"||(E.type==="TSPropertySignature"||E.type==="TSCallSignatureDeclaration"||E.type==="TSMethodSignature"||E.type==="TSConstructSignatureDeclaration")&&We(E,tt.PrettierIgnore))),C;if(v.length===0){if(!We(s,tt.Dangling))return[m,y,Mn(e,r)];C=me([m,Ir(e,t,{indent:!0}),_e,y,yi(e),Mn(e,r)])}else C=[d&&ir(s.properties)?s7(c):"",m,Le([t.bracketSpacing?Ye:_e,...v]),_t(D&&(p!==","||Ma(t))?p:""),t.bracketSpacing?Ye:_e,y,yi(e),Mn(e,r)];return e.match(w=>w.type==="ObjectPattern"&&!ir(w.decorators),jS)||Il(s)&&(e.match(void 0,(w,A)=>A==="typeAnnotation",(w,A)=>A==="typeAnnotation",jS)||e.match(void 0,(w,A)=>w.type==="FunctionTypeParam"&&A==="typeAnnotation",jS))||!f&&e.match(w=>w.type==="ObjectPattern",w=>w.type==="AssignmentExpression"||w.type==="VariableDeclarator")?C:me(C,{shouldBreak:f})}function jS(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&Ez(e)}function zye(e){let t=[e];for(let r=0;rd[O]===n),p=d.type===n.type&&!f,m,y,b=0;do y=m||n,m=e.getParentNode(b),b++;while(m&&m.type===n.type&&a.every(O=>m[O]!==y));let v=m||d,E=y;if(i&&(Dn(n[a[0]])||Dn(l)||Dn(u)||zye(E))){h=!0,p=!0;let O=N=>[_t("("),Le([_e,N]),_e,_t(")")],P=N=>N.type==="NullLiteral"||N.type==="Literal"&&N.value===null||N.type==="Identifier"&&N.name==="undefined";c.push(" ? ",P(l)?r(s):O(r(s))," : ",u.type===n.type||P(u)?r(o):O(r(o)))}else{let O=N=>t.useTabs?Le(r(N)):Fo(2,r(N)),P=[Ye,"? ",l.type===n.type?_t("","("):"",O(s),l.type===n.type?_t("",")"):"",Ye,": ",O(o)];c.push(d.type!==n.type||d[o]===n||f?P:t.useTabs?jj(Le(P)):Fo(Math.max(0,t.tabWidth-2),P))}let D=[s,o,...a].some(O=>We(n[O],P=>Ls(P)&&Bl(t.originalText,Rr(P),Xt(P)))),C=O=>d===v?me(O,{shouldBreak:D}):D?[O,Oo]:O,w=!h&&(qr(d)||d.type==="NGPipeExpression"&&d.left===n)&&!d.computed,A=Wye(e),$=C([Hye(e,t,r),p?c:Le(c),i&&w&&!A?_e:""]);return f||A?me([Le([_e,$]),_e]):$}function Gye(e,t){return(qr(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function qye(e,t,r,n){return[...e.map(i=>qh(i)),qh(t),qh(r)].flat().some(i=>Ls(i)&&Bl(n.originalText,Rr(i),Xt(i)))}var Kye=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Jye(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let i=0;!r;i++){let s=e.getParentNode(i);if(s.type==="ChainExpression"&&s.expression===n||Zt(s)&&s.callee===n||qr(s)&&s.object===n||s.type==="TSNonNullExpression"&&s.expression===n){n=s;continue}s.type==="NewExpression"&&s.callee===n||Ao(s)&&s.expression===n?(r=e.getParentNode(i+1),n=s):r=s}return n===t?!1:r[Kye.get(r.type)]===n}var zS=e=>[_t("("),Le([_e,e]),_e,_t(")")];function T2(e,t,r,n){if(!t.experimentalTernaries)return Vye(e,t,r);let{node:i}=e,s=i.type==="ConditionalExpression",o=i.type==="TSConditionalType"||i.type==="ConditionalTypeAnnotation",a=s?"consequent":"trueType",l=s?"alternate":"falseType",u=s?["test"]:["checkType","extendsType"],c=i[a],h=i[l],d=u.map(Re=>i[Re]),{parent:f}=e,p=f.type===i.type,m=p&&u.some(Re=>f[Re]===i),y=p&&f[l]===i,b=c.type===i.type,v=h.type===i.type,E=v||y,D=t.tabWidth>2||t.useTabs,C,w,A=0;do w=C||i,C=e.getParentNode(A),A++;while(C&&C.type===i.type&&u.every(Re=>C[Re]!==w));let $=C||f,O=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),P=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(b||v),N=s&&$.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",F=Jye(e),L=Gye(i,f),k=o&&Fc(e,t),T=D?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",M=qye(d,c,h,t)||b||v,R=!E&&!p&&!o&&(N?c.type==="NullLiteral"||c.type==="Literal"&&c.value===null:h2(c,t)&&NO(i.test,3)),B=E||y||o&&!p||p&&s&&NO(i.test,1)||R,U=[];!b&&We(c,tt.Dangling)&&e.call(Re=>{U.push(Ir(Re,t),$e)},"consequent");let V=[];We(i.test,tt.Dangling)&&e.call(Re=>{V.push(Ir(Re,t))},"test"),!v&&We(h,tt.Dangling)&&e.call(Re=>{V.push(Ir(Re,t))},"alternate"),We(i,tt.Dangling)&&V.push(Ir(e,t));let K=Symbol("test"),J=Symbol("consequent"),G=Symbol("test-and-consequent"),Y=s?[zS(r("test")),i.test.type==="ConditionalExpression"?Oo:""]:[r("checkType")," ","extends"," ",i.extendsType.type==="TSConditionalType"||i.extendsType.type==="ConditionalTypeAnnotation"||i.extendsType.type==="TSMappedType"?r("extendsType"):me(zS(r("extendsType")))],Q=me([Y," ?"],{id:K}),X=r(a),le=Le([b||N&&(Dn(c)||p||E)?$e:Ye,U,X]),be=B?me([Q,E?le:_t(le,me(le,{id:J}),{groupId:K})],{id:G}):[Q,le],ce=r(l),xe=R?_t(ce,jj(zS(ce)),{groupId:G}):ce,ke=[be,V.length>0?[Le([$e,V]),$e]:v?$e:R?_t(Ye," ",{groupId:G}):Ye,":",v?" ":D?B?_t(T,_t(E||R?" ":T," "),{groupId:G}):_t(T," "):" ",v?xe:me([Le(xe),N&&!R?_e:""]),L&&!F?_e:"",M?Oo:""];return O&&!M?me(Le([_e,me(ke)])):O||P?me(Le(ke)):F||o&&m?me([Le([_e,ke]),k?_e:""]):f===$?me(ke):ke}function Xye(e,t,r,n){let{node:i}=e;if(u2(i))return Lye(e,t);let s=t.semi?";":"",o=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),$e];case"File":return $ye(e,t,r)??r("program");case"EmptyStatement":return"";case"ExpressionStatement":return _ye(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!We(i.expression)&&(lo(i.expression)||jn(i.expression))?["(",r("expression"),")"]:me(["(",Le([_e,r("expression")]),_e,")"]);case"AssignmentExpression":return Ame(e,t,r);case"VariableDeclarator":return Tme(e,t,r);case"BinaryExpression":case"LogicalExpression":return fz(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Dme(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&o.push(r("object")),o.push(me(Le([_e,jz(e,t,r)]))),o;case"Identifier":return[i.name,yi(e),Bz(e),Mn(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return zz(e,r);case"FunctionDeclaration":case"FunctionExpression":return qz(e,r,t,n);case"ArrowFunctionExpression":return cye(e,t,r,n);case"YieldExpression":return o.push("yield"),i.delegate&&o.push("*"),i.argument&&o.push(" ",r("argument")),o;case"AwaitExpression":if(o.push("await"),i.argument){o.push(" ",r("argument"));let{parent:a}=e;if(Zt(a)&&a.callee===i||qr(a)&&a.object===i){o=[Le([_e,...o]),_e];let l=e.findAncestor(u=>u.type==="AwaitExpression"||u.type==="BlockStatement");if((l==null?void 0:l.type)!=="AwaitExpression"||!fi(l.argument,u=>u===i))return me(o)}}return o;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return p7(e,t,r);case"ImportDeclaration":return Oye(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Bye(e,t,r);case"ImportAttribute":return IS(e,t,r);case"Import":return"import";case"Program":case"BlockStatement":case"StaticBlock":return Qz(e,t,r);case"ClassBody":return Aye(e,t,r);case"ThrowStatement":return lye(e,t,r);case"ReturnStatement":return aye(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return xz(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return r1(e,t,r);case"Property":return Xb(i)?jC(e,t,r):IS(e,t,r);case"ObjectProperty":return IS(e,t,r);case"ObjectMethod":return jC(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return S2(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let l=[];return e.each(({isFirst:u})=>{u?l.push(r()):l.push(",",Le([Ye,r()]))},"expressions"),me(l)}return me(Wt([",",Ye],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return o.push(i.operator),/[a-z]$/u.test(i.operator)&&o.push(" "),We(i.argument)?o.push(me(["(",Le([_e,r("argument")]),_e,")"])):o.push(r("argument")),o;case"UpdateExpression":return[i.prefix?i.operator:"",r("argument"),i.prefix?"":i.operator];case"ConditionalExpression":return T2(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),l=e.parent,u=l.type==="ForStatement"||l.type==="ForInStatement"||l.type==="ForOfStatement",c=i.declarations.some(d=>d.init),h;return a.length===1&&!We(i.declarations[0])?h=a[0]:a.length>0&&(h=Le(a[0])),o=[Wi(e),i.kind,h?[" ",h]:"",Le(a.slice(1).map(d=>[",",c&&!u?$e:Ye,d]))],u&&l.body!==i||o.push(s),me(o)}case"WithStatement":return me(["with (",r("object"),")",Va(i.body,r("body"))]);case"IfStatement":{let a=Va(i.consequent,r("consequent")),l=me(["if (",me([Le([_e,r("test")]),_e]),")",a]);if(o.push(l),i.alternate){let u=We(i.consequent,tt.Trailing|tt.Line)||Fj(i),c=i.consequent.type==="BlockStatement"&&!u;o.push(c?" ":$e),We(i,tt.Dangling)&&o.push(Ir(e,t),u?$e:" "),o.push("else",me(Va(i.alternate,r("alternate"),i.alternate.type==="IfStatement")))}return o}case"ForStatement":{let a=Va(i.body,r("body")),l=Ir(e,t),u=l?[l,_e]:"";return!i.init&&!i.test&&!i.update?[u,me(["for (;;)",a])]:[u,me(["for (",me([Le([_e,r("init"),";",Ye,r("test"),";",Ye,r("update")]),_e]),")",a])]}case"WhileStatement":return me(["while (",me([Le([_e,r("test")]),_e]),")",Va(i.body,r("body"))]);case"ForInStatement":return me(["for (",r("left")," in ",r("right"),")",Va(i.body,r("body"))]);case"ForOfStatement":return me(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Va(i.body,r("body"))]);case"DoWhileStatement":{let a=Va(i.body,r("body"));return o=[me(["do",a])],i.body.type==="BlockStatement"?o.push(" "):o.push($e),o.push("while (",me([Le([_e,r("test")]),_e]),")",s),o}case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return o.push(i.type==="BreakStatement"?"break":"continue"),i.label&&o.push(" ",r("label")),o.push(s),o;case"LabeledStatement":return i.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let a=We(i.param,u=>!Ls(u)||u.leading&&es(t.originalText,Xt(u))||u.trailing&&es(t.originalText,Rr(u),{backwards:!0})),l=r("param");return["catch ",a?["(",Le([_e,l]),_e,") "]:["(",l,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[me(["switch (",Le([_e,r("discriminant")]),_e,")"])," {",i.cases.length>0?Le([$e,Wt($e,e.map(({node:a,isLast:l})=>[r(),!l&&Ia(a,t)?$e:""],"cases"))]):"",$e,"}"];case"SwitchCase":{i.test?o.push("case ",r("test"),":"):o.push("default:"),We(i,tt.Dangling)&&o.push(" ",Ir(e,t));let a=i.consequent.filter(l=>l.type!=="EmptyStatement");if(a.length>0){let l=zC(e,t,r,"consequent");o.push(a.length===1&&a[0].type==="BlockStatement"?[" ",l]:Le([$e,l]))}return o}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return n7(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return a7(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return l7(e,t,r);case"TemplateElement":return oc(i.value.raw);case"TemplateLiteral":return nz(e,r,t);case"TaggedTemplateExpression":return Mpe(e,r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",r("body")];case"InterpreterDirective":default:throw new Yd(i,"ESTree")}}function x7(e,t,r){let{parent:n,node:i,key:s}=e,o=[r("expression")];switch(i.type){case"AsConstExpression":o.push(" as const");break;case"AsExpression":case"TSAsExpression":o.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":o.push(" satisfies ",r("typeAnnotation"));break}return s==="callee"&&Zt(n)||s==="object"&&qr(n)?me([Le([_e,...o]),_e]):o}function Yye(e,t,r){let{node:n}=e,i=[Wi(e),"component"];n.id&&i.push(" ",r("id")),i.push(r("typeParameters"));let s=Qye(e,r,t);return n.rendersType?i.push(me([s," ",r("rendersType")])):i.push(me([s])),n.body&&i.push(" ",r("body")),t.semi&&n.type==="DeclareComponent"&&i.push(";"),i}function Qye(e,t,r){let{node:n}=e,i=n.params;if(n.rest&&(i=[...i,n.rest]),i.length===0)return["(",Ir(e,r,{filter:o=>uo(r.originalText,Xt(o))===")"}),")"];let s=[];return eve(e,(o,a)=>{let l=a===i.length-1;l&&n.rest&&s.push("..."),s.push(t()),!l&&(s.push(","),Ia(i[a],r)?s.push($e,$e):s.push(Ye))}),["(",Le([_e,...s]),_t(Ma(r,"all")&&!Zye(n,i)?",":""),_e,")"]}function Zye(e,t){var r;return e.rest||((r=nr(!1,t,-1))==null?void 0:r.type)==="RestElement"}function eve(e,t){let{node:r}=e,n=0,i=s=>t(s,n++);e.each(i,"params"),r.rest&&e.call(i,"rest")}function tve(e,t,r){let{node:n}=e;return n.shorthand?r("local"):[r("name")," as ",r("local")]}function rve(e,t,r){let{node:n}=e,i=[];return n.name&&i.push(r("name"),n.optional?"?: ":": "),i.push(r("typeAnnotation")),i}function w7(e,t,r){return r1(e,r,t)}function S7(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function nve(e,t,r){let{node:n}=e,i;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":i="boolean";break;case"EnumNumberBody":i="number";break;case"EnumBigIntBody":i="bigint";break;case"EnumStringBody":i="string";break;case"EnumSymbolBody":i="symbol";break}return[i?`of ${i} `:"",w7(e,t,r)]}function D7(e,t,r){let{node:n}=e;return[Wi(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?w7(e,t,r):t("body")]}function ive(e,t,r){let{node:n}=e,i=["hook"];n.id&&i.push(" ",r("id"));let s=Oc(e,r,t,!1,!0),o=t1(e,r),a=Qd(n,o);return i.push(me([a?me(s):s,o]),n.body?" ":"",r("body")),i}function sve(e,t,r){let{node:n}=e,i=[Wi(e),"hook"];return n.id&&i.push(" ",r("id")),t.semi&&i.push(";"),i}function iN(e){var t;let{node:r}=e;return r.type==="HookTypeAnnotation"&&((t=e.getParentNode(2))==null?void 0:t.type)==="DeclareHook"}function ove(e,t,r){let{node:n}=e,i=[];i.push(iN(e)?"":"hook ");let s=Oc(e,r,t,!1,!0),o=[];return o.push(iN(e)?": ":" => ",r("returnType")),Qd(n,o)&&(s=me(s)),i.push(s,o),me(i)}function E7(e,t,r){let{node:n}=e,i=[Wi(e),"interface"],s=[],o=[];n.type!=="InterfaceTypeAnnotation"&&s.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!We(n.typeParameters,tt.Trailing|tt.Line);return ir(n.extends)&&o.push(a?_t(" ",Ye,{groupId:E2(n.typeParameters)}):Ye,"extends ",(n.extends.length===1?bfe:Le)(Wt([",",Ye],e.map(r,"extends")))),We(n.id,tt.Trailing)||ir(n.extends)?a?i.push(me([...s,Le(o)])):i.push(me(Le([...s,...o]))):i.push(...s,...o),i.push(" ",r("body")),me(i)}function ave(e,t,r){let{node:n}=e;if(Ej(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return Yye(e,t,r);case"ComponentParameter":return tve(e,t,r);case"ComponentTypeParameter":return rve(e,t,r);case"HookDeclaration":return ive(e,t,r);case"DeclareHook":return sve(e,t,r);case"HookTypeAnnotation":return ove(e,t,r);case"DeclareClass":return n7(e,t,r);case"DeclareFunction":return[Wi(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Mn(e,r),i];case"DeclareNamespace":return["declare namespace ",r("id")," ",r("body")];case"DeclareVariable":return[Wi(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return p7(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return Gme(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Az(e,t,r);case"IntersectionTypeAnnotation":return Tz(e,t,r);case"UnionTypeAnnotation":return kz(e,t,r);case"ConditionalTypeAnnotation":return T2(e,t,r);case"InferTypeAnnotation":return Lz(e,t,r);case"FunctionTypeAnnotation":return _z(e,t,r);case"TupleTypeAnnotation":return S2(e,t,r);case"TupleTypeLabeledElement":return Fz(e,t,r);case"TupleTypeSpreadElement":return Pz(e,t,r);case"GenericTypeAnnotation":return[r("id"),Fp(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return $z(e,t,r);case"TypeAnnotation":return Nz(e,t,r);case"TypeParameter":return t7(e,t,r);case"TypeofTypeAnnotation":return Iz(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Mz(r);case"DeclareEnum":case"EnumDeclaration":return D7(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return nve(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return S7(e,r);case"FunctionTypeParam":{let s=n.name?r("name"):e.parent.this===n?"this":"";return[s,yi(e),s?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return E7(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:s}=n;return Vz.ok(s==="plus"||s==="minus"),s==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return xye(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let s="";return n.proto?s="proto ":n.static&&(s="static "),[s,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",tm(e,t,r),yi(e),Xb(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return r1(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",yi(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return zz(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return oc(yd(Ts(n),t));case"NumberLiteralTypeAnnotation":return cl(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return HC(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),Mn(e,r),")"];case"TypePredicate":return Rz(e,r);case"TypeOperator":return[n.operator," ",r("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return Fp(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return x7(e,t,r)}}function lve(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(Cj(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",o=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(jn(i.expression)||lo(i.expression)),l=me(["<",Le([_e,r("typeAnnotation")]),_e,">"]),u=[_t("("),Le([_e,r("expression")]),_e,_t(")")];return a?$u([[l,r("expression")],[l,me(u,{shouldBreak:!0})],[l,r("expression")]]):me([l,r("expression")])}case"TSDeclareFunction":return qz(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Qz(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return r1(e,t,r);case"TSTypeAliasDeclaration":return Az(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return a7(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return l7(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r(i.typeArguments?"typeArguments":"typeParameters")];case"TSTemplateLiteralType":return nz(e,r,t);case"TSNamedTupleMember":return Fz(e,t,r);case"TSRestType":return Pz(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return E7(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return Fp(e,t,r,"params");case"TSTypeParameter":return t7(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return x7(e,t,r);case"TSArrayType":return Mz(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",tm(e,t,r),yi(e),Mn(e,r)];case"TSParameterProperty":return[h0(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Iz(e,r);case"TSIndexSignature":{let a=i.parameters.length>1?_t(Ma(t)?",":""):"",l=me([Le([_e,Wt([", ",_e],e.map(r,"parameters"))]),a,_e]),u=e.parent.type==="ClassBody"&&e.key==="body";return[u&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?l:"","]",Mn(e,r),u?s:""]}case"TSTypePredicate":return Rz(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",Fp(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return $z(e,t,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return wye(e,t,r);case"TSMethodSignature":{let a=i.kind&&i.kind!=="method"?`${i.kind} `:"";o.push(h0(i),a,i.computed?"[":"",r("key"),i.computed?"]":"",yi(e));let l=Oc(e,r,t,!1,!0),u=i.returnType?"returnType":"typeAnnotation",c=i[u],h=c?Mn(e,r,u):"",d=Qd(i,h);return o.push(d?me(l):l),c&&o.push(me(h)),me(o)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return D7(e,r,t);case"TSEnumMember":return S7(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",g7(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,l=a.type==="TSModuleDeclaration",u=((n=i.body)==null?void 0:n.type)==="TSModuleDeclaration";if(l)o.push(".");else if(o.push(Wi(e)),!(i.kind==="global"||i.global)){let c=i.kind??(vi(i.id)||C2(t,Rr(i),Rr(i.id)).trim().endsWith("module")?"module":"namespace");o.push(c," ")}return o.push(r("id")),u?o.push(r("body")):i.body?o.push(" ",me(r("body"))):o.push(s),o}case"TSConditionalType":return T2(e,t,r);case"TSInferType":return Lz(e,t,r);case"TSIntersectionType":return Tz(e,t,r);case"TSUnionType":return kz(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return _z(e,t,r);case"TSTupleType":return S2(e,t,r);case"TSTypeReference":return[r("typeName"),Fp(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSTypeAnnotation":return Nz(e,t,r);case"TSEmptyBodyFunctionExpression":return D2(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return eN(e,r,"?");case"TSJSDocNonNullableType":return eN(e,r,"!");case"TSParenthesizedType":default:throw new Yd(i,"TypeScript")}}function uve(e,t,r,n){if(dz(e))return kge(e,t);for(let i of[hme,ime,ave,lve,Xye]){let s=i(e,t,r,n);if(s!==void 0)return s}}var cve=yr(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function hve(e,t,r,n){var i;e.isRoot&&((i=t.__onHtmlBindingRoot)==null||i.call(t,e.node,t));let s=uve(e,t,r,n);if(!s)return"";let{node:o}=e;if(cve(o))return s;let a=ir(o.decorators),l=gme(e,t,r),u=o.type==="ClassExpression";if(a&&!u)return LC(s,d=>me([l,d]));let c=Fc(e,t),h=kye(e,t);return!l&&!c&&!h?s:LC(s,d=>[h?";":"",c?"(":"",c&&u&&a?[Le([Ye,l,d]),Ye]:[l,d],c?")":""])}var dve=hve,fve={avoidAstMutation:!0},pve=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],C7={};qb(C7,{getVisitorKeys:()=>vve,massageAstNode:()=>A7,print:()=>bve});var gve={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},mve=gve,yve=Sj(mve),vve=yve;function bve(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),$e];case"ArrayExpression":{if(n.elements.length===0)return"[]";let i=e.map(()=>e.node===null?"null":r(),"elements");return["[",Le([$e,Wt([",",$e],i)]),$e,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",Le([$e,Wt([",",$e],e.map(r,"properties"))]),$e,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return sN(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return sN(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new Yd(n,"JSON")}}function sN(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var xve=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function A7(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,i]of e.elements.entries())i===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}A7.ignoredProperties=xve;var cy={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},du="JavaScript",wve={arrowParens:{category:du,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:cy.bracketSameLine,bracketSpacing:cy.bracketSpacing,jsxBracketSameLine:{category:du,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:du,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:du,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:cy.singleQuote,jsxSingleQuote:{category:du,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:du,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:du,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:cy.singleAttributePerLine},Sve=wve,Dve={estree:xj,"estree-json":C7},Eve=[...xde,...pve],Cve=bj,Ave=Object.defineProperty,T7=e=>{throw TypeError(e)},k7=(e,t)=>{for(var r in t)Ave(e,r,{get:t[r],enumerable:!0})},_7=(e,t,r)=>t.has(e)||T7("Cannot "+r),Ga=(e,t,r)=>(_7(e,t,"read from private field"),t.get(e)),Tve=(e,t,r)=>t.has(e)?T7("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),kve=(e,t,r,n)=>(_7(e,t,"write to private field"),t.set(e,r),r),$7={};k7($7,{languages:()=>f1e,options:()=>g1e,parsers:()=>l9,printers:()=>wxe});var _ve=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ts=_ve,k2="string",_2="array",$2="cursor",n1="indent",i1="align",L2="trim",xg="group",s1="fill",o1="if-break",a1="indent-if-break",P2="line-suffix",F2="line-suffix-boundary",Nc="line",O2="label",l1="break-parent",L7=new Set([$2,n1,i1,L2,xg,s1,o1,a1,P2,F2,Nc,O2,l1]);function $ve(e){if(typeof e=="string")return k2;if(Array.isArray(e))return _2;if(!e)return;let{type:t}=e;if(L7.has(t))return t}var N2=$ve,Lve=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Pve(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(N2(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Lve([...L7].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var Fve=class extends Error{constructor(t){super(Pve(t));qo(this,"name","InvalidDocError");this.doc=t}},P7=Fve,Ove=()=>{},Nve=Ove;function Uo(e){return{type:n1,contents:e}}function F7(e,t){return{type:i1,contents:t,n:e}}function dn(e,t={}){return Nve(t.expandedStates),{type:xg,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Mve(e){return F7(Number.NEGATIVE_INFINITY,e)}function Ive(e){return F7({type:"root"},e)}function O7(e){return{type:s1,parts:e}}function d0(e,t="",r={}){return{type:o1,breakContents:e,flatContents:t,groupId:r.groupId}}function Rve(e,t){return{type:a1,contents:e,groupId:t.groupId,negate:t.negate}}var rm={type:l1},Bve={type:Nc,hard:!0},jve={type:Nc,hard:!0,literal:!0},En={type:Nc},Yn={type:Nc,soft:!0},Fr=[Bve,rm],zve=[jve,rm];function Zd(e,t){let r=[];for(let n=0;n{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},nm=Hve;function M2(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(N2(s)){case _2:return t(s.map(n));case s1:return t({...s,parts:s.parts.map(n)});case o1:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case xg:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case i1:case n1:case a1:case O2:case P2:return t({...s,contents:n(s.contents)});case k2:case $2:case L2:case F2:case Nc:case l1:return t(s);default:throw new P7(s)}}}function Uve(e){switch(N2(e)){case s1:if(e.parts.every(t=>t===""))return"";break;case xg:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===xg&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case i1:case n1:case a1:case P2:if(!e.contents)return"";break;case o1:if(!e.flatContents&&!e.breakContents)return"";break;case _2:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof nm(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case k2:case $2:case L2:case F2:case Nc:case O2:case l1:break;default:throw new P7(e)}return e}function Wve(e){return M2(e,t=>Uve(t))}function Qs(e,t=zve){return M2(e,r=>typeof r=="string"?Zd(t,r.split(` -`)):r)}var hy="'",oN='"';function Vve(e,t){let r=t===!0||t===hy?hy:oN,n=r===hy?oN:hy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var Gve=Vve;function qve(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var zs,Kve=class{constructor(e){Tve(this,zs),kve(this,zs,new Set(e))}getLeadingWhitespaceCount(e){let t=Ga(this,zs),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return Ga(this,zs).has(e.charAt(0))}hasTrailingWhitespace(e){return Ga(this,zs).has(nm(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${qve([...Ga(this,zs)].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=Ga(this,zs);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=Ga(this,zs);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=Ga(this,zs);return Array.prototype.every.call(e,r=>t.has(r))}};zs=new WeakMap;var Jve=Kve,Xve=[" ",` -`,"\f","\r"," "],Yve=new Jve(Xve),No=Yve,Qve=class extends Error{constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);qo(this,"name","UnexpectedNodeError");this.node=t}},Zve=Qve;function e0e(e){return(e==null?void 0:e.type)==="front-matter"}var u1=e0e,t0e=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),r0e=new Set(["if","else if","for","switch","case"]);function N7(e,t){var r;if(e.type==="text"||e.type==="comment"||u1(e)||e.type==="yaml"||e.type==="toml")return null;if(e.type==="attribute"&&delete t.value,e.type==="docType"&&delete t.value,e.type==="angularControlFlowBlock"&&(r=e.parameters)!=null&&r.children)for(let n of t.parameters.children)r0e.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.type==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim()),e.type==="angularLetDeclarationInitializer"&&delete t.value}N7.ignoredProperties=t0e;var n0e=N7;async function i0e(e,t){if(e.language==="yaml"){let r=e.value.trim(),n=r?await t(r,{parser:"yaml"}):"";return Ive([e.startDelimiter,e.explicitLanguage,Fr,n,n?Fr:"",e.endDelimiter])}}var s0e=i0e;function c1(e,t=!0){return[Uo([Yn,e]),t?Yn:""]}function ef(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function co(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(o,a)=>{i=n(o,a)});let s=await t(e,r,t);return i?dn(s):c1(s)}function o0e(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(s)?"":co(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},ef)}var a0e=o0e,l0e=e=>String(e).split(/[/\\]/u).pop();function aN(e,t){if(!t)return;let r=l0e(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function u0e(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function c0e(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=u0e(r,t.language)??aN(r,t.physicalFile)??aN(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var h1=c0e,h0e="inline",d0e={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},f0e="normal",p0e={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function g0e(e){return e.type==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var wg=g0e,m0e=e=>ts(!1,e,/^[\t\f\r ]*\n/gu,""),M7=e=>m0e(No.trimEnd(e)),y0e=e=>{let t=e,r=No.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=No.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function I7(e,t){return!!(e.type==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.type==="ieConditionalComment"&&!e.complete||bd(e)&&e.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||R2(e,t)&&!Aa(e)&&e.type!=="interpolation")}function d1(e){return e.type==="attribute"||!e.parent||!e.prev?!1:v0e(e.prev)}function v0e(e){return e.type==="comment"&&e.value.trim()==="prettier-ignore"}function ms(e){return e.type==="text"||e.type==="comment"}function Aa(e){return e.type==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||wg(e)&&(e.name==="script"||e.name==="style"))}function b0e(e){return e.children&&!Aa(e)}function x0e(e){return Aa(e)||e.type==="interpolation"||R7(e)}function R7(e){return V7(e).startsWith("pre")}function w0e(e,t){var r,n;let i=s();if(i&&!e.prev&&(n=(r=e.parent)==null?void 0:r.tagDefinition)!=null&&n.ignoreFirstLf)return e.type==="interpolation";return i;function s(){return u1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.prev&&(e.prev.type==="text"||e.prev.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:bd(e.parent)?!0:!(!e.prev&&(e.parent.type==="root"||bd(e)&&e.parent||Aa(e.parent)||f1(e.parent,t)||!$0e(e.parent.cssDisplay))||e.prev&&!F0e(e.prev.cssDisplay))}}function S0e(e,t){return u1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.next&&(e.next.type==="text"||e.next.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:bd(e.parent)?!0:!(!e.next&&(e.parent.type==="root"||bd(e)&&e.parent||Aa(e.parent)||f1(e.parent,t)||!L0e(e.parent.cssDisplay))||e.next&&!P0e(e.next.cssDisplay))}function D0e(e){return O0e(e.cssDisplay)&&!Aa(e)}function dy(e){return u1(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+10&&(["body","script","style"].includes(e.name)||e.children.some(t=>A0e(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.type!=="text"&&z7(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||H7(e.lastChild))}function B7(e){return e.type==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function HS(e){return U7(e)||e.prev&&C0e(e.prev)||j7(e)}function C0e(e){return U7(e)||e.type==="element"&&e.fullName==="br"||j7(e)}function j7(e){return z7(e)&&H7(e)}function z7(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:e.parent.type==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function U7(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function I2(e){return e.lastChild?I2(e.lastChild):e}function A0e(e){var t;return(t=e.children)==null?void 0:t.some(r=>r.type!=="text")}function W7(e){if(e)switch(e){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(e.endsWith("json")||e.endsWith("importmap")||e==="speculationrules")return"json"}}function T0e(e,t){let{name:r,attrMap:n}=e;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:i,lang:s}=e.attrMap;return!s&&!i?"babel":h1(t,{language:s})??W7(i)}function k0e(e,t){if(!R2(e,t))return;let{attrMap:r}=e;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:i}=r;return h1(t,{language:i})??W7(n)}function _0e(e,t){if(e.name!=="style")return;let{lang:r}=e.attrMap;return r?h1(t,{language:r}):"css"}function lN(e,t){return T0e(e,t)??_0e(e,t)??k0e(e,t)}function im(e){return e==="block"||e==="list-item"||e.startsWith("table")}function $0e(e){return!im(e)&&e!=="inline-block"}function L0e(e){return!im(e)&&e!=="inline-block"}function P0e(e){return!im(e)}function F0e(e){return!im(e)}function O0e(e){return!im(e)&&e!=="inline-block"}function bd(e){return V7(e).startsWith("pre")}function N0e(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}function M0e(e,t){var r;if(tf(e,t))return"block";if(((r=e.prev)==null?void 0:r.type)==="comment"){let i=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(i)return i[1]}let n=!1;if(e.type==="element"&&e.namespace==="svg")if(N0e(e,i=>i.fullName==="svg:foreignObject"))n=!0;else return e.name==="svg"?"inline-block":"block";switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return e.type==="element"&&(!e.namespace||n||wg(e))&&d0e[e.name]||h0e}}function V7(e){return e.type==="element"&&(!e.namespace||wg(e))&&p0e[e.name]||f0e}function I0e(e){let t=Number.POSITIVE_INFINITY;for(let r of e.split(` -`)){if(r.length===0)continue;let n=No.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n=l&&s(c)<=u&&o.add(c);return r.slice(l,u)}var _ge=kge;function IC(e,t){var r,n,i,s,o,a,l,u,c;if(e.isRoot)return!1;let{node:h,key:d,parent:f}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&Fge(h)&&ap(e))return!0;if($ge(h))return!1;if(h.type==="Identifier"){if((r=h.extra)!=null&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(h.name)||d==="left"&&(h.name==="async"&&!f.await||h.name==="let")&&f.type==="ForOfStatement")return!0;if(h.name==="let"){let p=(n=e.findAncestor(m=>m.type==="ForOfStatement"))==null?void 0:n.left;if(p&&mi(p,m=>m===h))return!0}if(d==="object"&&h.name==="let"&&f.type==="MemberExpression"&&f.computed&&!f.optional){let p=e.findAncestor(y=>y.type==="ExpressionStatement"||y.type==="ForStatement"||y.type==="ForInStatement"),m=p?p.type==="ExpressionStatement"?p.expression:p.type==="ForStatement"?p.init:p.left:void 0;if(m&&mi(m,y=>y===h))return!0}if(d==="expression")switch(h.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let p=e.findAncestor(m=>!_o(m));if(p!==f&&p.type==="ExpressionStatement")return!0}}return!1}if(h.type==="ObjectExpression"||h.type==="FunctionExpression"||h.type==="ClassExpression"||h.type==="DoExpression"){let p=(i=e.findAncestor(m=>m.type==="ExpressionStatement"))==null?void 0:i.expression;if(p&&mi(p,m=>m===h))return!0}if(h.type==="ObjectExpression"){let p=(s=e.findAncestor(m=>m.type==="ArrowFunctionExpression"))==null?void 0:s.body;if(p&&p.type!=="SequenceExpression"&&p.type!=="AssignmentExpression"&&mi(p,m=>m===h))return!0}switch(f.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(d==="superClass"&&(h.type==="ArrowFunctionExpression"||h.type==="AssignmentExpression"||h.type==="AwaitExpression"||h.type==="BinaryExpression"||h.type==="ConditionalExpression"||h.type==="LogicalExpression"||h.type==="NewExpression"||h.type==="ObjectExpression"||h.type==="SequenceExpression"||h.type==="TaggedTemplateExpression"||h.type==="UnaryExpression"||h.type==="UpdateExpression"||h.type==="YieldExpression"||h.type==="TSNonNullExpression"||h.type==="ClassExpression"&&ar(h.decorators)))return!0;break;case"ExportDefaultDeclaration":return dz(e,t)||h.type==="SequenceExpression";case"Decorator":if(d==="expression"&&!Ige(h))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(p,m)=>m==="returnType"&&p.type==="ArrowFunctionExpression")&&Pge(h))return!0;break;case"BinaryExpression":if(d==="left"&&(f.operator==="in"||f.operator==="instanceof")&&h.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(d==="init"&&e.match(void 0,void 0,(p,m)=>m==="declarations"&&p.type==="VariableDeclaration",(p,m)=>m==="left"&&p.type==="ForInStatement"))return!0;break}switch(h.type){case"UpdateExpression":if(f.type==="UnaryExpression")return h.prefix&&(h.operator==="++"&&f.operator==="+"||h.operator==="--"&&f.operator==="-");case"UnaryExpression":switch(f.type){case"UnaryExpression":return h.operator===f.operator&&(h.operator==="+"||h.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return d==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"BinaryExpression":return d==="left"&&f.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(f.type==="UpdateExpression"||h.operator==="in"&&Lge(e))return!0;if(h.operator==="|>"&&(o=h.extra)!=null&&o.parenthesized){let p=e.grandparent;if(p.type==="BinaryExpression"&&p.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(f.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!_o(h);case"ConditionalExpression":return _o(h)||ufe(h);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return d==="callee";case"ClassExpression":case"ClassDeclaration":return d==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return d==="object";case"AssignmentExpression":case"AssignmentPattern":return d==="left"&&(h.type==="TSTypeAssertion"||_o(h));case"LogicalExpression":if(h.type==="LogicalExpression")return f.operator!==h.operator;case"BinaryExpression":{let{operator:p,type:m}=h;if(!p&&m!=="TSTypeAssertion")return!0;let y=o0(p),b=f.operator,v=o0(b);return v>y||d==="right"&&v===y||v===y&&!f2(b,p)?!0:v");default:return!1}case"TSFunctionType":if(e.match(p=>p.type==="TSFunctionType",(p,m)=>m==="typeAnnotation"&&p.type==="TSTypeAnnotation",(p,m)=>m==="returnType"&&p.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(d==="extendsType"&&f.type==="TSConditionalType"){if(h.type==="TSConditionalType")return!0;let{typeAnnotation:p}=h.returnType||h.typeAnnotation;if(p.type==="TSTypePredicate"&&p.typeAnnotation&&(p=p.typeAnnotation.typeAnnotation),p.type==="TSInferType"&&p.typeParameter.constraint)return!0}if(d==="checkType"&&f.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((f.type==="TSUnionType"||f.type==="TSIntersectionType")&&f.types.length>1&&(!h.types||h.types.length>1))return!0;case"TSInferType":if(h.type==="TSInferType"){if(f.type==="TSRestType")return!1;if(d==="types"&&(f.type==="TSUnionType"||f.type==="TSIntersectionType")&&h.typeParameter.type==="TSTypeParameter"&&h.typeParameter.constraint)return!0}case"TSTypeOperator":return f.type==="TSArrayType"||f.type==="TSOptionalType"||f.type==="TSRestType"||d==="objectType"&&f.type==="TSIndexedAccessType"||f.type==="TSTypeOperator"||f.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return d==="objectType"&&f.type==="TSIndexedAccessType"||d==="elementType"&&f.type==="TSArrayType";case"TypeOperator":return f.type==="ArrayTypeAnnotation"||f.type==="NullableTypeAnnotation"||d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType")||f.type==="TypeOperator";case"TypeofTypeAnnotation":return d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType")||d==="elementType"&&f.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return f.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return f.type==="TypeOperator"||f.type==="ArrayTypeAnnotation"||f.type==="NullableTypeAnnotation"||f.type==="IntersectionTypeAnnotation"||f.type==="UnionTypeAnnotation"||d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return f.type==="ArrayTypeAnnotation"||d==="objectType"&&(f.type==="IndexedAccessType"||f.type==="OptionalIndexedAccessType");case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(h.type==="ComponentTypeAnnotation"&&(h.rendersType===null||h.rendersType===void 0))return!1;if(e.match(void 0,(m,y)=>y==="typeAnnotation"&&m.type==="TypeAnnotation",(m,y)=>y==="returnType"&&m.type==="ArrowFunctionExpression")||e.match(void 0,(m,y)=>y==="typeAnnotation"&&m.type==="TypePredicate",(m,y)=>y==="typeAnnotation"&&m.type==="TypeAnnotation",(m,y)=>y==="returnType"&&m.type==="ArrowFunctionExpression"))return!0;let p=f.type==="NullableTypeAnnotation"?e.grandparent:f;return p.type==="UnionTypeAnnotation"||p.type==="IntersectionTypeAnnotation"||p.type==="ArrayTypeAnnotation"||d==="objectType"&&(p.type==="IndexedAccessType"||p.type==="OptionalIndexedAccessType")||d==="checkType"&&f.type==="ConditionalTypeAnnotation"||d==="extendsType"&&f.type==="ConditionalTypeAnnotation"&&((a=h.returnType)==null?void 0:a.type)==="InferTypeAnnotation"&&((l=h.returnType)==null?void 0:l.typeParameter.bound)||p.type==="NullableTypeAnnotation"||f.type==="FunctionTypeParam"&&f.name===null&&si(h).some(m=>{var y;return((y=m.typeAnnotation)==null?void 0:y.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(d==="extendsType"&&f.type==="ConditionalTypeAnnotation"&&h.type==="ConditionalTypeAnnotation"||d==="checkType"&&f.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return d==="objectType"&&f.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof h.value=="string"&&f.type==="ExpressionStatement"&&!f.directive){let p=e.grandparent;return p.type==="Program"||p.type==="BlockStatement"}return d==="object"&&f.type==="MemberExpression"&&typeof h.value=="number";case"AssignmentExpression":{let p=e.grandparent;return d==="body"&&f.type==="ArrowFunctionExpression"?!0:d==="key"&&(f.type==="ClassProperty"||f.type==="PropertyDefinition")&&f.computed||(d==="init"||d==="update")&&f.type==="ForStatement"?!1:f.type==="ExpressionStatement"?h.left.type==="ObjectPattern":!(d==="key"&&f.type==="TSPropertySignature"||f.type==="AssignmentExpression"||f.type==="SequenceExpression"&&p.type==="ForStatement"&&(p.init===f||p.update===f)||d==="value"&&f.type==="Property"&&p.type==="ObjectPattern"&&p.properties.includes(f)||f.type==="NGChainedExpression")}case"ConditionalExpression":switch(f.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:d==="test";case"MemberExpression":case"OptionalMemberExpression":return d==="object";default:return!1}case"FunctionExpression":switch(f.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(f.type){case"BinaryExpression":return f.operator!=="|>"||((u=h.extra)==null?void 0:u.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return d==="callee";case"MemberExpression":case"OptionalMemberExpression":return d==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return d==="test";default:return!1}case"ClassExpression":switch(f.type){case"NewExpression":return d==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(Oge(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(d==="callee"&&(f.type==="BindExpression"||f.type==="NewExpression")){let p=h;for(;p;)switch(p.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":p=p.object;break;case"TaggedTemplateExpression":p=p.tag;break;case"TSNonNullExpression":p=p.expression;break;default:return!1}}return!1;case"BindExpression":return d==="callee"&&(f.type==="BindExpression"||f.type==="NewExpression")||d==="object"&&Jr(f);case"NGPipeExpression":return!(f.type==="NGRoot"||f.type==="NGMicrosyntaxExpression"||f.type==="ObjectProperty"&&!((c=h.extra)!=null&&c.parenthesized)||Un(f)||d==="arguments"&&rr(f)||d==="right"&&f.type==="NGPipeExpression"||d==="property"&&f.type==="MemberExpression"||f.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return d==="callee"||d==="left"&&f.type==="BinaryExpression"&&f.operator==="<"||!Un(f)&&f.type!=="ArrowFunctionExpression"&&f.type!=="AssignmentExpression"&&f.type!=="AssignmentPattern"&&f.type!=="BinaryExpression"&&f.type!=="NewExpression"&&f.type!=="ConditionalExpression"&&f.type!=="ExpressionStatement"&&f.type!=="JsExpressionRoot"&&f.type!=="JSXAttribute"&&f.type!=="JSXElement"&&f.type!=="JSXExpressionContainer"&&f.type!=="JSXFragment"&&f.type!=="LogicalExpression"&&!rr(f)&&!ja(f)&&f.type!=="ReturnStatement"&&f.type!=="ThrowStatement"&&f.type!=="TypeCastExpression"&&f.type!=="VariableDeclarator"&&f.type!=="YieldExpression";case"TSInstantiationExpression":return d==="object"&&Jr(f)}return!1}var $ge=xr(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function Lge(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function Pge(e){return AC(e,t=>t.type==="ObjectTypeAnnotation"&&AC(t,r=>r.type==="FunctionTypeAnnotation"))}function Fge(e){return ho(e)}function ap(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(ap);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(ap);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(ap);break;case"UnaryExpression":if(t.prefix)return e.callParent(ap);break}return!1}function dz(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!IC(e,t):!u2(r)||n.type!=="ExportDefaultDeclaration"&&IC(e,t)?!1:e.call(()=>dz(e,t),...kj(r))}function Oge(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(i==="object"&&r.type==="MemberExpression"||i==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression")&&(e.match(void 0,void 0,(s,o)=>o==="callee"&&(s.type==="CallExpression"&&!s.optional||s.type==="NewExpression")||o==="object"&&s.type==="MemberExpression"&&!s.optional)||e.match(void 0,void 0,(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))}function MC(e){return e.type==="Identifier"?!0:Jr(e)?!e.computed&&!e.optional&&e.property.type==="Identifier"&&MC(e.object):!1}function Ige(e){return e.type==="ChainExpression"&&(e=e.expression),MC(e)||rr(e)&&!e.optional&&MC(e.callee)}var Ic=IC;function Mge(e,t){let r=t-1;r=yd(e,r,{backwards:!0}),r=vd(e,r,{backwards:!0}),r=yd(e,r,{backwards:!0});let n=vd(e,r,{backwards:!0});return r!==n}var Nge=Mge,Rge=()=>!0;function S2(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function Bge(e,t){var r;let n=e.node,i=[S2(e,t)],{printer:s,originalText:o,locStart:a,locEnd:l}=t;if((r=s.isBlockComment)!=null&&r.call(s,n)){let c=ns(o,l(n))?ns(o,a(n),{backwards:!0})?$e:Ye:" ";i.push(c)}else i.push($e);let u=vd(o,yd(o,l(n)));return u!==!1&&ns(o,u)&&i.push($e),i}function jge(e,t,r){var n;let i=e.node,s=S2(e,t),{printer:o,originalText:a,locStart:l}=t,u=(n=o.isBlockComment)==null?void 0:n.call(o,i);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||ns(a,l(i),{backwards:!0})){let c=Nge(a,l(i));return{doc:HO([$e,c?$e:"",s]),isBlock:u,hasLineSuffix:!0}}return!u||r!=null&&r.hasLineSuffix?{doc:[HO([" ",s]),No],isBlock:u,hasLineSuffix:!0}:{doc:[" ",s],isBlock:u,hasLineSuffix:!1}}function Br(e,t,r={}){let{node:n}=e;if(!ar(n==null?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:o=Rge}=r,a=[];if(e.each(({node:u})=>{u.leading||u.trailing||u.marker!==s||!o(u)||a.push(S2(e,t))},"comments"),a.length===0)return"";let l=qt($e,a);return i?Le([$e,l]):l}function fz(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(a=>!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:l,trailing:u}=a;l?i.push(Bge(e,t)):u&&(o=jge(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function oo(e,t,r){let{leading:n,trailing:i}=fz(e,r);return!n&&!i?t:$C(t,s=>[n,s,i])}var zge=class extends Error{constructor(r,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(r[i])}.`);Jo(this,"name","UnexpectedNodeError");this.node=r}},Zd=zge;function Hge(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Us,Uge=class{constructor(t){bde(this,Us),xde(this,Us,new Set(t))}getLeadingWhitespaceCount(t){let r=Ga(this,Us),n=0;for(let i=0;i=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return Ga(this,Us).has(t.charAt(0))}hasTrailingWhitespace(t){return Ga(this,Us).has(or(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${Hge([...Ga(this,Us)].join(""))}]+`,i=new RegExp(r?`(${n})`:n,"u");return t.split(i)}hasWhitespaceCharacter(t){let r=Ga(this,Us);return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=Ga(this,Us);return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=Ga(this,Us);return Array.prototype.every.call(t,n=>r.has(n))}};Us=new WeakMap;var Wge=Uge,Qy=new Wge(` +\r `),IS=e=>e===""||e===Ye||e===$e||e===_e;function Vge(e,t,r){var n,i,s;let{node:o}=e;if(o.type==="JSXElement"&&ome(o))return[r("openingElement"),r("closingElement")];let a=o.type==="JSXElement"?r("openingElement"):r("openingFragment"),l=o.type==="JSXElement"?r("closingElement"):r("closingFragment");if(o.children.length===1&&o.children[0].type==="JSXExpressionContainer"&&(o.children[0].expression.type==="TemplateLiteral"||o.children[0].expression.type==="TaggedTemplateExpression"))return[a,...e.map(r,"children"),l];o.children=o.children.map(w=>ame(w)?{type:"JSXText",value:" ",raw:" "}:w);let u=o.children.some(Tn),c=o.children.filter(w=>w.type==="JSXExpressionContainer").length>1,h=o.type==="JSXElement"&&o.openingElement.attributes.length>1,d=vi(a)||u||h||c,f=e.parent.rootMarker==="mdx",p=t.singleQuote?"{' '}":'{" "}',m=f?" ":Lt([p,_e]," "),y=((i=(n=o.openingElement)==null?void 0:n.name)==null?void 0:i.name)==="fbt",b=Gge(e,t,r,m,y),v=o.children.some(w=>vg(w));for(let w=b.length-2;w>=0;w--){let T=b[w]===""&&b[w+1]==="",k=b[w]===$e&&b[w+1]===""&&b[w+2]===$e,O=(b[w]===_e||b[w]===$e)&&b[w+1]===""&&b[w+2]===m,P=b[w]===m&&b[w+1]===""&&(b[w+2]===_e||b[w+2]===$e),I=b[w]===m&&b[w+1]===""&&b[w+2]===m,F=b[w]===_e&&b[w+1]===""&&b[w+2]===$e||b[w]===$e&&b[w+1]===""&&b[w+2]===_e;k&&v||T||O||I||F?b.splice(w,2):P&&b.splice(w+1,2)}for(;b.length>0&&IS(or(!1,b,-1));)b.pop();for(;b.length>1&&IS(b[0])&&IS(b[1]);)b.shift(),b.shift();let E=[];for(let[w,T]of b.entries()){if(T===m){if(w===1&&b[w-1]===""){if(b.length===2){E.push(p);continue}E.push([p,$e]);continue}else if(w===b.length-1){E.push(p);continue}else if(b[w-1]===""&&b[w-2]===$e){E.push(p);continue}}E.push(T),vi(T)&&(d=!0)}let D=v?p2(E):me(E,{shouldBreak:!0});if(((s=t.cursorNode)==null?void 0:s.type)==="JSXText"&&o.children.includes(t.cursorNode)&&(D=[UO,D,UO]),f)return D;let C=me([a,Le([$e,D]),$e,l]);return d?C:Pu([me([a,...b,l]),C])}function Gge(e,t,r,n,i){let s=[];return e.each(({node:o,next:a})=>{if(o.type==="JSXText"){let l=$s(o);if(vg(o)){let u=Qy.split(l,!0);u[0]===""&&(s.push(""),u.shift(),/\n/u.test(u[0])?s.push(XO(i,u[1],o,a)):s.push(n),u.shift());let c;if(or(!1,u,-1)===""&&(u.pop(),c=u.pop()),u.length===0)return;for(let[h,d]of u.entries())h%2===1?s.push(Ye):s.push(d);c!==void 0?/\n/u.test(c)?s.push(XO(i,or(!1,s,-1),o,a)):s.push(n):s.push(JO(i,or(!1,s,-1),o,a))}else/\n/u.test(l)?l.match(/\n/gu).length>1&&s.push("",$e):s.push("",n)}else{let l=r();if(s.push(l),a&&vg(a)){let u=Qy.trim($s(a)),[c]=Qy.split(u);s.push(JO(i,c,o,a))}else s.push($e)}},"children"),s}function JO(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?_e:$e:_e}function XO(e,t,r,n){return e?$e:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?$e:_e:$e}var qge=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function Kge(e,t,r){let{parent:n}=e;if(qge.has(n.type))return t;let i=e.match(void 0,o=>o.type==="ArrowFunctionExpression",rr,o=>o.type==="JSXExpressionContainer"),s=Ic(e,r);return me([s?"":Lt("("),Le([_e,t]),_e,s?"":Lt(")")],{shouldBreak:i})}function Jge(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(wi(n.value)){let o=$s(n.value),a=Nn(!1,Nn(!1,o.slice(1,-1),"'","'"),""",'"'),l=Dj(a,t.jsxSingleQuote);a=l==='"'?Nn(!1,a,'"',"""):Nn(!1,a,"'","'"),s=e.call(()=>oo(e,lc(l+a+l),t),"value")}else s=r("value");i.push("=",s)}return i}function Xge(e,t,r){let{node:n}=e,i=(s,o)=>s.type==="JSXEmptyExpression"||!We(s)&&(Un(s)||ho(s)||s.type==="ArrowFunctionExpression"||s.type==="AwaitExpression"&&(i(s.argument,s)||s.argument.type==="JSXElement")||rr(s)||s.type==="ChainExpression"&&rr(s.expression)||s.type==="FunctionExpression"||s.type==="TemplateLiteral"||s.type==="TaggedTemplateExpression"||s.type==="DoExpression"||Tn(o)&&(s.type==="ConditionalExpression"||Ta(s)));return i(n.expression,e.parent)?me(["{",r("expression"),Aa,"}"]):me(["{",Le([_e,r("expression")]),_e,Aa,"}"])}function Yge(e,t,r){var n,i;let{node:s}=e,o=We(s.name)||We(s.typeParameters)||We(s.typeArguments);if(s.selfClosing&&s.attributes.length===0&&!o)return["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((n=s.attributes)==null?void 0:n.length)===1&&wi(s.attributes[0].value)&&!s.attributes[0].value.value.includes(` +`)&&!o&&!We(s.attributes[0]))return me(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let a=(i=s.attributes)==null?void 0:i.some(u=>wi(u.value)&&u.value.value.includes(` +`)),l=t.singleAttributePerLine&&s.attributes.length>1?$e:Ye;return me(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters"),Le(e.map(()=>[l,r()],"attributes")),...Qge(s,t,o)],{shouldBreak:a})}function Qge(e,t,r){return e.selfClosing?[Ye,"/>"]:Zge(e,t,r)?[">"]:[_e,">"]}function Zge(e,t,r){let n=e.attributes.length>0&&We(or(!1,e.attributes,-1),tt.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function eme(e,t,r){let{node:n}=e,i=[];i.push(""),i}function tme(e,t){let{node:r}=e,n=We(r),i=We(r,tt.Line),s=r.type==="JSXOpeningFragment";return[s?"<":""]}function rme(e,t,r){let n=oo(e,Vge(e,t,r),t);return Kge(e,n,t)}function nme(e,t){let{node:r}=e,n=We(r,tt.Line);return[Br(e,t,{indent:n}),n?$e:""]}function ime(e,t,r){let{node:n}=e;return["{",e.call(({node:i})=>{let s=["...",r()];return!We(i)||!rz(e)?s:[Le([_e,oo(e,s,t)]),_e]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function sme(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Jge(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return qt(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return qt(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return ime(e,t,r);case"JSXExpressionContainer":return Xge(e,t,r);case"JSXFragment":case"JSXElement":return rme(e,t,r);case"JSXOpeningElement":return Yge(e,t,r);case"JSXClosingElement":return eme(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return tme(e,t);case"JSXEmptyExpression":return nme(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Zd(n,"JSX")}}function ome(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!vg(t)}function vg(e){return e.type==="JSXText"&&(Qy.hasNonWhitespaceCharacter($s(e))||!/\n/u.test($s(e)))}function ame(e){return e.type==="JSXExpressionContainer"&&wi(e.expression)&&e.expression.value===" "&&!We(e.expression)}function lme(e){let{node:t,parent:r}=e;if(!Tn(t)||!Tn(r))return!1;let{index:n,siblings:i}=e,s;for(let o=n;o>0;o--){let a=i[o-1];if(!(a.type==="JSXText"&&!vg(a))){s=a;break}}return(s==null?void 0:s.type)==="JSXExpressionContainer"&&s.expression.type==="JSXEmptyExpression"&&Yb(s.expression)}function ume(e){return Yb(e.node)||lme(e)}var pz=ume,cme=0;function gz(e,t,r){var n;let{node:i,parent:s,grandparent:o,key:a}=e,l=a!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),u=i.operator==="|>"&&((n=e.root.extra)==null?void 0:n.__isUsingHackPipeline),c=NC(e,r,t,!1,l);if(l)return c;if(u)return me(c);if(rr(s)&&s.callee===i||s.type==="UnaryExpression"||Jr(s)&&!s.computed)return me([Le([_e,...c]),_e]);let h=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&o.type==="JSXAttribute"||i.operator!=="|"&&s.type==="JsExpressionRoot"||i.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&o.type==="NGMicrosyntax"&&o.body.length===1)||i===s.body&&s.type==="ArrowFunctionExpression"||i!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&o.type!=="ReturnStatement"&&o.type!=="ThrowStatement"&&!rr(o)||s.type==="TemplateLiteral",d=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||ja(s),f=Ta(i.left)&&f2(i.operator,i.left.operator);if(h||bg(i)&&!f||!bg(i)&&d)return me(c);if(c.length===0)return"";let p=Tn(i.right),m=c.findIndex(C=>typeof C!="string"&&!Array.isArray(C)&&C.type===Ls),y=c.slice(0,m===-1?1:m+1),b=c.slice(y.length,p?-1:void 0),v=Symbol("logicalChain-"+ ++cme),E=me([...y,Le(b)],{id:v});if(!p)return E;let D=or(!1,c,-1);return me([E,Qb(D,{groupId:v})])}function NC(e,t,r,n,i){var s;let{node:o}=e;if(!Ta(o))return[me(t())];let a=[];f2(o.operator,o.left.operator)?a=e.call(y=>NC(y,t,r,!0,i),"left"):a.push(me(t("left")));let l=bg(o),u=(o.operator==="|>"||o.type==="NGPipeExpression"||hme(e,r))&&!oc(r.originalText,o.right),c=o.type==="NGPipeExpression"?"|":o.operator,h=o.type==="NGPipeExpression"&&o.arguments.length>0?me(Le([_e,": ",qt([Ye,": "],e.map(()=>Mo(2,me(t())),"arguments"))])):"",d;if(l)d=[c," ",t("right"),h];else{let y=c==="|>"&&((s=e.root.extra)!=null&&s.__isUsingHackPipeline)?e.call(b=>NC(b,t,r,!0,i),"right"):t("right");d=[u?Ye:"",c,u?" ":Ye,y,h]}let{parent:f}=e,p=We(o.left,tt.Trailing|tt.Line),m=p||!(i&&o.type==="LogicalExpression")&&f.type!==o.type&&o.left.type!==o.type&&o.right.type!==o.type;if(a.push(u?"":" ",m?me(d,{shouldBreak:p}):d),n&&We(o)){let y=g2(oo(e,a,r));return y.type===su?y.parts:Array.isArray(y)?y:[y]}return a}function bg(e){return e.type!=="LogicalExpression"?!1:!!(ho(e.right)&&e.right.properties.length>0||Un(e.right)&&e.right.elements.length>0||Tn(e.right))}var YO=e=>e.type==="BinaryExpression"&&e.operator==="|";function hme(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&YO(e.node)&&!e.hasAncestor(r=>!YO(r)&&r.type!=="JsExpressionRoot")}function dme(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),We(n.node)?" //"+Jh(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return gz(e,t,r);case"NGChainedExpression":return me(qt([";",Ye],e.map(()=>pme(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":QO(e)?" ":[";",Ye],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:i,parent:s}=e,o=QO(e)||(i===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(i===2||i===3)&&(n.key.name==="else"&&s.body[i-1].type==="NGMicrosyntaxKeyedExpression"&&s.body[i-1].key.name==="then"||n.key.name==="track"))&&s.body[0].type==="NGMicrosyntaxExpression";return[r("key"),o?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new Zd(n,"Angular")}}function QO({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var fme=xr(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function pme({node:e}){return AC(e,fme)}function mz(e,t,r){let{node:n}=e;return me([qt(Ye,e.map(r,"decorators")),yz(n,t)?$e:Ye])}function gme(e,t,r){return vz(e.node)?[qt($e,e.map(r,"declaration","decorators")),$e]:""}function mme(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!ar(s)||vz(i)||pz(e))return"";let o=n.type==="ClassExpression"||n.type==="ClassDeclaration"||yz(n,t);return[e.key==="declaration"&&lfe(i)?$e:o?No:"",qt(Ye,e.map(r,"decorators")),Ye]}function yz(e,t){return e.decorators.some(r=>ns(t.originalText,Zt(r)))}function vz(e){var t;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let r=(t=e.declaration)==null?void 0:t.decorators;return ar(r)&&qb(e,r[0])}var u0=class extends Error{constructor(){super(...arguments);Jo(this,"name","ArgExpansionBailout")}};function yme(e,t,r){let{node:n}=e,i=Is(n);if(i.length===0)return["(",Br(e,t),")"];let s=i.length-1;if(xme(i)){let d=["("];return a0(e,(f,p)=>{d.push(r()),p!==s&&d.push(", ")}),d.push(")"),d}let o=!1,a=[];a0(e,({node:d},f)=>{let p=r();f===s||(Ba(d,t)?(o=!0,p=[p,",",$e,$e]):p=[p,",",Ye]),a.push(p)});let l=n.type==="ImportExpression"||n.callee.type==="Import",u=!t.parser.startsWith("__ng_")&&!l&&Ra(t,"all")?",":"";function c(){return me(["(",Le([Ye,...a]),u,Ye,")"],{shouldBreak:!0})}if(o||e.parent.type!=="Decorator"&&vfe(i))return c();if(bme(i)){let d=a.slice(1);if(d.some(vi))return c();let f;try{f=r(jO(n,0),{expandFirstArg:!0})}catch(p){if(p instanceof u0)return c();throw p}return vi(f)?[No,Pu([["(",me(f,{shouldBreak:!0}),", ",...d,")"],c()])]:Pu([["(",f,", ",...d,")"],["(",me(f,{shouldBreak:!0}),", ",...d,")"],c()])}if(vme(i,a,t)){let d=a.slice(0,-1);if(d.some(vi))return c();let f;try{f=r(jO(n,-1),{expandLastArg:!0})}catch(p){if(p instanceof u0)return c();throw p}return vi(f)?[No,Pu([["(",...d,me(f,{shouldBreak:!0}),")"],c()])]:Pu([["(",...d,f,")"],["(",...d,me(f,{shouldBreak:!0}),")"],c()])}let h=["(",Le([_e,...a]),Lt(u),_e,")"];return Mj(e)?h:me(h,{shouldBreak:a.some(vi)||o})}function Op(e,t=!1){return ho(e)&&(e.properties.length>0||We(e))||Un(e)&&(e.elements.length>0||We(e))||e.type==="TSTypeAssertion"&&Op(e.expression)||_o(e)&&Op(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||wme(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&Op(e.body,!0)||ho(e.body)||Un(e.body)||!t&&(rr(e.body)||e.body.type==="ConditionalExpression")||Tn(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function vme(e,t,r){var n,i;let s=or(!1,e,-1);if(e.length===1){let a=or(!1,t,-1);if((n=a.label)!=null&&n.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let o=or(!1,e,-2);return!We(s,tt.Leading)&&!We(s,tt.Trailing)&&Op(s)&&(!o||o.type!==s.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!Un(s))&&!(e.length>1&&Wz(s,r))}function bme(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Sme(r)?!0:!We(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&bz(r)&&!Op(r)}function bz(e){if(e.type==="ParenthesizedExpression")return bz(e.expression);if(_o(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.typeArguments??t.typeParameters;(r==null?void 0:r.params.length)===1&&(t=r.params[0])}return h2(t)&&Ys(e.expression,1)}return xd(e)&&Is(e).length>1?!1:Ta(e)?Ys(e.left,1)&&Ys(e.right,1):$j(e)||Ys(e)}function xme(e){return e.length===2?ZO(e,0):e.length===3?e[0].type==="Identifier"&&ZO(e,1):!1}function ZO(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&si(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&!e.some(i=>We(i))}function wme(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||We(e,tt.Dangling))}function Sme(e){return e.type==="ObjectExpression"&&e.properties.length===1&&ja(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&wi(e.properties[0].value)&&e.properties[0].value.value==="module"}var RC=yme,Dme=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),rr(e)&&Is(e).length>0);function Eme(e,t,r){var n;let i=r("object"),s=xz(e,t,r),{node:o}=e,a=e.findAncestor(c=>!(Jr(c)||c.type==="TSNonNullExpression")),l=e.findAncestor(c=>!(c.type==="ChainExpression"||c.type==="TSNonNullExpression")),u=a&&(a.type==="NewExpression"||a.type==="BindExpression"||a.type==="AssignmentExpression"&&a.left.type!=="Identifier")||o.computed||o.object.type==="Identifier"&&o.property.type==="Identifier"&&!Jr(l)||(l.type==="AssignmentExpression"||l.type==="VariableDeclarator")&&(Dme(o.object)||((n=i.label)==null?void 0:n.memberChain));return Qg(i.label,[i,u?s:me(Le([_e,s]))])}function xz(e,t,r){let n=r("property"),{node:i}=e,s=xi(e);return i.computed?!i.property||Ca(i.property)?[s,"[",n,"]"]:me([s,"[",Le([_e,n]),_e,"]"]):[s,".",n]}function wz(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>wz(e,t,r),"expression");let{parent:n}=e,i=!n||n.type==="ExpressionStatement",s=[];function o(_){let{originalText:A}=t,M=Zg(A,Zt(_));return A.charAt(M)===")"?M!==!1&&l2(A,M+1):Ba(_,t)}function a(_){let{node:A}=_;if(A.type==="ChainExpression")return _.call(()=>a(_),"expression");if(rr(A)&&(bh(A.callee)||rr(A.callee))){let M=o(A);s.unshift({node:A,hasTrailingEmptyLine:M,printed:[oo(_,[xi(_),uc(_,t,r),RC(_,t,r)],t),M?$e:""]}),_.call(R=>a(R),"callee")}else bh(A)?(s.unshift({node:A,needsParens:Ic(_,t),printed:oo(_,Jr(A)?xz(_,t,r):Hz(_,t,r),t)}),_.call(M=>a(M),"object")):A.type==="TSNonNullExpression"?(s.unshift({node:A,printed:oo(_,"!",t)}),_.call(M=>a(M),"expression")):s.unshift({node:A,printed:r()})}let{node:l}=e;s.unshift({node:l,printed:[xi(e),uc(e,t,r),RC(e,t,r)]}),l.callee&&e.call(_=>a(_),"callee");let u=[],c=[s[0]],h=1;for(;h0&&u.push(c);function f(_){return/^[A-Z]|^[$_]+$/u.test(_)}function p(_){return _.length<=t.tabWidth}function m(_){var A;let M=(A=_[1][0])==null?void 0:A.node.computed;if(_[0].length===1){let B=_[0][0].node;return B.type==="ThisExpression"||B.type==="Identifier"&&(f(B.name)||i&&p(B.name)||M)}let R=or(!1,_[0],-1).node;return Jr(R)&&R.property.type==="Identifier"&&(f(R.property.name)||M)}let y=u.length>=2&&!We(u[1][0].node)&&m(u);function b(_){let A=_.map(M=>M.printed);return _.length>0&&or(!1,_,-1).needsParens?["(",...A,")"]:A}function v(_){return _.length===0?"":Le([$e,qt($e,_.map(b))])}let E=u.map(b),D=E,C=y?3:2,w=u.flat(),T=w.slice(1,-1).some(_=>We(_.node,tt.Leading))||w.slice(0,-1).some(_=>We(_.node,tt.Trailing))||u[C]&&We(u[C][0].node,tt.Leading);if(u.length<=C&&!T&&!u.some(_=>or(!1,_,-1).hasTrailingEmptyLine))return Mj(e)?D:me(D);let k=or(!1,u[y?1:0],-1).node,O=!rr(k)&&o(k),P=[b(u[0]),y?u.slice(1,2).map(b):"",O?$e:"",v(u.slice(y?2:1))],I=s.map(({node:_})=>_).filter(rr);function F(){let _=or(!1,or(!1,u,-1),-1).node,A=or(!1,E,-1);return rr(_)&&vi(A)&&I.slice(0,-1).some(M=>M.arguments.some(mg))}let L;return T||I.length>2&&I.some(_=>!_.arguments.every(A=>Ys(A)))||E.slice(0,-1).some(vi)||F()?L=me(P):L=[vi(D)||O?No:"",Pu([D,P])],Qg({memberChain:!0},L)}var Cme=wz;function Sz(e,t,r){var n;let{node:i}=e,s=i.type==="NewExpression",o=i.type==="ImportExpression",a=xi(e),l=Is(i),u=l.length===1&&Oj(l[0],t.originalText);if(u||Tme(e)||Xb(i,e.parent)){let h=[];if(a0(e,()=>{h.push(r())}),!(u&&(n=h[0].label)!=null&&n.embed))return[s?"new ":"",eI(e,r),a,uc(e,t,r),"(",qt(", ",h),")"]}if(!o&&!s&&bh(i.callee)&&!e.call(h=>Ic(h,t),"callee",...i.callee.type==="ChainExpression"?["expression"]:[]))return Cme(e,t,r);let c=[s?"new ":"",eI(e,r),a,uc(e,t,r),RC(e,t,r)];return o||rr(i.callee)?me(c):c}function eI(e,t){let{node:r}=e;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:t("callee")}function Tme(e){let{node:t}=e;if(t.type!=="CallExpression"||t.optional||t.callee.type!=="Identifier")return!1;let r=Is(t);return t.callee.name==="require"?r.length===1&&wi(r[0])||r.length>1:t.callee.name==="define"&&e.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&wi(r[0])&&r[1].type==="ArrayExpression":!1}function em(e,t,r,n,i,s){let o=_me(e,t,r,n,s),a=s?r(s,{assignmentLayout:o}):"";switch(o){case"break-after-operator":return me([me(n),i,me(Le([Ye,a]))]);case"never-break-after-operator":return me([me(n),i," ",a]);case"fluid":{let l=Symbol("assignment");return me([me(n),i,me(Le(Ye),{id:l}),Aa,Qb(a,{groupId:l})])}case"break-lhs":return me([n,i," ",me(a)]);case"chain":return[me(n),i,Ye,a];case"chain-tail":return[me(n),i,Le([Ye,a])];case"chain-tail-arrow-chain":return[me(n),i,a];case"only-left":return n}}function Ame(e,t,r){let{node:n}=e;return em(e,t,r,r("left"),[" ",n.operator],"right")}function kme(e,t,r){return em(e,t,r,r("id")," =","init")}function _me(e,t,r,n,i){let{node:s}=e,o=s[i];if(!o)return"only-left";let a=!Zy(o);if(e.match(Zy,Dz,c=>!a||c.type!=="ExpressionStatement"&&c.type!=="VariableDeclaration"))return a?o.type==="ArrowFunctionExpression"&&o.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&Zy(o.right)||oc(t.originalText,o))return"break-after-operator";if(s.type==="ImportAttribute"||o.type==="CallExpression"&&o.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let l=Hfe(n);if(Lme(s)||Ime(s)||Ez(s)&&l)return"break-lhs";let u=Nme(s,n,t);return e.call(()=>$me(e,t,r,u),i)?"break-after-operator":Pme(s)?"break-lhs":!l&&(u||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||o.type==="BooleanLiteral"||Ca(o)||o.type==="ClassExpression")?"never-break-after-operator":"fluid"}function $me(e,t,r,n){let i=e.node;if(Ta(i)&&!bg(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!jme(i))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:u}=i;return Ta(u)&&!bg(u)}let{consequent:a,alternate:l}=i;return a.type==="ConditionalExpression"||l.type==="ConditionalExpression"}case"ClassExpression":return ar(i.decorators)}if(n)return!1;let s=i,o=[];for(;;)if(s.type==="UnaryExpression"||s.type==="AwaitExpression"||s.type==="YieldExpression"&&s.argument!==null)s=s.argument,o.push("argument");else if(s.type==="TSNonNullExpression")s=s.expression,o.push("expression");else break;return!!(wi(s)||e.call(()=>Cz(e,t,r),...o))}function Lme(e){if(Dz(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return ja(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Zy(e){return e.type==="AssignmentExpression"}function Dz(e){return Zy(e)||e.type==="VariableDeclarator"}function Pme(e){let t=Ome(e);if(ar(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Fme=xr(["TSTypeAliasDeclaration","TypeAlias"]);function Ome(e){var t;if(Fme(e))return(t=e.typeParameters)==null?void 0:t.params}function Ime(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=tI(t.typeAnnotation);return ar(r)&&r.length>1&&r.some(n=>ar(tI(n))||n.type==="TSConditionalType")}function Ez(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var Mme=xr(["TSTypeReference","GenericTypeAnnotation"]);function tI(e){var t;if(Mme(e))return(t=e.typeArguments??e.typeParameters)==null?void 0:t.params}function Cz(e,t,r,n=!1){var i;let{node:s}=e,o=()=>Cz(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(o,"expression");if(rr(s)){if((i=Sz(e,t,r).label)!=null&&i.memberChain)return!1;let a=Is(s);return!(a.length===0||a.length===1&&d2(a[0],t))||Rme(s,r)?!1:e.call(o,"callee")}return Jr(s)?e.call(o,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function Nme(e,t,r){return ja(e)?(t=g2(t),typeof t=="string"&&md(t)1)return!0;if(r.length===1){let i=r[0];if(ac(i)||Rj(i)||i.type==="TSTypeLiteral"||i.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(vi(t(n)))return!0}return!1}function Bme(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function jme(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!r.typeParameters;case"TSTypeReference":return!!(r.typeArguments??r.typeParameters);default:return!1}}return t(e.checkType)||t(e.extendsType)}function Mc(e,t,r,n,i){let s=e.node,o=si(s),a=i?uc(e,r,t):"";if(o.length===0)return[a,"(",Br(e,r,{filter:f=>fo(r.originalText,Zt(f))===")"}),")"];let{parent:l}=e,u=Xb(l),c=Tz(s),h=[];if(Efe(e,(f,p)=>{let m=p===o.length-1;m&&s.rest&&h.push("..."),h.push(t()),!m&&(h.push(","),u||c?h.push(" "):Ba(o[p],r)?h.push($e,$e):h.push(Ye))}),n&&!Hme(e)){if(vi(a)||vi(h))throw new u0;return me([_C(a),"(",_C(h),")"])}let d=o.every(f=>!ar(f.decorators));return c&&d?[a,"(",...h,")"]:u?[a,"(",...h,")"]:(Lj(l)||dfe(l)||l.type==="TypeAlias"||l.type==="UnionTypeAnnotation"||l.type==="IntersectionTypeAnnotation"||l.type==="FunctionTypeAnnotation"&&l.returnType===s)&&o.length===1&&o[0].name===null&&s.this!==o[0]&&o[0].typeAnnotation&&s.typeParameters===null&&h2(o[0].typeAnnotation)&&!s.rest?r.arrowParens==="always"||s.type==="HookTypeAnnotation"?["(",...h,")"]:h:[a,"(",Le([_e,...h]),Lt(!Dfe(s)&&Ra(r,"all")?",":""),_e,")"]}function Tz(e){if(!e)return!1;let t=si(e);if(t.length!==1)return!1;let[r]=t;return!We(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Bl(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Bl(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||ho(r.right)&&r.right.properties.length===0||Un(r.right)&&r.right.elements.length===0))}function zme(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function ef(e,t){var r;let n=zme(e);if(!n)return!1;let i=(r=e.typeParameters)==null?void 0:r.params;if(i){if(i.length>1)return!1;if(i.length===1){let s=i[0];if(s.constraint||s.default)return!1}}return si(e).length===1&&(Bl(n)||vi(t))}function Hme(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function Ume(e){let t=si(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var Wme=xr(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),Vme=xr(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function Gme(e){let{types:t}=e;if(t.some(n=>We(n)))return!1;let r=t.find(n=>Vme(n));return r?t.every(n=>n===r||Wme(n)):!1}function Az(e){return h2(e)||Bl(e)?!0:ac(e)?Gme(e):!1}function qme(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[qi(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}function kz(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[qi(e)];s.push("type ",r("id"),r("typeParameters"));let o=i.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[em(e,t,r,s," =",o),n]}function _z(e,t,r){let n=!1;return me(e.map(({isFirst:i,previous:s,node:o,index:a})=>{let l=r();if(i)return l;let u=Bl(o),c=Bl(s);return c&&u?[" & ",n?Le(l):l]:!c&&!u?Le([" &",Ye,l]):(a>1&&(n=!0),[" & ",a>1?Le(l):l])},"types"))}function $z(e,t,r){let{node:n}=e,{parent:i}=e,s=i.type!=="TypeParameterInstantiation"&&(i.type!=="TSConditionalType"||!t.experimentalTernaries)&&(i.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&i.type!=="TSTypeParameterInstantiation"&&i.type!=="GenericTypeAnnotation"&&i.type!=="TSTypeReference"&&i.type!=="TSTypeAssertion"&&i.type!=="TupleTypeAnnotation"&&i.type!=="TSTupleType"&&!(i.type==="FunctionTypeParam"&&!i.name&&e.grandparent.this!==i)&&!((i.type==="TypeAlias"||i.type==="VariableDeclarator"||i.type==="TSTypeAliasDeclaration")&&oc(t.originalText,n)),o=Az(n),a=e.map(c=>{let h=r();return o||(h=Mo(2,h)),oo(c,h,t)},"types");if(o)return qt(" | ",a);let l=s&&!oc(t.originalText,n),u=[Lt([l?Ye:"","| "]),qt([Ye,"| "],a)];return Ic(e,t)?me([Le(u),_e]):(i.type==="TupleTypeAnnotation"||i.type==="TSTupleType")&&i[i.type==="TupleTypeAnnotation"&&i.types?"types":"elementTypes"].length>1?me([Le([Lt(["(",_e]),u]),_e,Lt(")")]):me(s?Le(u):u)}function Kme(e){var t;let{node:r,parent:n}=e;return r.type==="FunctionTypeAnnotation"&&(Lj(n)||!((n.type==="ObjectTypeProperty"||n.type==="ObjectTypeInternalSlot")&&!n.variance&&!n.optional&&qb(n,r)||n.type==="ObjectTypeCallProperty"||((t=e.getParentNode(2))==null?void 0:t.type)==="DeclareFunction"))}function Lz(e,t,r){let{node:n}=e,i=[Zb(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&i.push("new ");let s=Mc(e,r,t,!1,!0),o=[];return n.type==="FunctionTypeAnnotation"?o.push(Kme(e)?" => ":": ",r("returnType")):o.push(Bn(e,r,n.returnType?"returnType":"typeAnnotation")),ef(n,o)&&(s=me(s)),i.push(s,o),me(i)}function Pz(e,t,r){return[r("objectType"),xi(e),"[",r("indexType"),"]"]}function Fz(e,t,r){return["infer ",r("typeParameter")]}function rI(e,t,r){let{node:n}=e;return[n.postfix?"":r,Bn(e,t),n.postfix?r:""]}function Oz(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Iz(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var Jme=new WeakSet;function Bn(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let s=e.call(Mz,r);(s==="=>"||s===":"&&We(n,tt.Leading))&&(i=!0),Jme.add(n)}return i?[" ",t(r)]:t(r)}var Mz=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareHook")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function Nz(e,t,r){let n=Mz(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function Rz(e){return[e("elementType"),"[]"]}function Bz({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TypeofTypeAnnotation"||e.typeArguments?"typeArguments":"typeParameters";return["typeof ",t(r),t(n)]}function jz(e,t){let{node:r}=e;return[r.type==="TSTypePredicate"&&r.asserts?"asserts ":r.type==="TypePredicate"&&r.kind?`${r.kind} `:"",t("parameterName"),r.typeAnnotation?[" is ",Bn(e,t)]:""]}function xi(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":rr(t)||Jr(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function zz(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var Xme=new Set(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function qi(e){let{node:t}=e;return t.declare||Xme.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var Yme=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Zb({node:e}){return e.abstract||Yme.has(e.type)?"abstract ":""}function uc(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function Hz(e,t,r){return["::",r("callee")]}function qa(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:Le([Ye,t])}function Uz(e,t){return["...",t("argument"),Bn(e,t)]}function c0(e){return e.accessibility?e.accessibility+" ":""}function Qme(e,t,r,n){let{node:i}=e,s=i.inexact?"...":"";return We(i,tt.Dangling)?me([r,s,Br(e,t,{indent:!0}),_e,n]):[r,s,n]}function D2(e,t,r){let{node:n}=e,i=[],s=n.type==="TupleExpression"?"#[":"[",o="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",l=n[a];if(l.length===0)i.push(Qme(e,t,s,o));else{let u=or(!1,l,-1),c=(u==null?void 0:u.type)!=="RestElement"&&!n.inexact,h=u===null,d=Symbol("array"),f=!t.__inJestEach&&l.length>1&&l.every((y,b,v)=>{let E=y==null?void 0:y.type;if(!Un(y)&&!ho(y))return!1;let D=v[b+1];if(D&&E!==D.type)return!1;let C=Un(y)?"elements":"properties";return y[C]&&y[C].length>1}),p=Wz(n,t),m=c?h?",":Ra(t)?p?Lt(",","",{groupId:d}):Lt(","):"":"";i.push(me([s,Le([_e,p?eye(e,t,r,m):[Zme(e,t,a,n.inexact,r),m],Br(e,t)]),_e,o],{shouldBreak:f,id:d}))}return i.push(xi(e),Bn(e,r)),i}function Wz(e,t){return Un(e)&&e.elements.length>1&&e.elements.every(r=>r&&(Ca(r)||_j(r)&&!We(r.argument))&&!We(r,tt.Trailing|tt.Line,n=>!ns(t.originalText,jr(n),{backwards:!0})))}function Vz({node:e},{originalText:t}){let r=i=>o2(t,a2(t,i)),n=i=>t[i]===","?i:n(r(i+1));return l2(t,n(Zt(e)))}function Zme(e,t,r,n,i){let s=[];return e.each(({node:o,isLast:a})=>{s.push(o?me(i()):""),(!a||n)&&s.push([",",Ye,o&&Vz(e,t)?_e:""])},r),n&&s.push("..."),s}function eye(e,t,r,n){let i=[];return e.each(({isLast:s,next:o})=>{i.push([r(),s?n:","]),s||i.push(Vz(e,t)?[$e,$e]:We(o,tt.Leading|tt.Line)?$e:Ye)},"elements"),p2(i)}var Gz=new Proxy(()=>{},{get:()=>Gz}),qz=Gz,tye=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,rye=e=>tye.test(e),nye=rye;function iye(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var dl=iye,ev=new WeakMap;function Kz(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function nI(e,t){return t.parser==="json"||t.parser==="jsonc"||!wi(e.key)||bd($s(e.key),t).slice(1,-1)!==e.key.value?!1:!!(nye(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Kz(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!=="ImportAttribute"&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function sye(e,t){let{key:r}=e.node;return(r.type==="Identifier"||Ca(r)&&Kz(dl($s(r)))&&String(r.value)===dl($s(r))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&ev.get(e.parent))}function tm(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if(t.quoteProps==="consistent"&&!ev.has(i)){let o=e.siblings.some(a=>!a.computed&&wi(a.key)&&!nI(a,t));ev.set(i,o)}if(sye(e,t)){let o=bd(JSON.stringify(s.type==="Identifier"?s.name:s.value.toString()),t);return e.call(a=>oo(a,o,t),"key")}return nI(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!ev.get(i))?e.call(o=>oo(o,/^\d/u.test(s.value)?dl(s.value):s.value,t),"key"):r("key")}function MS(e,t,r){let{node:n}=e;return n.shorthand?r("value"):em(e,t,r,tm(e,t,r),":","value")}var oye=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&Jb(r));function Jz(e,t,r,n){if(oye(e))return E2(e,r,t);let{node:i}=e,s=!1;if((i.type==="FunctionDeclaration"||i.type==="FunctionExpression")&&n!=null&&n.expandLastArg){let{parent:c}=e;rr(c)&&(Is(c).length>1||si(i).every(h=>h.type==="Identifier"&&!h.typeAnnotation))&&(s=!0)}let o=[qi(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],a=Mc(e,t,r,s),l=e1(e,t),u=ef(i,l);return o.push(uc(e,r,t),me([u?me(a):a,l]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&o.push(";"),o}function BC(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,o=[];return!i||i==="init"||i==="method"||i==="constructor"?s.async&&o.push("async "):(qz.ok(i==="get"||i==="set"),o.push(i," ")),s.generator&&o.push("*"),o.push(tm(e,t,r),n.optional||n.key.optional?"?":"",n===s?E2(e,t,r):r("value")),o}function E2(e,t,r){let{node:n}=e,i=Mc(e,r,t),s=e1(e,r),o=Ume(n),a=ef(n,s),l=[uc(e,t,r),me([o?me(i,{shouldBreak:!0}):a?me(i):i,s])];return n.body?l.push(" ",r("body")):l.push(t.semi?";":""),l}function aye(e){let t=si(e);return t.length===1&&!e.typeParameters&&!We(e,tt.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!We(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Xz(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return aye(r)}return!1}function e1(e,t){let{node:r}=e,n=[Bn(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Yz(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let l=r("argument");cye(t,n.argument)?l=["(",Le([$e,l]),$e,")"]:(Ta(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(l=me([Lt("("),Le([_e,l]),_e,Lt(")")])),s.push(" ",l)}let o=We(n,tt.Dangling),a=i&&o&&We(n,tt.Last|tt.Line);return a&&s.push(i),o&&s.push(" ",Br(e,t)),a||s.push(i),s}function lye(e,t,r){return["return",Yz(e,t,r)]}function uye(e,t,r){return["throw",Yz(e,t,r)]}function cye(e,t){if(oc(e.originalText,t)||We(t,tt.Leading,r=>zl(e.originalText,jr(r),Zt(r)))&&!Tn(t))return!0;if(u2(t)){let r=t,n;for(;n=afe(r);)if(r=n,oc(e.originalText,r))return!0}return!1}var NS=new WeakMap;function Qz(e){return NS.has(e)||NS.set(e,e.type==="ConditionalExpression"&&!mi(e,t=>t.type==="ObjectExpression")),NS.get(e)}var Zz=e=>e.type==="SequenceExpression";function hye(e,t,r,n={}){let i=[],s,o=[],a=!1,l=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",u;(function y(){let{node:b}=e,v=dye(e,t,r,n);if(i.length===0)i.push(v);else{let{leading:E,trailing:D}=fz(e,t);i.push([E,v]),o.unshift(D)}l&&(a||(a=b.returnType&&si(b).length>0||b.typeParameters||si(b).some(E=>E.type!=="Identifier"))),!l||b.body.type!=="ArrowFunctionExpression"?(s=r("body",n),u=b.body):e.call(y,"body")})();let c=!oc(t.originalText,u)&&(Zz(u)||fye(u,s,t)||!a&&Qz(u)),h=e.key==="callee"&&xd(e.parent),d=Symbol("arrow-chain"),f=pye(e,n,{signatureDocs:i,shouldBreak:a}),p,m=!1;return l&&(h||n.assignmentLayout)&&(m=!0,p=n.assignmentLayout==="chain-tail-arrow-chain"||h&&!c),s=gye(e,t,n,{bodyDoc:s,bodyComments:o,functionBody:u,shouldPutBodyOnSameLine:c}),me([me(m?Le([_e,f]):f,{shouldBreak:p,id:d})," =>",l?Qb(s,{groupId:d}):me(s),l&&h?Lt(_e,"",{groupId:d}):""])}function dye(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),Xz(e,t))s.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,l=e1(e,r);if(a){if(vi(l))throw new u0;l=me(_C(l))}s.push(me([Mc(e,r,t,a,!0),l]))}let o=Br(e,t,{filter(a){let l=Zg(t.originalText,Zt(a));return l!==!1&&t.originalText.slice(l,l+2)==="=>"}});return o&&s.push(" ",o),s}function fye(e,t,r){var n,i;return Un(e)||ho(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||Tn(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((i=t.label)==null?void 0:i.embed)||Oj(e,r.originalText))}function pye(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:i,key:s}=e;return s!=="callee"&&xd(i)||Ta(i)?me([r[0]," =>",Le([Ye,qt([" =>",Ye],r.slice(1))])],{shouldBreak:n}):s==="callee"&&xd(i)||t.assignmentLayout?me(qt([" =>",Ye],r),{shouldBreak:n}):me(Le(qt([" =>",Ye],r)),{shouldBreak:n})}function gye(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:o}){let{node:a,parent:l}=e,u=r.expandLastArg&&Ra(t,"all")?Lt(","):"",c=(r.expandLastArg||l.type==="JSXExpressionContainer")&&!We(a)?_e:"";return o&&Qz(s)?[" ",me([Lt("","("),Le([_e,n]),Lt("",")"),u,c]),i]:(Zz(s)&&(n=me(["(",Le([_e,n]),_e,")"])),o?[" ",n,i]:[Le([Ye,n,i]),u,c])}var mye=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},yye=mye;function jC(e,t,r,n){let{node:i}=e,s=[],o=yye(!1,i[n],a=>a.type!=="EmptyStatement");return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(s.push(r()),a!==o&&(s.push($e),Ba(a,t)&&s.push($e)))},n),s}function e7(e,t,r){let n=vye(e,t,r),{node:i,parent:s}=e;if(i.type==="Program"&&(s==null?void 0:s.type)!=="ModuleExpression")return n?[n,$e]:"";let o=[];if(i.type==="StaticBlock"&&o.push("static "),o.push("{"),n)o.push(Le([$e,n]),$e);else{let a=e.grandparent;s.type==="ArrowFunctionExpression"||s.type==="FunctionExpression"||s.type==="FunctionDeclaration"||s.type==="ComponentDeclaration"||s.type==="HookDeclaration"||s.type==="ObjectMethod"||s.type==="ClassMethod"||s.type==="ClassPrivateMethod"||s.type==="ForStatement"||s.type==="WhileStatement"||s.type==="DoWhileStatement"||s.type==="DoExpression"||s.type==="ModuleExpression"||s.type==="CatchClause"&&!a.finalizer||s.type==="TSModuleDeclaration"||i.type==="StaticBlock"||o.push($e)}return o.push("}"),o}function vye(e,t,r){let{node:n}=e,i=ar(n.directives),s=n.body.some(l=>l.type!=="EmptyStatement"),o=We(n,tt.Dangling);if(!i&&!s&&!o)return"";let a=[];return i&&(a.push(jC(e,t,r,"directives")),(s||o)&&(a.push($e),Ba(or(!1,n.directives,-1),t)&&a.push($e))),s&&a.push(jC(e,t,r,"body")),o&&a.push(Br(e,t)),a}function bye(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var t7=bye;function xye(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function wye(e,t,r){let{node:n}=e;return me([n.variance?r("variance"):"","[",Le([r("keyTparam")," in ",r("sourceType")]),"]",xye(n.optional),": ",r("propType")])}function r7(e,t){return e==="+"||e==="-"?e+t:t}function Sye(e,t,r){let{node:n}=e,i=zl(t.originalText,jr(n),jr(n.typeParameter));return me(["{",Le([t.bracketSpacing?Ye:_e,me([r("typeParameter"),n.optional?r7(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?Lt(";"):""]),Br(e,t),t.bracketSpacing?Ye:_e,"}"],{shouldBreak:i})}var C2=t7("typeParameters");function Dye(e,t,r){let{node:n}=e;return si(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function Ip(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=Xb(e.grandparent),o=e.match(l=>!(l[n].length===1&&Bl(l[n][0])),void 0,(l,u)=>u==="typeAnnotation",l=>l.type==="Identifier",Ez);if(i[n].length===0||!o&&(s||i[n].length===1&&(i[n][0].type==="NullableTypeAnnotation"||Az(i[n][0]))))return["<",qt(", ",e.map(r,n)),Eye(e,t),">"];let a=i.type==="TSTypeParameterInstantiation"?"":Dye(e,t,n)?",":Ra(t)?Lt(","):"";return me(["<",Le([_e,qt([",",Ye],e.map(r,n))]),a,_e,">"],{id:C2(i)})}function Eye(e,t){let{node:r}=e;if(!We(r,tt.Dangling))return"";let n=!We(r,tt.Line),i=Br(e,t,{indent:!n});return n?i:[i,$e]}function n7(e,t,r){let{node:n,parent:i}=e,s=[n.type==="TSTypeParameter"&&n.const?"const ":""],o=n.type==="TSTypeParameter"?r("name"):n.name;if(i.type==="TSMappedType")return i.readonly&&s.push(r7(i.readonly,"readonly")," "),s.push("[",o),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent(()=>r("nameType"))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(o),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(Bn(e,r,"bound"))),n.constraint){let a=Symbol("constraint");s.push(" extends",me(Le(Ye),{id:a}),Aa,Qb(r("constraint"),{groupId:a}))}return n.default&&s.push(" = ",r("default")),me(s)}var i7=xr(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function s7(e,t,r){let{node:n}=e,i=[qi(e),Zb(e),"class"],s=We(n.id,tt.Trailing)||We(n.typeParameters,tt.Trailing)||We(n.superClass)||ar(n.extends)||ar(n.mixins)||ar(n.implements),o=[],a=[];if(n.id&&o.push(" ",r("id")),o.push(r("typeParameters")),n.superClass){let l=[Tye(e,t,r),r(n.superTypeArguments?"superTypeArguments":"superTypeParameters")],u=e.call(c=>["extends ",oo(c,l,t)],"superClass");s?a.push(Ye,me(u)):a.push(" ",u)}else a.push(RS(e,t,r,"extends"));if(a.push(RS(e,t,r,"mixins"),RS(e,t,r,"implements")),s){let l;l7(n)?l=[...o,Le(a)]:l=Le([...o,a]),i.push(me(l,{id:o7(n)}))}else i.push(...o,...a);return i.push(" ",r("body")),i}var o7=t7("heritageGroup");function a7(e){return Lt($e,"",{groupId:o7(e)})}function Cye(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function l7(e){return e.typeParameters&&!We(e.typeParameters,tt.Trailing|tt.Line)&&!Cye(e)}function RS(e,t,r,n){let{node:i}=e;if(!ar(i[n]))return"";let s=Br(e,t,{marker:n});return[l7(i)?Lt(" ",Ye,{groupId:C2(i.typeParameters)}):Ye,s,s&&$e,n,me(Le([Ye,qt([",",Ye],e.map(r,n))]))]}function Tye(e,t,r){let n=r("superClass"),{parent:i}=e;return i.type==="AssignmentExpression"?me(Lt(["(",Le([_e,n]),_e,")"],n)):n}function u7(e,t,r){let{node:n}=e,i=[];return ar(n.decorators)&&i.push(mz(e,t,r)),i.push(c0(n)),n.static&&i.push("static "),i.push(Zb(e)),n.override&&i.push("override "),i.push(BC(e,t,r)),i}function c7(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";ar(n.decorators)&&i.push(mz(e,t,r)),i.push(c0(n),qi(e)),n.static&&i.push("static "),i.push(Zb(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&i.push("accessor "),i.push(tm(e,t,r),xi(e),zz(e),Bn(e,r));let o=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[em(e,t,r,i," =",o?void 0:"value"),s]}function Aye(e,t,r){let{node:n}=e,i=[];return e.each(({node:s,next:o,isLast:a})=>{i.push(r()),!t.semi&&i7(s)&&kye(s,o)&&i.push(";"),a||(i.push($e),Ba(s,t)&&i.push($e))},"body"),We(n,tt.Dangling)&&i.push(Br(e,t)),[ar(n.body)?a7(e.parent):"","{",i.length>0?[Le([$e,i]),$e]:"","}"]}function kye(e,t){var r;let{type:n,name:i}=e.key;if(!e.computed&&n==="Identifier"&&(i==="static"||i==="get"||i==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let s=(r=t.key)==null?void 0:r.name;if(s==="in"||s==="instanceof")return!0}if(i7(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let s=t.value?t.value.generator:t.generator;return!!(t.computed||s)}case"TSIndexSignature":return!0}return!1}function _ye(e,t){if(t.semi||d7(e,t)||p7(e,t))return!1;let{node:r,key:n,parent:i}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(i.type==="Program"||i.type==="BlockStatement"||i.type==="StaticBlock"||i.type==="TSModuleBlock")||n==="consequent"&&i.type==="SwitchCase")&&e.call(()=>h7(e,t),"expression"))}function h7(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Xz(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:i}=r;if(n&&(i==="+"||i==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(Tn(r))return!0}return Ic(e,t)?!0:u2(r)?e.call(()=>h7(e,t),...kj(r)):!1}function d7({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&Tn(e.expression)&&t.type==="Program"&&t.body.length===1}function f7(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return f7(e.object)}return!1;case"Identifier":return!0;default:return!1}}function p7({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function $ye(e,t,r){let n=[r("expression")];return p7(e,t)?f7(e.node.expression)&&n.push(";"):d7(e,t)||t.semi&&n.push(";"),n}function Lye(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let i=qt([",",Ye],n);return t.__isVueForBindingLeft?["(",Le([_e,me(i)]),_e,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return qt([",",Ye],n)}}function Pye(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return iI(r);case"BigIntLiteral":return zC(r.extra.raw);case"NumericLiteral":return dl(r.extra.raw);case"StringLiteral":return lc(bd(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return dl(r.value)+"m";case"DirectiveLiteral":return sI(r.extra.raw,t);case"Literal":{if(r.regex)return iI(r.regex);if(r.bigint)return zC(r.raw);if(r.decimal)return dl(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?dl(r.raw):typeof n=="string"?Fye(e)?sI(r.raw,t):lc(bd(r.raw,t)):String(n)}}}function Fye(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function zC(e){return e.toLowerCase()}function iI({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function sI(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Oye(e,t,r){let n=e.originalText.slice(t,r);for(let i of e[Symbol.for("comments")]){let s=jr(i);if(s>r)break;let o=Zt(i);if(oe.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function m7(e,t,r){let{node:n}=e,i=[gme(e,t,r),qi(e),"export",g7(n)?" default":""],{declaration:s,exported:o}=n;return We(n,tt.Dangling)&&(i.push(" ",Br(e,t)),Ij(n)&&i.push($e)),s?i.push(" ",r("declaration")):(i.push(Rye(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(i.push(" *"),o&&i.push(" as ",r("exported"))):i.push(b7(e,t,r)),i.push(v7(e,t,r),w7(e,t,r))),i.push(Nye(n,t)),i}var Mye=xr(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);function Nye(e,t){return t.semi&&(!e.declaration||g7(e)&&!Mye(e.declaration))?";":""}function A2(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function y7(e,t){return A2(e.importKind,t)}function Rye(e){return A2(e.exportKind)}function v7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return x7(n,t)&&i.push(" from"),i.push(" ",r("source")),i}function b7(e,t,r){let{node:n}=e;if(!x7(n,t))return"";let i=[" "];if(ar(n.specifiers)){let s=[],o=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")s.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")o.push(r());else throw new Zd(n,"specifier")},"specifiers"),i.push(qt(", ",s)),o.length>0&&(s.length>0&&i.push(", "),o.length>1||s.length>0||n.specifiers.some(a=>We(a))?i.push(me(["{",Le([t.bracketSpacing?Ye:_e,qt([",",Ye],o)]),Lt(Ra(t)?",":""),t.bracketSpacing?Ye:_e,"}"])):i.push(["{",t.bracketSpacing?" ":"",...o,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function x7(e,t){return e.type!=="ImportDeclaration"||ar(e.specifiers)||e.importKind==="type"?!0:T2(t,jr(e),jr(e.source)).trimEnd().endsWith("from")}function Bye(e,t){var r,n;if((r=e.extra)!=null&&r.deprecatedAssertSyntax)return"assert";let i=T2(t,Zt(e.source),(n=e.attributes)!=null&&n[0]?jr(e.attributes[0]):Zt(e)).trimStart();return i.startsWith("assert")?"assert":i.startsWith("with")||ar(e.attributes)?"with":void 0}function w7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=Bye(n,t);if(!i)return"";let s=[` ${i} {`];return ar(n.attributes)&&(t.bracketSpacing&&s.push(" "),s.push(qt(", ",e.map(r,"attributes"))),t.bracketSpacing&&s.push(" ")),s.push("}"),s}function jye(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),o=s?"imported":"local",a=s?"local":"exported",l=n[o],u=n[a],c="",h="";return i==="ExportNamespaceSpecifier"||i==="ImportNamespaceSpecifier"?c="*":l&&(c=r(o)),u&&!zye(n)&&(h=r(a)),[A2(i==="ImportSpecifier"?n.importKind:n.exportKind,!1),c,c&&h?" as ":"",h]}function zye(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!Kde(t,r))return!1;if(wi(t))return t.value===r.value&&$s(t)===$s(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function t1(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,o=s.type==="ObjectTypeAnnotation",a=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumBigIntBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",l=[s.type==="TSTypeLiteral"||a?"members":s.type==="TSInterfaceBody"?"body":"properties"];o&&l.push("indexers","callProperties","internalSlots");let u=l.flatMap(w=>e.map(({node:T})=>({node:T,printed:r(),loc:jr(T)}),w));l.length>1&&u.sort((w,T)=>w.loc-T.loc);let{parent:c,key:h}=e,d=o&&h==="body"&&(c.type==="InterfaceDeclaration"||c.type==="DeclareInterface"||c.type==="DeclareClass"),f=s.type==="TSInterfaceBody"||a||d||s.type==="ObjectPattern"&&c.type!=="FunctionDeclaration"&&c.type!=="FunctionExpression"&&c.type!=="ArrowFunctionExpression"&&c.type!=="ObjectMethod"&&c.type!=="ClassMethod"&&c.type!=="ClassPrivateMethod"&&c.type!=="AssignmentPattern"&&c.type!=="CatchClause"&&s.properties.some(w=>w.value&&(w.value.type==="ObjectPattern"||w.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&u.length>0&&zl(t.originalText,jr(s),u[0].loc),p=d?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?Lt(i,";"):",",m=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",b=[],v=u.map(w=>{let T=[...b,me(w.printed)];return b=[p,Ye],(w.node.type==="TSPropertySignature"||w.node.type==="TSMethodSignature"||w.node.type==="TSConstructSignatureDeclaration"||w.node.type==="TSCallSignatureDeclaration")&&We(w.node,tt.PrettierIgnore)&&b.shift(),Ba(w.node,t)&&b.push($e),T});if(s.inexact||s.hasUnknownMembers){let w;if(We(s,tt.Dangling)){let T=We(s,tt.Line);w=[Br(e,t),T||ns(t.originalText,Zt(or(!1,Jh(s),-1)))?$e:Ye,"..."]}else w=["..."];v.push([...b,...w])}let E=(n=or(!1,u,-1))==null?void 0:n.node,D=!(s.inexact||s.hasUnknownMembers||E&&(E.type==="RestElement"||(E.type==="TSPropertySignature"||E.type==="TSCallSignatureDeclaration"||E.type==="TSMethodSignature"||E.type==="TSConstructSignatureDeclaration")&&We(E,tt.PrettierIgnore))),C;if(v.length===0){if(!We(s,tt.Dangling))return[m,y,Bn(e,r)];C=me([m,Br(e,t,{indent:!0}),_e,y,xi(e),Bn(e,r)])}else C=[d&&ar(s.properties)?a7(c):"",m,Le([t.bracketSpacing?Ye:_e,...v]),Lt(D&&(p!==","||Ra(t))?p:""),t.bracketSpacing?Ye:_e,y,xi(e),Bn(e,r)];return e.match(w=>w.type==="ObjectPattern"&&!ar(w.decorators),BS)||Bl(s)&&(e.match(void 0,(w,T)=>T==="typeAnnotation",(w,T)=>T==="typeAnnotation",BS)||e.match(void 0,(w,T)=>w.type==="FunctionTypeParam"&&T==="typeAnnotation",BS))||!f&&e.match(w=>w.type==="ObjectPattern",w=>w.type==="AssignmentExpression"||w.type==="VariableDeclarator")?C:me(C,{shouldBreak:f})}function BS(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&Tz(e)}function Hye(e){let t=[e];for(let r=0;rd[O]===n),p=d.type===n.type&&!f,m,y,b=0;do y=m||n,m=e.getParentNode(b),b++;while(m&&m.type===n.type&&a.every(O=>m[O]!==y));let v=m||d,E=y;if(i&&(Tn(n[a[0]])||Tn(l)||Tn(u)||Hye(E))){h=!0,p=!0;let O=I=>[Lt("("),Le([_e,I]),_e,Lt(")")],P=I=>I.type==="NullLiteral"||I.type==="Literal"&&I.value===null||I.type==="Identifier"&&I.name==="undefined";c.push(" ? ",P(l)?r(s):O(r(s))," : ",u.type===n.type||P(u)?r(o):O(r(o)))}else{let O=I=>t.useTabs?Le(r(I)):Mo(2,r(I)),P=[Ye,"? ",l.type===n.type?Lt("","("):"",O(s),l.type===n.type?Lt("",")"):"",Ye,": ",O(o)];c.push(d.type!==n.type||d[o]===n||f?P:t.useTabs?Hj(Le(P)):Mo(Math.max(0,t.tabWidth-2),P))}let D=[s,o,...a].some(O=>We(n[O],P=>Os(P)&&zl(t.originalText,jr(P),Zt(P)))),C=O=>d===v?me(O,{shouldBreak:D}):D?[O,No]:O,w=!h&&(Jr(d)||d.type==="NGPipeExpression"&&d.left===n)&&!d.computed,T=Vye(e),k=C([Uye(e,t,r),p?c:Le(c),i&&w&&!T?_e:""]);return f||T?me([Le([_e,k]),_e]):k}function qye(e,t){return(Jr(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function Kye(e,t,r,n){return[...e.map(i=>Jh(i)),Jh(t),Jh(r)].flat().some(i=>Os(i)&&zl(n.originalText,jr(i),Zt(i)))}var Jye=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Xye(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let i=0;!r;i++){let s=e.getParentNode(i);if(s.type==="ChainExpression"&&s.expression===n||rr(s)&&s.callee===n||Jr(s)&&s.object===n||s.type==="TSNonNullExpression"&&s.expression===n){n=s;continue}s.type==="NewExpression"&&s.callee===n||_o(s)&&s.expression===n?(r=e.getParentNode(i+1),n=s):r=s}return n===t?!1:r[Jye.get(r.type)]===n}var jS=e=>[Lt("("),Le([_e,e]),_e,Lt(")")];function k2(e,t,r,n){if(!t.experimentalTernaries)return Gye(e,t,r);let{node:i}=e,s=i.type==="ConditionalExpression",o=i.type==="TSConditionalType"||i.type==="ConditionalTypeAnnotation",a=s?"consequent":"trueType",l=s?"alternate":"falseType",u=s?["test"]:["checkType","extendsType"],c=i[a],h=i[l],d=u.map(Re=>i[Re]),{parent:f}=e,p=f.type===i.type,m=p&&u.some(Re=>f[Re]===i),y=p&&f[l]===i,b=c.type===i.type,v=h.type===i.type,E=v||y,D=t.tabWidth>2||t.useTabs,C,w,T=0;do w=C||i,C=e.getParentNode(T),T++;while(C&&C.type===i.type&&u.every(Re=>C[Re]!==w));let k=C||f,O=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),P=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(b||v),I=s&&k.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",F=Xye(e),L=qye(i,f),_=o&&Ic(e,t),A=D?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",M=Kye(d,c,h,t)||b||v,R=!E&&!p&&!o&&(I?c.type==="NullLiteral"||c.type==="Literal"&&c.value===null:d2(c,t)&&NO(i.test,3)),B=E||y||o&&!p||p&&s&&NO(i.test,1)||R,U=[];!b&&We(c,tt.Dangling)&&e.call(Re=>{U.push(Br(Re,t),$e)},"consequent");let V=[];We(i.test,tt.Dangling)&&e.call(Re=>{V.push(Br(Re,t))},"test"),!v&&We(h,tt.Dangling)&&e.call(Re=>{V.push(Br(Re,t))},"alternate"),We(i,tt.Dangling)&&V.push(Br(e,t));let K=Symbol("test"),J=Symbol("consequent"),G=Symbol("test-and-consequent"),Y=s?[jS(r("test")),i.test.type==="ConditionalExpression"?No:""]:[r("checkType")," ","extends"," ",i.extendsType.type==="TSConditionalType"||i.extendsType.type==="ConditionalTypeAnnotation"||i.extendsType.type==="TSMappedType"?r("extendsType"):me(jS(r("extendsType")))],Q=me([Y," ?"],{id:K}),X=r(a),le=Le([b||I&&(Tn(c)||p||E)?$e:Ye,U,X]),be=B?me([Q,E?le:Lt(le,me(le,{id:J}),{groupId:K})],{id:G}):[Q,le],ce=r(l),xe=R?Lt(ce,Hj(jS(ce)),{groupId:G}):ce,ke=[be,V.length>0?[Le([$e,V]),$e]:v?$e:R?Lt(Ye," ",{groupId:G}):Ye,":",v?" ":D?B?Lt(A,Lt(E||R?" ":A," "),{groupId:G}):Lt(A," "):" ",v?xe:me([Le(xe),I&&!R?_e:""]),L&&!F?_e:"",M?No:""];return O&&!M?me(Le([_e,me(ke)])):O||P?me(Le(ke)):F||o&&m?me([Le([_e,ke]),_?_e:""]):f===k?me(ke):ke}function Yye(e,t,r,n){let{node:i}=e;if(c2(i))return Pye(e,t);let s=t.semi?";":"",o=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),$e];case"File":return Lye(e,t,r)??r("program");case"EmptyStatement":return"";case"ExpressionStatement":return $ye(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!We(i.expression)&&(ho(i.expression)||Un(i.expression))?["(",r("expression"),")"]:me(["(",Le([_e,r("expression")]),_e,")"]);case"AssignmentExpression":return Ame(e,t,r);case"VariableDeclarator":return kme(e,t,r);case"BinaryExpression":case"LogicalExpression":return gz(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Eme(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&o.push(r("object")),o.push(me(Le([_e,Hz(e,t,r)]))),o;case"Identifier":return[i.name,xi(e),zz(e),Bn(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Uz(e,r);case"FunctionDeclaration":case"FunctionExpression":return Jz(e,r,t,n);case"ArrowFunctionExpression":return hye(e,t,r,n);case"YieldExpression":return o.push("yield"),i.delegate&&o.push("*"),i.argument&&o.push(" ",r("argument")),o;case"AwaitExpression":if(o.push("await"),i.argument){o.push(" ",r("argument"));let{parent:a}=e;if(rr(a)&&a.callee===i||Jr(a)&&a.object===i){o=[Le([_e,...o]),_e];let l=e.findAncestor(u=>u.type==="AwaitExpression"||u.type==="BlockStatement");if((l==null?void 0:l.type)!=="AwaitExpression"||!mi(l.argument,u=>u===i))return me(o)}}return o;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return m7(e,t,r);case"ImportDeclaration":return Iye(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return jye(e,t,r);case"ImportAttribute":return MS(e,t,r);case"Import":return"import";case"Program":case"BlockStatement":case"StaticBlock":return e7(e,t,r);case"ClassBody":return Aye(e,t,r);case"ThrowStatement":return uye(e,t,r);case"ReturnStatement":return lye(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Sz(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return t1(e,t,r);case"Property":return Jb(i)?BC(e,t,r):MS(e,t,r);case"ObjectProperty":return MS(e,t,r);case"ObjectMethod":return BC(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return D2(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let l=[];return e.each(({isFirst:u})=>{u?l.push(r()):l.push(",",Le([Ye,r()]))},"expressions"),me(l)}return me(qt([",",Ye],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return o.push(i.operator),/[a-z]$/u.test(i.operator)&&o.push(" "),We(i.argument)?o.push(me(["(",Le([_e,r("argument")]),_e,")"])):o.push(r("argument")),o;case"UpdateExpression":return[i.prefix?i.operator:"",r("argument"),i.prefix?"":i.operator];case"ConditionalExpression":return k2(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),l=e.parent,u=l.type==="ForStatement"||l.type==="ForInStatement"||l.type==="ForOfStatement",c=i.declarations.some(d=>d.init),h;return a.length===1&&!We(i.declarations[0])?h=a[0]:a.length>0&&(h=Le(a[0])),o=[qi(e),i.kind,h?[" ",h]:"",Le(a.slice(1).map(d=>[",",c&&!u?$e:Ye,d]))],u&&l.body!==i||o.push(s),me(o)}case"WithStatement":return me(["with (",r("object"),")",qa(i.body,r("body"))]);case"IfStatement":{let a=qa(i.consequent,r("consequent")),l=me(["if (",me([Le([_e,r("test")]),_e]),")",a]);if(o.push(l),i.alternate){let u=We(i.consequent,tt.Trailing|tt.Line)||Ij(i),c=i.consequent.type==="BlockStatement"&&!u;o.push(c?" ":$e),We(i,tt.Dangling)&&o.push(Br(e,t),u?$e:" "),o.push("else",me(qa(i.alternate,r("alternate"),i.alternate.type==="IfStatement")))}return o}case"ForStatement":{let a=qa(i.body,r("body")),l=Br(e,t),u=l?[l,_e]:"";return!i.init&&!i.test&&!i.update?[u,me(["for (;;)",a])]:[u,me(["for (",me([Le([_e,r("init"),";",Ye,r("test"),";",Ye,r("update")]),_e]),")",a])]}case"WhileStatement":return me(["while (",me([Le([_e,r("test")]),_e]),")",qa(i.body,r("body"))]);case"ForInStatement":return me(["for (",r("left")," in ",r("right"),")",qa(i.body,r("body"))]);case"ForOfStatement":return me(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",qa(i.body,r("body"))]);case"DoWhileStatement":{let a=qa(i.body,r("body"));return o=[me(["do",a])],i.body.type==="BlockStatement"?o.push(" "):o.push($e),o.push("while (",me([Le([_e,r("test")]),_e]),")",s),o}case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return o.push(i.type==="BreakStatement"?"break":"continue"),i.label&&o.push(" ",r("label")),o.push(s),o;case"LabeledStatement":return i.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let a=We(i.param,u=>!Os(u)||u.leading&&ns(t.originalText,Zt(u))||u.trailing&&ns(t.originalText,jr(u),{backwards:!0})),l=r("param");return["catch ",a?["(",Le([_e,l]),_e,") "]:["(",l,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[me(["switch (",Le([_e,r("discriminant")]),_e,")"])," {",i.cases.length>0?Le([$e,qt($e,e.map(({node:a,isLast:l})=>[r(),!l&&Ba(a,t)?$e:""],"cases"))]):"",$e,"}"];case"SwitchCase":{i.test?o.push("case ",r("test"),":"):o.push("default:"),We(i,tt.Dangling)&&o.push(" ",Br(e,t));let a=i.consequent.filter(l=>l.type!=="EmptyStatement");if(a.length>0){let l=jC(e,t,r,"consequent");o.push(a.length===1&&a[0].type==="BlockStatement"?[" ",l]:Le([$e,l]))}return o}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return s7(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return u7(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return c7(e,t,r);case"TemplateElement":return lc(i.value.raw);case"TemplateLiteral":return sz(e,r,t);case"TaggedTemplateExpression":return Npe(e,r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",r("body")];case"InterpreterDirective":default:throw new Zd(i,"ESTree")}}function S7(e,t,r){let{parent:n,node:i,key:s}=e,o=[r("expression")];switch(i.type){case"AsConstExpression":o.push(" as const");break;case"AsExpression":case"TSAsExpression":o.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":o.push(" satisfies ",r("typeAnnotation"));break}return s==="callee"&&rr(n)||s==="object"&&Jr(n)?me([Le([_e,...o]),_e]):o}function Qye(e,t,r){let{node:n}=e,i=[qi(e),"component"];n.id&&i.push(" ",r("id")),i.push(r("typeParameters"));let s=Zye(e,r,t);return n.rendersType?i.push(me([s," ",r("rendersType")])):i.push(me([s])),n.body&&i.push(" ",r("body")),t.semi&&n.type==="DeclareComponent"&&i.push(";"),i}function Zye(e,t,r){let{node:n}=e,i=n.params;if(n.rest&&(i=[...i,n.rest]),i.length===0)return["(",Br(e,r,{filter:o=>fo(r.originalText,Zt(o))===")"}),")"];let s=[];return tve(e,(o,a)=>{let l=a===i.length-1;l&&n.rest&&s.push("..."),s.push(t()),!l&&(s.push(","),Ba(i[a],r)?s.push($e,$e):s.push(Ye))}),["(",Le([_e,...s]),Lt(Ra(r,"all")&&!eve(n,i)?",":""),_e,")"]}function eve(e,t){var r;return e.rest||((r=or(!1,t,-1))==null?void 0:r.type)==="RestElement"}function tve(e,t){let{node:r}=e,n=0,i=s=>t(s,n++);e.each(i,"params"),r.rest&&e.call(i,"rest")}function rve(e,t,r){let{node:n}=e;return n.shorthand?r("local"):[r("name")," as ",r("local")]}function nve(e,t,r){let{node:n}=e,i=[];return n.name&&i.push(r("name"),n.optional?"?: ":": "),i.push(r("typeAnnotation")),i}function D7(e,t,r){return t1(e,r,t)}function E7(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function ive(e,t,r){let{node:n}=e,i;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":i="boolean";break;case"EnumNumberBody":i="number";break;case"EnumBigIntBody":i="bigint";break;case"EnumStringBody":i="string";break;case"EnumSymbolBody":i="symbol";break}return[i?`of ${i} `:"",D7(e,t,r)]}function C7(e,t,r){let{node:n}=e;return[qi(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?D7(e,t,r):t("body")]}function sve(e,t,r){let{node:n}=e,i=["hook"];n.id&&i.push(" ",r("id"));let s=Mc(e,r,t,!1,!0),o=e1(e,r),a=ef(n,o);return i.push(me([a?me(s):s,o]),n.body?" ":"",r("body")),i}function ove(e,t,r){let{node:n}=e,i=[qi(e),"hook"];return n.id&&i.push(" ",r("id")),t.semi&&i.push(";"),i}function oI(e){var t;let{node:r}=e;return r.type==="HookTypeAnnotation"&&((t=e.getParentNode(2))==null?void 0:t.type)==="DeclareHook"}function ave(e,t,r){let{node:n}=e,i=[];i.push(oI(e)?"":"hook ");let s=Mc(e,r,t,!1,!0),o=[];return o.push(oI(e)?": ":" => ",r("returnType")),ef(n,o)&&(s=me(s)),i.push(s,o),me(i)}function T7(e,t,r){let{node:n}=e,i=[qi(e),"interface"],s=[],o=[];n.type!=="InterfaceTypeAnnotation"&&s.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!We(n.typeParameters,tt.Trailing|tt.Line);return ar(n.extends)&&o.push(a?Lt(" ",Ye,{groupId:C2(n.typeParameters)}):Ye,"extends ",(n.extends.length===1?xfe:Le)(qt([",",Ye],e.map(r,"extends")))),We(n.id,tt.Trailing)||ar(n.extends)?a?i.push(me([...s,Le(o)])):i.push(me(Le([...s,...o]))):i.push(...s,...o),i.push(" ",r("body")),me(i)}function lve(e,t,r){let{node:n}=e;if(Tj(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return Qye(e,t,r);case"ComponentParameter":return rve(e,t,r);case"ComponentTypeParameter":return nve(e,t,r);case"HookDeclaration":return sve(e,t,r);case"DeclareHook":return ove(e,t,r);case"HookTypeAnnotation":return ave(e,t,r);case"DeclareClass":return s7(e,t,r);case"DeclareFunction":return[qi(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Bn(e,r),i];case"DeclareNamespace":return["declare namespace ",r("id")," ",r("body")];case"DeclareVariable":return[qi(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return m7(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return qme(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return kz(e,t,r);case"IntersectionTypeAnnotation":return _z(e,t,r);case"UnionTypeAnnotation":return $z(e,t,r);case"ConditionalTypeAnnotation":return k2(e,t,r);case"InferTypeAnnotation":return Fz(e,t,r);case"FunctionTypeAnnotation":return Lz(e,t,r);case"TupleTypeAnnotation":return D2(e,t,r);case"TupleTypeLabeledElement":return Iz(e,t,r);case"TupleTypeSpreadElement":return Oz(e,t,r);case"GenericTypeAnnotation":return[r("id"),Ip(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return Pz(e,t,r);case"TypeAnnotation":return Nz(e,t,r);case"TypeParameter":return n7(e,t,r);case"TypeofTypeAnnotation":return Bz(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Rz(r);case"DeclareEnum":case"EnumDeclaration":return C7(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return ive(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return E7(e,r);case"FunctionTypeParam":{let s=n.name?r("name"):e.parent.this===n?"this":"";return[s,xi(e),s?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return T7(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:s}=n;return qz.ok(s==="plus"||s==="minus"),s==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return wye(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let s="";return n.proto?s="proto ":n.static&&(s="static "),[s,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",tm(e,t,r),xi(e),Jb(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return t1(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",xi(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Uz(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return lc(bd($s(n),t));case"NumberLiteralTypeAnnotation":return dl(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return zC(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),Bn(e,r),")"];case"TypePredicate":return jz(e,r);case"TypeOperator":return[n.operator," ",r("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return Ip(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return S7(e,t,r)}}function uve(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(Aj(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",o=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(Un(i.expression)||ho(i.expression)),l=me(["<",Le([_e,r("typeAnnotation")]),_e,">"]),u=[Lt("("),Le([_e,r("expression")]),_e,Lt(")")];return a?Pu([[l,r("expression")],[l,me(u,{shouldBreak:!0})],[l,r("expression")]]):me([l,r("expression")])}case"TSDeclareFunction":return Jz(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return e7(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return t1(e,t,r);case"TSTypeAliasDeclaration":return kz(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return u7(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return c7(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r(i.typeArguments?"typeArguments":"typeParameters")];case"TSTemplateLiteralType":return sz(e,r,t);case"TSNamedTupleMember":return Iz(e,t,r);case"TSRestType":return Oz(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return T7(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return Ip(e,t,r,"params");case"TSTypeParameter":return n7(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return S7(e,t,r);case"TSArrayType":return Rz(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",tm(e,t,r),xi(e),Bn(e,r)];case"TSParameterProperty":return[c0(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Bz(e,r);case"TSIndexSignature":{let a=i.parameters.length>1?Lt(Ra(t)?",":""):"",l=me([Le([_e,qt([", ",_e],e.map(r,"parameters"))]),a,_e]),u=e.parent.type==="ClassBody"&&e.key==="body";return[u&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?l:"","]",Bn(e,r),u?s:""]}case"TSTypePredicate":return jz(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",Ip(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return Pz(e,t,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return Sye(e,t,r);case"TSMethodSignature":{let a=i.kind&&i.kind!=="method"?`${i.kind} `:"";o.push(c0(i),a,i.computed?"[":"",r("key"),i.computed?"]":"",xi(e));let l=Mc(e,r,t,!1,!0),u=i.returnType?"returnType":"typeAnnotation",c=i[u],h=c?Bn(e,r,u):"",d=ef(i,h);return o.push(d?me(l):l),c&&o.push(me(h)),me(o)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return C7(e,r,t);case"TSEnumMember":return E7(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",y7(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,l=a.type==="TSModuleDeclaration",u=((n=i.body)==null?void 0:n.type)==="TSModuleDeclaration";if(l)o.push(".");else if(o.push(qi(e)),!(i.kind==="global"||i.global)){let c=i.kind??(wi(i.id)||T2(t,jr(i),jr(i.id)).trim().endsWith("module")?"module":"namespace");o.push(c," ")}return o.push(r("id")),u?o.push(r("body")):i.body?o.push(" ",me(r("body"))):o.push(s),o}case"TSConditionalType":return k2(e,t,r);case"TSInferType":return Fz(e,t,r);case"TSIntersectionType":return _z(e,t,r);case"TSUnionType":return $z(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return Lz(e,t,r);case"TSTupleType":return D2(e,t,r);case"TSTypeReference":return[r("typeName"),Ip(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSTypeAnnotation":return Nz(e,t,r);case"TSEmptyBodyFunctionExpression":return E2(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return rI(e,r,"?");case"TSJSDocNonNullableType":return rI(e,r,"!");case"TSParenthesizedType":default:throw new Zd(i,"TypeScript")}}function cve(e,t,r,n){if(pz(e))return _ge(e,t);for(let i of[dme,sme,lve,uve,Yye]){let s=i(e,t,r,n);if(s!==void 0)return s}}var hve=xr(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function dve(e,t,r,n){var i;e.isRoot&&((i=t.__onHtmlBindingRoot)==null||i.call(t,e.node,t));let s=cve(e,t,r,n);if(!s)return"";let{node:o}=e;if(hve(o))return s;let a=ar(o.decorators),l=mme(e,t,r),u=o.type==="ClassExpression";if(a&&!u)return $C(s,d=>me([l,d]));let c=Ic(e,t),h=_ye(e,t);return!l&&!c&&!h?s:$C(s,d=>[h?";":"",c?"(":"",c&&u&&a?[Le([Ye,l,d]),Ye]:[l,d],c?")":""])}var fve=dve,pve={avoidAstMutation:!0},gve=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],A7={};Gb(A7,{getVisitorKeys:()=>bve,massageAstNode:()=>k7,print:()=>xve});var mve={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},yve=mve,vve=Ej(yve),bve=vve;function xve(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),$e];case"ArrayExpression":{if(n.elements.length===0)return"[]";let i=e.map(()=>e.node===null?"null":r(),"elements");return["[",Le([$e,qt([",",$e],i)]),$e,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",Le([$e,qt([",",$e],e.map(r,"properties"))]),$e,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return aI(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return aI(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new Zd(n,"JSON")}}function aI(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var wve=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function k7(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,i]of e.elements.entries())i===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}k7.ignoredProperties=wve;var cy={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},pu="JavaScript",Sve={arrowParens:{category:pu,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:cy.bracketSameLine,bracketSpacing:cy.bracketSpacing,jsxBracketSameLine:{category:pu,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:pu,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:pu,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:cy.singleQuote,jsxSingleQuote:{category:pu,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:pu,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:pu,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:cy.singleAttributePerLine},Dve=Sve,Eve={estree:Sj,"estree-json":A7},Cve=[...wde,...gve],Tve=wj,Ave=Object.defineProperty,_7=e=>{throw TypeError(e)},$7=(e,t)=>{for(var r in t)Ave(e,r,{get:t[r],enumerable:!0})},L7=(e,t,r)=>t.has(e)||_7("Cannot "+r),Ka=(e,t,r)=>(L7(e,t,"read from private field"),t.get(e)),kve=(e,t,r)=>t.has(e)?_7("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),_ve=(e,t,r,n)=>(L7(e,t,"write to private field"),t.set(e,r),r),P7={};$7(P7,{languages:()=>p1e,options:()=>m1e,parsers:()=>c9,printers:()=>Sxe});var $ve=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},is=$ve,_2="string",$2="array",L2="cursor",r1="indent",n1="align",P2="trim",xg="group",i1="fill",s1="if-break",o1="indent-if-break",F2="line-suffix",O2="line-suffix-boundary",Nc="line",I2="label",a1="break-parent",F7=new Set([L2,r1,n1,P2,xg,i1,s1,o1,F2,O2,Nc,I2,a1]);function Lve(e){if(typeof e=="string")return _2;if(Array.isArray(e))return $2;if(!e)return;let{type:t}=e;if(F7.has(t))return t}var M2=Lve,Pve=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Fve(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(M2(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Pve([...F7].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var Ove=class extends Error{constructor(t){super(Fve(t));Jo(this,"name","InvalidDocError");this.doc=t}},O7=Ove,Ive=()=>{},Mve=Ive;function Vo(e){return{type:r1,contents:e}}function I7(e,t){return{type:n1,contents:t,n:e}}function gn(e,t={}){return Mve(t.expandedStates),{type:xg,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Nve(e){return I7(Number.NEGATIVE_INFINITY,e)}function Rve(e){return I7({type:"root"},e)}function M7(e){return{type:i1,parts:e}}function h0(e,t="",r={}){return{type:s1,breakContents:e,flatContents:t,groupId:r.groupId}}function Bve(e,t){return{type:o1,contents:e,groupId:t.groupId,negate:t.negate}}var rm={type:a1},jve={type:Nc,hard:!0},zve={type:Nc,hard:!0,literal:!0},An={type:Nc},ei={type:Nc,soft:!0},Mr=[jve,rm],Hve=[zve,rm];function tf(e,t){let r=[];for(let n=0;n{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},nm=Uve;function N2(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(M2(s)){case $2:return t(s.map(n));case i1:return t({...s,parts:s.parts.map(n)});case s1:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case xg:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case n1:case r1:case o1:case I2:case F2:return t({...s,contents:n(s.contents)});case _2:case L2:case P2:case O2:case Nc:case a1:return t(s);default:throw new O7(s)}}}function Wve(e){switch(M2(e)){case i1:if(e.parts.every(t=>t===""))return"";break;case xg:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===xg&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case n1:case r1:case o1:case F2:if(!e.contents)return"";break;case s1:if(!e.flatContents&&!e.breakContents)return"";break;case $2:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof nm(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case _2:case L2:case P2:case O2:case Nc:case I2:case a1:break;default:throw new O7(e)}return e}function Vve(e){return N2(e,t=>Wve(t))}function to(e,t=Hve){return N2(e,r=>typeof r=="string"?tf(t,r.split(` +`)):r)}var hy="'",lI='"';function Gve(e,t){let r=t===!0||t===hy?hy:lI,n=r===hy?lI:hy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var qve=Gve;function Kve(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ws,Jve=class{constructor(e){kve(this,Ws),_ve(this,Ws,new Set(e))}getLeadingWhitespaceCount(e){let t=Ka(this,Ws),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return Ka(this,Ws).has(e.charAt(0))}hasTrailingWhitespace(e){return Ka(this,Ws).has(nm(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${Kve([...Ka(this,Ws)].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=Ka(this,Ws);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=Ka(this,Ws);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=Ka(this,Ws);return Array.prototype.every.call(e,r=>t.has(r))}};Ws=new WeakMap;var Xve=Jve,Yve=[" ",` +`,"\f","\r"," "],Qve=new Xve(Yve),Ro=Qve,Zve=class extends Error{constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);Jo(this,"name","UnexpectedNodeError");this.node=t}},e0e=Zve;function t0e(e){return(e==null?void 0:e.type)==="front-matter"}var l1=t0e,r0e=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),n0e=new Set(["if","else if","for","switch","case"]);function N7(e,t){var r;if(e.type==="text"||e.type==="comment"||l1(e)||e.type==="yaml"||e.type==="toml")return null;if(e.type==="attribute"&&delete t.value,e.type==="docType"&&delete t.value,e.type==="angularControlFlowBlock"&&(r=e.parameters)!=null&&r.children)for(let n of t.parameters.children)n0e.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.type==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim()),e.type==="angularLetDeclarationInitializer"&&delete t.value}N7.ignoredProperties=r0e;var i0e=N7;async function s0e(e,t){if(e.language==="yaml"){let r=e.value.trim(),n=r?await t(r,{parser:"yaml"}):"";return Rve([e.startDelimiter,e.explicitLanguage,Mr,n,n?Mr:"",e.endDelimiter])}}var o0e=s0e;function u1(e,t=!0){return[Vo([ei,e]),t?ei:""]}function rf(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function po(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(o,a)=>{i=n(o,a)});let s=await t(e,r,t);return i?gn(s):u1(s)}function a0e(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(s)?"":po(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},rf)}var l0e=a0e,u0e=e=>String(e).split(/[/\\]/u).pop();function uI(e,t){if(!t)return;let r=u0e(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function c0e(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function h0e(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=c0e(r,t.language)??uI(r,t.physicalFile)??uI(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var c1=h0e,d0e="inline",f0e={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},p0e="normal",g0e={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function m0e(e){return e.type==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var wg=m0e,y0e=e=>is(!1,e,/^[\t\f\r ]*\n/gu,""),R7=e=>y0e(Ro.trimEnd(e)),v0e=e=>{let t=e,r=Ro.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=Ro.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function B7(e,t){return!!(e.type==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.type==="ieConditionalComment"&&!e.complete||wd(e)&&e.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||B2(e,t)&&!ka(e)&&e.type!=="interpolation")}function h1(e){return e.type==="attribute"||!e.parent||!e.prev?!1:b0e(e.prev)}function b0e(e){return e.type==="comment"&&e.value.trim()==="prettier-ignore"}function bs(e){return e.type==="text"||e.type==="comment"}function ka(e){return e.type==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||wg(e)&&(e.name==="script"||e.name==="style"))}function x0e(e){return e.children&&!ka(e)}function w0e(e){return ka(e)||e.type==="interpolation"||j7(e)}function j7(e){return q7(e).startsWith("pre")}function S0e(e,t){var r,n;let i=s();if(i&&!e.prev&&(n=(r=e.parent)==null?void 0:r.tagDefinition)!=null&&n.ignoreFirstLf)return e.type==="interpolation";return i;function s(){return l1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.prev&&(e.prev.type==="text"||e.prev.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:wd(e.parent)?!0:!(!e.prev&&(e.parent.type==="root"||wd(e)&&e.parent||ka(e.parent)||d1(e.parent,t)||!L0e(e.parent.cssDisplay))||e.prev&&!O0e(e.prev.cssDisplay))}}function D0e(e,t){return l1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.next&&(e.next.type==="text"||e.next.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:wd(e.parent)?!0:!(!e.next&&(e.parent.type==="root"||wd(e)&&e.parent||ka(e.parent)||d1(e.parent,t)||!P0e(e.parent.cssDisplay))||e.next&&!F0e(e.next.cssDisplay))}function E0e(e){return I0e(e.cssDisplay)&&!ka(e)}function dy(e){return l1(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+10&&(["body","script","style"].includes(e.name)||e.children.some(t=>A0e(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.type!=="text"&&U7(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||W7(e.lastChild))}function z7(e){return e.type==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function zS(e){return V7(e)||e.prev&&T0e(e.prev)||H7(e)}function T0e(e){return V7(e)||e.type==="element"&&e.fullName==="br"||H7(e)}function H7(e){return U7(e)&&W7(e)}function U7(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:e.parent.type==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function V7(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function R2(e){return e.lastChild?R2(e.lastChild):e}function A0e(e){var t;return(t=e.children)==null?void 0:t.some(r=>r.type!=="text")}function G7(e){if(e)switch(e){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(e.endsWith("json")||e.endsWith("importmap")||e==="speculationrules")return"json"}}function k0e(e,t){let{name:r,attrMap:n}=e;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:i,lang:s}=e.attrMap;return!s&&!i?"babel":c1(t,{language:s})??G7(i)}function _0e(e,t){if(!B2(e,t))return;let{attrMap:r}=e;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:i}=r;return c1(t,{language:i})??G7(n)}function $0e(e,t){if(e.name!=="style")return;let{lang:r}=e.attrMap;return r?c1(t,{language:r}):"css"}function cI(e,t){return k0e(e,t)??$0e(e,t)??_0e(e,t)}function im(e){return e==="block"||e==="list-item"||e.startsWith("table")}function L0e(e){return!im(e)&&e!=="inline-block"}function P0e(e){return!im(e)&&e!=="inline-block"}function F0e(e){return!im(e)}function O0e(e){return!im(e)}function I0e(e){return!im(e)&&e!=="inline-block"}function wd(e){return q7(e).startsWith("pre")}function M0e(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}function N0e(e,t){var r;if(nf(e,t))return"block";if(((r=e.prev)==null?void 0:r.type)==="comment"){let i=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(i)return i[1]}let n=!1;if(e.type==="element"&&e.namespace==="svg")if(M0e(e,i=>i.fullName==="svg:foreignObject"))n=!0;else return e.name==="svg"?"inline-block":"block";switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return e.type==="element"&&(!e.namespace||n||wg(e))&&f0e[e.name]||d0e}}function q7(e){return e.type==="element"&&(!e.namespace||wg(e))&&g0e[e.name]||p0e}function R0e(e){let t=Number.POSITIVE_INFINITY;for(let r of e.split(` +`)){if(r.length===0)continue;let n=Ro.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(t)).join(` -`)}function q7(e){return ts(!1,ts(!1,e,"'","'"),""",'"')}function ou(e){return q7(e.value)}var R0e=new Set(["template","style","script"]);function f1(e,t){return tf(e,t)&&!R0e.has(e.fullName)}function tf(e,t){return t.parser==="vue"&&e.type==="element"&&e.parent.type==="root"&&e.fullName.toLowerCase()!=="html"}function R2(e,t){return tf(e,t)&&(f1(e,t)||e.attrMap.lang&&e.attrMap.lang!=="html")}function B0e(e){let t=e.fullName;return t.charAt(0)==="#"||t==="slot-scope"||t==="v-slot"||t.startsWith("v-slot:")}function j0e(e,t){let r=e.parent;if(!tf(r,t))return!1;let n=r.fullName,i=e.fullName;return n==="script"&&i==="setup"||n==="style"&&i==="vars"}function K7(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?Qs(t):Qs(G7(M7(t)),Fr):Zd(En,No.split(t))}function J7(e,t){return tf(e,t)&&e.name==="script"}var X7=/\{\{(.+?)\}\}/su;async function z0e(e,t){let r=[];for(let[n,i]of e.split(X7).entries())if(n%2===0)r.push(Qs(i));else try{r.push(dn(["{{",Uo([En,await co(i,t,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),En,"}}"]))}catch{r.push("{{",Qs(i),"}}")}return r}function B2({parser:e}){return(t,r,n)=>co(ou(n.node),t,{parser:e},ef)}var H0e=B2({parser:"__ng_action"}),U0e=B2({parser:"__ng_binding"}),W0e=B2({parser:"__ng_directive"});function V0e(e,t){if(t.parser!=="angular")return;let{node:r}=e,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return H0e;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return U0e;if(n.startsWith("*"))return W0e;let i=ou(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>c1(O7(K7(r,i.trim())),!i.includes("@@"));if(X7.test(i))return s=>z0e(i,s)}var G0e=V0e;function q0e(e,t){let{node:r}=e,n=ou(r);if(r.fullName==="class"&&!t.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var K0e=q0e;function uN(e){return e===" "||e===` -`||e==="\f"||e==="\r"||e===" "}var J0e=/^[ \t\n\r\u000c]+/,X0e=/^[, \t\n\r\u000c]+/,Y0e=/^[^ \t\n\r\u000c]+/,Q0e=/[,]+$/,cN=/^\d+$/,Z0e=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function ebe(e){let t=e.length,r,n,i,s,o,a=0,l;function u(f){let p,m=f.exec(e.substring(a));if(m)return[p]=m,a+=p.length,p}let c=[];for(;;){if(u(X0e),a>=t){if(c.length===0)throw new Error("Must contain one or more image candidate strings.");return c}l=a,r=u(Y0e),n=[],r.slice(-1)===","?(r=r.replace(Q0e,""),d()):h()}function h(){for(u(J0e),i="",s="in descriptor";;){if(o=e.charAt(a),s==="in descriptor")if(uN(o))i&&(n.push(i),i="",s="after descriptor");else if(o===","){a+=1,i&&n.push(i),d();return}else if(o==="(")i+=o,s="in parens";else if(o===""){i&&n.push(i),d();return}else i+=o;else if(s==="in parens")if(o===")")i+=o,s="in descriptor";else if(o===""){n.push(i),d();return}else i+=o;else if(s==="after descriptor"&&!uN(o))if(o===""){d();return}else s="in descriptor",a-=1;a+=1}}function d(){let f=!1,p,m,y,b,v={},E,D,C,w,A;for(b=0;bibe(ou(e.node))}var Y7={width:"w",height:"h",density:"x"},nbe=Object.keys(Y7);function ibe(e){let t=tbe(e),r=nbe.filter(c=>t.some(h=>Object.prototype.hasOwnProperty.call(h,c)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,i=Y7[n],s=t.map(c=>c.source.value),o=Math.max(...s.map(c=>c.length)),a=t.map(c=>c[n]?String(c[n].value):""),l=a.map(c=>{let h=c.indexOf(".");return h===-1?c.length:h}),u=Math.max(...l);return c1(Zd([",",En],s.map((c,h)=>{let d=[c],f=a[h];if(f){let p=o-c.length+1,m=u-l[h],y=" ".repeat(p+m);d.push(d0(y," "),f+i)}return d})))}var sbe=rbe;function obe(e,t){let{node:r}=e,n=ou(e.node).trim();if(r.fullName==="style"&&!t.parentParser&&!n.includes("{{"))return async i=>c1(await i(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var US=new WeakMap;function abe(e,t){let{root:r}=e;return US.has(r)||US.set(r,r.children.some(n=>J7(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),US.get(r)}var j2=abe;function lbe(e,t,r){let{node:n}=r,i=ou(n);return co(`type T<${i}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},ef)}function ube(e,t,{parseWithTs:r}){return co(`function _(${e}) {}`,t,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function cbe(e){let t=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/u,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\]|\[[$_a-z][\w$]*\])*$/iu,n=e.trim();return t.test(n)||r.test(n)}async function hbe(e,t,r,n){let i=ou(r.node),{left:s,operator:o,right:a}=dbe(i),l=j2(r,n);return[dn(await co(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",o," ",await co(a,e,{parser:l?"__ts_expression":"__js_expression"})]}function dbe(e){let t=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,i=e.match(t);if(!i)return;let s={};if(s.for=i[3].trim(),!s.for)return;let o=ts(!1,i[1].trim(),n,""),a=o.match(r);a?(s.alias=o.replace(r,""),s.iterator1=a[1].trim(),a[2]&&(s.iterator2=a[2].trim())):s.alias=o;let l=[s.alias,s.iterator1,s.iterator2];if(!l.some((u,c)=>!u&&(c===0||l.slice(c+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:i[2],right:s.for}}function fbe(e,t){if(t.parser!=="vue")return;let{node:r}=e,n=r.fullName;if(n==="v-for")return hbe;if(n==="generic"&&J7(r.parent,t))return lbe;let i=ou(r),s=j2(e,t);if(B0e(r)||j0e(r,t))return o=>ube(i,o,{parseWithTs:s});if(n.startsWith("@")||n.startsWith("v-on:"))return o=>pbe(i,o,{parseWithTs:s});if(n.startsWith(":")||n.startsWith("v-bind:"))return o=>gbe(i,o,{parseWithTs:s});if(n.startsWith("v-"))return o=>Q7(i,o,{parseWithTs:s})}function pbe(e,t,{parseWithTs:r}){return cbe(e)?Q7(e,t,{parseWithTs:r}):co(e,t,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},ef)}function gbe(e,t,{parseWithTs:r}){return co(e,t,{parser:r?"__vue_ts_expression":"__vue_expression"},ef)}function Q7(e,t,{parseWithTs:r}){return co(e,t,{parser:r?"__ts_expression":"__js_expression"},ef)}var mbe=fbe;function ybe(e,t){let{node:r}=e;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||t.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[sbe,obe,K0e,mbe,G0e]){let i=n(e,t);if(i)return vbe(i)}}}function vbe(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=M2(s,o=>typeof o=="string"?ts(!1,o,'"',"""):o),[n.node.rawName,'="',dn(s),'"']}}var bbe=ybe,Z7=new Proxy(()=>{},{get:()=>Z7}),e9=Z7;function xbe(e){return Array.isArray(e)&&e.length>0}var z2=xbe;function p1(e){return e.sourceSpan.start.offset}function g1(e){return e.sourceSpan.end.offset}function UC(e,t){return[e.isSelfClosing?"":wbe(e,t),Op(e,t)]}function wbe(e,t){return e.lastChild&&Sg(e.lastChild)?"":[Sbe(e,t),H2(e,t)]}function Op(e,t){return(e.next?uc(e.next):om(e.parent))?"":[sm(e,t),lc(e,t)]}function Sbe(e,t){return om(e)?sm(e.lastChild,t):""}function lc(e,t){return Sg(e)?H2(e.parent,t):m1(e)?U2(e.next):""}function H2(e,t){if(e9(!e.isSelfClosing),t9(e,t))return"";switch(e.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function t9(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(d1(e)||I7(e.parent,t))}function uc(e){return e.prev&&e.prev.type!=="docType"&&e.type!=="angularControlFlowBlock"&&!ms(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function om(e){var t;return((t=e.lastChild)==null?void 0:t.isTrailingSpaceSensitive)&&!e.lastChild.hasTrailingSpaces&&!ms(I2(e.lastChild))&&!bd(e)}function Sg(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&ms(I2(e))}function m1(e){return e.next&&!ms(e.next)&&ms(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function Dbe(e){let t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return t?t[1]?t[1].split(/\s+/u):!0:!1}function y1(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Ebe(e,t,r){var n;let{node:i}=e;if(!z2(i.attrs))return i.isSelfClosing?" ":"";let s=((n=i.prev)==null?void 0:n.type)==="comment"&&Dbe(i.prev.value),o=typeof s=="boolean"?()=>s:Array.isArray(s)?h=>s.includes(h.rawName):()=>!1,a=e.map(({node:h})=>o(h)?Qs(t.originalText.slice(p1(h),g1(h))):r(),"attrs"),l=i.type==="element"&&i.fullName==="script"&&i.attrs.length===1&&i.attrs[0].fullName==="src"&&i.children.length===0,u=t.singleAttributePerLine&&i.attrs.length>1&&!tf(i,t)?Fr:En,c=[Uo([l?" ":En,Zd(u,a)])];return i.firstChild&&y1(i.firstChild)||i.isSelfClosing&&om(i.parent)||l?c.push(i.isSelfClosing?" ":""):c.push(t.bracketSameLine?i.isSelfClosing?" ":"":i.isSelfClosing?En:Yn),c}function Cbe(e){return e.firstChild&&y1(e.firstChild)?"":W2(e)}function WC(e,t,r){let{node:n}=e;return[Np(n,t),Ebe(e,t,r),n.isSelfClosing?"":Cbe(n)]}function Np(e,t){return e.prev&&m1(e.prev)?"":[cc(e,t),U2(e)]}function cc(e,t){return y1(e)?W2(e.parent):uc(e)?sm(e.prev,t):""}function U2(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${e.rawName}`;default:return`<${e.rawName}`}}function W2(e){switch(e9(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">";default:return">"}}function Abe(e,t){if(!e.endSourceSpan)return"";let r=e.startSourceSpan.end.offset;e.firstChild&&y1(e.firstChild)&&(r-=W2(e).length);let n=e.endSourceSpan.start.offset;return e.lastChild&&Sg(e.lastChild)?n+=H2(e,t).length:om(e)&&(n-=sm(e.lastChild,t).length),t.originalText.slice(r,n)}var r9=Abe,Tbe=new Set(["if","else if","for","switch","case"]);function kbe(e,t){let{node:r}=e;switch(r.type){case"element":if(Aa(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&R2(r,t)){let n=lN(r,t);return n?async(i,s)=>{let o=r9(r,t),a=/^\s*$/u.test(o),l="";return a||(l=await i(M7(o),{parser:n,__embeddedInHtml:!0}),a=l===""),[cc(r,t),dn(WC(e,t,s)),a?"":Fr,l,a?"":Fr,UC(r,t),lc(r,t)]}:void 0}break;case"text":if(Aa(r.parent)){let n=lN(r.parent,t);if(n)return async i=>{let s=n==="markdown"?G7(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,o={parser:n,__embeddedInHtml:!0};if(t.parser==="html"&&n==="babel"){let a="script",{attrMap:l}=r.parent;l&&(l.type==="module"||l.type==="text/babel"&&l["data-type"]==="module")&&(a="module"),o.__babelSourceType=a}return[rm,cc(r,t),await i(s,o),lc(r,t)]}}else if(r.parent.type==="interpolation")return async n=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return t.parser==="angular"?i.parser="__ng_interpolation":t.parser==="vue"?i.parser=j2(e,t)?"__vue_ts_expression":"__vue_expression":i.parser="__js_expression",[Uo([En,await n(r.value,i)]),r.parent.next&&uc(r.parent.next)?" ":En]};break;case"attribute":return bbe(e,t);case"front-matter":return n=>s0e(r,n);case"angularControlFlowBlockParameters":return Tbe.has(e.parent.name)?a0e:void 0;case"angularLetDeclarationInitializer":return n=>co(r.value,n,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var _be=kbe,If=null;function Mp(e){if(If!==null&&typeof If.property){let t=If;return If=Mp.prototype=null,t}return If=Mp.prototype=e??Object.create(null),new Mp}var $be=10;for(let e=0;e<=$be;e++)Mp();function Lbe(e){return Mp(e)}function Pbe(e,t="type"){Lbe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var Fbe=Pbe,Obe={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Nbe=Obe,Mbe=Fbe(Nbe),Ibe=Mbe;function Rbe(e){return/^\s*/u.test(e)}function Bbe(e){return` +`)}function J7(e){return is(!1,is(!1,e,"'","'"),""",'"')}function lu(e){return J7(e.value)}var B0e=new Set(["template","style","script"]);function d1(e,t){return nf(e,t)&&!B0e.has(e.fullName)}function nf(e,t){return t.parser==="vue"&&e.type==="element"&&e.parent.type==="root"&&e.fullName.toLowerCase()!=="html"}function B2(e,t){return nf(e,t)&&(d1(e,t)||e.attrMap.lang&&e.attrMap.lang!=="html")}function j0e(e){let t=e.fullName;return t.charAt(0)==="#"||t==="slot-scope"||t==="v-slot"||t.startsWith("v-slot:")}function z0e(e,t){let r=e.parent;if(!nf(r,t))return!1;let n=r.fullName,i=e.fullName;return n==="script"&&i==="setup"||n==="style"&&i==="vars"}function X7(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?to(t):to(K7(R7(t)),Mr):tf(An,Ro.split(t))}function Y7(e,t){return nf(e,t)&&e.name==="script"}var Q7=/\{\{(.+?)\}\}/su;async function H0e(e,t){let r=[];for(let[n,i]of e.split(Q7).entries())if(n%2===0)r.push(to(i));else try{r.push(gn(["{{",Vo([An,await po(i,t,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),An,"}}"]))}catch{r.push("{{",to(i),"}}")}return r}function j2({parser:e}){return(t,r,n)=>po(lu(n.node),t,{parser:e},rf)}var U0e=j2({parser:"__ng_action"}),W0e=j2({parser:"__ng_binding"}),V0e=j2({parser:"__ng_directive"});function G0e(e,t){if(t.parser!=="angular")return;let{node:r}=e,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return U0e;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return W0e;if(n.startsWith("*"))return V0e;let i=lu(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>u1(M7(X7(r,i.trim())),!i.includes("@@"));if(Q7.test(i))return s=>H0e(i,s)}var q0e=G0e;function K0e(e,t){let{node:r}=e,n=lu(r);if(r.fullName==="class"&&!t.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var J0e=K0e;function hI(e){return e===" "||e===` +`||e==="\f"||e==="\r"||e===" "}var X0e=/^[ \t\n\r\u000c]+/,Y0e=/^[, \t\n\r\u000c]+/,Q0e=/^[^ \t\n\r\u000c]+/,Z0e=/[,]+$/,dI=/^\d+$/,ebe=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function tbe(e){let t=e.length,r,n,i,s,o,a=0,l;function u(f){let p,m=f.exec(e.substring(a));if(m)return[p]=m,a+=p.length,p}let c=[];for(;;){if(u(Y0e),a>=t){if(c.length===0)throw new Error("Must contain one or more image candidate strings.");return c}l=a,r=u(Q0e),n=[],r.slice(-1)===","?(r=r.replace(Z0e,""),d()):h()}function h(){for(u(X0e),i="",s="in descriptor";;){if(o=e.charAt(a),s==="in descriptor")if(hI(o))i&&(n.push(i),i="",s="after descriptor");else if(o===","){a+=1,i&&n.push(i),d();return}else if(o==="(")i+=o,s="in parens";else if(o===""){i&&n.push(i),d();return}else i+=o;else if(s==="in parens")if(o===")")i+=o,s="in descriptor";else if(o===""){n.push(i),d();return}else i+=o;else if(s==="after descriptor"&&!hI(o))if(o===""){d();return}else s="in descriptor",a-=1;a+=1}}function d(){let f=!1,p,m,y,b,v={},E,D,C,w,T;for(b=0;bsbe(lu(e.node))}var Z7={width:"w",height:"h",density:"x"},ibe=Object.keys(Z7);function sbe(e){let t=rbe(e),r=ibe.filter(c=>t.some(h=>Object.prototype.hasOwnProperty.call(h,c)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,i=Z7[n],s=t.map(c=>c.source.value),o=Math.max(...s.map(c=>c.length)),a=t.map(c=>c[n]?String(c[n].value):""),l=a.map(c=>{let h=c.indexOf(".");return h===-1?c.length:h}),u=Math.max(...l);return u1(tf([",",An],s.map((c,h)=>{let d=[c],f=a[h];if(f){let p=o-c.length+1,m=u-l[h],y=" ".repeat(p+m);d.push(h0(y," "),f+i)}return d})))}var obe=nbe;function abe(e,t){let{node:r}=e,n=lu(e.node).trim();if(r.fullName==="style"&&!t.parentParser&&!n.includes("{{"))return async i=>u1(await i(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var HS=new WeakMap;function lbe(e,t){let{root:r}=e;return HS.has(r)||HS.set(r,r.children.some(n=>Y7(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),HS.get(r)}var z2=lbe;function ube(e,t,r){let{node:n}=r,i=lu(n);return po(`type T<${i}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},rf)}function cbe(e,t,{parseWithTs:r}){return po(`function _(${e}) {}`,t,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function hbe(e){let t=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/u,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\]|\[[$_a-z][\w$]*\])*$/iu,n=e.trim();return t.test(n)||r.test(n)}async function dbe(e,t,r,n){let i=lu(r.node),{left:s,operator:o,right:a}=fbe(i),l=z2(r,n);return[gn(await po(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",o," ",await po(a,e,{parser:l?"__ts_expression":"__js_expression"})]}function fbe(e){let t=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,i=e.match(t);if(!i)return;let s={};if(s.for=i[3].trim(),!s.for)return;let o=is(!1,i[1].trim(),n,""),a=o.match(r);a?(s.alias=o.replace(r,""),s.iterator1=a[1].trim(),a[2]&&(s.iterator2=a[2].trim())):s.alias=o;let l=[s.alias,s.iterator1,s.iterator2];if(!l.some((u,c)=>!u&&(c===0||l.slice(c+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:i[2],right:s.for}}function pbe(e,t){if(t.parser!=="vue")return;let{node:r}=e,n=r.fullName;if(n==="v-for")return dbe;if(n==="generic"&&Y7(r.parent,t))return ube;let i=lu(r),s=z2(e,t);if(j0e(r)||z0e(r,t))return o=>cbe(i,o,{parseWithTs:s});if(n.startsWith("@")||n.startsWith("v-on:"))return o=>gbe(i,o,{parseWithTs:s});if(n.startsWith(":")||n.startsWith("v-bind:"))return o=>mbe(i,o,{parseWithTs:s});if(n.startsWith("v-"))return o=>e9(i,o,{parseWithTs:s})}function gbe(e,t,{parseWithTs:r}){return hbe(e)?e9(e,t,{parseWithTs:r}):po(e,t,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},rf)}function mbe(e,t,{parseWithTs:r}){return po(e,t,{parser:r?"__vue_ts_expression":"__vue_expression"},rf)}function e9(e,t,{parseWithTs:r}){return po(e,t,{parser:r?"__ts_expression":"__js_expression"},rf)}var ybe=pbe;function vbe(e,t){let{node:r}=e;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||t.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[obe,abe,J0e,ybe,q0e]){let i=n(e,t);if(i)return bbe(i)}}}function bbe(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=N2(s,o=>typeof o=="string"?is(!1,o,'"',"""):o),[n.node.rawName,'="',gn(s),'"']}}var xbe=vbe,t9=new Proxy(()=>{},{get:()=>t9}),r9=t9;function wbe(e){return Array.isArray(e)&&e.length>0}var H2=wbe;function f1(e){return e.sourceSpan.start.offset}function p1(e){return e.sourceSpan.end.offset}function HC(e,t){return[e.isSelfClosing?"":Sbe(e,t),Mp(e,t)]}function Sbe(e,t){return e.lastChild&&Sg(e.lastChild)?"":[Dbe(e,t),U2(e,t)]}function Mp(e,t){return(e.next?hc(e.next):om(e.parent))?"":[sm(e,t),cc(e,t)]}function Dbe(e,t){return om(e)?sm(e.lastChild,t):""}function cc(e,t){return Sg(e)?U2(e.parent,t):g1(e)?W2(e.next):""}function U2(e,t){if(r9(!e.isSelfClosing),n9(e,t))return"";switch(e.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function n9(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(h1(e)||B7(e.parent,t))}function hc(e){return e.prev&&e.prev.type!=="docType"&&e.type!=="angularControlFlowBlock"&&!bs(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function om(e){var t;return((t=e.lastChild)==null?void 0:t.isTrailingSpaceSensitive)&&!e.lastChild.hasTrailingSpaces&&!bs(R2(e.lastChild))&&!wd(e)}function Sg(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&bs(R2(e))}function g1(e){return e.next&&!bs(e.next)&&bs(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function Ebe(e){let t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return t?t[1]?t[1].split(/\s+/u):!0:!1}function m1(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Cbe(e,t,r){var n;let{node:i}=e;if(!H2(i.attrs))return i.isSelfClosing?" ":"";let s=((n=i.prev)==null?void 0:n.type)==="comment"&&Ebe(i.prev.value),o=typeof s=="boolean"?()=>s:Array.isArray(s)?h=>s.includes(h.rawName):()=>!1,a=e.map(({node:h})=>o(h)?to(t.originalText.slice(f1(h),p1(h))):r(),"attrs"),l=i.type==="element"&&i.fullName==="script"&&i.attrs.length===1&&i.attrs[0].fullName==="src"&&i.children.length===0,u=t.singleAttributePerLine&&i.attrs.length>1&&!nf(i,t)?Mr:An,c=[Vo([l?" ":An,tf(u,a)])];return i.firstChild&&m1(i.firstChild)||i.isSelfClosing&&om(i.parent)||l?c.push(i.isSelfClosing?" ":""):c.push(t.bracketSameLine?i.isSelfClosing?" ":"":i.isSelfClosing?An:ei),c}function Tbe(e){return e.firstChild&&m1(e.firstChild)?"":V2(e)}function UC(e,t,r){let{node:n}=e;return[Np(n,t),Cbe(e,t,r),n.isSelfClosing?"":Tbe(n)]}function Np(e,t){return e.prev&&g1(e.prev)?"":[dc(e,t),W2(e)]}function dc(e,t){return m1(e)?V2(e.parent):hc(e)?sm(e.prev,t):""}function W2(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${e.rawName}`;default:return`<${e.rawName}`}}function V2(e){switch(r9(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">";default:return">"}}function Abe(e,t){if(!e.endSourceSpan)return"";let r=e.startSourceSpan.end.offset;e.firstChild&&m1(e.firstChild)&&(r-=V2(e).length);let n=e.endSourceSpan.start.offset;return e.lastChild&&Sg(e.lastChild)?n+=U2(e,t).length:om(e)&&(n-=sm(e.lastChild,t).length),t.originalText.slice(r,n)}var i9=Abe,kbe=new Set(["if","else if","for","switch","case"]);function _be(e,t){let{node:r}=e;switch(r.type){case"element":if(ka(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&B2(r,t)){let n=cI(r,t);return n?async(i,s)=>{let o=i9(r,t),a=/^\s*$/u.test(o),l="";return a||(l=await i(R7(o),{parser:n,__embeddedInHtml:!0}),a=l===""),[dc(r,t),gn(UC(e,t,s)),a?"":Mr,l,a?"":Mr,HC(r,t),cc(r,t)]}:void 0}break;case"text":if(ka(r.parent)){let n=cI(r.parent,t);if(n)return async i=>{let s=n==="markdown"?K7(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,o={parser:n,__embeddedInHtml:!0};if(t.parser==="html"&&n==="babel"){let a="script",{attrMap:l}=r.parent;l&&(l.type==="module"||l.type==="text/babel"&&l["data-type"]==="module")&&(a="module"),o.__babelSourceType=a}return[rm,dc(r,t),await i(s,o),cc(r,t)]}}else if(r.parent.type==="interpolation")return async n=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return t.parser==="angular"?i.parser="__ng_interpolation":t.parser==="vue"?i.parser=z2(e,t)?"__vue_ts_expression":"__vue_expression":i.parser="__js_expression",[Vo([An,await n(r.value,i)]),r.parent.next&&hc(r.parent.next)?" ":An]};break;case"attribute":return xbe(e,t);case"front-matter":return n=>o0e(r,n);case"angularControlFlowBlockParameters":return kbe.has(e.parent.name)?l0e:void 0;case"angularLetDeclarationInitializer":return n=>po(r.value,n,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var $be=_be,Bf=null;function Rp(e){if(Bf!==null&&typeof Bf.property){let t=Bf;return Bf=Rp.prototype=null,t}return Bf=Rp.prototype=e??Object.create(null),new Rp}var Lbe=10;for(let e=0;e<=Lbe;e++)Rp();function Pbe(e){return Rp(e)}function Fbe(e,t="type"){Pbe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var Obe=Fbe,Ibe={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Mbe=Ibe,Nbe=Obe(Mbe),Rbe=Nbe;function Bbe(e){return/^\s*/u.test(e)}function jbe(e){return` -`+e}var jbe=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function n9(e){let t=g1(e);return e.type==="element"&&!e.endSourceSpan&&z2(e.children)?Math.max(t,n9(nm(!1,e.children,-1))):t}function Rf(e,t,r){let n=e.node;if(d1(n)){let i=n9(n);return[cc(n,t),Qs(No.trimEnd(t.originalText.slice(p1(n)+(n.prev&&m1(n.prev)?U2(n).length:0),i-(n.next&&uc(n.next)?sm(n,t).length:0)))),lc(n,t)]}return r()}function fy(e,t){return ms(e)&&ms(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?HS(t)?Fr:En:"":HS(t)?Fr:Yn:m1(e)&&(d1(t)||t.firstChild||t.isSelfClosing||t.type==="element"&&t.attrs.length>0)||e.type==="element"&&e.isSelfClosing&&uc(t)?"":!t.isLeadingSpaceSensitive||HS(t)||uc(t)&&e.lastChild&&Sg(e.lastChild)&&e.lastChild.lastChild&&Sg(e.lastChild.lastChild)?Fr:t.hasLeadingSpaces?En:Yn}function V2(e,t,r){let{node:n}=e;if(B7(n))return[rm,...e.map(s=>{let o=s.node,a=o.prev?fy(o.prev,o):"";return[a?[a,dy(o.prev)?Fr:""]:"",Rf(s,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map((s,o)=>{let a=s.node;if(ms(a)){if(a.prev&&ms(a.prev)){let p=fy(a.prev,a);if(p)return dy(a.prev)?[Fr,Fr,Rf(s,t,r)]:[p,Rf(s,t,r)]}return Rf(s,t,r)}let l=[],u=[],c=[],h=[],d=a.prev?fy(a.prev,a):"",f=a.next?fy(a,a.next):"";return d&&(dy(a.prev)?l.push(Fr,Fr):d===Fr?l.push(Fr):ms(a.prev)?u.push(d):u.push(d0("",Yn,{groupId:i[o-1]}))),f&&(dy(a)?ms(a.next)&&h.push(Fr,Fr):f===Fr?ms(a.next)&&h.push(Fr):c.push(f)),[...l,dn([...u,dn([Rf(s,t,r),...c],{id:i[o]})]),...h]},"children")}function zbe(e,t,r){let{node:n}=e,i=[];Hbe(e)&&i.push("} "),i.push("@",n.name),n.parameters&&i.push(" (",dn(r("parameters")),")"),i.push(" {");let s=i9(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(Uo([Fr,V2(e,t,r)])),s&&i.push(Fr,"}")):s&&i.push("}"),dn(i,{shouldBreak:!0})}function i9(e){var t,r;return!(((t=e.next)==null?void 0:t.type)==="angularControlFlowBlock"&&(r=jbe.get(e.name))!=null&&r.has(e.next.name))}function Hbe(e){let{previous:t}=e;return(t==null?void 0:t.type)==="angularControlFlowBlock"&&!d1(t)&&!i9(t)}function Ube(e,t,r){return[Uo([Yn,Zd([";",En],e.map(r,"children"))]),Yn]}function Wbe(e,t,r){let{node:n}=e;return[Np(n,t),dn([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",Uo([En,Zd(En,e.map(r,"cases"))])]:"",Yn]),Op(n,t)]}function Vbe(e,t,r){let{node:n}=e;return[n.value," {",dn([Uo([Yn,e.map(({node:i})=>i.type==="text"&&!No.trim(i.value)?"":r(),"expression")]),Yn]),"}"]}function Gbe(e,t,r){let{node:n}=e;if(I7(n,t))return[cc(n,t),dn(WC(e,t,r)),Qs(r9(n,t)),...UC(n,t),lc(n,t)];let i=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),o=c=>dn([dn(WC(e,t,r),{id:s}),c,UC(n,t)]),a=c=>i?Rve(c,{groupId:s}):(Aa(n)||f1(n,t))&&n.parent.type==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?c:Uo(c),l=()=>i?d0(Yn,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?En:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Mve(Yn):Yn,u=()=>(n.next?uc(n.next):om(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":i?d0(Yn,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?En:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":Yn;return n.children.length===0?o(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?En:""):o([E0e(n)?rm:"",a([l(),V2(e,t,r)]),u()])}function f0(e){return e>=9&&e<=32||e==160}function G2(e){return 48<=e&&e<=57}function p0(e){return e>=97&&e<=122||e>=65&&e<=90}function qbe(e){return e>=97&&e<=102||e>=65&&e<=70||G2(e)}function q2(e){return e===10||e===13}function hN(e){return 48<=e&&e<=55}function WS(e){return e===39||e===34||e===96}var Kbe=/-+([a-z0-9])/g;function Jbe(e){return e.replace(Kbe,(...t)=>t[1].toUpperCase())}var VC=class s9{constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,o=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let a=r.substring(0,i-1).lastIndexOf(` -`);o=a>0?i-a:i}else o--;for(;i0;){let a=r.charCodeAt(i);i++,t--,a==10?(s++,o=0):o++}return new s9(this.file,i,s,o)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,o=0,a=0;for(;o0&&(i--,o++,!(n[i]==` +`+e}var zbe=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function s9(e){let t=p1(e);return e.type==="element"&&!e.endSourceSpan&&H2(e.children)?Math.max(t,s9(nm(!1,e.children,-1))):t}function jf(e,t,r){let n=e.node;if(h1(n)){let i=s9(n);return[dc(n,t),to(Ro.trimEnd(t.originalText.slice(f1(n)+(n.prev&&g1(n.prev)?W2(n).length:0),i-(n.next&&hc(n.next)?sm(n,t).length:0)))),cc(n,t)]}return r()}function fy(e,t){return bs(e)&&bs(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?zS(t)?Mr:An:"":zS(t)?Mr:ei:g1(e)&&(h1(t)||t.firstChild||t.isSelfClosing||t.type==="element"&&t.attrs.length>0)||e.type==="element"&&e.isSelfClosing&&hc(t)?"":!t.isLeadingSpaceSensitive||zS(t)||hc(t)&&e.lastChild&&Sg(e.lastChild)&&e.lastChild.lastChild&&Sg(e.lastChild.lastChild)?Mr:t.hasLeadingSpaces?An:ei}function G2(e,t,r){let{node:n}=e;if(z7(n))return[rm,...e.map(s=>{let o=s.node,a=o.prev?fy(o.prev,o):"";return[a?[a,dy(o.prev)?Mr:""]:"",jf(s,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map((s,o)=>{let a=s.node;if(bs(a)){if(a.prev&&bs(a.prev)){let p=fy(a.prev,a);if(p)return dy(a.prev)?[Mr,Mr,jf(s,t,r)]:[p,jf(s,t,r)]}return jf(s,t,r)}let l=[],u=[],c=[],h=[],d=a.prev?fy(a.prev,a):"",f=a.next?fy(a,a.next):"";return d&&(dy(a.prev)?l.push(Mr,Mr):d===Mr?l.push(Mr):bs(a.prev)?u.push(d):u.push(h0("",ei,{groupId:i[o-1]}))),f&&(dy(a)?bs(a.next)&&h.push(Mr,Mr):f===Mr?bs(a.next)&&h.push(Mr):c.push(f)),[...l,gn([...u,gn([jf(s,t,r),...c],{id:i[o]})]),...h]},"children")}function Hbe(e,t,r){let{node:n}=e,i=[];Ube(e)&&i.push("} "),i.push("@",n.name),n.parameters&&i.push(" (",gn(r("parameters")),")"),i.push(" {");let s=o9(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(Vo([Mr,G2(e,t,r)])),s&&i.push(Mr,"}")):s&&i.push("}"),gn(i,{shouldBreak:!0})}function o9(e){var t,r;return!(((t=e.next)==null?void 0:t.type)==="angularControlFlowBlock"&&(r=zbe.get(e.name))!=null&&r.has(e.next.name))}function Ube(e){let{previous:t}=e;return(t==null?void 0:t.type)==="angularControlFlowBlock"&&!h1(t)&&!o9(t)}function Wbe(e,t,r){return[Vo([ei,tf([";",An],e.map(r,"children"))]),ei]}function Vbe(e,t,r){let{node:n}=e;return[Np(n,t),gn([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",Vo([An,tf(An,e.map(r,"cases"))])]:"",ei]),Mp(n,t)]}function Gbe(e,t,r){let{node:n}=e;return[n.value," {",gn([Vo([ei,e.map(({node:i})=>i.type==="text"&&!Ro.trim(i.value)?"":r(),"expression")]),ei]),"}"]}function qbe(e,t,r){let{node:n}=e;if(B7(n,t))return[dc(n,t),gn(UC(e,t,r)),to(i9(n,t)),...HC(n,t),cc(n,t)];let i=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),o=c=>gn([gn(UC(e,t,r),{id:s}),c,HC(n,t)]),a=c=>i?Bve(c,{groupId:s}):(ka(n)||d1(n,t))&&n.parent.type==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?c:Vo(c),l=()=>i?h0(ei,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?An:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Nve(ei):ei,u=()=>(n.next?hc(n.next):om(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":i?h0(ei,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?An:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":ei;return n.children.length===0?o(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?An:""):o([C0e(n)?rm:"",a([l(),G2(e,t,r)]),u()])}function d0(e){return e>=9&&e<=32||e==160}function q2(e){return 48<=e&&e<=57}function f0(e){return e>=97&&e<=122||e>=65&&e<=90}function Kbe(e){return e>=97&&e<=102||e>=65&&e<=70||q2(e)}function K2(e){return e===10||e===13}function fI(e){return 48<=e&&e<=55}function US(e){return e===39||e===34||e===96}var Jbe=/-+([a-z0-9])/g;function Xbe(e){return e.replace(Jbe,(...t)=>t[1].toUpperCase())}var WC=class a9{constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,o=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let a=r.substring(0,i-1).lastIndexOf(` +`);o=a>0?i-a:i}else o--;for(;i0;){let a=r.charCodeAt(i);i++,t--,a==10?(s++,o=0):o++}return new a9(this.file,i,s,o)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,o=0,a=0;for(;o0&&(i--,o++,!(n[i]==` `&&++a==r)););for(o=0,a=0;o]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},Xbe=[Qbe,Zbe,t1e,n1e,i1e,a1e,s1e,o1e,l1e,r1e];function Ybe(e,t){for(let r of Xbe)r(e,t);return e}function Qbe(e){e.walk(t=>{if(t.type==="element"&&t.tagDefinition.ignoreFirstLf&&t.children.length>0&&t.children[0].type==="text"&&t.children[0].value[0]===` -`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function Zbe(e){let t=r=>{var n,i;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((i=r.firstChild)==null?void 0:i.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};e.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let i=0;it.type==="cdata",t=>``)}function r1e(e){let t=r=>{var n,i;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!No.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((i=r.next)==null?void 0:i.type)==="text"};e.walk(r=>{if(r.children)for(let n=0;n`+i.firstChild.value+``+o.value,s.sourceSpan=new Ot(s.sourceSpan.start,o.sourceSpan.end),s.isTrailingSpaceSensitive=o.isTrailingSpaceSensitive,s.hasTrailingSpaces=o.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(o)}})}function n1e(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/su;e.walk(n=>{if(b0e(n))for(let i of n.children){if(i.type!=="text")continue;let s=i.sourceSpan.start,o=null,a=i.value.split(r);for(let l=0;l0&&n.insertChildBefore(i,{type:"text",value:u,sourceSpan:new Ot(s,o)});continue}o=s.moveBy(u.length+4),n.insertChildBefore(i,{type:"interpolation",sourceSpan:new Ot(s,o),children:u.length===0?[]:[{type:"text",value:u,sourceSpan:new Ot(s.moveBy(2),o.moveBy(-2))}]})}n.removeChild(i)}})}function i1e(e){e.walk(t=>{if(!t.children)return;if(t.children.length===0||t.children.length===1&&t.children[0].type==="text"&&No.trim(t.children[0].value).length===0){t.hasDanglingSpaces=t.children.length>0,t.children=[];return}let r=x0e(t),n=R7(t);if(!r)for(let i=0;i{t.isSelfClosing=!t.children||t.type==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function o1e(e,t){e.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function a1e(e,t){e.walk(r=>{r.cssDisplay=M0e(r,t)})}function l1e(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=D0e(r);return}for(let i of n)i.isLeadingSpaceSensitive=w0e(i,t),i.isTrailingSpaceSensitive=S0e(i,t);for(let i=0;i of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},fN="HTML",p1e={bracketSameLine:dN.bracketSameLine,htmlWhitespaceSensitivity:{category:fN,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:dN.singleAttributePerLine,vueIndentScriptAndStyle:{category:fN,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},g1e=p1e,l9={};k7(l9,{angular:()=>vxe,html:()=>yxe,lwc:()=>xxe,vue:()=>bxe});var pN;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(pN||(pN={}));var gN;(function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"})(gN||(gN={}));var mN;(function(e){e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(mN||(mN={}));var yN={name:"custom-elements"},vN={name:"no-errors-schema"},Lu;(function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"})(Lu||(Lu={}));var bN;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"})(bN||(bN={}));var Xs;(function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"})(Xs||(Xs={}));function v1(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function xN(e){return v1(e)[1]==="ng-container"}function wN(e){return v1(e)[1]==="ng-content"}function rv(e){return e===null?null:v1(e)[0]}function m0(e,t){return e?`:${e}:${t}`:t}var nv;function SN(){return nv||(nv={},py(Lu.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),py(Lu.STYLE,["*|style"]),py(Lu.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),py(Lu.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),nv}function py(e,t){for(let r of t)nv[r.toLowerCase()]=e}var m1e=class{},y1e="boolean",v1e="number",b1e="string",x1e="object",w1e=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],u9=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),S1e=Array.from(u9).reduce((e,[t,r])=>(e.set(t,r),e),new Map),D1e=class extends m1e{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,w1e.forEach(e=>{let t=new Map,r=new Set,[n,i]=e.split("|"),s=i.split(","),[o,a]=n.split("^");o.split(",").forEach(u=>{this._schema.set(u.toLowerCase(),t),this._eventSchema.set(u.toLowerCase(),r)});let l=a&&this._schema.get(a.toLowerCase());if(l){for(let[u,c]of l)t.set(u,c);for(let u of this._eventSchema.get(a.toLowerCase()))r.add(u)}s.forEach(u=>{if(u.length>0)switch(u[0]){case"*":r.add(u.substring(1));break;case"!":t.set(u.substring(1),y1e);break;case"#":t.set(u.substring(1),v1e);break;case"%":t.set(u.substring(1),x1e);break;default:t.set(u,b1e)}})})}hasProperty(e,t,r){if(r.some(n=>n.name===vN.name))return!0;if(e.indexOf("-")>-1){if(xN(e)||wN(e))return!1;if(r.some(n=>n.name===yN.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(t)}hasElement(e,t){return t.some(r=>r.name===vN.name)||e.indexOf("-")>-1&&(xN(e)||wN(e)||t.some(r=>r.name===yN.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,t,r){r&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let n=SN()[e+"|"+t];return n||(n=SN()["*|"+t],n||Lu.NONE)}getMappedPropName(e){return u9.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... -If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(t.keys()).map(r=>S1e.get(r)??r)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Jbe(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(E1e(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let o=r.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function E1e(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var kt=class{constructor({closedByChildren:t,implicitNamespacePrefix:r,contentType:n=Xs.PARSABLE_DATA,closedByParent:i=!1,isVoid:s=!1,ignoreFirstLf:o=!1,preventNamespaceInheritance:a=!1,canSelfClose:l=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=s,this.closedByParent=i||s,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=o,this.preventNamespaceInheritance=a,this.canSelfClose=l??s}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},DN,Bf;function GC(e){return Bf||(DN=new kt({canSelfClose:!0}),Bf=Object.assign(Object.create(null),{base:new kt({isVoid:!0}),meta:new kt({isVoid:!0}),area:new kt({isVoid:!0}),embed:new kt({isVoid:!0}),link:new kt({isVoid:!0}),img:new kt({isVoid:!0}),input:new kt({isVoid:!0}),param:new kt({isVoid:!0}),hr:new kt({isVoid:!0}),br:new kt({isVoid:!0}),source:new kt({isVoid:!0}),track:new kt({isVoid:!0}),wbr:new kt({isVoid:!0}),p:new kt({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new kt({closedByChildren:["tbody","tfoot"]}),tbody:new kt({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new kt({closedByChildren:["tbody"],closedByParent:!0}),tr:new kt({closedByChildren:["tr"],closedByParent:!0}),td:new kt({closedByChildren:["td","th"],closedByParent:!0}),th:new kt({closedByChildren:["td","th"],closedByParent:!0}),col:new kt({isVoid:!0}),svg:new kt({implicitNamespacePrefix:"svg"}),foreignObject:new kt({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new kt({implicitNamespacePrefix:"math"}),li:new kt({closedByChildren:["li"],closedByParent:!0}),dt:new kt({closedByChildren:["dt","dd"]}),dd:new kt({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new kt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new kt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new kt({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new kt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new kt({closedByChildren:["optgroup"],closedByParent:!0}),option:new kt({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new kt({ignoreFirstLf:!0}),listing:new kt({ignoreFirstLf:!0}),style:new kt({contentType:Xs.RAW_TEXT}),script:new kt({contentType:Xs.RAW_TEXT}),title:new kt({contentType:{default:Xs.ESCAPABLE_RAW_TEXT,svg:Xs.PARSABLE_DATA}}),textarea:new kt({contentType:Xs.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new D1e().allKnownElementNames().forEach(t=>{!Bf[t]&&rv(t)===null&&(Bf[t]=new kt({canSelfClose:!1}))})),Bf[e]??DN}var rf=class{constructor(t,r){this.sourceSpan=t,this.i18n=r}},C1e=class extends rf{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="text"}visit(e,t){return e.visitText(this,t)}},A1e=class extends rf{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="cdata"}visit(e,t){return e.visitCdata(this,t)}},T1e=class extends rf{constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}},k1e=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i,this.type="expansionCase"}visit(e,t){return e.visitExpansionCase(this,t)}},_1e=class extends rf{constructor(e,t,r,n,i,s,o){super(r,o),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s,this.type="attribute"}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},qa=class extends rf{constructor(t,r,n,i,s,o=null,a=null,l){super(i,l),this.name=t,this.attrs=r,this.children=n,this.startSourceSpan=s,this.endSourceSpan=o,this.nameSpan=a,this.type="element"}visit(t,r){return t.visitElement(this,r)}},$1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="comment"}visit(e,t){return e.visitComment(this,t)}},L1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="docType"}visit(e,t){return e.visitDocType(this,t)}},lh=class extends rf{constructor(t,r,n,i,s,o,a=null,l){super(i,l),this.name=t,this.parameters=r,this.children=n,this.nameSpan=s,this.startSourceSpan=o,this.endSourceSpan=a,this.type="block"}visit(t,r){return t.visitBlock(this,r)}},EN=class{constructor(t,r){this.expression=t,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,r){return t.visitBlockParameter(this,r)}},CN=class{constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i,this.type="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitLetDeclaration(this,t)}};function c9(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let o=i(s);o&&n.push(o)}),n}var P1e=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitChildren(e,t){let r=[],n=this;function i(s){s&&r.push(c9(n,s,e))}return t(i),Array.prototype.concat.apply([],r)}},y0={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",af:"⁡",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"⁣",ic:"⁣",InvisibleTimes:"⁢",it:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",ZeroWidthSpace:"​",NewLine:` -`,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},F1e="";y0.ngsp=F1e;var O1e=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function N1e(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let r=t[0],n=t[1];O1e.forEach(i=>{if(i.test(r)||i.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var M1e=class h9{static fromArray(t){return t?(N1e("interpolation",t),new h9(t[0],t[1])):d9}constructor(t,r){this.start=t,this.end=r}},d9=new M1e("{{","}}"),VS=class extends a9{constructor(e,t,r){super(r,e),this.tokenType=t}},I1e=class{constructor(e,t,r){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=r}};function R1e(e,t,r,n={}){let i=new z1e(new o9(e,t),r,n);return i.tokenize(),new I1e(q1e(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var B1e=/\r\n?/g;function uh(e){return`Unexpected character "${e===0?"EOF":String.fromCharCode(e)}"`}function AN(e){return`Unknown entity "${e}" - use the "&#;" or "&#x;" syntax`}function j1e(e,t){return`Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`}var v0;(function(e){e.HEX="hexadecimal",e.DEC="decimal"})(v0||(v0={}));var GS=class{constructor(t){this.error=t}},z1e=class{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||d9,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;let n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new K1e(e,n):new f9(e,n),this._preserveLineEndings=r.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=r.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=r.tokenizeBlocks??!0,this._tokenizeLet=r.tokenizeLet??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(B1e,` -`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>f0(r)?!e:_N(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._beginToken(25,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(en),this._attemptCharCode(41))this._attemptCharCodeUntilFn(en);else{t.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):t.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn($N);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&WS(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn($N)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),f0(this._cursor.peek()))this._attemptCharCodeUntilFn(en);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=33;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(en),!this._attemptCharCode(61)){t.type=33;return}this._attemptCharCodeUntilFn(r=>en(r)&&!q2(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(t.type=33,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>p0(r)||r==36||r===95||t&&G2(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;WS(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(V1e(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new VS("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(this._currentTokenType===null)throw new VS("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new VS(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new GS(r)}handleError(e){if(e instanceof K2&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof GS)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return G1e(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(uh(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){let t=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==58&&!H1e(this._cursor.peek());)this._cursor.advance();let r;this._cursor.peek()===58?(t=this._cursor.getChars(e),this._cursor.advance(),r=this._cursor.clone()):r=e,this._requireCharCodeUntilFn(TN,t===""?0:1);let n=this._cursor.getChars(r);return[t,n]}_consumeTagOpen(e){let t,r,n,i=[];try{if(!p0(this._cursor.peek()))throw this._createError(uh(this._cursor.peek()),this._cursor.getSpan(e));for(n=this._consumeTagOpenStart(e),r=n.parts[0],t=n.parts[1],this._attemptCharCodeUntilFn(en);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,a]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(en),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(en);let l=this._consumeAttributeValue();i.push({prefix:o,name:a,value:l})}else i.push({prefix:o,name:a});this._attemptCharCodeUntilFn(en)}this._consumeTagOpenEnd()}catch(o){if(o instanceof GS){n?n.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let s=this._getTagContentType(t,r,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(r,t),s===Xs.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):s===Xs.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(en),!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t))?!1:(this._attemptCharCodeUntilFn(en),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(n=>n===62,3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(0,e);let t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(uh(e),this._cursor.getSpan());this._beginToken(14);let t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let t=this._cursor.peek();this._consumeQuote(t);let r=()=>this._cursor.peek()===t;e=this._consumeWithInterpolation(16,17,r,r),this._consumeQuote(t)}else{let t=()=>TN(this._cursor.peek());e=this._consumeWithInterpolation(16,17,t,t)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(en),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(en),this._requireCharCode(62),this._endToken([]);else{let[t,r]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(en),this._requireCharCode(62),this._endToken([t,r]),this._handleFullNameStackForTagClose(t,r)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{let n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(en),this._beginToken(7);let r=this._readUntil(44);this._endToken([r]),this._requireCharCode(44),this._attemptCharCodeUntilFn(en)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(en),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(en),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(en),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,t,r,n){this._beginToken(e);let i=[];for(;!r();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(t,o,n),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let s=this._processCarriageReturns(i.join(""));return this._endToken([s]),s}_consumeInterpolation(e,t,r){let n=[];this._beginToken(e,t),n.push(this._interpolationConfig.start);let i=this._cursor.clone(),s=null,o=!1;for(;this._cursor.peek()!==0&&(r===null||!r());){let a=this._cursor.clone();if(this._isTagStart()){this._cursor=a,n.push(this._getProcessedChars(i,a)),this._endToken(n);return}if(s===null)if(this._attemptStr(this._interpolationConfig.end)){n.push(this._getProcessedChars(i,a)),n.push(this._interpolationConfig.end),this._endToken(n);return}else this._attemptStr("//")&&(o=!0);let l=this._cursor.peek();this._cursor.advance(),l===92?this._cursor.advance():l===s?s=null:!o&&s===null&&WS(l)&&(s=l)}n.push(this._getProcessedChars(i,this._cursor)),this._endToken(n)}_getProcessedChars(e,t){return this._processCarriageReturns(t.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let t=e.peek();if(97<=t&&t<=122||65<=t&&t<=90||t===47||t===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),_N(e.peek()))return!0}return!1}_readUntil(e){let t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){let r=m0(e,t);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===r)&&this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){let r=m0(e,t);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}};function en(e){return!f0(e)||e===0}function TN(e){return f0(e)||e===62||e===60||e===47||e===39||e===34||e===61||e===0}function H1e(e){return(e<97||12257)}function U1e(e){return e===59||e===0||!qbe(e)}function W1e(e){return e===59||e===0||!p0(e)}function V1e(e){return e!==125}function G1e(e,t){return kN(e)===kN(t)}function kN(e){return e>=97&&e<=122?e-97+65:e}function _N(e){return p0(e)||G2(e)||e===95}function $N(e){return e!==59&&en(e)}function q1e(e){let t=[],r;for(let n=0;n0&&r.indexOf(t.peek())!==-1;)n===t&&(t=t.clone()),t.advance();let i=this.locationFromCursor(t),s=this.locationFromCursor(this),o=n!==t?this.locationFromCursor(n):i;return new Ot(i,s,o)}getChars(t){return this.input.substring(t.state.offset,this.state.offset)}charAt(t){return this.input.charCodeAt(t)}advanceState(t){if(t.offset>=this.end)throw this.state=t,new K2('Unexpected character "EOF"',this);let r=this.charAt(t.offset);r===10?(t.line++,t.column=0):q2(r)||t.column++,t.offset++,this.updatePeek(t)}updatePeek(t){t.peek=t.offset>=this.end?0:this.charAt(t.offset)}locationFromCursor(t){return new VC(t.file,t.state.offset,t.state.line,t.state.column)}},K1e=class KC extends f9{constructor(t,r){t instanceof KC?(super(t),this.internalState={...t.internalState}):(super(t,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new KC(this)}getChars(t){let r=t.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(t()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),t()===110)this.state.peek=10;else if(t()===114)this.state.peek=13;else if(t()===118)this.state.peek=11;else if(t()===116)this.state.peek=9;else if(t()===98)this.state.peek=8;else if(t()===102)this.state.peek=12;else if(t()===117)if(this.advanceState(this.internalState),t()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;t()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(t()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(hN(t())){let r="",n=0,i=this.clone();for(;hN(t())&&n<3;)i=this.clone(),r+=String.fromCodePoint(t()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=i.internalState}else q2(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(t,r){let n=this.input.slice(t.internalState.offset,t.internalState.offset+r),i=parseInt(n,16);if(isNaN(i))throw t.state=t.internalState,new K2("Invalid hexadecimal escape sequence",t);return i}},K2=class{constructor(e,t){this.msg=e,this.cursor=t}},ci=class p9 extends a9{static create(t,r,n){return new p9(t,r,n)}constructor(t,r,n){super(r,n),this.elementName=t}},J1e=class{constructor(e,t){this.rootNodes=e,this.errors=t}},X1e=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){let s=f=>(p,...m)=>f(p.toLowerCase(),...m),o=n?this.getTagDefinition:s(this.getTagDefinition),a=f=>o(f).getContentType(),l=n?i:s(i),u=R1e(e,t,i?(f,p,m,y)=>{let b=l(f,p,m,y);return b!==void 0?b:a(f)}:a,r),c=r&&r.canSelfClose||!1,h=r&&r.allowHtmComponentClosingTags||!1,d=new Y1e(u.tokens,o,c,h,n);return d.build(),new J1e(d.rootNodes,u.errors.concat(d.errors))}},Y1e=class g9{constructor(t,r,n,i,s){this.tokens=t,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=i,this.isTagNameCaseSensitive=s,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let t of this._containerStack)t instanceof lh&&this.errors.push(ci.create(t.name,t.sourceSpan,`Unclosed block "${t.name}"`))}_advance(){let t=this._peek;return this._index0)return this.errors=this.errors.concat(s.errors),null;let o=new Ot(t.sourceSpan.start,i.sourceSpan.end,t.sourceSpan.fullStart),a=new Ot(r.sourceSpan.start,i.sourceSpan.end,r.sourceSpan.fullStart);return new k1e(t.parts[0],s.rootNodes,o,t.sourceSpan,a)}_collectExpansionExpTokens(t){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(LN(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(ci.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(LN(n,20))n.pop();else return this.errors.push(ci.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===34)return this.errors.push(ci.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(t){let r=t.parts[0];if(r.length>0&&r[0]==` +`&&++a==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},l9=class{constructor(t,r){this.content=t,this.url=r}},Mt=class{constructor(t,r,n=t,i=null){this.start=t,this.end=r,this.fullStart=n,this.details=i}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},p0;(function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"})(p0||(p0={}));var u9=class{constructor(t,r,n=p0.ERROR){this.span=t,this.msg=r,this.level=n}contextualMessage(){let t=this.span.start.getContext(100,3);return t?`${this.msg} ("${t.before}[${p0[this.level]} ->]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},Ybe=[Zbe,e1e,r1e,i1e,s1e,l1e,o1e,a1e,u1e,n1e];function Qbe(e,t){for(let r of Ybe)r(e,t);return e}function Zbe(e){e.walk(t=>{if(t.type==="element"&&t.tagDefinition.ignoreFirstLf&&t.children.length>0&&t.children[0].type==="text"&&t.children[0].value[0]===` +`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function e1e(e){let t=r=>{var n,i;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((i=r.firstChild)==null?void 0:i.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};e.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let i=0;it.type==="cdata",t=>``)}function n1e(e){let t=r=>{var n,i;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!Ro.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((i=r.next)==null?void 0:i.type)==="text"};e.walk(r=>{if(r.children)for(let n=0;n`+i.firstChild.value+``+o.value,s.sourceSpan=new Mt(s.sourceSpan.start,o.sourceSpan.end),s.isTrailingSpaceSensitive=o.isTrailingSpaceSensitive,s.hasTrailingSpaces=o.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(o)}})}function i1e(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/su;e.walk(n=>{if(x0e(n))for(let i of n.children){if(i.type!=="text")continue;let s=i.sourceSpan.start,o=null,a=i.value.split(r);for(let l=0;l0&&n.insertChildBefore(i,{type:"text",value:u,sourceSpan:new Mt(s,o)});continue}o=s.moveBy(u.length+4),n.insertChildBefore(i,{type:"interpolation",sourceSpan:new Mt(s,o),children:u.length===0?[]:[{type:"text",value:u,sourceSpan:new Mt(s.moveBy(2),o.moveBy(-2))}]})}n.removeChild(i)}})}function s1e(e){e.walk(t=>{if(!t.children)return;if(t.children.length===0||t.children.length===1&&t.children[0].type==="text"&&Ro.trim(t.children[0].value).length===0){t.hasDanglingSpaces=t.children.length>0,t.children=[];return}let r=w0e(t),n=j7(t);if(!r)for(let i=0;i{t.isSelfClosing=!t.children||t.type==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function a1e(e,t){e.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function l1e(e,t){e.walk(r=>{r.cssDisplay=N0e(r,t)})}function u1e(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=E0e(r);return}for(let i of n)i.isLeadingSpaceSensitive=S0e(i,t),i.isTrailingSpaceSensitive=D0e(i,t);for(let i=0;i of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},gI="HTML",g1e={bracketSameLine:pI.bracketSameLine,htmlWhitespaceSensitivity:{category:gI,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:pI.singleAttributePerLine,vueIndentScriptAndStyle:{category:gI,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},m1e=g1e,c9={};$7(c9,{angular:()=>bxe,html:()=>vxe,lwc:()=>wxe,vue:()=>xxe});var mI;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(mI||(mI={}));var yI;(function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"})(yI||(yI={}));var vI;(function(e){e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(vI||(vI={}));var bI={name:"custom-elements"},xI={name:"no-errors-schema"},Fu;(function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"})(Fu||(Fu={}));var wI;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"})(wI||(wI={}));var Zs;(function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"})(Zs||(Zs={}));function y1(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function SI(e){return y1(e)[1]==="ng-container"}function DI(e){return y1(e)[1]==="ng-content"}function tv(e){return e===null?null:y1(e)[0]}function g0(e,t){return e?`:${e}:${t}`:t}var rv;function EI(){return rv||(rv={},py(Fu.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),py(Fu.STYLE,["*|style"]),py(Fu.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),py(Fu.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),rv}function py(e,t){for(let r of t)rv[r.toLowerCase()]=e}var y1e=class{},v1e="boolean",b1e="number",x1e="string",w1e="object",S1e=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],h9=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),D1e=Array.from(h9).reduce((e,[t,r])=>(e.set(t,r),e),new Map),E1e=class extends y1e{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,S1e.forEach(e=>{let t=new Map,r=new Set,[n,i]=e.split("|"),s=i.split(","),[o,a]=n.split("^");o.split(",").forEach(u=>{this._schema.set(u.toLowerCase(),t),this._eventSchema.set(u.toLowerCase(),r)});let l=a&&this._schema.get(a.toLowerCase());if(l){for(let[u,c]of l)t.set(u,c);for(let u of this._eventSchema.get(a.toLowerCase()))r.add(u)}s.forEach(u=>{if(u.length>0)switch(u[0]){case"*":r.add(u.substring(1));break;case"!":t.set(u.substring(1),v1e);break;case"#":t.set(u.substring(1),b1e);break;case"%":t.set(u.substring(1),w1e);break;default:t.set(u,x1e)}})})}hasProperty(e,t,r){if(r.some(n=>n.name===xI.name))return!0;if(e.indexOf("-")>-1){if(SI(e)||DI(e))return!1;if(r.some(n=>n.name===bI.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(t)}hasElement(e,t){return t.some(r=>r.name===xI.name)||e.indexOf("-")>-1&&(SI(e)||DI(e)||t.some(r=>r.name===bI.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,t,r){r&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let n=EI()[e+"|"+t];return n||(n=EI()["*|"+t],n||Fu.NONE)}getMappedPropName(e){return h9.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(t.keys()).map(r=>D1e.get(r)??r)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Xbe(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(C1e(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let o=r.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function C1e(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var $t=class{constructor({closedByChildren:t,implicitNamespacePrefix:r,contentType:n=Zs.PARSABLE_DATA,closedByParent:i=!1,isVoid:s=!1,ignoreFirstLf:o=!1,preventNamespaceInheritance:a=!1,canSelfClose:l=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=s,this.closedByParent=i||s,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=o,this.preventNamespaceInheritance=a,this.canSelfClose=l??s}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},CI,zf;function VC(e){return zf||(CI=new $t({canSelfClose:!0}),zf=Object.assign(Object.create(null),{base:new $t({isVoid:!0}),meta:new $t({isVoid:!0}),area:new $t({isVoid:!0}),embed:new $t({isVoid:!0}),link:new $t({isVoid:!0}),img:new $t({isVoid:!0}),input:new $t({isVoid:!0}),param:new $t({isVoid:!0}),hr:new $t({isVoid:!0}),br:new $t({isVoid:!0}),source:new $t({isVoid:!0}),track:new $t({isVoid:!0}),wbr:new $t({isVoid:!0}),p:new $t({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new $t({closedByChildren:["tbody","tfoot"]}),tbody:new $t({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new $t({closedByChildren:["tbody"],closedByParent:!0}),tr:new $t({closedByChildren:["tr"],closedByParent:!0}),td:new $t({closedByChildren:["td","th"],closedByParent:!0}),th:new $t({closedByChildren:["td","th"],closedByParent:!0}),col:new $t({isVoid:!0}),svg:new $t({implicitNamespacePrefix:"svg"}),foreignObject:new $t({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new $t({implicitNamespacePrefix:"math"}),li:new $t({closedByChildren:["li"],closedByParent:!0}),dt:new $t({closedByChildren:["dt","dd"]}),dd:new $t({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new $t({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new $t({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new $t({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new $t({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new $t({closedByChildren:["optgroup"],closedByParent:!0}),option:new $t({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new $t({ignoreFirstLf:!0}),listing:new $t({ignoreFirstLf:!0}),style:new $t({contentType:Zs.RAW_TEXT}),script:new $t({contentType:Zs.RAW_TEXT}),title:new $t({contentType:{default:Zs.ESCAPABLE_RAW_TEXT,svg:Zs.PARSABLE_DATA}}),textarea:new $t({contentType:Zs.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new E1e().allKnownElementNames().forEach(t=>{!zf[t]&&tv(t)===null&&(zf[t]=new $t({canSelfClose:!1}))})),zf[e]??CI}var sf=class{constructor(t,r){this.sourceSpan=t,this.i18n=r}},T1e=class extends sf{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="text"}visit(e,t){return e.visitText(this,t)}},A1e=class extends sf{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="cdata"}visit(e,t){return e.visitCdata(this,t)}},k1e=class extends sf{constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}},_1e=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i,this.type="expansionCase"}visit(e,t){return e.visitExpansionCase(this,t)}},$1e=class extends sf{constructor(e,t,r,n,i,s,o){super(r,o),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s,this.type="attribute"}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},Ja=class extends sf{constructor(t,r,n,i,s,o=null,a=null,l){super(i,l),this.name=t,this.attrs=r,this.children=n,this.startSourceSpan=s,this.endSourceSpan=o,this.nameSpan=a,this.type="element"}visit(t,r){return t.visitElement(this,r)}},L1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="comment"}visit(e,t){return e.visitComment(this,t)}},P1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="docType"}visit(e,t){return e.visitDocType(this,t)}},ch=class extends sf{constructor(t,r,n,i,s,o,a=null,l){super(i,l),this.name=t,this.parameters=r,this.children=n,this.nameSpan=s,this.startSourceSpan=o,this.endSourceSpan=a,this.type="block"}visit(t,r){return t.visitBlock(this,r)}},TI=class{constructor(t,r){this.expression=t,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,r){return t.visitBlockParameter(this,r)}},AI=class{constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i,this.type="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitLetDeclaration(this,t)}};function d9(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let o=i(s);o&&n.push(o)}),n}var F1e=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitChildren(e,t){let r=[],n=this;function i(s){s&&r.push(d9(n,s,e))}return t(i),Array.prototype.concat.apply([],r)}},m0={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",af:"⁡",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"⁣",ic:"⁣",InvisibleTimes:"⁢",it:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",ZeroWidthSpace:"​",NewLine:` +`,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},O1e="";m0.ngsp=O1e;var I1e=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function M1e(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let r=t[0],n=t[1];I1e.forEach(i=>{if(i.test(r)||i.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var N1e=class f9{static fromArray(t){return t?(M1e("interpolation",t),new f9(t[0],t[1])):p9}constructor(t,r){this.start=t,this.end=r}},p9=new N1e("{{","}}"),WS=class extends u9{constructor(e,t,r){super(r,e),this.tokenType=t}},R1e=class{constructor(e,t,r){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=r}};function B1e(e,t,r,n={}){let i=new H1e(new l9(e,t),r,n);return i.tokenize(),new R1e(K1e(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var j1e=/\r\n?/g;function hh(e){return`Unexpected character "${e===0?"EOF":String.fromCharCode(e)}"`}function kI(e){return`Unknown entity "${e}" - use the "&#;" or "&#x;" syntax`}function z1e(e,t){return`Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`}var y0;(function(e){e.HEX="hexadecimal",e.DEC="decimal"})(y0||(y0={}));var VS=class{constructor(t){this.error=t}},H1e=class{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||p9,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;let n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new J1e(e,n):new g9(e,n),this._preserveLineEndings=r.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=r.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=r.tokenizeBlocks??!0,this._tokenizeLet=r.tokenizeLet??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(j1e,` +`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>d0(r)?!e:LI(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._beginToken(25,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(rn),this._attemptCharCode(41))this._attemptCharCodeUntilFn(rn);else{t.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):t.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(PI);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&US(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(PI)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),d0(this._cursor.peek()))this._attemptCharCodeUntilFn(rn);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=33;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(rn),!this._attemptCharCode(61)){t.type=33;return}this._attemptCharCodeUntilFn(r=>rn(r)&&!K2(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(t.type=33,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>f0(r)||r==36||r===95||t&&q2(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;US(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(G1e(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new WS("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(this._currentTokenType===null)throw new WS("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new WS(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new VS(r)}handleError(e){if(e instanceof J2&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof VS)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return q1e(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(hh(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){let t=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==58&&!U1e(this._cursor.peek());)this._cursor.advance();let r;this._cursor.peek()===58?(t=this._cursor.getChars(e),this._cursor.advance(),r=this._cursor.clone()):r=e,this._requireCharCodeUntilFn(_I,t===""?0:1);let n=this._cursor.getChars(r);return[t,n]}_consumeTagOpen(e){let t,r,n,i=[];try{if(!f0(this._cursor.peek()))throw this._createError(hh(this._cursor.peek()),this._cursor.getSpan(e));for(n=this._consumeTagOpenStart(e),r=n.parts[0],t=n.parts[1],this._attemptCharCodeUntilFn(rn);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,a]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(rn),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(rn);let l=this._consumeAttributeValue();i.push({prefix:o,name:a,value:l})}else i.push({prefix:o,name:a});this._attemptCharCodeUntilFn(rn)}this._consumeTagOpenEnd()}catch(o){if(o instanceof VS){n?n.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let s=this._getTagContentType(t,r,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(r,t),s===Zs.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):s===Zs.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(rn),!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t))?!1:(this._attemptCharCodeUntilFn(rn),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(n=>n===62,3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(0,e);let t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(hh(e),this._cursor.getSpan());this._beginToken(14);let t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let t=this._cursor.peek();this._consumeQuote(t);let r=()=>this._cursor.peek()===t;e=this._consumeWithInterpolation(16,17,r,r),this._consumeQuote(t)}else{let t=()=>_I(this._cursor.peek());e=this._consumeWithInterpolation(16,17,t,t)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(rn),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(rn),this._requireCharCode(62),this._endToken([]);else{let[t,r]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(rn),this._requireCharCode(62),this._endToken([t,r]),this._handleFullNameStackForTagClose(t,r)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{let n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(rn),this._beginToken(7);let r=this._readUntil(44);this._endToken([r]),this._requireCharCode(44),this._attemptCharCodeUntilFn(rn)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(rn),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(rn),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(rn),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,t,r,n){this._beginToken(e);let i=[];for(;!r();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(t,o,n),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let s=this._processCarriageReturns(i.join(""));return this._endToken([s]),s}_consumeInterpolation(e,t,r){let n=[];this._beginToken(e,t),n.push(this._interpolationConfig.start);let i=this._cursor.clone(),s=null,o=!1;for(;this._cursor.peek()!==0&&(r===null||!r());){let a=this._cursor.clone();if(this._isTagStart()){this._cursor=a,n.push(this._getProcessedChars(i,a)),this._endToken(n);return}if(s===null)if(this._attemptStr(this._interpolationConfig.end)){n.push(this._getProcessedChars(i,a)),n.push(this._interpolationConfig.end),this._endToken(n);return}else this._attemptStr("//")&&(o=!0);let l=this._cursor.peek();this._cursor.advance(),l===92?this._cursor.advance():l===s?s=null:!o&&s===null&&US(l)&&(s=l)}n.push(this._getProcessedChars(i,this._cursor)),this._endToken(n)}_getProcessedChars(e,t){return this._processCarriageReturns(t.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let t=e.peek();if(97<=t&&t<=122||65<=t&&t<=90||t===47||t===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),LI(e.peek()))return!0}return!1}_readUntil(e){let t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){let r=g0(e,t);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===r)&&this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){let r=g0(e,t);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}};function rn(e){return!d0(e)||e===0}function _I(e){return d0(e)||e===62||e===60||e===47||e===39||e===34||e===61||e===0}function U1e(e){return(e<97||12257)}function W1e(e){return e===59||e===0||!Kbe(e)}function V1e(e){return e===59||e===0||!f0(e)}function G1e(e){return e!==125}function q1e(e,t){return $I(e)===$I(t)}function $I(e){return e>=97&&e<=122?e-97+65:e}function LI(e){return f0(e)||q2(e)||e===95}function PI(e){return e!==59&&rn(e)}function K1e(e){let t=[],r;for(let n=0;n0&&r.indexOf(t.peek())!==-1;)n===t&&(t=t.clone()),t.advance();let i=this.locationFromCursor(t),s=this.locationFromCursor(this),o=n!==t?this.locationFromCursor(n):i;return new Mt(i,s,o)}getChars(t){return this.input.substring(t.state.offset,this.state.offset)}charAt(t){return this.input.charCodeAt(t)}advanceState(t){if(t.offset>=this.end)throw this.state=t,new J2('Unexpected character "EOF"',this);let r=this.charAt(t.offset);r===10?(t.line++,t.column=0):K2(r)||t.column++,t.offset++,this.updatePeek(t)}updatePeek(t){t.peek=t.offset>=this.end?0:this.charAt(t.offset)}locationFromCursor(t){return new WC(t.file,t.state.offset,t.state.line,t.state.column)}},J1e=class qC extends g9{constructor(t,r){t instanceof qC?(super(t),this.internalState={...t.internalState}):(super(t,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new qC(this)}getChars(t){let r=t.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(t()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),t()===110)this.state.peek=10;else if(t()===114)this.state.peek=13;else if(t()===118)this.state.peek=11;else if(t()===116)this.state.peek=9;else if(t()===98)this.state.peek=8;else if(t()===102)this.state.peek=12;else if(t()===117)if(this.advanceState(this.internalState),t()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;t()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(t()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(fI(t())){let r="",n=0,i=this.clone();for(;fI(t())&&n<3;)i=this.clone(),r+=String.fromCodePoint(t()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=i.internalState}else K2(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(t,r){let n=this.input.slice(t.internalState.offset,t.internalState.offset+r),i=parseInt(n,16);if(isNaN(i))throw t.state=t.internalState,new J2("Invalid hexadecimal escape sequence",t);return i}},J2=class{constructor(e,t){this.msg=e,this.cursor=t}},fi=class m9 extends u9{static create(t,r,n){return new m9(t,r,n)}constructor(t,r,n){super(r,n),this.elementName=t}},X1e=class{constructor(e,t){this.rootNodes=e,this.errors=t}},Y1e=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){let s=f=>(p,...m)=>f(p.toLowerCase(),...m),o=n?this.getTagDefinition:s(this.getTagDefinition),a=f=>o(f).getContentType(),l=n?i:s(i),u=B1e(e,t,i?(f,p,m,y)=>{let b=l(f,p,m,y);return b!==void 0?b:a(f)}:a,r),c=r&&r.canSelfClose||!1,h=r&&r.allowHtmComponentClosingTags||!1,d=new Q1e(u.tokens,o,c,h,n);return d.build(),new X1e(d.rootNodes,u.errors.concat(d.errors))}},Q1e=class y9{constructor(t,r,n,i,s){this.tokens=t,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=i,this.isTagNameCaseSensitive=s,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let t of this._containerStack)t instanceof ch&&this.errors.push(fi.create(t.name,t.sourceSpan,`Unclosed block "${t.name}"`))}_advance(){let t=this._peek;return this._index0)return this.errors=this.errors.concat(s.errors),null;let o=new Mt(t.sourceSpan.start,i.sourceSpan.end,t.sourceSpan.fullStart),a=new Mt(r.sourceSpan.start,i.sourceSpan.end,r.sourceSpan.fullStart);return new _1e(t.parts[0],s.rootNodes,o,t.sourceSpan,a)}_collectExpansionExpTokens(t){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(FI(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(fi.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(FI(n,20))n.pop();else return this.errors.push(fi.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===34)return this.errors.push(fi.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(t){let r=t.parts[0];if(r.length>0&&r[0]==` `){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===` -`){let s=this._getContainer();s!=null&&s.children.length===0&&this.getTagDefinition(s.name).ignoreFirstLf&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,PN):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let s=t.sourceSpan;this._addToParent(new C1e(i,new Ot(n.start,s.end,n.fullStart,n.details),r))}}_closeVoidElement(){let t=this._getContainer();t instanceof qa&&this.getTagDefinition(t.name).isVoid&&this._containerStack.pop()}_consumeStartTag(t){let[r,n]=t.parts,i=[];for(;this._peek.type===14;)i.push(this._consumeAttr(this._advance()));let s=this._getElementFullName(r,n,this._getClosestParentElement()),o=!1;if(this._peek.type===2){this._advance(),o=!0;let f=this.getTagDefinition(s);this.canSelfClose||f.canSelfClose||rv(s)!==null||f.isVoid||this.errors.push(ci.create(s,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),o=!1);let a=this._peek.sourceSpan.fullStart,l=new Ot(t.sourceSpan.start,a,t.sourceSpan.fullStart),u=new Ot(t.sourceSpan.start,a,t.sourceSpan.fullStart),c=new Ot(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new qa(s,i,[],l,u,void 0,c),d=this._getContainer();this._pushContainer(h,d instanceof qa&&this.getTagDefinition(d.name).isClosedByChild(h.name)),o?this._popContainer(s,qa,l):t.type===4&&(this._popContainer(s,qa,null),this.errors.push(ci.create(s,l,`Opening tag "${s}" not terminated.`)))}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeEndTag(t){let r=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t.parts[0],t.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(ci.create(r,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(r,qa,t.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(ci.create(r,t.sourceSpan,n))}}_popContainer(t,r,n){let i=!1;for(let s=this._containerStack.length-1;s>=0;s--){let o=this._containerStack[s];if(rv(o.name)?o.name===t:(t==null||o.name.toLowerCase()===t.toLowerCase())&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(s,this._containerStack.length-s),!i;(o instanceof lh||o instanceof qa&&!this.getTagDefinition(o.name).closedByParent)&&(i=!0)}return!1}_consumeAttr(t){let r=m0(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===15&&(i=this._advance());let s="",o=[],a,l;if(this._peek.type===16)for(a=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let c=this._advance();o.push(c),c.type===17?s+=c.parts.join("").replace(/&([^;]+);/g,PN):c.type===9?s+=c.parts[0]:s+=c.parts.join(""),l=n=c.sourceSpan.end}this._peek.type===15&&(l=n=this._advance().sourceSpan.end);let u=a&&l&&new Ot((i==null?void 0:i.sourceSpan.start)??a.start,l,(i==null?void 0:i.sourceSpan.fullStart)??a.fullStart);return new _1e(r,s,new Ot(t.sourceSpan.start,n,t.sourceSpan.fullStart),t.sourceSpan,u,o.length>0?o:void 0,void 0)}_consumeBlockOpen(t){let r=[];for(;this._peek.type===28;){let a=this._advance();r.push(new EN(a.parts[0],a.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,i=new Ot(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new Ot(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new lh(t.parts[0],r,[],i,t.sourceSpan,s);this._pushContainer(o,!1)}_consumeBlockClose(t){this._popContainer(null,lh,t.sourceSpan)||this.errors.push(ci.create(null,t.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(t){let r=[];for(;this._peek.type===28;){let a=this._advance();r.push(new EN(a.parts[0],a.sourceSpan))}let n=this._peek.sourceSpan.fullStart,i=new Ot(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new Ot(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new lh(t.parts[0],r,[],i,t.sourceSpan,s);this._pushContainer(o,!1),this._popContainer(null,lh,null),this.errors.push(ci.create(t.parts[0],i,`Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(t){let r=t.parts[0],n,i;if(this._peek.type!==31){this.errors.push(ci.create(t.parts[0],t.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(ci.create(t.parts[0],t.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else i=this._advance();let s=i.sourceSpan.fullStart,o=new Ot(t.sourceSpan.start,s,t.sourceSpan.fullStart),a=t.sourceSpan.toString().lastIndexOf(r),l=t.sourceSpan.start.moveBy(a),u=new Ot(l,t.sourceSpan.end),c=new CN(r,n.parts[0],o,u,n.sourceSpan);this._addToParent(c)}_consumeIncompleteLet(t){let r=t.parts[0]??"",n=r?` "${r}"`:"";if(r.length>0){let i=t.sourceSpan.toString().lastIndexOf(r),s=t.sourceSpan.start.moveBy(i),o=new Ot(s,t.sourceSpan.end),a=new Ot(t.sourceSpan.start,t.sourceSpan.start.moveBy(0)),l=new CN(r,"",t.sourceSpan,o,a);this._addToParent(l)}this.errors.push(ci.create(t.parts[0],t.sourceSpan,`Incomplete @let declaration${n}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let t=this._containerStack.length-1;t>-1;t--)if(this._containerStack[t]instanceof qa)return this._containerStack[t];return null}_addToParent(t){let r=this._getContainer();r===null?this.rootNodes.push(t):r.children.push(t)}_getElementFullName(t,r,n){if(t===""&&(t=this.getTagDefinition(r).implicitNamespacePrefix||"",t===""&&n!=null)){let i=v1(n.name)[1];this.getTagDefinition(i).preventNamespaceInheritance||(t=rv(n.name))}return m0(t,r)}};function LN(e,t){return e.length>0&&e[e.length-1]===t}function PN(e,t){return y0[t]!==void 0?y0[t]||e:/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):e}var Q1e=class extends X1e{constructor(){super(GC)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}},qS=null,Z1e=()=>(qS||(qS=new Q1e),qS);function FN(e,t={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s,tokenizeAngularBlocks:o=!1,tokenizeAngularLetDeclaration:a=!1}=t;return Z1e().parse(e,"angular-html-parser",{tokenizeExpansionForms:o,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:o,tokenizeLet:a},i,s)}function exe(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var txe=exe,jf=3;function rxe(e){let t=e.slice(0,jf);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(` -`,jf);if(r===-1)return;let n=e.slice(jf,r).trim(),i=e.indexOf(` +`){let s=this._getContainer();s!=null&&s.children.length===0&&this.getTagDefinition(s.name).ignoreFirstLf&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,OI):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let s=t.sourceSpan;this._addToParent(new T1e(i,new Mt(n.start,s.end,n.fullStart,n.details),r))}}_closeVoidElement(){let t=this._getContainer();t instanceof Ja&&this.getTagDefinition(t.name).isVoid&&this._containerStack.pop()}_consumeStartTag(t){let[r,n]=t.parts,i=[];for(;this._peek.type===14;)i.push(this._consumeAttr(this._advance()));let s=this._getElementFullName(r,n,this._getClosestParentElement()),o=!1;if(this._peek.type===2){this._advance(),o=!0;let f=this.getTagDefinition(s);this.canSelfClose||f.canSelfClose||tv(s)!==null||f.isVoid||this.errors.push(fi.create(s,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),o=!1);let a=this._peek.sourceSpan.fullStart,l=new Mt(t.sourceSpan.start,a,t.sourceSpan.fullStart),u=new Mt(t.sourceSpan.start,a,t.sourceSpan.fullStart),c=new Mt(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new Ja(s,i,[],l,u,void 0,c),d=this._getContainer();this._pushContainer(h,d instanceof Ja&&this.getTagDefinition(d.name).isClosedByChild(h.name)),o?this._popContainer(s,Ja,l):t.type===4&&(this._popContainer(s,Ja,null),this.errors.push(fi.create(s,l,`Opening tag "${s}" not terminated.`)))}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeEndTag(t){let r=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t.parts[0],t.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(fi.create(r,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(r,Ja,t.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(fi.create(r,t.sourceSpan,n))}}_popContainer(t,r,n){let i=!1;for(let s=this._containerStack.length-1;s>=0;s--){let o=this._containerStack[s];if(tv(o.name)?o.name===t:(t==null||o.name.toLowerCase()===t.toLowerCase())&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(s,this._containerStack.length-s),!i;(o instanceof ch||o instanceof Ja&&!this.getTagDefinition(o.name).closedByParent)&&(i=!0)}return!1}_consumeAttr(t){let r=g0(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===15&&(i=this._advance());let s="",o=[],a,l;if(this._peek.type===16)for(a=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let c=this._advance();o.push(c),c.type===17?s+=c.parts.join("").replace(/&([^;]+);/g,OI):c.type===9?s+=c.parts[0]:s+=c.parts.join(""),l=n=c.sourceSpan.end}this._peek.type===15&&(l=n=this._advance().sourceSpan.end);let u=a&&l&&new Mt((i==null?void 0:i.sourceSpan.start)??a.start,l,(i==null?void 0:i.sourceSpan.fullStart)??a.fullStart);return new $1e(r,s,new Mt(t.sourceSpan.start,n,t.sourceSpan.fullStart),t.sourceSpan,u,o.length>0?o:void 0,void 0)}_consumeBlockOpen(t){let r=[];for(;this._peek.type===28;){let a=this._advance();r.push(new TI(a.parts[0],a.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,i=new Mt(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new Mt(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new ch(t.parts[0],r,[],i,t.sourceSpan,s);this._pushContainer(o,!1)}_consumeBlockClose(t){this._popContainer(null,ch,t.sourceSpan)||this.errors.push(fi.create(null,t.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(t){let r=[];for(;this._peek.type===28;){let a=this._advance();r.push(new TI(a.parts[0],a.sourceSpan))}let n=this._peek.sourceSpan.fullStart,i=new Mt(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new Mt(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new ch(t.parts[0],r,[],i,t.sourceSpan,s);this._pushContainer(o,!1),this._popContainer(null,ch,null),this.errors.push(fi.create(t.parts[0],i,`Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(t){let r=t.parts[0],n,i;if(this._peek.type!==31){this.errors.push(fi.create(t.parts[0],t.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(fi.create(t.parts[0],t.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else i=this._advance();let s=i.sourceSpan.fullStart,o=new Mt(t.sourceSpan.start,s,t.sourceSpan.fullStart),a=t.sourceSpan.toString().lastIndexOf(r),l=t.sourceSpan.start.moveBy(a),u=new Mt(l,t.sourceSpan.end),c=new AI(r,n.parts[0],o,u,n.sourceSpan);this._addToParent(c)}_consumeIncompleteLet(t){let r=t.parts[0]??"",n=r?` "${r}"`:"";if(r.length>0){let i=t.sourceSpan.toString().lastIndexOf(r),s=t.sourceSpan.start.moveBy(i),o=new Mt(s,t.sourceSpan.end),a=new Mt(t.sourceSpan.start,t.sourceSpan.start.moveBy(0)),l=new AI(r,"",t.sourceSpan,o,a);this._addToParent(l)}this.errors.push(fi.create(t.parts[0],t.sourceSpan,`Incomplete @let declaration${n}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let t=this._containerStack.length-1;t>-1;t--)if(this._containerStack[t]instanceof Ja)return this._containerStack[t];return null}_addToParent(t){let r=this._getContainer();r===null?this.rootNodes.push(t):r.children.push(t)}_getElementFullName(t,r,n){if(t===""&&(t=this.getTagDefinition(r).implicitNamespacePrefix||"",t===""&&n!=null)){let i=y1(n.name)[1];this.getTagDefinition(i).preventNamespaceInheritance||(t=tv(n.name))}return g0(t,r)}};function FI(e,t){return e.length>0&&e[e.length-1]===t}function OI(e,t){return m0[t]!==void 0?m0[t]||e:/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):e}var Z1e=class extends Y1e{constructor(){super(VC)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}},GS=null,exe=()=>(GS||(GS=new Z1e),GS);function II(e,t={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s,tokenizeAngularBlocks:o=!1,tokenizeAngularLetDeclaration:a=!1}=t;return exe().parse(e,"angular-html-parser",{tokenizeExpansionForms:o,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:o,tokenizeLet:a},i,s)}function txe(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var rxe=txe,Hf=3;function nxe(e){let t=e.slice(0,Hf);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(` +`,Hf);if(r===-1)return;let n=e.slice(Hf,r).trim(),i=e.indexOf(` ${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(` -...`,r)),i===-1)return;let o=i+1+jf,a=e.charAt(o+1);if(!/\s?/u.test(a))return;let l=e.slice(0,o);return{type:"front-matter",language:s,explicitLanguage:n,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:l.slice(-jf),raw:l}}function nxe(e){let t=rxe(e);if(!t)return{content:e};let{raw:r}=t;return{frontMatter:t,content:ts(!1,r,/[^\n]/gu," ")+e.slice(r.length)}}var ixe=nxe,gy={attrs:!0,children:!0,cases:!0,expression:!0},ON=new Set(["parent"]),sxe=class op{constructor(t={}){for(let r of new Set([...ON,...Object.keys(t)]))this.setProperty(r,t[r])}setProperty(t,r){if(this[t]!==r){if(t in gy&&(r=r.map(n=>this.createChild(n))),!ON.has(t)){this[t]=r;return}Object.defineProperty(this,t,{value:r,enumerable:!1,configurable:!0})}}map(t){let r;for(let n in gy){let i=this[n];if(i){let s=oxe(i,o=>o.map(t));r!==i&&(r||(r=new op({parent:this.parent})),r.setProperty(n,s))}}if(r)for(let n in this)n in gy||(r[n]=this[n]);return t(r||this)}walk(t){for(let r in gy){let n=this[r];if(n)for(let i=0;i[t.fullName,t.value]))}};function oxe(e,t){let r=e.map(t);return r.some((n,i)=>n!==e[i])?r:e}var axe=[{regex:/^(\[if([^\]]*)\]>)(.*?){try{return[!0,t(s,a).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new Ot(a,l)}]]}})();return{type:"ieConditionalComment",complete:u,children:c,condition:ts(!1,i.trim(),/\s+/gu," "),sourceSpan:e.sourceSpan,startSourceSpan:new Ot(e.sourceSpan.start,a),endSourceSpan:new Ot(l,e.sourceSpan.end)}}function cxe(e,t,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:ts(!1,n.trim(),/\s+/gu," "),sourceSpan:e.sourceSpan}}function hxe(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}var KS=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),dxe=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function fxe(e){if(e.type==="block"){if(e.name=ts(!1,e.name.toLowerCase(),/\s+/gu," ").trim(),e.type="angularControlFlowBlock",!z2(e.parameters)){delete e.parameters;return}for(let t of e.parameters)t.type="angularControlFlowBlockParameter";e.parameters={type:"angularControlFlowBlockParameters",children:e.parameters,sourceSpan:new Ot(e.parameters[0].sourceSpan.start,nm(!1,e.parameters,-1).sourceSpan.end)}}}function pxe(e){e.type==="letDeclaration"&&(e.type="angularLetDeclaration",e.id=e.name,e.init={type:"angularLetDeclarationInitializer",sourceSpan:new Ot(e.valueSpan.start,e.valueSpan.end),value:e.value},delete e.name,delete e.value)}function gxe(e){(e.type==="plural"||e.type==="select")&&(e.clause=e.type,e.type="angularIcuExpression"),e.type==="expansionCase"&&(e.type="angularIcuCase")}function m9(e,t,r){let{name:n,canSelfClose:i=!0,normalizeTagName:s=!1,normalizeAttributeName:o=!1,allowHtmComponentClosingTags:a=!1,isTagNameCaseSensitive:l=!1,shouldParseAsRawText:u}=t,{rootNodes:c,errors:h}=FN(e,{canSelfClose:i,allowHtmComponentClosingTags:a,isTagNameCaseSensitive:l,getTagContentType:u?(...v)=>u(...v)?Xs.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0,tokenizeAngularLetDeclaration:n==="angular"?!0:void 0});if(n==="vue"){if(c.some(C=>C.type==="docType"&&C.value==="html"||C.type==="element"&&C.name.toLowerCase()==="html"))return m9(e,v9,r);let v,E=()=>v??(v=FN(e,{canSelfClose:i,allowHtmComponentClosingTags:a,isTagNameCaseSensitive:l})),D=C=>E().rootNodes.find(({startSourceSpan:w})=>w&&w.start.offset===C.startSourceSpan.start.offset)??C;for(let[C,w]of c.entries()){let{endSourceSpan:A,startSourceSpan:$}=w;if(A===null)h=E().errors,c[C]=D(w);else if(mxe(w,r)){let O=E().errors.find(P=>P.span.start.offset>$.start.offset&&P.span.start.offset0&&NN(h[0]);let d=v=>{let E=v.name.startsWith(":")?v.name.slice(1).split(":")[0]:null,D=v.nameSpan.toString(),C=E!==null&&D.startsWith(`${E}:`),w=C?D.slice(E.length+1):D;v.name=w,v.namespace=E,v.hasExplicitNamespace=C},f=v=>{switch(v.type){case"element":d(v);for(let E of v.attrs)d(E),E.valueSpan?(E.value=E.valueSpan.toString(),/["']/u.test(E.value[0])&&(E.value=E.value.slice(1,-1))):E.value=null;break;case"comment":v.value=v.sourceSpan.toString().slice(4,-3);break;case"text":v.value=v.sourceSpan.toString();break}},p=(v,E)=>{let D=v.toLowerCase();return E(D)?D:v},m=v=>{if(v.type==="element"&&(s&&(!v.namespace||v.namespace===v.tagDefinition.implicitNamespacePrefix||wg(v))&&(v.name=p(v.name,E=>dxe.has(E))),o))for(let E of v.attrs)E.namespace||(E.name=p(E.name,D=>KS.has(v.name)&&(KS.get("*").has(D)||KS.get(v.name).has(D))))},y=v=>{v.sourceSpan&&v.endSourceSpan&&(v.sourceSpan=new Ot(v.sourceSpan.start,v.endSourceSpan.end))},b=v=>{if(v.type==="element"){let E=GC(l?v.name:v.name.toLowerCase());!v.namespace||v.namespace===E.implicitNamespacePrefix||wg(v)?v.tagDefinition=E:v.tagDefinition=GC("")}};return c9(new class extends P1e{visitExpansionCase(v,E){n==="angular"&&this.visitChildren(E,D=>{D(v.expression)})}visit(v){f(v),b(v),m(v),y(v)}},c),c}function mxe(e,t){var r;if(e.type!=="element"||e.name!=="template")return!1;let n=(r=e.attrs.find(i=>i.name==="lang"))==null?void 0:r.value;return!n||h1(t,{language:n})==="html"}function NN(e){let{msg:t,span:{start:r,end:n}}=e;throw txe(t,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:e})}function y9(e,t,r={},n=!0){let{frontMatter:i,content:s}=n?ixe(e):{frontMatter:null,content:e},o=new o9(e,r.filepath),a=new VC(o,0,0,0),l=a.moveBy(e.length),u={type:"root",sourceSpan:new Ot(a,l),children:m9(s,t,r)};if(i){let d=new VC(o,0,0,0),f=d.moveBy(i.raw.length);i.sourceSpan=new Ot(d,f),u.children.unshift(i)}let c=new sxe(u),h=(d,f)=>{let{offset:p}=f,m=ts(!1,e.slice(0,p),/[^\n\r]/gu," "),y=y9(m+d,t,r,!1);y.sourceSpan=new Ot(f,nm(!1,y.children,-1).sourceSpan.end);let b=y.children[0];return b.length===p?y.children.shift():(b.sourceSpan=new Ot(b.sourceSpan.start.moveBy(p),b.sourceSpan.end),b.value=b.value.slice(p)),y};return c.walk(d=>{if(d.type==="comment"){let f=lxe(d,h);f&&d.parent.replaceChild(d,f)}fxe(d),pxe(d),gxe(d)}),c}function b1(e){return{parse:(t,r)=>y9(t,e,r),hasPragma:Rbe,astFormat:"html",locStart:p1,locEnd:g1}}var v9={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},yxe=b1(v9),vxe=b1({name:"angular"}),bxe=b1({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(e,t,r,n){return e.toLowerCase()!=="html"&&!r&&(e!=="template"||n.some(({name:i,value:s})=>i==="lang"&&s!=="html"&&s!==""&&s!==void 0))}}),xxe=b1({name:"lwc",canSelfClose:!1}),wxe={html:d1e},Sxe=$7;const Dxe=["DBAccordion","DBAccordionItem","DBButton","DBBadge","DBNotification","DBCard","DBCheckbox","DBBrand","DBDrawer","DBDivider","DBHeader","DBInfotext","DBIcon","DBLink","DBInput","DBMainNavigation","DBNavigationItem","DBRadio","DBSection","DBPage","DBSelect","DBTextarea","DBTag"],Exe=[{value:"variant",snippet:'variant=""',meta:"attribute"},{value:"primary",meta:"button-variant"},{value:"outlined",meta:"button-variant"},{value:"solid",meta:"button-variant"},{value:"text",meta:"button-variant"},{value:"primaryVariant",snippet:'variant="brand"',meta:"button-variant"},{value:"outlinedVariant",snippet:'variant="outlined"',meta:"button-variant"},{value:"solidVariant",snippet:'variant="filled"',meta:"button-variant"},{value:"textVariant",snippet:'variant="ghost"',meta:"button-variant"},{value:"adaptive",meta:"semantic-variant"},{value:"informational",meta:"semantic-variant"},{value:"critical",meta:"semantic-variant"},{value:"successful",meta:"semantic-variant"},{value:"warning",meta:"semantic-variant"},{value:"adaptiveVariant",snippet:'variant="adaptive"',meta:"semantic-variant"},{value:"informationalVariant",snippet:'variant="informational"',meta:"semantic-variant"},{value:"criticalVariant",snippet:'variant="critical"',meta:"semantic-variant"},{value:"successfulVariant",snippet:'variant="successful"',meta:"semantic-variant"},{value:"warningVariant",snippet:'variant="warning"',meta:"semantic-variant"}],Cxe=()=>{const e=Dxe.map(r=>({caption:r,value:r})),t=Exe.map(r=>({...r,caption:r.value}));return{getCompletions:(r,n,i,s,o)=>{o(null,[...e,...t].map(a=>({...a,meta:a.meta||"dbux"})))}}},MN=(e,t)=>{const r=e.slice(t.length);return t+r.charAt(0).toUpperCase()+r.slice(1)},Axe=(e,t)=>{const r={};return e&&Object.keys(e).forEach(i=>{if(i==="classname")r.className=e[i];else if(i.startsWith("on"))try{const s=MN(i,"on");r[s]=Function(e[i].replace(/"/g,""))}catch{}else if(i.startsWith("slot"))try{const s=MN(i,"slot");r[s]=J6(e[i],t)}catch{}else r[i]=e[i]}),r},Ar={transform:e=>e.type&&e.type.endsWith&&e.type.endsWith("<")?e.type:e,replace:({name:e,attribs:t,children:r})=>{const n=Axe(t,Ar);if(e==="dbaccordion")return j.jsx(vJ,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbaccordionitem")return j.jsx(I5,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbbutton")return j.jsx(wt,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbbadge")return j.jsx(NE,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbalert")return j.jsx(Rv,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbcard")return j.jsx(Mi,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbcheckbox")return j.jsx(ME,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbbrand")return j.jsx(KK,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbdrawer")return j.jsx($d,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbdivider")return j.jsx(oo,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbheader")return j.jsx(N5,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbinfotext")return j.jsx(ur,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbicon")return j.jsx(Ld,{...n,children:Tr.domToReact(r,Ar)});if(e==="dblink")return j.jsx(Ph,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbinput")return j.jsx(Gr,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbmainnavigation")return j.jsx(R5,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbnavigationitem")return j.jsx(RE,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbradio")return j.jsx(IE,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbsection")return j.jsx(Wg,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbpage")return j.jsx(M5,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbselect")return j.jsx(Iu,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbtextarea")return j.jsx(wp,{...n,children:Tr.domToReact(r,Ar)});if(e==="dbtag")return j.jsx(jv,{...n,children:Tr.domToReact(r,Ar)})}},Txe=[{key:"page",label:"Page",content:`this.createChild(n))),!MI.has(t)){this[t]=r;return}Object.defineProperty(this,t,{value:r,enumerable:!1,configurable:!0})}}map(t){let r;for(let n in gy){let i=this[n];if(i){let s=axe(i,o=>o.map(t));r!==i&&(r||(r=new lp({parent:this.parent})),r.setProperty(n,s))}}if(r)for(let n in this)n in gy||(r[n]=this[n]);return t(r||this)}walk(t){for(let r in gy){let n=this[r];if(n)for(let i=0;i[t.fullName,t.value]))}};function axe(e,t){let r=e.map(t);return r.some((n,i)=>n!==e[i])?r:e}var lxe=[{regex:/^(\[if([^\]]*)\]>)(.*?){try{return[!0,t(s,a).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new Mt(a,l)}]]}})();return{type:"ieConditionalComment",complete:u,children:c,condition:is(!1,i.trim(),/\s+/gu," "),sourceSpan:e.sourceSpan,startSourceSpan:new Mt(e.sourceSpan.start,a),endSourceSpan:new Mt(l,e.sourceSpan.end)}}function hxe(e,t,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:is(!1,n.trim(),/\s+/gu," "),sourceSpan:e.sourceSpan}}function dxe(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}var qS=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),fxe=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function pxe(e){if(e.type==="block"){if(e.name=is(!1,e.name.toLowerCase(),/\s+/gu," ").trim(),e.type="angularControlFlowBlock",!H2(e.parameters)){delete e.parameters;return}for(let t of e.parameters)t.type="angularControlFlowBlockParameter";e.parameters={type:"angularControlFlowBlockParameters",children:e.parameters,sourceSpan:new Mt(e.parameters[0].sourceSpan.start,nm(!1,e.parameters,-1).sourceSpan.end)}}}function gxe(e){e.type==="letDeclaration"&&(e.type="angularLetDeclaration",e.id=e.name,e.init={type:"angularLetDeclarationInitializer",sourceSpan:new Mt(e.valueSpan.start,e.valueSpan.end),value:e.value},delete e.name,delete e.value)}function mxe(e){(e.type==="plural"||e.type==="select")&&(e.clause=e.type,e.type="angularIcuExpression"),e.type==="expansionCase"&&(e.type="angularIcuCase")}function v9(e,t,r){let{name:n,canSelfClose:i=!0,normalizeTagName:s=!1,normalizeAttributeName:o=!1,allowHtmComponentClosingTags:a=!1,isTagNameCaseSensitive:l=!1,shouldParseAsRawText:u}=t,{rootNodes:c,errors:h}=II(e,{canSelfClose:i,allowHtmComponentClosingTags:a,isTagNameCaseSensitive:l,getTagContentType:u?(...v)=>u(...v)?Zs.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0,tokenizeAngularLetDeclaration:n==="angular"?!0:void 0});if(n==="vue"){if(c.some(C=>C.type==="docType"&&C.value==="html"||C.type==="element"&&C.name.toLowerCase()==="html"))return v9(e,x9,r);let v,E=()=>v??(v=II(e,{canSelfClose:i,allowHtmComponentClosingTags:a,isTagNameCaseSensitive:l})),D=C=>E().rootNodes.find(({startSourceSpan:w})=>w&&w.start.offset===C.startSourceSpan.start.offset)??C;for(let[C,w]of c.entries()){let{endSourceSpan:T,startSourceSpan:k}=w;if(T===null)h=E().errors,c[C]=D(w);else if(yxe(w,r)){let O=E().errors.find(P=>P.span.start.offset>k.start.offset&&P.span.start.offset0&&NI(h[0]);let d=v=>{let E=v.name.startsWith(":")?v.name.slice(1).split(":")[0]:null,D=v.nameSpan.toString(),C=E!==null&&D.startsWith(`${E}:`),w=C?D.slice(E.length+1):D;v.name=w,v.namespace=E,v.hasExplicitNamespace=C},f=v=>{switch(v.type){case"element":d(v);for(let E of v.attrs)d(E),E.valueSpan?(E.value=E.valueSpan.toString(),/["']/u.test(E.value[0])&&(E.value=E.value.slice(1,-1))):E.value=null;break;case"comment":v.value=v.sourceSpan.toString().slice(4,-3);break;case"text":v.value=v.sourceSpan.toString();break}},p=(v,E)=>{let D=v.toLowerCase();return E(D)?D:v},m=v=>{if(v.type==="element"&&(s&&(!v.namespace||v.namespace===v.tagDefinition.implicitNamespacePrefix||wg(v))&&(v.name=p(v.name,E=>fxe.has(E))),o))for(let E of v.attrs)E.namespace||(E.name=p(E.name,D=>qS.has(v.name)&&(qS.get("*").has(D)||qS.get(v.name).has(D))))},y=v=>{v.sourceSpan&&v.endSourceSpan&&(v.sourceSpan=new Mt(v.sourceSpan.start,v.endSourceSpan.end))},b=v=>{if(v.type==="element"){let E=VC(l?v.name:v.name.toLowerCase());!v.namespace||v.namespace===E.implicitNamespacePrefix||wg(v)?v.tagDefinition=E:v.tagDefinition=VC("")}};return d9(new class extends F1e{visitExpansionCase(v,E){n==="angular"&&this.visitChildren(E,D=>{D(v.expression)})}visit(v){f(v),b(v),m(v),y(v)}},c),c}function yxe(e,t){var r;if(e.type!=="element"||e.name!=="template")return!1;let n=(r=e.attrs.find(i=>i.name==="lang"))==null?void 0:r.value;return!n||c1(t,{language:n})==="html"}function NI(e){let{msg:t,span:{start:r,end:n}}=e;throw rxe(t,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:e})}function b9(e,t,r={},n=!0){let{frontMatter:i,content:s}=n?sxe(e):{frontMatter:null,content:e},o=new l9(e,r.filepath),a=new WC(o,0,0,0),l=a.moveBy(e.length),u={type:"root",sourceSpan:new Mt(a,l),children:v9(s,t,r)};if(i){let d=new WC(o,0,0,0),f=d.moveBy(i.raw.length);i.sourceSpan=new Mt(d,f),u.children.unshift(i)}let c=new oxe(u),h=(d,f)=>{let{offset:p}=f,m=is(!1,e.slice(0,p),/[^\n\r]/gu," "),y=b9(m+d,t,r,!1);y.sourceSpan=new Mt(f,nm(!1,y.children,-1).sourceSpan.end);let b=y.children[0];return b.length===p?y.children.shift():(b.sourceSpan=new Mt(b.sourceSpan.start.moveBy(p),b.sourceSpan.end),b.value=b.value.slice(p)),y};return c.walk(d=>{if(d.type==="comment"){let f=uxe(d,h);f&&d.parent.replaceChild(d,f)}pxe(d),gxe(d),mxe(d)}),c}function v1(e){return{parse:(t,r)=>b9(t,e,r),hasPragma:Bbe,astFormat:"html",locStart:f1,locEnd:p1}}var x9={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},vxe=v1(x9),bxe=v1({name:"angular"}),xxe=v1({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(e,t,r,n){return e.toLowerCase()!=="html"&&!r&&(e!=="template"||n.some(({name:i,value:s})=>i==="lang"&&s!=="html"&&s!==""&&s!==void 0))}}),wxe=v1({name:"lwc",canSelfClose:!1}),Sxe={html:f1e},Dxe=P7;const Exe=["DBAccordion","DBAccordionItem","DBButton","DBBadge","DBNotification","DBCard","DBCheckbox","DBBrand","DBDrawer","DBDivider","DBHeader","DBInfotext","DBIcon","DBLink","DBInput","DBMainNavigation","DBNavigationItem","DBRadio","DBSection","DBPage","DBSelect","DBTextarea","DBTag"],Cxe=[{value:"variant",snippet:'variant=""',meta:"attribute"},{value:"primary",meta:"button-variant"},{value:"outlined",meta:"button-variant"},{value:"solid",meta:"button-variant"},{value:"text",meta:"button-variant"},{value:"primaryVariant",snippet:'variant="brand"',meta:"button-variant"},{value:"outlinedVariant",snippet:'variant="outlined"',meta:"button-variant"},{value:"solidVariant",snippet:'variant="filled"',meta:"button-variant"},{value:"textVariant",snippet:'variant="ghost"',meta:"button-variant"},{value:"adaptive",meta:"semantic-variant"},{value:"informational",meta:"semantic-variant"},{value:"critical",meta:"semantic-variant"},{value:"successful",meta:"semantic-variant"},{value:"warning",meta:"semantic-variant"},{value:"adaptiveVariant",snippet:'variant="adaptive"',meta:"semantic-variant"},{value:"informationalVariant",snippet:'variant="informational"',meta:"semantic-variant"},{value:"criticalVariant",snippet:'variant="critical"',meta:"semantic-variant"},{value:"successfulVariant",snippet:'variant="successful"',meta:"semantic-variant"},{value:"warningVariant",snippet:'variant="warning"',meta:"semantic-variant"}],Txe=()=>{const e=Exe.map(r=>({caption:r,value:r})),t=Cxe.map(r=>({...r,caption:r.value}));return{getCompletions:(r,n,i,s,o)=>{o(null,[...e,...t].map(a=>({...a,meta:a.meta||"dbux"})))}}},RI=(e,t)=>{const r=e.slice(t.length);return t+r.charAt(0).toUpperCase()+r.slice(1)},Axe=(e,t)=>{const r={};return e&&Object.keys(e).forEach(i=>{if(i==="classname")r.className=e[i];else if(i.startsWith("on"))try{const s=RI(i,"on");r[s]=Function(e[i].replace(/"/g,""))}catch{}else if(i.startsWith("slot"))try{const s=RI(i,"slot");r[s]=Y6(e[i],t)}catch{}else r[i]=e[i]}),r},_r={transform:e=>e.type&&e.type.endsWith&&e.type.endsWith("<")?e.type:e,replace:({name:e,attribs:t,children:r})=>{const n=Axe(t,_r);if(e==="dbaccordion")return j.jsx(xJ,{...n,children:$r.domToReact(r,_r)});if(e==="dbaccordionitem")return j.jsx(B5,{...n,children:$r.domToReact(r,_r)});if(e==="dbbutton")return j.jsx(Dt,{...n,children:$r.domToReact(r,_r)});if(e==="dbbadge")return j.jsx(OE,{...n,children:$r.domToReact(r,_r)});if(e==="dbalert")return j.jsx(Nv,{...n,children:$r.domToReact(r,_r)});if(e==="dbcard")return j.jsx(Bi,{...n,children:$r.domToReact(r,_r)});if(e==="dbcheckbox")return j.jsx(IE,{...n,children:$r.domToReact(r,_r)});if(e==="dbbrand")return j.jsx(XK,{...n,children:$r.domToReact(r,_r)});if(e==="dbdrawer")return j.jsx(Pd,{...n,children:$r.domToReact(r,_r)});if(e==="dbdivider")return j.jsx(uo,{...n,children:$r.domToReact(r,_r)});if(e==="dbheader")return j.jsx(N5,{...n,children:$r.domToReact(r,_r)});if(e==="dbinfotext")return j.jsx(dr,{...n,children:$r.domToReact(r,_r)});if(e==="dbicon")return j.jsx(Fd,{...n,children:$r.domToReact(r,_r)});if(e==="dblink")return j.jsx(Oh,{...n,children:$r.domToReact(r,_r)});if(e==="dbinput")return j.jsx(Kr,{...n,children:$r.domToReact(r,_r)});if(e==="dbmainnavigation")return j.jsx(j5,{...n,children:$r.domToReact(r,_r)});if(e==="dbnavigationitem")return j.jsx(NE,{...n,children:$r.domToReact(r,_r)});if(e==="dbradio")return j.jsx(ME,{...n,children:$r.domToReact(r,_r)});if(e==="dbsection")return j.jsx(Wg,{...n,children:$r.domToReact(r,_r)});if(e==="dbpage")return j.jsx(R5,{...n,children:$r.domToReact(r,_r)});if(e==="dbselect")return j.jsx(Bu,{...n,children:$r.domToReact(r,_r)});if(e==="dbtextarea")return j.jsx(Dp,{...n,children:$r.domToReact(r,_r)});if(e==="dbtag")return j.jsx(Bv,{...n,children:$r.domToReact(r,_r)})}},kxe=[{key:"page",label:"Page",content:` -`}],Dg=e=>e.startsWith("data:image")?e:`${Ab}/assets/images/${e||"peace-in-a-box.svg"}`,b9=e=>vt.valid(e),kxe=e=>vt.valid(e)?vt.hex(e).luminance():-1,hl=(e=Ji,t=Ji)=>vt.valid(e)&&vt.valid(t)?vt.contrast(e,t):-1,Mr=(e,t,r)=>{try{return e.replace(/-/g," ").split(" ").map((n,i)=>(t&&i===0?n[0]:n[0].toUpperCase())+n.substring(1,n.length)).join(r||"")}catch(n){console.error(n)}return"ERROR"},x1=({name:e,children:t,actionBar:r,className:n,density:i,navigation:s,withDevMode:o})=>{const{t:a}=Yt(),{theme:l,darkMode:u,developerMode:c}=tr(f=>f),[h,d]=z.useState();return j.jsx("div",{className:"contents","data-density":i||"regular","data-color-scheme":u?"dark":"light",children:j.jsx(M5,{className:n,variant:"fixed","data-color":"neutral-bg-basic-level-1",header:j.jsx(N5,{drawerOpen:h,onToggle:()=>d(!h),brand:j.jsxs("div",{className:"db-brand",children:[j.jsx(hb,{to:"/",children:j.jsx("img",{className:"logo",src:Dg(u&&l.branding.image.dark?l.branding.image.dark:l.branding.image.light),alt:"brand"})}),e]}),secondaryAction:r,primaryAction:j.jsxs("div",{className:"flex gap-fix-sm",children:[o&&j.jsxs(wt,{className:c?"":"opacity-0",icon:"wrench",variant:"ghost",noText:!0,onClick:()=>tr.setState({developerMode:!c}),children:["Developer Mode",j.jsx(gs,{placement:"bottom",children:a(c?"disableDevMode":"enableDevMode")})]}),j.jsxs(wt,{variant:"ghost",icon:u?"sun":"moon",noText:!0,className:"p-0 w-siz-md",onClick:()=>{tr.setState({darkMode:!u})},children:[u?"🌞":"🌛",j.jsx(gs,{placement:"left",children:a(u?"enableLightMode":"enableDarkMode")})]})]}),children:s}),children:t})})},_xe=()=>{const{t:e}=Yt(),{editorMarkup:t}=tr(n=>n);z.useEffect(()=>{poe.require("ace/ext/language_tools").addCompleter(Cxe())},[]);const r=async()=>{const n=await t2(t,{parser:"babel",plugins:[mde,Cve,Sxe],semi:!1});tr.setState({editorMarkup:n.replace(/\n$/,"").replace(";","")})};return j.jsx(x1,{name:e("editor"),children:j.jsxs("div",{className:"editor w-full h-full grid grid-cols-2 gap-fix-xs p-fix-xs",children:[j.jsxs("div",{className:"flex flex-col gap-fix-xs",children:[j.jsx(Mae,{mode:"html",theme:"dracula",onChange:n=>tr.setState({editorMarkup:n}),name:"ace-editor",value:t||"",fontSize:16,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,height:"100%",width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showLineNumbers:!0,useWorker:!1}}),j.jsxs("div",{className:"flex flex-wrap db-density-functional gap-fix-xs",children:[j.jsx(wt,{icon:"grid_view",onClick:()=>r(),children:e("formatCode")}),j.jsx(oo,{variant:"vertical"}),Txe.map(n=>j.jsxs(wt,{icon:"copy",onClick:()=>{navigator.clipboard.writeText(n.content||""),tr.setState({notification:`${n.label} Template copied`})},children:[n.label," Template"]},n.key))]})]}),j.jsx(Mi,{className:"rounded-none h-full overflow-auto",children:J6(t,Ar)})]})})},$xe=(e,t)=>{const r=b9(t)?t:Ji,n=e.at(0),i=e.at(-3),s=hl(r,n==null?void 0:n.hex)<3,o=hl(r,i==null?void 0:i.hex)<3;return{originBgDark:(n==null?void 0:n.hex)??Ji,originBgLight:(i==null?void 0:i.hex)??Ji,originLightAlternative:o?eF(e,!1,i):t,originDarkAlternative:s?eF(e,!0,n):t}},Ka=10,JC=(e,t,r)=>{let n=new Fe;n.hex=e,n.hexToHsluv();const i=n.hsluv_l;n.hsluvToHex(),n.hex=r??e,n.hexToHsluv();let s,o;t?i<=80?(s=i+Ka,o=i+Ka*2):(s=i-Ka,o=i-Ka*2):i>=20?(s=i-Ka,o=i-Ka*2):(s=i+Ka,o=i+Ka*2),n.hsluv_l=s,n.hsluvToHex();const a=n.hex;n=new Fe,n.hex=r??e,n.hexToHsluv(),n.hsluv_l=o,n.hsluvToHex();const l=n.hex;return{hoverColor:a,pressedColor:l}},IN=98,RN=2,JS=(e,t,r)=>{if(hl(e,t)<4.5){const n=new Fe;return n.hex=e,n.hexToHsluv(),n.hsluv_l=r,n.hsluvToHex(),n.hex}},b0=(e,t,r)=>{const n=t?RN:IN,i=t?IN:RN,s=t?99:1,o=t?100:0;let a=new Fe;a.hex=e,a.hexToHsluv(),a.hsluv_l=n,a.hsluvToHex();let l=a.hex;const u=JS(e,l,i);if(u){l=u;const d=JS(e,l,s);if(d){l=d;const f=JS(e,l,o);f&&(l=f)}}const c=r??l,h=hl(e,c);return{onOrigin:c,onOriginAlternative:l,onOriginAccessible:h===1||h>=4.5,...JC(c,t,e)}},Lxe=(e,t,r,n)=>{const i=bk(e,t,r),{originLightAlternative:s,originDarkAlternative:o,originBgLight:a,originBgDark:l}=$xe(i,n),{hoverColor:u,pressedColor:c}=JC(n,!1),{hoverColor:h,pressedColor:d}=JC(n,!0);return{origin:t,originBgLight:a,originBgDark:l,originLight:n,originLightAlternative:s,originLightAccessible:n===s,originLightHovered:u,originLightPressed:c,originDark:n,originDarkAlternative:o,originDarkAccessible:n===o,originDarkHovered:h,originDarkPressed:d}},my=(e,t,r,n)=>{const i=n??t,{onOrigin:s,hoverColor:o,pressedColor:a,onOriginAccessible:l,onOriginAlternative:u}=b0(i,!1),{onOrigin:c,hoverColor:h,pressedColor:d,onOriginAccessible:f,onOriginAlternative:p}=b0(i,!0);return{...Lxe(e,t,r,i),onOriginLight:s,onOriginLightHovered:o,onOriginLightPressed:a,onOriginLightAccessible:l,onOriginLightAlternative:u,onOriginDark:c,onOriginDarkHovered:h,onOriginDarkPressed:d,onOriginDarkAccessible:f,onOriginDarkAlternative:p}},zf=({name:e,color:t,onColorChange:r,error:n,alternative:i,contrast:s,contrastMin:o})=>{const{t:a}=Yt();return j.jsxs(j.Fragment,{children:[j.jsx(oo,{}),j.jsx("p",{className:"font-bold",children:e}),s&&j.jsxs(ur,{semantic:s<(o??3)?"critical":"successful",size:"small",children:[s.toFixed(2),":1"]}),j.jsxs("div",{className:"grid grid-cols-2 gap-fix-md",children:[j.jsx(Gr,{label:a("colorInputPicker"),type:"color",value:t,onChange:l=>{r(l.target.value)}}),j.jsx(Gr,{label:a("colorInputHex"),placeholder:a("colorInputHex"),value:t,onChange:l=>{r(l.target.value)}})]}),n&&j.jsx(ur,{semantic:"warning",children:a(n)}),i&&j.jsxs("div",{className:"grid grid-cols-2 gap-fix-md",children:[j.jsx("div",{className:"w-full h-full text-[0]",style:{backgroundColor:i},children:i}),j.jsx(wt,{onClick:()=>{r(i)},children:a("overwrite")})]})]})},Qo=({label:e,color:t,setOriginColor:r,onAddColor:n,onDelete:i,isAddColor:s,customColor:o})=>{var C,w;const{t:a}=Yt(),[l,u]=z.useState(t),[c,h]=z.useState(),[d,f]=z.useState(!0),[p,m]=z.useState(s?"":e),{theme:y,setCustomColors:b,luminanceSteps:v}=tr(A=>A),E=z.useCallback(()=>(s?l:t).origin,[s,l,t]),D=z.useCallback(()=>{if(!s)return!t.originDarkAccessible||!t.originLightAccessible?"exclamation_mark_triangle":!t.onOriginDarkAccessible||!t.onOriginLightAccessible?"exclamation_mark_circle":void 0},[s,t]);return j.jsx("div",{className:"color-picker-container",children:j.jsxs("div",{className:"color-input-container",children:[j.jsx(jv,{children:j.jsxs("button",{className:"color-tag","data-icon":s?"plus":void 0,"data-icon-after":D(),style:s?{}:{"--db-current-origin-color":t.origin,"--db-adaptive-bg-basic-level-3-default":`var(--db-${e.toLowerCase()}-bg-basic-level-3-default)`,"--db-adaptive-bg-basic-level-3-hovered":`var(--db-${e.toLowerCase()}-bg-basic-level-3-hovered)`,"--db-adaptive-bg-basic-level-3-pressed":`var(--db-${e.toLowerCase()}-bg-basic-level-3-pressed)`,"--db-adaptive-on-bg-basic-emphasis-60-default":`var(--db-${e.toLowerCase()}-on-bg-basic-emphasis-60-default)`},onClick:()=>h(!0),children:[a(e),!s&&j.jsx(gs,{placement:"bottom",className:"db-neutral-bg-basic-level-1",children:a("adaptColor")})]})}),j.jsx($d,{backdrop:"weak",open:c,onClose:()=>h(!1),drawerHeader:a("editColor",{colorName:p}),children:j.jsxs("div",{className:"flex flex-col gap-fix-sm mt-fix-md overflow-y-auto",children:[j.jsx(Gr,{id:`input-${p}`,label:a("colorName"),required:!0,value:p,disabled:!o,customValidity:o&&((C=y.customColors)!=null&&C[p])&&e!==p?"invalid":"no-validation",message:o&&((w=y.customColors)!=null&&w[p])&&e!==p?a("customColorExists"):void 0,pattern:"[a-zA-Z0-9\\-_]+",onChange:A=>{m(A.target.value),f(A.target.validity.valid)}}),j.jsx(zf,{name:"origin",color:E(),onColorChange:A=>{s?u(my(p,A,v)):r&&r(my(p,A,v))}}),!s&&j.jsxs(j.Fragment,{children:[j.jsx(zf,{name:"origin-light",color:t.originLight??Ji,alternative:t.originLightAccessible?void 0:t.originLightAlternative,error:t.originLightAccessible?void 0:"accessibilityCritical",contrast:hl(t.originLight,t.originBgLight),onColorChange:A=>{if(r){const{originLight:$,originLightAccessible:O,originLightPressed:P,originLightHovered:N,onOriginLight:F,onOriginLightHovered:L,onOriginLightPressed:k,onOriginLightAccessible:T,onOriginLightAlternative:M,originLightAlternative:R}=my(p,t.origin,v,A);r({...t,originLight:$,originLightAccessible:O,originLightAlternative:R,originLightPressed:P,originLightHovered:N,onOriginLight:F,onOriginLightHovered:L,onOriginLightPressed:k,onOriginLightAccessible:T,onOriginLightAlternative:M})}}}),j.jsx(zf,{name:"on-origin-light",color:t.onOriginLight??Ji,alternative:t.onOriginLightAccessible?void 0:t.onOriginLightAlternative,error:t.onOriginLightAccessible?void 0:"accessibilityCritical",contrastMin:4.5,contrast:hl(t.originLight,t.onOriginLight),onColorChange:A=>{if(r){const{onOrigin:$,onOriginAccessible:O,onOriginAlternative:P,hoverColor:N,pressedColor:F}=b0(t.originLight??Ji,!1,A);r({...t,onOriginLight:$,onOriginLightHovered:N,onOriginLightPressed:F,onOriginLightAccessible:O,onOriginLightAlternative:P})}}}),j.jsx(zf,{name:"origin-dark",color:t.originDark??Ji,alternative:t.originDarkAccessible?void 0:t.originDarkAlternative,error:t.originDarkAccessible?void 0:"accessibilityCritical",contrast:hl(t.originDark,t.originBgDark),onColorChange:A=>{if(r){const{originDark:$,originDarkAccessible:O,originDarkAlternative:P,originDarkPressed:N,originDarkHovered:F,onOriginDark:L,onOriginDarkHovered:k,onOriginDarkPressed:T,onOriginDarkAccessible:M,onOriginDarkAlternative:R}=my(p,t.origin,v,A);r({...t,originDark:$,originDarkAccessible:O,originDarkAlternative:P,originDarkPressed:N,originDarkHovered:F,onOriginDark:L,onOriginDarkHovered:k,onOriginDarkPressed:T,onOriginDarkAccessible:M,onOriginDarkAlternative:R})}}}),j.jsx(zf,{name:"on-origin-dark",contrastMin:4.5,color:t.onOriginDark??Ji,alternative:t.onOriginDarkAccessible?void 0:t.onOriginDarkAlternative,error:t.onOriginDarkAccessible?void 0:"accessibilityCritical",contrast:hl(t.originDark,t.onOriginDark),onColorChange:A=>{if(r){const{onOrigin:$,onOriginAccessible:O,onOriginAlternative:P,hoverColor:N,pressedColor:F}=b0(t.originDark??Ji,!0,A);r({...t,onOriginDark:$,onOriginDarkHovered:N,onOriginDarkPressed:F,onOriginDarkAccessible:O,onOriginDarkAlternative:P})}}})]}),o&&j.jsxs(j.Fragment,{children:[j.jsx(oo,{}),j.jsxs("div",{className:"ml-auto flex gap-fix-md",children:[!s&&j.jsx(wt,{icon:"bin",onClick:()=>{i&&i()},children:a("deleteColor")}),j.jsx(wt,{className:"ml-auto",variant:"brand",disabled:p.length===0||e===p||!d,onClick:()=>{if(s)h(!1),n&&n(p,l),u({origin:"#ffffff"}),m("");else if(y.customColors){const A={};Object.keys(y.customColors).forEach($=>{var O,P,N;(O=y.customColors)!=null&&O[$]&&($===e?A[p]=(P=y.customColors)==null?void 0:P[$]:A[$]=(N=y.customColors)==null?void 0:N[$])}),b(A)}},children:a(s?"addColor":"changeColor")})]})]})]})})]})})},Pxe=()=>{const{t:e}=Yt(),{setColors:t,theme:r,setAdditionalColors:n,setCustomColors:i}=tr(s=>s);return j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("colors")}),j.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[j.jsx(Qo,{color:r.colors.neutral,label:"Neutral",setOriginColor:s=>t({...r.colors,neutral:s})}),j.jsx(Qo,{color:r.colors.brand,label:"brand",setOriginColor:s=>{t({...r.colors,brand:s})}}),j.jsx(Qo,{color:r.colors.informational,label:"Informational",setOriginColor:s=>t({...r.colors,informational:s})}),j.jsx(Qo,{color:r.colors.successful,label:"Successful",setOriginColor:s=>t({...r.colors,successful:s})}),j.jsx(Qo,{color:r.colors.warning,label:"Warning",setOriginColor:s=>t({...r.colors,warning:s})}),j.jsx(Qo,{color:r.colors.critical,label:"Critical",setOriginColor:s=>t({...r.colors,critical:s})})]})]}),j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("additional-colors")}),j.jsx("div",{className:"flex flex-wrap gap-fix-xs",children:Object.entries(r.additionalColors).map(([s,o])=>j.jsx(Qo,{color:o,label:s,setOriginColor:a=>{n({...r.additionalColors,[s]:a})}},s))})]}),j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("custom")}),j.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[j.jsx(Qo,{color:{origin:"#ffffff"},label:e("addColor"),onAddColor:(s,o)=>{i({...r.customColors,[s]:o})},customColor:!0,isAddColor:!0}),r.customColors&&Object.entries(r.customColors).map(([s,o])=>j.jsx(Qo,{color:o,label:s,setOriginColor:a=>{i({...r.customColors,[s]:a})},customColor:!0,onDelete:()=>{const a={...r.customColors};delete a[s],i(a)}},s))]})]})]})},ch=["adaptive","neutral","critical","informational","warning","successful"],XS=e=>e.charAt(0).toUpperCase()+e.slice(1),Fxe=[{title:"Button",component:j.jsx("div",{className:"grid grid-cols-5 gap-fix-sm items-center",children:["outlined","filled","ghost","brand"].map(e=>j.jsxs(z.Fragment,{children:[j.jsxs("h6",{children:[XS(e),":"]}),j.jsx(wt,{variant:e,children:"Default"}),j.jsx(wt,{variant:e,icon:"person",children:"Icon"}),j.jsx(wt,{variant:e,disabled:!0,children:"Disabled"}),j.jsx(wt,{variant:e,size:"small",children:"Small"})]},`button-${e}`))})},{title:"Link",component:j.jsxs(z.Fragment,{children:[j.jsx(Ph,{href:"#",children:"Text Link"}),j.jsx(Ph,{href:"#",variant:"brand",children:"Brand Text Link"}),j.jsx(Ph,{href:"#",disabled:!0,children:"Disabled Link"}),j.jsx(Ph,{href:"#",size:"small",children:"Small Link"})]})},{title:"Infotext",component:j.jsxs(z.Fragment,{children:[ch.map(e=>j.jsx(ur,{semantic:e,children:XS(e)},`infotext-${e}`)),j.jsx(ur,{size:"small",children:"Small"})]})},{title:"Tag",component:j.jsxs(z.Fragment,{children:[j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Weak:"}),ch.map(e=>j.jsxs(jv,{semantic:e,children:["Tag ",e]},`tag-${e}`))]}),j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Strong:"}),ch.map(e=>j.jsxs(jv,{semantic:e,emphasis:"strong",children:["Tag ",e]},`tag-strong-${e}`))]})]})},{title:"Badge",component:j.jsxs(z.Fragment,{children:[j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Weak:"}),ch.map(e=>j.jsxs(NE,{semantic:e,children:["Badge ",e]},`badge-${e}`))]}),j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Strong:"}),ch.map(e=>j.jsxs(NE,{semantic:e,emphasis:"strong",children:["Badge ",e]},`badge-strong-${e}`))]})]})},{title:"Notification",component:j.jsxs(z.Fragment,{children:[ch.map(e=>j.jsx(Rv,{semantic:e,variant:"standalone",headline:"Variant",linkVariant:"inline",link:j.jsx("a",{href:"#",children:"Link"}),children:XS(e)},`alert-component-${e}`)),j.jsx(Rv,{variant:"docked",icon:"person",headline:"Type",linkVariant:"inline",link:j.jsx("a",{href:"#",children:"Link"}),children:"Docked"})]})},{title:"Input",component:j.jsxs(z.Fragment,{children:[j.jsx(Gr,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),j.jsx(Gr,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),j.jsx(Gr,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Checkbox",component:j.jsxs(z.Fragment,{children:[j.jsx(ME,{name:"checkbox",children:"Checkbox"}),j.jsx(ME,{name:"checkbox",required:!0,children:"Checkbox required"})]})},{title:"Radio",component:j.jsxs(z.Fragment,{children:[j.jsx(IE,{name:"radio",children:"Radio"}),j.jsx(IE,{name:"radio",required:!0,children:"Radio required"})]})},{title:"Select",component:j.jsxs(z.Fragment,{children:[j.jsxs(Iu,{variant:"floating",label:"Select",placeholder:"Select",message:"Select Message",disabled:!0,children:[j.jsx("option",{children:"Option1"}),j.jsx("option",{children:"Option2"})]}),j.jsxs(Iu,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0,children:[j.jsx("option",{children:"Option1"}),j.jsx("option",{children:"Option2"})]}),j.jsxs(Iu,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0,children:[j.jsx("option",{children:"Option1"}),j.jsx("option",{children:"Option2"})]})]})},{title:"Textarea",component:j.jsxs(z.Fragment,{children:[j.jsx(wp,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),j.jsx(wp,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),j.jsx(wp,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Divider",component:j.jsxs(z.Fragment,{children:[j.jsx(oo,{}),j.jsx(oo,{emphasis:"strong"})]})}],Oxe=()=>{const[e,t]=z.useState(""),{t:r}=Yt();return j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx(Gr,{variant:"floating",label:r("search"),placeholder:r("search"),type:"search",onChange:n=>t(n.target.value)}),j.jsx("div",{className:"grid gap-fix-sm",children:Fxe.map(n=>n.title.toLowerCase().includes(e.toLowerCase())?j.jsx(Mi,{spacing:"small",children:j.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[j.jsx("h5",{children:n.title}),j.jsx("div",{className:"flex flex-wrap gap-fix-sm items-center",children:n.component})]})},`component-list-${n.title}`):null)})]})},BN=({hue:e,hex:t,saturation:r,luminance:n,children:i,index:s,hideText:o})=>j.jsxs("div",{className:"palette-box gap-fix-md",style:{backgroundColor:t,color:kxe(t)<.4?"#fff":"#000","--color-index":s},children:[i,!o&&j.jsxs("div",{className:"flex flex-col",children:[j.jsxs("span",{className:"whitespace-nowrap",children:["hex: ",t]}),j.jsxs("span",{className:"whitespace-nowrap",children:["hsl: ",Math.round(e),"/",Math.round(r),"/",Math.round(n)]})]})]}),Nxe=()=>{const{luminanceSteps:e,developerMode:t,theme:r}=tr(o=>o),{t:n}=Yt(),[i,s]=z.useState({});return z.useEffect(()=>{s({...r.colors,...r.additionalColors,...r.customColors})},[r]),j.jsxs("div",{className:"flex flex-col",children:[t&&j.jsx(Gr,{label:n("luminanceSteps"),value:e,onChange:o=>{const a=o.target.value.split(",").map(l=>Number(l||0));tr.setState({luminanceSteps:a})}}),j.jsxs("div",{className:"flex gap-fix-2xs",children:[j.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[j.jsx("div",{className:"py-fix-sm",children:j.jsx("span",{className:"font-bold invisible",children:"Palette"})}),e.map((o,a)=>j.jsx("div",{className:"flex items-center",children:j.jsx("span",{className:"font-bold whitespace-nowrap pr-fix-xs md:pr-fix-lg",children:a})},`luminance-step-${o}`))]}),Object.entries(i).filter(([,o])=>b9(o.origin)).map(([o,a],l)=>{const u=bk(o,a.origin,e);return j.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[j.jsx("div",{className:"py-fix-sm",children:j.jsx("span",{className:"font-bold",children:o})}),u.map(({hex:c,hue:h,saturation:d,luminance:f},p)=>j.jsx(z.Fragment,{children:j.jsx(wJ,{style:{"--color-index":p},placement:l>3?"left-start":"right-start",trigger:j.jsx(BN,{hex:c,hue:h,saturation:d,luminance:f,index:p}),children:j.jsx("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:u.map((m,y)=>j.jsx(z.Fragment,{children:j.jsx(BN,{hex:m.hex,hue:m.hue,saturation:m.saturation,luminance:m.luminance,hideText:!0,children:j.jsx("span",{className:"m-auto",children:vt.contrast(vt.hex(c),vt.hex(m.hex)).toFixed(2)})})},`popover-${o}-${m.hex}-${y}`))})})},`${o}-${c}-${p}`))]},`${o}-header`)})]})]})},x0=z.memo(({label:e,accept:t,onUpload:r,size:n,variant:i,noText:s,tooltip:o})=>{const{t:a}=Yt();return j.jsxs("label",{className:"upload-button relative","data-icon":"upload","data-size":n,"data-variant":i,"data-no-text":s,children:[a(e),j.jsx("input",{type:"file",accept:t,className:"absolute w-full h-full",title:"",onChange:l=>{const u=l.target.files;if(u&&u.length>0){const c=new FileReader;c.addEventListener("load",()=>{r(c.result)},!1),c.readAsDataURL(u[0])}}}),o&&j.jsx(gs,{placement:"bottom",children:a(o)})]})});var x9={exports:{}};(function(e,t){var r={};/*! +`}],Dg=e=>e.startsWith("data:image")?e:`${Cb}/assets/images/${e||"peace-in-a-box.svg"}`,w9=e=>bt.valid(e),_xe=e=>bt.valid(e)?bt.hex(e).luminance():-1,fl=(e=Qi,t=Qi)=>bt.valid(e)&&bt.valid(t)?bt.contrast(e,t):-1,sn=(e,t,r)=>{try{return e.replace(/-/g," ").split(" ").map((n,i)=>(t&&i===0?n[0]:n[0].toUpperCase())+n.substring(1,n.length)).join(r||"")}catch(n){console.error(n)}return"ERROR"},b1=({name:e,children:t,actionBar:r,className:n,density:i,navigation:s,withDevMode:o})=>{const{t:a}=er(),{theme:l,darkMode:u,developerMode:c}=ir(f=>f),[h,d]=z.useState();return j.jsx("div",{className:"contents","data-density":i||"regular","data-color-scheme":u?"dark":"light",children:j.jsx(R5,{className:n,variant:"fixed","data-color":"neutral-bg-basic-level-1",header:j.jsx(N5,{drawerOpen:h,onToggle:()=>d(!h),brand:j.jsxs("div",{className:"db-brand",children:[j.jsx(cb,{to:"/",children:j.jsx("img",{className:"logo",src:Dg(u&&l.branding.image.dark?l.branding.image.dark:l.branding.image.light),alt:"brand"})}),e]}),secondaryAction:r,primaryAction:j.jsxs("div",{className:"flex gap-fix-sm",children:[o&&j.jsxs(Dt,{className:c?"":"opacity-0",icon:"wrench",variant:"ghost",noText:!0,onClick:()=>ir.setState({developerMode:!c}),children:["Developer Mode",j.jsx(vs,{placement:"bottom",children:a(c?"disableDevMode":"enableDevMode")})]}),j.jsxs(Dt,{variant:"ghost",icon:u?"sun":"moon",noText:!0,className:"p-0 w-siz-md",onClick:()=>{ir.setState({darkMode:!u})},children:[u?"🌞":"🌛",j.jsx(vs,{placement:"left",children:a(u?"enableLightMode":"enableDarkMode")})]})]}),children:s}),children:t})})},$xe=()=>{const{t:e}=er(),{editorMarkup:t}=ir(n=>n);z.useEffect(()=>{goe.require("ace/ext/language_tools").addCompleter(Txe())},[]);const r=async()=>{const n=await r2(t,{parser:"babel",plugins:[yde,Tve,Dxe],semi:!1});ir.setState({editorMarkup:n.replace(/\n$/,"").replace(";","")})};return j.jsx(b1,{name:e("editor"),children:j.jsxs("div",{className:"editor w-full h-full grid grid-cols-2 gap-fix-xs p-fix-xs",children:[j.jsxs("div",{className:"flex flex-col gap-fix-xs",children:[j.jsx(Nae,{mode:"html",theme:"dracula",onChange:n=>ir.setState({editorMarkup:n}),name:"ace-editor",value:t||"",fontSize:16,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,height:"100%",width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showLineNumbers:!0,useWorker:!1}}),j.jsxs("div",{className:"flex flex-wrap db-density-functional gap-fix-xs",children:[j.jsx(Dt,{icon:"grid_view",onClick:()=>r(),children:e("formatCode")}),j.jsx(uo,{variant:"vertical"}),kxe.map(n=>j.jsxs(Dt,{icon:"copy",onClick:()=>{navigator.clipboard.writeText(n.content||""),ir.setState({notification:`${n.label} Template copied`})},children:[n.label," Template"]},n.key))]})]}),j.jsx(Bi,{className:"rounded-none h-full overflow-auto",children:Y6(t,_r)})]})})},Lxe=(e,t)=>{const r=w9(t)?t:Qi,n=e.at(0),i=e.at(-3),s=fl(r,n==null?void 0:n.hex)<3,o=fl(r,i==null?void 0:i.hex)<3;return{originBgDark:(n==null?void 0:n.hex)??Qi,originBgLight:(i==null?void 0:i.hex)??Qi,originLightAlternative:o?rF(e,!1,i):t,originDarkAlternative:s?rF(e,!0,n):t}},Xa=10,KC=(e,t,r)=>{let n=new Fe;n.hex=e,n.hexToHsluv();const i=n.hsluv_l;n.hsluvToHex(),n.hex=r??e,n.hexToHsluv();let s,o;t?i<=80?(s=i+Xa,o=i+Xa*2):(s=i-Xa,o=i-Xa*2):i>=20?(s=i-Xa,o=i-Xa*2):(s=i+Xa,o=i+Xa*2),n.hsluv_l=s,n.hsluvToHex();const a=n.hex;n=new Fe,n.hex=r??e,n.hexToHsluv(),n.hsluv_l=o,n.hsluvToHex();const l=n.hex;return{hoverColor:a,pressedColor:l}},BI=98,jI=2,KS=(e,t,r)=>{if(fl(e,t)<4.5){const n=new Fe;return n.hex=e,n.hexToHsluv(),n.hsluv_l=r,n.hsluvToHex(),n.hex}},v0=(e,t,r)=>{const n=t?jI:BI,i=t?BI:jI,s=t?99:1,o=t?100:0;let a=new Fe;a.hex=e,a.hexToHsluv(),a.hsluv_l=n,a.hsluvToHex();let l=a.hex;const u=KS(e,l,i);if(u){l=u;const d=KS(e,l,s);if(d){l=d;const f=KS(e,l,o);f&&(l=f)}}const c=r??l,h=fl(e,c);return{onOrigin:c,onOriginAlternative:l,onOriginAccessible:h===1||h>=4.5,...KC(c,t,e)}},Pxe=(e,t,r,n)=>{const i=xk(e,t,r),{originLightAlternative:s,originDarkAlternative:o,originBgLight:a,originBgDark:l}=Lxe(i,n),{hoverColor:u,pressedColor:c}=KC(n,!1),{hoverColor:h,pressedColor:d}=KC(n,!0);return{origin:t,originBgLight:a,originBgDark:l,originLight:n,originLightAlternative:s,originLightAccessible:n===s,originLightHovered:u,originLightPressed:c,originDark:n,originDarkAlternative:o,originDarkAccessible:n===o,originDarkHovered:h,originDarkPressed:d}},my=(e,t,r,n)=>{const i=n??t,{onOrigin:s,hoverColor:o,pressedColor:a,onOriginAccessible:l,onOriginAlternative:u}=v0(i,!1),{onOrigin:c,hoverColor:h,pressedColor:d,onOriginAccessible:f,onOriginAlternative:p}=v0(i,!0);return{...Pxe(e,t,r,i),onOriginLight:s,onOriginLightHovered:o,onOriginLightPressed:a,onOriginLightAccessible:l,onOriginLightAlternative:u,onOriginDark:c,onOriginDarkHovered:h,onOriginDarkPressed:d,onOriginDarkAccessible:f,onOriginDarkAlternative:p}},Uf=({name:e,color:t,onColorChange:r,error:n,alternative:i,contrast:s,contrastMin:o})=>{const{t:a}=er();return j.jsxs(j.Fragment,{children:[j.jsx(uo,{}),j.jsx("p",{className:"font-bold",children:e}),s&&j.jsxs(dr,{semantic:s<(o??3)?"critical":"successful",size:"small",children:[s.toFixed(2),":1"]}),j.jsxs("div",{className:"grid grid-cols-2 gap-fix-md",children:[j.jsx(Kr,{label:a("colorInputPicker"),type:"color",value:t,onChange:l=>{r(l.target.value)}}),j.jsx(Kr,{label:a("colorInputHex"),placeholder:a("colorInputHex"),value:t,onChange:l=>{r(l.target.value)}})]}),n&&j.jsx(dr,{semantic:"warning",children:a(n)}),i&&j.jsxs("div",{className:"grid grid-cols-2 gap-fix-md",children:[j.jsx("div",{className:"w-full h-full text-[0]",style:{backgroundColor:i},children:i}),j.jsx(Dt,{onClick:()=>{r(i)},children:a("overwrite")})]})]})},ea=({label:e,color:t,setOriginColor:r,onAddColor:n,onDelete:i,isAddColor:s,customColor:o})=>{var C,w;const{t:a}=er(),[l,u]=z.useState(t),[c,h]=z.useState(),[d,f]=z.useState(!0),[p,m]=z.useState(s?"":e),{theme:y,setCustomColors:b,luminanceSteps:v}=ir(T=>T),E=z.useCallback(()=>(s?l:t).origin,[s,l,t]),D=z.useCallback(()=>{if(!s)return!t.originDarkAccessible||!t.originLightAccessible?"exclamation_mark_triangle":!t.onOriginDarkAccessible||!t.onOriginLightAccessible?"exclamation_mark_circle":void 0},[s,t]);return j.jsx("div",{className:"color-picker-container",children:j.jsxs("div",{className:"color-input-container",children:[j.jsx(Bv,{children:j.jsxs("button",{className:"color-tag","data-icon":s?"plus":void 0,"data-icon-after":D(),style:s?{}:{"--db-current-origin-color":t.origin,"--db-adaptive-bg-basic-level-3-default":`var(--db-${e.toLowerCase()}-bg-basic-level-3-default)`,"--db-adaptive-bg-basic-level-3-hovered":`var(--db-${e.toLowerCase()}-bg-basic-level-3-hovered)`,"--db-adaptive-bg-basic-level-3-pressed":`var(--db-${e.toLowerCase()}-bg-basic-level-3-pressed)`,"--db-adaptive-on-bg-basic-emphasis-60-default":`var(--db-${e.toLowerCase()}-on-bg-basic-emphasis-60-default)`},onClick:()=>h(!0),children:[a(e),!s&&j.jsx(vs,{placement:"bottom",className:"db-neutral-bg-basic-level-1",children:a("adaptColor")})]})}),j.jsx(Pd,{backdrop:"weak",open:c,onClose:()=>h(!1),drawerHeader:a("editColor",{colorName:p}),children:j.jsxs("div",{className:"flex flex-col gap-fix-sm mt-fix-md overflow-y-auto",children:[j.jsx(Kr,{id:`input-${p}`,label:a("colorName"),required:!0,value:p,disabled:!o,customValidity:o&&((C=y.customColors)!=null&&C[p])&&e!==p?"invalid":"no-validation",message:o&&((w=y.customColors)!=null&&w[p])&&e!==p?a("customColorExists"):void 0,pattern:"[a-zA-Z0-9\\-_]+",onChange:T=>{m(T.target.value),f(T.target.validity.valid)}}),j.jsx(Uf,{name:"origin",color:E(),onColorChange:T=>{s?u(my(p,T,v)):r&&r(my(p,T,v))}}),!s&&j.jsxs(j.Fragment,{children:[j.jsx(Uf,{name:"origin-light",color:t.originLight??Qi,alternative:t.originLightAccessible?void 0:t.originLightAlternative,error:t.originLightAccessible?void 0:"accessibilityCritical",contrast:fl(t.originLight,t.originBgLight),onColorChange:T=>{if(r){const{originLight:k,originLightAccessible:O,originLightPressed:P,originLightHovered:I,onOriginLight:F,onOriginLightHovered:L,onOriginLightPressed:_,onOriginLightAccessible:A,onOriginLightAlternative:M,originLightAlternative:R}=my(p,t.origin,v,T);r({...t,originLight:k,originLightAccessible:O,originLightAlternative:R,originLightPressed:P,originLightHovered:I,onOriginLight:F,onOriginLightHovered:L,onOriginLightPressed:_,onOriginLightAccessible:A,onOriginLightAlternative:M})}}}),j.jsx(Uf,{name:"on-origin-light",color:t.onOriginLight??Qi,alternative:t.onOriginLightAccessible?void 0:t.onOriginLightAlternative,error:t.onOriginLightAccessible?void 0:"accessibilityCritical",contrastMin:4.5,contrast:fl(t.originLight,t.onOriginLight),onColorChange:T=>{if(r){const{onOrigin:k,onOriginAccessible:O,onOriginAlternative:P,hoverColor:I,pressedColor:F}=v0(t.originLight??Qi,!1,T);r({...t,onOriginLight:k,onOriginLightHovered:I,onOriginLightPressed:F,onOriginLightAccessible:O,onOriginLightAlternative:P})}}}),j.jsx(Uf,{name:"origin-dark",color:t.originDark??Qi,alternative:t.originDarkAccessible?void 0:t.originDarkAlternative,error:t.originDarkAccessible?void 0:"accessibilityCritical",contrast:fl(t.originDark,t.originBgDark),onColorChange:T=>{if(r){const{originDark:k,originDarkAccessible:O,originDarkAlternative:P,originDarkPressed:I,originDarkHovered:F,onOriginDark:L,onOriginDarkHovered:_,onOriginDarkPressed:A,onOriginDarkAccessible:M,onOriginDarkAlternative:R}=my(p,t.origin,v,T);r({...t,originDark:k,originDarkAccessible:O,originDarkAlternative:P,originDarkPressed:I,originDarkHovered:F,onOriginDark:L,onOriginDarkHovered:_,onOriginDarkPressed:A,onOriginDarkAccessible:M,onOriginDarkAlternative:R})}}}),j.jsx(Uf,{name:"on-origin-dark",contrastMin:4.5,color:t.onOriginDark??Qi,alternative:t.onOriginDarkAccessible?void 0:t.onOriginDarkAlternative,error:t.onOriginDarkAccessible?void 0:"accessibilityCritical",contrast:fl(t.originDark,t.onOriginDark),onColorChange:T=>{if(r){const{onOrigin:k,onOriginAccessible:O,onOriginAlternative:P,hoverColor:I,pressedColor:F}=v0(t.originDark??Qi,!0,T);r({...t,onOriginDark:k,onOriginDarkHovered:I,onOriginDarkPressed:F,onOriginDarkAccessible:O,onOriginDarkAlternative:P})}}})]}),o&&j.jsxs(j.Fragment,{children:[j.jsx(uo,{}),j.jsxs("div",{className:"ml-auto flex gap-fix-md",children:[!s&&j.jsx(Dt,{icon:"bin",onClick:()=>{i&&i()},children:a("deleteColor")}),j.jsx(Dt,{className:"ml-auto",variant:"brand",disabled:p.length===0||e===p||!d,onClick:()=>{if(s)h(!1),n&&n(p,l),u({origin:"#ffffff"}),m("");else if(y.customColors){const T={};Object.keys(y.customColors).forEach(k=>{var O,P,I;(O=y.customColors)!=null&&O[k]&&(k===e?T[p]=(P=y.customColors)==null?void 0:P[k]:T[k]=(I=y.customColors)==null?void 0:I[k])}),b(T)}},children:a(s?"addColor":"changeColor")})]})]})]})})]})})},Fxe=()=>{const{t:e}=er(),{setColors:t,theme:r,setAdditionalColors:n,setCustomColors:i}=ir(s=>s);return j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("colors")}),j.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[j.jsx(ea,{color:r.colors.neutral,label:"Neutral",setOriginColor:s=>t({...r.colors,neutral:s})}),j.jsx(ea,{color:r.colors.brand,label:"brand",setOriginColor:s=>{t({...r.colors,brand:s})}}),j.jsx(ea,{color:r.colors.informational,label:"Informational",setOriginColor:s=>t({...r.colors,informational:s})}),j.jsx(ea,{color:r.colors.successful,label:"Successful",setOriginColor:s=>t({...r.colors,successful:s})}),j.jsx(ea,{color:r.colors.warning,label:"Warning",setOriginColor:s=>t({...r.colors,warning:s})}),j.jsx(ea,{color:r.colors.critical,label:"Critical",setOriginColor:s=>t({...r.colors,critical:s})})]})]}),j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("additional-colors")}),j.jsx("div",{className:"flex flex-wrap gap-fix-xs",children:Object.entries(r.additionalColors).map(([s,o])=>j.jsx(ea,{color:o,label:s,setOriginColor:a=>{n({...r.additionalColors,[s]:a})}},s))})]}),j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("custom")}),j.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[j.jsx(ea,{color:{origin:"#ffffff"},label:e("addColor"),onAddColor:(s,o)=>{i({...r.customColors,[s]:o})},customColor:!0,isAddColor:!0}),r.customColors&&Object.entries(r.customColors).map(([s,o])=>j.jsx(ea,{color:o,label:s,setOriginColor:a=>{i({...r.customColors,[s]:a})},customColor:!0,onDelete:()=>{const a={...r.customColors};delete a[s],i(a)}},s))]})]})]})},dh=["adaptive","neutral","critical","informational","warning","successful"],JS=e=>e.charAt(0).toUpperCase()+e.slice(1),Oxe=[{title:"Button",component:j.jsx("div",{className:"grid grid-cols-5 gap-fix-sm items-center",children:["outlined","filled","ghost","brand"].map(e=>j.jsxs(z.Fragment,{children:[j.jsxs("h6",{children:[JS(e),":"]}),j.jsx(Dt,{variant:e,children:"Default"}),j.jsx(Dt,{variant:e,icon:"person",children:"Icon"}),j.jsx(Dt,{variant:e,disabled:!0,children:"Disabled"}),j.jsx(Dt,{variant:e,size:"small",children:"Small"})]},`button-${e}`))})},{title:"Link",component:j.jsxs(z.Fragment,{children:[j.jsx(Oh,{href:"#",children:"Text Link"}),j.jsx(Oh,{href:"#",variant:"brand",children:"Brand Text Link"}),j.jsx(Oh,{href:"#",disabled:!0,children:"Disabled Link"}),j.jsx(Oh,{href:"#",size:"small",children:"Small Link"})]})},{title:"Infotext",component:j.jsxs(z.Fragment,{children:[dh.map(e=>j.jsx(dr,{semantic:e,children:JS(e)},`infotext-${e}`)),j.jsx(dr,{size:"small",children:"Small"})]})},{title:"Tag",component:j.jsxs(z.Fragment,{children:[j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Weak:"}),dh.map(e=>j.jsxs(Bv,{semantic:e,children:["Tag ",e]},`tag-${e}`))]}),j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Strong:"}),dh.map(e=>j.jsxs(Bv,{semantic:e,emphasis:"strong",children:["Tag ",e]},`tag-strong-${e}`))]})]})},{title:"Badge",component:j.jsxs(z.Fragment,{children:[j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Weak:"}),dh.map(e=>j.jsxs(OE,{semantic:e,children:["Badge ",e]},`badge-${e}`))]}),j.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[j.jsx("h6",{children:"Strong:"}),dh.map(e=>j.jsxs(OE,{semantic:e,emphasis:"strong",children:["Badge ",e]},`badge-strong-${e}`))]})]})},{title:"Notification",component:j.jsxs(z.Fragment,{children:[dh.map(e=>j.jsx(Nv,{semantic:e,variant:"standalone",headline:"Variant",linkVariant:"inline",link:j.jsx("a",{href:"#",children:"Link"}),children:JS(e)},`alert-component-${e}`)),j.jsx(Nv,{variant:"docked",icon:"person",headline:"Type",linkVariant:"inline",link:j.jsx("a",{href:"#",children:"Link"}),children:"Docked"})]})},{title:"Input",component:j.jsxs(z.Fragment,{children:[j.jsx(Kr,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),j.jsx(Kr,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),j.jsx(Kr,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Checkbox",component:j.jsxs(z.Fragment,{children:[j.jsx(IE,{name:"checkbox",children:"Checkbox"}),j.jsx(IE,{name:"checkbox",required:!0,children:"Checkbox required"})]})},{title:"Radio",component:j.jsxs(z.Fragment,{children:[j.jsx(ME,{name:"radio",children:"Radio"}),j.jsx(ME,{name:"radio",required:!0,children:"Radio required"})]})},{title:"Select",component:j.jsxs(z.Fragment,{children:[j.jsxs(Bu,{variant:"floating",label:"Select",placeholder:"Select",message:"Select Message",disabled:!0,children:[j.jsx("option",{children:"Option1"}),j.jsx("option",{children:"Option2"})]}),j.jsxs(Bu,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0,children:[j.jsx("option",{children:"Option1"}),j.jsx("option",{children:"Option2"})]}),j.jsxs(Bu,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0,children:[j.jsx("option",{children:"Option1"}),j.jsx("option",{children:"Option2"})]})]})},{title:"Textarea",component:j.jsxs(z.Fragment,{children:[j.jsx(Dp,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),j.jsx(Dp,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),j.jsx(Dp,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Divider",component:j.jsxs(z.Fragment,{children:[j.jsx(uo,{}),j.jsx(uo,{emphasis:"strong"})]})}],Ixe=()=>{const[e,t]=z.useState(""),{t:r}=er();return j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx(Kr,{variant:"floating",label:r("search"),placeholder:r("search"),type:"search",onChange:n=>t(n.target.value)}),j.jsx("div",{className:"grid gap-fix-sm",children:Oxe.map(n=>n.title.toLowerCase().includes(e.toLowerCase())?j.jsx(Bi,{spacing:"small",children:j.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[j.jsx("h5",{children:n.title}),j.jsx("div",{className:"flex flex-wrap gap-fix-sm items-center",children:n.component})]})},`component-list-${n.title}`):null)})]})},zI=({hue:e,hex:t,saturation:r,luminance:n,children:i,index:s,hideText:o})=>j.jsxs("div",{className:"palette-box gap-fix-md",style:{backgroundColor:t,color:_xe(t)<.4?"#fff":"#000","--color-index":s},children:[i,!o&&j.jsxs("div",{className:"flex flex-col",children:[j.jsxs("span",{className:"whitespace-nowrap",children:["hex: ",t]}),j.jsxs("span",{className:"whitespace-nowrap",children:["hsl: ",Math.round(e),"/",Math.round(r),"/",Math.round(n)]})]})]}),Mxe=()=>{const{luminanceSteps:e,developerMode:t,theme:r}=ir(o=>o),{t:n}=er(),[i,s]=z.useState({});return z.useEffect(()=>{s({...r.colors,...r.additionalColors,...r.customColors})},[r]),j.jsxs("div",{className:"flex flex-col",children:[t&&j.jsx(Kr,{label:n("luminanceSteps"),value:e,onChange:o=>{const a=o.target.value.split(",").map(l=>Number(l||0));ir.setState({luminanceSteps:a})}}),j.jsxs("div",{className:"flex gap-fix-2xs",children:[j.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[j.jsx("div",{className:"py-fix-sm",children:j.jsx("span",{className:"font-bold invisible",children:"Palette"})}),e.map((o,a)=>j.jsx("div",{className:"flex items-center",children:j.jsx("span",{className:"font-bold whitespace-nowrap pr-fix-xs md:pr-fix-lg",children:a})},`luminance-step-${o}`))]}),Object.entries(i).filter(([,o])=>w9(o.origin)).map(([o,a],l)=>{const u=xk(o,a.origin,e);return j.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[j.jsx("div",{className:"py-fix-sm",children:j.jsx("span",{className:"font-bold",children:o})}),u.map(({hex:c,hue:h,saturation:d,luminance:f},p)=>j.jsx(z.Fragment,{children:j.jsx(DJ,{style:{"--color-index":p},placement:l>3?"left-start":"right-start",trigger:j.jsx(zI,{hex:c,hue:h,saturation:d,luminance:f,index:p}),children:j.jsx("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:u.map((m,y)=>j.jsx(z.Fragment,{children:j.jsx(zI,{hex:m.hex,hue:m.hue,saturation:m.saturation,luminance:m.luminance,hideText:!0,children:j.jsx("span",{className:"m-auto",children:bt.contrast(bt.hex(c),bt.hex(m.hex)).toFixed(2)})})},`popover-${o}-${m.hex}-${y}`))})})},`${o}-${c}-${p}`))]},`${o}-header`)})]})]})},b0=z.memo(({label:e,accept:t,onUpload:r,size:n,variant:i,noText:s,tooltip:o})=>{const{t:a}=er();return j.jsxs("label",{className:"upload-button relative","data-icon":"upload","data-size":n,"data-variant":i,"data-no-text":s,children:[a(e),j.jsx("input",{type:"file",accept:t,className:"absolute w-full h-full",title:"",onChange:l=>{const u=l.target.files;if(u&&u.length>0){const c=new FileReader;c.addEventListener("load",()=>{r(c.result)},!1),c.readAsDataURL(u[0])}}}),o&&j.jsx(vs,{placement:"bottom",children:a(o)})]})});var S9={exports:{}};(function(e,t){var r={};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -1498,8 +1498,8 @@ slotHeader=" JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE - */(function(n){e.exports=n()})(function(){return function n(i,s,o){function a(c,h){if(!s[c]){if(!i[c]){var d=typeof rp=="function"&&rp;if(!h&&d)return d(c,!0);if(l)return l(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var p=s[c]={exports:{}};i[c][0].call(p.exports,function(m){var y=i[c][1][m];return a(y||m)},p,p.exports,n,i,s,o)}return s[c].exports}for(var l=typeof rp=="function"&&rp,u=0;u>2,p=(3&c)<<4|h>>4,m=1>6:64,y=2>4,h=(15&f)<<4|(p=l.indexOf(u.charAt(y++)))>>2,d=(3&p)<<6|(m=l.indexOf(u.charAt(y++))),E[b++]=c,p!==64&&(E[b++]=h),m!==64&&(E[b++]=d);return E}},{"./support":30,"./utils":32}],2:[function(n,i,s){var o=n("./external"),a=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),u=n("./stream/DataLengthProbe");function c(h,d,f,p,m){this.compressedSize=h,this.uncompressedSize=d,this.crc32=f,this.compression=p,this.compressedContent=m}c.prototype={getContentWorker:function(){var h=new a(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(h,d,f){return h.pipe(new l).pipe(new u("uncompressedSize")).pipe(d.compressWorker(f)).pipe(new u("compressedSize")).withStreamInfo("compression",d)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,s){var o=n("./utils"),a=function(){for(var l,u=[],c=0;c<256;c++){l=c;for(var h=0;h<8;h++)l=1&l?3988292384^l>>>1:l>>>1;u[c]=l}return u}();i.exports=function(l,u){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(c,h,d,f){var p=a,m=f+d;c^=-1;for(var y=f;y>>8^p[255&(c^h[y])];return-1^c}(0|u,l,l.length,0):function(c,h,d,f){var p=a,m=f+d;c^=-1;for(var y=f;y>>8^p[255&(c^h.charCodeAt(y))];return-1^c}(0|u,l,l.length,0):0}},{"./utils":32}],5:[function(n,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,i,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:o}},{lie:37}],7:[function(n,i,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=n("pako"),l=n("./utils"),u=n("./stream/GenericWorker"),c=o?"uint8array":"array";function h(d,f){u.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=f,this.meta={}}s.magic="\b\0",l.inherits(h,u),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(c,d.data),!1)},h.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(f){d.push({data:f,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,s){function o(p,m){var y,b="";for(y=0;y>>=8;return b}function a(p,m,y,b,v,E){var D,C,w=p.file,A=p.compression,$=E!==c.utf8encode,O=l.transformTo("string",E(w.name)),P=l.transformTo("string",c.utf8encode(w.name)),N=w.comment,F=l.transformTo("string",E(N)),L=l.transformTo("string",c.utf8encode(N)),k=P.length!==w.name.length,T=L.length!==N.length,M="",R="",B="",U=w.dir,V=w.date,K={crc32:0,compressedSize:0,uncompressedSize:0};m&&!y||(K.crc32=p.crc32,K.compressedSize=p.compressedSize,K.uncompressedSize=p.uncompressedSize);var J=0;m&&(J|=8),$||!k&&!T||(J|=2048);var G=0,Y=0;U&&(G|=16),v==="UNIX"?(Y=798,G|=function(X,le){var be=X;return X||(be=le?16893:33204),(65535&be)<<16}(w.unixPermissions,U)):(Y=20,G|=function(X){return 63&(X||0)}(w.dosPermissions)),D=V.getUTCHours(),D<<=6,D|=V.getUTCMinutes(),D<<=5,D|=V.getUTCSeconds()/2,C=V.getUTCFullYear()-1980,C<<=4,C|=V.getUTCMonth()+1,C<<=5,C|=V.getUTCDate(),k&&(R=o(1,1)+o(h(O),4)+P,M+="up"+o(R.length,2)+R),T&&(B=o(1,1)+o(h(F),4)+L,M+="uc"+o(B.length,2)+B);var Q="";return Q+=` -\0`,Q+=o(J,2),Q+=A.magic,Q+=o(D,2),Q+=o(C,2),Q+=o(K.crc32,4),Q+=o(K.compressedSize,4),Q+=o(K.uncompressedSize,4),Q+=o(O.length,2),Q+=o(M.length,2),{fileRecord:d.LOCAL_FILE_HEADER+Q+O+M,dirRecord:d.CENTRAL_FILE_HEADER+o(Y,2)+Q+o(F.length,2)+"\0\0\0\0"+o(G,4)+o(b,4)+O+M+F}}var l=n("../utils"),u=n("../stream/GenericWorker"),c=n("../utf8"),h=n("../crc32"),d=n("../signature");function f(p,m,y,b){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=y,this.encodeFileName=b,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(f,u),f.prototype.push=function(p){var m=p.meta.percent||0,y=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,u.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:y?(m+100*(y-b-1))/y:100}}))},f.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var m=this.streamFiles&&!p.file.dir;if(m){var y=a(p,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(p){this.accumulate=!1;var m=this.streamFiles&&!p.file.dir,y=a(p,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),m)this.push({data:function(b){return d.DATA_DESCRIPTOR+o(b.crc32,4)+o(b.compressedSize,4)+o(b.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var p=this.bytesWritten,m=0;m=this.index;u--)c=(c<<8)+this.byteAt(u);return this.index+=l,c},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},i.exports=a},{"../utils":32}],19:[function(n,i,s){var o=n("./Uint8ArrayReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,i,s){var o=n("./DataReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,i,s){var o=n("./ArrayReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,i,s){var o=n("../utils"),a=n("../support"),l=n("./ArrayReader"),u=n("./StringReader"),c=n("./NodeBufferReader"),h=n("./Uint8ArrayReader");i.exports=function(d){var f=o.getTypeOf(d);return o.checkSupport(f),f!=="string"||a.uint8array?f==="nodebuffer"?new c(d):a.uint8array?new h(o.transformTo("uint8array",d)):new l(o.transformTo("array",d)):new u(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,i,s){var o=n("./GenericWorker"),a=n("../utils");function l(u){o.call(this,"ConvertWorker to "+u),this.destType=u}a.inherits(l,o),l.prototype.processChunk=function(u){this.push({data:a.transformTo(this.destType,u.data),meta:u.meta})},i.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,i,s){var o=n("./GenericWorker"),a=n("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,o),l.prototype.processChunk=function(u){this.streamInfo.crc32=a(u.data,this.streamInfo.crc32||0),this.push(u)},i.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,i,s){var o=n("../utils"),a=n("./GenericWorker");function l(u){a.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}o.inherits(l,a),l.prototype.processChunk=function(u){if(u){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+u.data.length}a.prototype.processChunk.call(this,u)},i.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,i,s){var o=n("../utils"),a=n("./GenericWorker");function l(u){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(h){c.dataIsReady=!0,c.data=h,c.max=h&&h.length||0,c.type=o.getTypeOf(h),c.isPaused||c._tickAndRepeat()},function(h){c.error(h)})}o.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,c);break;case"uint8array":u=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":u=this.data.slice(this.index,c)}return this.index=c,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,i,s){function o(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var u=0;u "+a:a}},i.exports=o},{}],29:[function(n,i,s){var o=n("../utils"),a=n("./ConvertWorker"),l=n("./GenericWorker"),u=n("../base64"),c=n("../support"),h=n("../external"),d=null;if(c.nodestream)try{d=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function f(m,y){return new h.Promise(function(b,v){var E=[],D=m._internalType,C=m._outputType,w=m._mimeType;m.on("data",function(A,$){E.push(A),y&&y($)}).on("error",function(A){E=[],v(A)}).on("end",function(){try{var A=function($,O,P){switch($){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),P);case"base64":return u.encode(O);default:return o.transformTo($,O)}}(C,function($,O){var P,N=0,F=null,L=0;for(P=0;P"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(o),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,i,s){for(var o=n("./utils"),a=n("./support"),l=n("./nodejsUtils"),u=n("./stream/GenericWorker"),c=new Array(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;c[254]=c[254]=1;function d(){u.call(this,"utf-8 decode"),this.leftOver=null}function f(){u.call(this,"utf-8 encode")}s.utf8encode=function(p){return a.nodebuffer?l.newBufferFrom(p,"utf-8"):function(m){var y,b,v,E,D,C=m.length,w=0;for(E=0;E>>6:(b<65536?y[D++]=224|b>>>12:(y[D++]=240|b>>>18,y[D++]=128|b>>>12&63),y[D++]=128|b>>>6&63),y[D++]=128|63&b);return y}(p)},s.utf8decode=function(p){return a.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):function(m){var y,b,v,E,D=m.length,C=new Array(2*D);for(y=b=0;y>10&1023,C[b++]=56320|1023&v)}return C.length!==b&&(C.subarray?C=C.subarray(0,b):C.length=b),o.applyFromCharCode(C)}(p=o.transformTo(a.uint8array?"uint8array":"array",p))},o.inherits(d,u),d.prototype.processChunk=function(p){var m=o.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var y=m;(m=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),m.set(y,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var b=function(E,D){var C;for((D=D||E.length)>E.length&&(D=E.length),C=D-1;0<=C&&(192&E[C])==128;)C--;return C<0||C===0?D:C+c[E[C]]>D?C:D}(m),v=m;b!==m.length&&(a.uint8array?(v=m.subarray(0,b),this.leftOver=m.subarray(b,m.length)):(v=m.slice(0,b),this.leftOver=m.slice(b,m.length))),this.push({data:s.utf8decode(v),meta:p.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(f,u),f.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,i,s){var o=n("./support"),a=n("./base64"),l=n("./nodejsUtils"),u=n("./external");function c(y){return y}function h(y,b){for(var v=0;v>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var m,y,b,v=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?f[b++]=224|p>>>12:(f[b++]=240|p>>>18,f[b++]=128|p>>>12&63),f[b++]=128|p>>>6&63),f[b++]=128|63&p);return f},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var f=new o.Buf8(d.length),p=0,m=f.length;p>10&1023,E[m++]=56320|1023&y)}return h(E,m)},s.utf8border=function(d,f){var p;for((f=f||d.length)>d.length&&(f=d.length),p=f-1;0<=p&&(192&d[p])==128;)p--;return p<0||p===0?f:p+u[d[p]]>f?p:f}},{"./common":41}],43:[function(n,i,s){i.exports=function(o,a,l,u){for(var c=65535&o|0,h=o>>>16&65535|0,d=0;l!==0;){for(l-=d=2e3>>1:a>>>1;l[u]=a}return l}();i.exports=function(a,l,u,c){var h=o,d=c+u;a^=-1;for(var f=c;f>>8^h[255&(a^l[f])];return-1^a}},{}],46:[function(n,i,s){var o,a=n("../utils/common"),l=n("./trees"),u=n("./adler32"),c=n("./crc32"),h=n("./messages"),d=0,f=4,p=0,m=-2,y=-1,b=4,v=2,E=8,D=9,C=286,w=30,A=19,$=2*C+1,O=15,P=3,N=258,F=N+P+1,L=42,k=113,T=1,M=2,R=3,B=4;function U(W,ye){return W.msg=h[ye],ye}function V(W){return(W<<1)-(4W.avail_out&&(pe=W.avail_out),pe!==0&&(a.arraySet(W.output,ye.pending_buf,ye.pending_out,pe,W.next_out),W.next_out+=pe,ye.pending_out+=pe,W.total_out+=pe,W.avail_out-=pe,ye.pending-=pe,ye.pending===0&&(ye.pending_out=0))}function G(W,ye){l._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,ye),W.block_start=W.strstart,J(W.strm)}function Y(W,ye){W.pending_buf[W.pending++]=ye}function Q(W,ye){W.pending_buf[W.pending++]=ye>>>8&255,W.pending_buf[W.pending++]=255&ye}function X(W,ye){var pe,re,ee=W.max_chain_length,ue=W.strstart,De=W.prev_length,Ce=W.nice_match,fe=W.strstart>W.w_size-F?W.strstart-(W.w_size-F):0,Ee=W.window,je=W.w_mask,ae=W.prev,ve=W.strstart+N,Ae=Ee[ue+De-1],ze=Ee[ue+De];W.prev_length>=W.good_match&&(ee>>=2),Ce>W.lookahead&&(Ce=W.lookahead);do if(Ee[(pe=ye)+De]===ze&&Ee[pe+De-1]===Ae&&Ee[pe]===Ee[ue]&&Ee[++pe]===Ee[ue+1]){ue+=2,pe++;do;while(Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&uefe&&--ee!=0);return De<=W.lookahead?De:W.lookahead}function le(W){var ye,pe,re,ee,ue,De,Ce,fe,Ee,je,ae=W.w_size;do{if(ee=W.window_size-W.lookahead-W.strstart,W.strstart>=ae+(ae-F)){for(a.arraySet(W.window,W.window,ae,ae,0),W.match_start-=ae,W.strstart-=ae,W.block_start-=ae,ye=pe=W.hash_size;re=W.head[--ye],W.head[ye]=ae<=re?re-ae:0,--pe;);for(ye=pe=ae;re=W.prev[--ye],W.prev[ye]=ae<=re?re-ae:0,--pe;);ee+=ae}if(W.strm.avail_in===0)break;if(De=W.strm,Ce=W.window,fe=W.strstart+W.lookahead,Ee=ee,je=void 0,je=De.avail_in,Ee=P)for(ue=W.strstart-W.insert,W.ins_h=W.window[ue],W.ins_h=(W.ins_h<=P&&(W.ins_h=(W.ins_h<=P)if(re=l._tr_tally(W,W.strstart-W.match_start,W.match_length-P),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=P){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<=P&&(W.ins_h=(W.ins_h<=P&&W.match_length<=W.prev_length){for(ee=W.strstart+W.lookahead-P,re=l._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-P),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=ee&&(W.ins_h=(W.ins_h<W.pending_buf_size-5&&(pe=W.pending_buf_size-5);;){if(W.lookahead<=1){if(le(W),W.lookahead===0&&ye===d)return T;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var re=W.block_start+pe;if((W.strstart===0||W.strstart>=re)&&(W.lookahead=W.strstart-re,W.strstart=re,G(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-F&&(G(W,!1),W.strm.avail_out===0))return T}return W.insert=0,ye===f?(G(W,!0),W.strm.avail_out===0?R:B):(W.strstart>W.block_start&&(G(W,!1),W.strm.avail_out),T)}),new xe(4,4,8,4,be),new xe(4,5,16,8,be),new xe(4,6,32,32,be),new xe(4,4,16,16,ce),new xe(8,16,32,32,ce),new xe(8,16,128,128,ce),new xe(8,32,128,256,ce),new xe(32,128,258,1024,ce),new xe(32,258,258,4096,ce)],s.deflateInit=function(W,ye){return mt(W,ye,E,15,8,0)},s.deflateInit2=mt,s.deflateReset=$t,s.deflateResetKeep=Re,s.deflateSetHeader=function(W,ye){return W&&W.state?W.state.wrap!==2?m:(W.state.gzhead=ye,p):m},s.deflate=function(W,ye){var pe,re,ee,ue;if(!W||!W.state||5>8&255),Y(re,re.gzhead.time>>16&255),Y(re,re.gzhead.time>>24&255),Y(re,re.level===9?2:2<=re.strategy||re.level<2?4:0),Y(re,255&re.gzhead.os),re.gzhead.extra&&re.gzhead.extra.length&&(Y(re,255&re.gzhead.extra.length),Y(re,re.gzhead.extra.length>>8&255)),re.gzhead.hcrc&&(W.adler=c(W.adler,re.pending_buf,re.pending,0)),re.gzindex=0,re.status=69):(Y(re,0),Y(re,0),Y(re,0),Y(re,0),Y(re,0),Y(re,re.level===9?2:2<=re.strategy||re.level<2?4:0),Y(re,3),re.status=k);else{var De=E+(re.w_bits-8<<4)<<8;De|=(2<=re.strategy||re.level<2?0:re.level<6?1:re.level===6?2:3)<<6,re.strstart!==0&&(De|=32),De+=31-De%31,re.status=k,Q(re,De),re.strstart!==0&&(Q(re,W.adler>>>16),Q(re,65535&W.adler)),W.adler=1}if(re.status===69)if(re.gzhead.extra){for(ee=re.pending;re.gzindex<(65535&re.gzhead.extra.length)&&(re.pending!==re.pending_buf_size||(re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),J(W),ee=re.pending,re.pending!==re.pending_buf_size));)Y(re,255&re.gzhead.extra[re.gzindex]),re.gzindex++;re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),re.gzindex===re.gzhead.extra.length&&(re.gzindex=0,re.status=73)}else re.status=73;if(re.status===73)if(re.gzhead.name){ee=re.pending;do{if(re.pending===re.pending_buf_size&&(re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),J(W),ee=re.pending,re.pending===re.pending_buf_size)){ue=1;break}ue=re.gzindexee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),ue===0&&(re.gzindex=0,re.status=91)}else re.status=91;if(re.status===91)if(re.gzhead.comment){ee=re.pending;do{if(re.pending===re.pending_buf_size&&(re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),J(W),ee=re.pending,re.pending===re.pending_buf_size)){ue=1;break}ue=re.gzindexee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),ue===0&&(re.status=103)}else re.status=103;if(re.status===103&&(re.gzhead.hcrc?(re.pending+2>re.pending_buf_size&&J(W),re.pending+2<=re.pending_buf_size&&(Y(re,255&W.adler),Y(re,W.adler>>8&255),W.adler=0,re.status=k)):re.status=k),re.pending!==0){if(J(W),W.avail_out===0)return re.last_flush=-1,p}else if(W.avail_in===0&&V(ye)<=V(pe)&&ye!==f)return U(W,-5);if(re.status===666&&W.avail_in!==0)return U(W,-5);if(W.avail_in!==0||re.lookahead!==0||ye!==d&&re.status!==666){var Ce=re.strategy===2?function(fe,Ee){for(var je;;){if(fe.lookahead===0&&(le(fe),fe.lookahead===0)){if(Ee===d)return T;break}if(fe.match_length=0,je=l._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++,je&&(G(fe,!1),fe.strm.avail_out===0))return T}return fe.insert=0,Ee===f?(G(fe,!0),fe.strm.avail_out===0?R:B):fe.last_lit&&(G(fe,!1),fe.strm.avail_out===0)?T:M}(re,ye):re.strategy===3?function(fe,Ee){for(var je,ae,ve,Ae,ze=fe.window;;){if(fe.lookahead<=N){if(le(fe),fe.lookahead<=N&&Ee===d)return T;if(fe.lookahead===0)break}if(fe.match_length=0,fe.lookahead>=P&&0fe.lookahead&&(fe.match_length=fe.lookahead)}if(fe.match_length>=P?(je=l._tr_tally(fe,1,fe.match_length-P),fe.lookahead-=fe.match_length,fe.strstart+=fe.match_length,fe.match_length=0):(je=l._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++),je&&(G(fe,!1),fe.strm.avail_out===0))return T}return fe.insert=0,Ee===f?(G(fe,!0),fe.strm.avail_out===0?R:B):fe.last_lit&&(G(fe,!1),fe.strm.avail_out===0)?T:M}(re,ye):o[re.level].func(re,ye);if(Ce!==R&&Ce!==B||(re.status=666),Ce===T||Ce===R)return W.avail_out===0&&(re.last_flush=-1),p;if(Ce===M&&(ye===1?l._tr_align(re):ye!==5&&(l._tr_stored_block(re,0,0,!1),ye===3&&(K(re.head),re.lookahead===0&&(re.strstart=0,re.block_start=0,re.insert=0))),J(W),W.avail_out===0))return re.last_flush=-1,p}return ye!==f?p:re.wrap<=0?1:(re.wrap===2?(Y(re,255&W.adler),Y(re,W.adler>>8&255),Y(re,W.adler>>16&255),Y(re,W.adler>>24&255),Y(re,255&W.total_in),Y(re,W.total_in>>8&255),Y(re,W.total_in>>16&255),Y(re,W.total_in>>24&255)):(Q(re,W.adler>>>16),Q(re,65535&W.adler)),J(W),0=pe.w_size&&(ue===0&&(K(pe.head),pe.strstart=0,pe.block_start=0,pe.insert=0),Ee=new a.Buf8(pe.w_size),a.arraySet(Ee,ye,je-pe.w_size,pe.w_size,0),ye=Ee,je=pe.w_size),De=W.avail_in,Ce=W.next_in,fe=W.input,W.avail_in=je,W.next_in=0,W.input=ye,le(pe);pe.lookahead>=P;){for(re=pe.strstart,ee=pe.lookahead-(P-1);pe.ins_h=(pe.ins_h<>>=P=O>>>24,D-=P,(P=O>>>16&255)===0)M[h++]=65535&O;else{if(!(16&P)){if(!(64&P)){O=C[(65535&O)+(E&(1<>>=P,D-=P),D<15&&(E+=T[u++]<>>=P=O>>>24,D-=P,!(16&(P=O>>>16&255))){if(!(64&P)){O=w[(65535&O)+(E&(1<>>=P,D-=P,(P=h-d)>3,E&=(1<<(D-=N<<3))-1,o.next_in=u,o.next_out=h,o.avail_in=u>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24)}function E(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function D(L){var k;return L&&L.state?(k=L.state,L.total_in=L.total_out=k.total=0,L.msg="",k.wrap&&(L.adler=1&k.wrap),k.mode=m,k.last=0,k.havedict=0,k.dmax=32768,k.head=null,k.hold=0,k.bits=0,k.lencode=k.lendyn=new o.Buf32(y),k.distcode=k.distdyn=new o.Buf32(b),k.sane=1,k.back=-1,f):p}function C(L){var k;return L&&L.state?((k=L.state).wsize=0,k.whave=0,k.wnext=0,D(L)):p}function w(L,k){var T,M;return L&&L.state?(M=L.state,k<0?(T=0,k=-k):(T=1+(k>>4),k<48&&(k&=15)),k&&(k<8||15=B.wsize?(o.arraySet(B.window,k,T-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(M<(R=B.wsize-B.wnext)&&(R=M),o.arraySet(B.window,k,T-M,R,B.wnext),(M-=R)?(o.arraySet(B.window,k,T-M,M,0),B.wnext=M,B.whave=B.wsize):(B.wnext+=R,B.wnext===B.wsize&&(B.wnext=0),B.whave>>8&255,T.check=l(T.check,ue,2,0),G=J=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&J)<<8)+(J>>8))%31){L.msg="incorrect header check",T.mode=30;break}if((15&J)!=8){L.msg="unknown compression method",T.mode=30;break}if(G-=4,W=8+(15&(J>>>=4)),T.wbits===0)T.wbits=W;else if(W>T.wbits){L.msg="invalid window size",T.mode=30;break}T.dmax=1<>8&1),512&T.flags&&(ue[0]=255&J,ue[1]=J>>>8&255,T.check=l(T.check,ue,2,0)),G=J=0,T.mode=3;case 3:for(;G<32;){if(V===0)break e;V--,J+=M[B++]<>>8&255,ue[2]=J>>>16&255,ue[3]=J>>>24&255,T.check=l(T.check,ue,4,0)),G=J=0,T.mode=4;case 4:for(;G<16;){if(V===0)break e;V--,J+=M[B++]<>8),512&T.flags&&(ue[0]=255&J,ue[1]=J>>>8&255,T.check=l(T.check,ue,2,0)),G=J=0,T.mode=5;case 5:if(1024&T.flags){for(;G<16;){if(V===0)break e;V--,J+=M[B++]<>>8&255,T.check=l(T.check,ue,2,0)),G=J=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(V<(X=T.length)&&(X=V),X&&(T.head&&(W=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),o.arraySet(T.head.extra,M,B,X,W)),512&T.flags&&(T.check=l(T.check,M,X,B)),V-=X,B+=X,T.length-=X),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(V===0)break e;for(X=0;W=M[B+X++],T.head&&W&&T.length<65536&&(T.head.name+=String.fromCharCode(W)),W&&X>9&1,T.head.done=!0),L.adler=T.check=0,T.mode=12;break;case 10:for(;G<32;){if(V===0)break e;V--,J+=M[B++]<>>=7&G,G-=7&G,T.mode=27;break}for(;G<3;){if(V===0)break e;V--,J+=M[B++]<>>=1)){case 0:T.mode=14;break;case 1:if(N(T),T.mode=20,k!==6)break;J>>>=2,G-=2;break e;case 2:T.mode=17;break;case 3:L.msg="invalid block type",T.mode=30}J>>>=2,G-=2;break;case 14:for(J>>>=7&G,G-=7&G;G<32;){if(V===0)break e;V--,J+=M[B++]<>>16^65535)){L.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&J,G=J=0,T.mode=15,k===6)break e;case 15:T.mode=16;case 16:if(X=T.length){if(V>>=5,G-=5,T.ndist=1+(31&J),J>>>=5,G-=5,T.ncode=4+(15&J),J>>>=4,G-=4,286>>=3,G-=3}for(;T.have<19;)T.lens[De[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,pe={bits:T.lenbits},ye=c(0,T.lens,0,19,T.lencode,0,T.work,pe),T.lenbits=pe.bits,ye){L.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have>>16&255,ke=65535&ee,!((ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>>=ce,G-=ce,T.lens[T.have++]=ke;else{if(ke===16){for(re=ce+2;G>>=ce,G-=ce,T.have===0){L.msg="invalid bit length repeat",T.mode=30;break}W=T.lens[T.have-1],X=3+(3&J),J>>>=2,G-=2}else if(ke===17){for(re=ce+3;G>>=ce)),J>>>=3,G-=3}else{for(re=ce+7;G>>=ce)),J>>>=7,G-=7}if(T.have+X>T.nlen+T.ndist){L.msg="invalid bit length repeat",T.mode=30;break}for(;X--;)T.lens[T.have++]=W}}if(T.mode===30)break;if(T.lens[256]===0){L.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,pe={bits:T.lenbits},ye=c(h,T.lens,0,T.nlen,T.lencode,0,T.work,pe),T.lenbits=pe.bits,ye){L.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,pe={bits:T.distbits},ye=c(d,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,pe),T.distbits=pe.bits,ye){L.msg="invalid distances set",T.mode=30;break}if(T.mode=20,k===6)break e;case 20:T.mode=21;case 21:if(6<=V&&258<=K){L.next_out=U,L.avail_out=K,L.next_in=B,L.avail_in=V,T.hold=J,T.bits=G,u(L,Q),U=L.next_out,R=L.output,K=L.avail_out,B=L.next_in,M=L.input,V=L.avail_in,J=T.hold,G=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;xe=(ee=T.lencode[J&(1<>>16&255,ke=65535&ee,!((ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>Re)])>>>16&255,ke=65535&ee,!(Re+(ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>>=Re,G-=Re,T.back+=Re}if(J>>>=ce,G-=ce,T.back+=ce,T.length=ke,xe===0){T.mode=26;break}if(32&xe){T.back=-1,T.mode=12;break}if(64&xe){L.msg="invalid literal/length code",T.mode=30;break}T.extra=15&xe,T.mode=22;case 22:if(T.extra){for(re=T.extra;G>>=T.extra,G-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;xe=(ee=T.distcode[J&(1<>>16&255,ke=65535&ee,!((ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>Re)])>>>16&255,ke=65535&ee,!(Re+(ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>>=Re,G-=Re,T.back+=Re}if(J>>>=ce,G-=ce,T.back+=ce,64&xe){L.msg="invalid distance code",T.mode=30;break}T.offset=ke,T.extra=15&xe,T.mode=24;case 24:if(T.extra){for(re=T.extra;G>>=T.extra,G-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){L.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(K===0)break e;if(X=Q-K,T.offset>X){if((X=T.offset-X)>T.whave&&T.sane){L.msg="invalid distance too far back",T.mode=30;break}le=X>T.wnext?(X-=T.wnext,T.wsize-X):T.wnext-X,X>T.length&&(X=T.length),be=T.window}else be=R,le=U-T.offset,X=T.length;for(K$?(P=le[be+b[k]],G[Y+b[k]]):(P=96,0),E=1<>U)+(D-=E)]=O<<24|P<<16|N|0,D!==0;);for(E=1<>=1;if(E!==0?(J&=E-1,J+=E):J=0,k++,--Q[L]==0){if(L===M)break;L=d[f+b[k]]}if(R>>7)]}function Y(ee,ue){ee.pending_buf[ee.pending++]=255&ue,ee.pending_buf[ee.pending++]=ue>>>8&255}function Q(ee,ue,De){ee.bi_valid>v-De?(ee.bi_buf|=ue<>v-ee.bi_valid,ee.bi_valid+=De-v):(ee.bi_buf|=ue<>>=1,De<<=1,0<--ue;);return De>>>1}function be(ee,ue,De){var Ce,fe,Ee=new Array(b+1),je=0;for(Ce=1;Ce<=b;Ce++)Ee[Ce]=je=je+De[Ce-1]<<1;for(fe=0;fe<=ue;fe++){var ae=ee[2*fe+1];ae!==0&&(ee[2*fe]=le(Ee[ae]++,ae))}}function ce(ee){var ue;for(ue=0;ue>1;1<=De;De--)Re(ee,Ee,De);for(fe=ve;De=ee.heap[1],ee.heap[1]=ee.heap[ee.heap_len--],Re(ee,Ee,1),Ce=ee.heap[1],ee.heap[--ee.heap_max]=De,ee.heap[--ee.heap_max]=Ce,Ee[2*fe]=Ee[2*De]+Ee[2*Ce],ee.depth[fe]=(ee.depth[De]>=ee.depth[Ce]?ee.depth[De]:ee.depth[Ce])+1,Ee[2*De+1]=Ee[2*Ce+1]=fe,ee.heap[1]=fe++,Re(ee,Ee,1),2<=ee.heap_len;);ee.heap[--ee.heap_max]=ee.heap[1],function(ze,at){var bt,ft,At,nt,ht,Ft,rr=at.dyn_tree,sn=at.max_code,Ai=at.stat_desc.static_tree,Tn=at.stat_desc.has_stree,us=at.stat_desc.extra_bits,fr=at.stat_desc.extra_base,Yr=at.stat_desc.max_length,oi=0;for(nt=0;nt<=b;nt++)ze.bl_count[nt]=0;for(rr[2*ze.heap[ze.heap_max]+1]=0,bt=ze.heap_max+1;bt>=7;fe>>=1)if(1&Ae&&ae.dyn_ltree[2*ve]!==0)return a;if(ae.dyn_ltree[18]!==0||ae.dyn_ltree[20]!==0||ae.dyn_ltree[26]!==0)return l;for(ve=32;ve>>3,(Ee=ee.static_len+3+7>>>3)<=fe&&(fe=Ee)):fe=Ee=De+5,De+4<=fe&&ue!==-1?re(ee,ue,De,Ce):ee.strategy===4||Ee===fe?(Q(ee,2+(Ce?1:0),3),$t(ee,F,L)):(Q(ee,4+(Ce?1:0),3),function(ae,ve,Ae,ze){var at;for(Q(ae,ve-257,5),Q(ae,Ae-1,5),Q(ae,ze-4,4),at=0;at>>8&255,ee.pending_buf[ee.d_buf+2*ee.last_lit+1]=255&ue,ee.pending_buf[ee.l_buf+ee.last_lit]=255&De,ee.last_lit++,ue===0?ee.dyn_ltree[2*De]++:(ee.matches++,ue--,ee.dyn_ltree[2*(T[De]+d+1)]++,ee.dyn_dtree[2*G(ue)]++),ee.last_lit===ee.lit_bufsize-1},s._tr_align=function(ee){Q(ee,2,3),X(ee,D,F),function(ue){ue.bi_valid===16?(Y(ue,ue.bi_buf),ue.bi_buf=0,ue.bi_valid=0):8<=ue.bi_valid&&(ue.pending_buf[ue.pending++]=255&ue.bi_buf,ue.bi_buf>>=8,ue.bi_valid-=8)}(ee)}},{"../utils/common":41}],53:[function(n,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,i,s){(function(o){(function(a,l){if(!a.setImmediate){var u,c,h,d,f=1,p={},m=!1,y=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,u={}.toString.call(a.process)==="[object process]"?function(C){process.nextTick(function(){E(C)})}:function(){if(a.postMessage&&!a.importScripts){var C=!0,w=a.onmessage;return a.onmessage=function(){C=!1},a.postMessage("","*"),a.onmessage=w,C}}()?(d="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",D,!1):a.attachEvent("onmessage",D),function(C){a.postMessage(d+C,"*")}):a.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){E(C.data)},function(C){h.port2.postMessage(C)}):y&&"onreadystatechange"in y.createElement("script")?(c=y.documentElement,function(C){var w=y.createElement("script");w.onreadystatechange=function(){E(C),w.onreadystatechange=null,c.removeChild(w),w=null},c.appendChild(w)}):function(C){setTimeout(E,0,C)},b.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var w=new Array(arguments.length-1),A=0;A"u"?o===void 0?this:o:self)}).call(this,typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(x9);var Mxe=x9.exports;const w9=jo(Mxe),Ixe=e=>`# Custom Theme for Web + */(function(n){e.exports=n()})(function(){return function n(i,s,o){function a(c,h){if(!s[c]){if(!i[c]){var d=typeof ip=="function"&&ip;if(!h&&d)return d(c,!0);if(l)return l(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var p=s[c]={exports:{}};i[c][0].call(p.exports,function(m){var y=i[c][1][m];return a(y||m)},p,p.exports,n,i,s,o)}return s[c].exports}for(var l=typeof ip=="function"&&ip,u=0;u>2,p=(3&c)<<4|h>>4,m=1>6:64,y=2>4,h=(15&f)<<4|(p=l.indexOf(u.charAt(y++)))>>2,d=(3&p)<<6|(m=l.indexOf(u.charAt(y++))),E[b++]=c,p!==64&&(E[b++]=h),m!==64&&(E[b++]=d);return E}},{"./support":30,"./utils":32}],2:[function(n,i,s){var o=n("./external"),a=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),u=n("./stream/DataLengthProbe");function c(h,d,f,p,m){this.compressedSize=h,this.uncompressedSize=d,this.crc32=f,this.compression=p,this.compressedContent=m}c.prototype={getContentWorker:function(){var h=new a(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(h,d,f){return h.pipe(new l).pipe(new u("uncompressedSize")).pipe(d.compressWorker(f)).pipe(new u("compressedSize")).withStreamInfo("compression",d)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,s){var o=n("./utils"),a=function(){for(var l,u=[],c=0;c<256;c++){l=c;for(var h=0;h<8;h++)l=1&l?3988292384^l>>>1:l>>>1;u[c]=l}return u}();i.exports=function(l,u){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(c,h,d,f){var p=a,m=f+d;c^=-1;for(var y=f;y>>8^p[255&(c^h[y])];return-1^c}(0|u,l,l.length,0):function(c,h,d,f){var p=a,m=f+d;c^=-1;for(var y=f;y>>8^p[255&(c^h.charCodeAt(y))];return-1^c}(0|u,l,l.length,0):0}},{"./utils":32}],5:[function(n,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,i,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:o}},{lie:37}],7:[function(n,i,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=n("pako"),l=n("./utils"),u=n("./stream/GenericWorker"),c=o?"uint8array":"array";function h(d,f){u.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=f,this.meta={}}s.magic="\b\0",l.inherits(h,u),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(c,d.data),!1)},h.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(f){d.push({data:f,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,s){function o(p,m){var y,b="";for(y=0;y>>=8;return b}function a(p,m,y,b,v,E){var D,C,w=p.file,T=p.compression,k=E!==c.utf8encode,O=l.transformTo("string",E(w.name)),P=l.transformTo("string",c.utf8encode(w.name)),I=w.comment,F=l.transformTo("string",E(I)),L=l.transformTo("string",c.utf8encode(I)),_=P.length!==w.name.length,A=L.length!==I.length,M="",R="",B="",U=w.dir,V=w.date,K={crc32:0,compressedSize:0,uncompressedSize:0};m&&!y||(K.crc32=p.crc32,K.compressedSize=p.compressedSize,K.uncompressedSize=p.uncompressedSize);var J=0;m&&(J|=8),k||!_&&!A||(J|=2048);var G=0,Y=0;U&&(G|=16),v==="UNIX"?(Y=798,G|=function(X,le){var be=X;return X||(be=le?16893:33204),(65535&be)<<16}(w.unixPermissions,U)):(Y=20,G|=function(X){return 63&(X||0)}(w.dosPermissions)),D=V.getUTCHours(),D<<=6,D|=V.getUTCMinutes(),D<<=5,D|=V.getUTCSeconds()/2,C=V.getUTCFullYear()-1980,C<<=4,C|=V.getUTCMonth()+1,C<<=5,C|=V.getUTCDate(),_&&(R=o(1,1)+o(h(O),4)+P,M+="up"+o(R.length,2)+R),A&&(B=o(1,1)+o(h(F),4)+L,M+="uc"+o(B.length,2)+B);var Q="";return Q+=` +\0`,Q+=o(J,2),Q+=T.magic,Q+=o(D,2),Q+=o(C,2),Q+=o(K.crc32,4),Q+=o(K.compressedSize,4),Q+=o(K.uncompressedSize,4),Q+=o(O.length,2),Q+=o(M.length,2),{fileRecord:d.LOCAL_FILE_HEADER+Q+O+M,dirRecord:d.CENTRAL_FILE_HEADER+o(Y,2)+Q+o(F.length,2)+"\0\0\0\0"+o(G,4)+o(b,4)+O+M+F}}var l=n("../utils"),u=n("../stream/GenericWorker"),c=n("../utf8"),h=n("../crc32"),d=n("../signature");function f(p,m,y,b){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=y,this.encodeFileName=b,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(f,u),f.prototype.push=function(p){var m=p.meta.percent||0,y=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,u.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:y?(m+100*(y-b-1))/y:100}}))},f.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var m=this.streamFiles&&!p.file.dir;if(m){var y=a(p,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(p){this.accumulate=!1;var m=this.streamFiles&&!p.file.dir,y=a(p,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),m)this.push({data:function(b){return d.DATA_DESCRIPTOR+o(b.crc32,4)+o(b.compressedSize,4)+o(b.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var p=this.bytesWritten,m=0;m=this.index;u--)c=(c<<8)+this.byteAt(u);return this.index+=l,c},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},i.exports=a},{"../utils":32}],19:[function(n,i,s){var o=n("./Uint8ArrayReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,i,s){var o=n("./DataReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,i,s){var o=n("./ArrayReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,i,s){var o=n("../utils"),a=n("../support"),l=n("./ArrayReader"),u=n("./StringReader"),c=n("./NodeBufferReader"),h=n("./Uint8ArrayReader");i.exports=function(d){var f=o.getTypeOf(d);return o.checkSupport(f),f!=="string"||a.uint8array?f==="nodebuffer"?new c(d):a.uint8array?new h(o.transformTo("uint8array",d)):new l(o.transformTo("array",d)):new u(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,i,s){var o=n("./GenericWorker"),a=n("../utils");function l(u){o.call(this,"ConvertWorker to "+u),this.destType=u}a.inherits(l,o),l.prototype.processChunk=function(u){this.push({data:a.transformTo(this.destType,u.data),meta:u.meta})},i.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,i,s){var o=n("./GenericWorker"),a=n("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,o),l.prototype.processChunk=function(u){this.streamInfo.crc32=a(u.data,this.streamInfo.crc32||0),this.push(u)},i.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,i,s){var o=n("../utils"),a=n("./GenericWorker");function l(u){a.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}o.inherits(l,a),l.prototype.processChunk=function(u){if(u){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+u.data.length}a.prototype.processChunk.call(this,u)},i.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,i,s){var o=n("../utils"),a=n("./GenericWorker");function l(u){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(h){c.dataIsReady=!0,c.data=h,c.max=h&&h.length||0,c.type=o.getTypeOf(h),c.isPaused||c._tickAndRepeat()},function(h){c.error(h)})}o.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,c);break;case"uint8array":u=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":u=this.data.slice(this.index,c)}return this.index=c,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,i,s){function o(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var u=0;u "+a:a}},i.exports=o},{}],29:[function(n,i,s){var o=n("../utils"),a=n("./ConvertWorker"),l=n("./GenericWorker"),u=n("../base64"),c=n("../support"),h=n("../external"),d=null;if(c.nodestream)try{d=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function f(m,y){return new h.Promise(function(b,v){var E=[],D=m._internalType,C=m._outputType,w=m._mimeType;m.on("data",function(T,k){E.push(T),y&&y(k)}).on("error",function(T){E=[],v(T)}).on("end",function(){try{var T=function(k,O,P){switch(k){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),P);case"base64":return u.encode(O);default:return o.transformTo(k,O)}}(C,function(k,O){var P,I=0,F=null,L=0;for(P=0;P"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(o),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,i,s){for(var o=n("./utils"),a=n("./support"),l=n("./nodejsUtils"),u=n("./stream/GenericWorker"),c=new Array(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;c[254]=c[254]=1;function d(){u.call(this,"utf-8 decode"),this.leftOver=null}function f(){u.call(this,"utf-8 encode")}s.utf8encode=function(p){return a.nodebuffer?l.newBufferFrom(p,"utf-8"):function(m){var y,b,v,E,D,C=m.length,w=0;for(E=0;E>>6:(b<65536?y[D++]=224|b>>>12:(y[D++]=240|b>>>18,y[D++]=128|b>>>12&63),y[D++]=128|b>>>6&63),y[D++]=128|63&b);return y}(p)},s.utf8decode=function(p){return a.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):function(m){var y,b,v,E,D=m.length,C=new Array(2*D);for(y=b=0;y>10&1023,C[b++]=56320|1023&v)}return C.length!==b&&(C.subarray?C=C.subarray(0,b):C.length=b),o.applyFromCharCode(C)}(p=o.transformTo(a.uint8array?"uint8array":"array",p))},o.inherits(d,u),d.prototype.processChunk=function(p){var m=o.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var y=m;(m=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),m.set(y,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var b=function(E,D){var C;for((D=D||E.length)>E.length&&(D=E.length),C=D-1;0<=C&&(192&E[C])==128;)C--;return C<0||C===0?D:C+c[E[C]]>D?C:D}(m),v=m;b!==m.length&&(a.uint8array?(v=m.subarray(0,b),this.leftOver=m.subarray(b,m.length)):(v=m.slice(0,b),this.leftOver=m.slice(b,m.length))),this.push({data:s.utf8decode(v),meta:p.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(f,u),f.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,i,s){var o=n("./support"),a=n("./base64"),l=n("./nodejsUtils"),u=n("./external");function c(y){return y}function h(y,b){for(var v=0;v>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var m,y,b,v=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?f[b++]=224|p>>>12:(f[b++]=240|p>>>18,f[b++]=128|p>>>12&63),f[b++]=128|p>>>6&63),f[b++]=128|63&p);return f},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var f=new o.Buf8(d.length),p=0,m=f.length;p>10&1023,E[m++]=56320|1023&y)}return h(E,m)},s.utf8border=function(d,f){var p;for((f=f||d.length)>d.length&&(f=d.length),p=f-1;0<=p&&(192&d[p])==128;)p--;return p<0||p===0?f:p+u[d[p]]>f?p:f}},{"./common":41}],43:[function(n,i,s){i.exports=function(o,a,l,u){for(var c=65535&o|0,h=o>>>16&65535|0,d=0;l!==0;){for(l-=d=2e3>>1:a>>>1;l[u]=a}return l}();i.exports=function(a,l,u,c){var h=o,d=c+u;a^=-1;for(var f=c;f>>8^h[255&(a^l[f])];return-1^a}},{}],46:[function(n,i,s){var o,a=n("../utils/common"),l=n("./trees"),u=n("./adler32"),c=n("./crc32"),h=n("./messages"),d=0,f=4,p=0,m=-2,y=-1,b=4,v=2,E=8,D=9,C=286,w=30,T=19,k=2*C+1,O=15,P=3,I=258,F=I+P+1,L=42,_=113,A=1,M=2,R=3,B=4;function U(W,ye){return W.msg=h[ye],ye}function V(W){return(W<<1)-(4W.avail_out&&(pe=W.avail_out),pe!==0&&(a.arraySet(W.output,ye.pending_buf,ye.pending_out,pe,W.next_out),W.next_out+=pe,ye.pending_out+=pe,W.total_out+=pe,W.avail_out-=pe,ye.pending-=pe,ye.pending===0&&(ye.pending_out=0))}function G(W,ye){l._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,ye),W.block_start=W.strstart,J(W.strm)}function Y(W,ye){W.pending_buf[W.pending++]=ye}function Q(W,ye){W.pending_buf[W.pending++]=ye>>>8&255,W.pending_buf[W.pending++]=255&ye}function X(W,ye){var pe,re,ee=W.max_chain_length,ue=W.strstart,De=W.prev_length,Ce=W.nice_match,fe=W.strstart>W.w_size-F?W.strstart-(W.w_size-F):0,Ee=W.window,je=W.w_mask,ae=W.prev,ve=W.strstart+I,Te=Ee[ue+De-1],ze=Ee[ue+De];W.prev_length>=W.good_match&&(ee>>=2),Ce>W.lookahead&&(Ce=W.lookahead);do if(Ee[(pe=ye)+De]===ze&&Ee[pe+De-1]===Te&&Ee[pe]===Ee[ue]&&Ee[++pe]===Ee[ue+1]){ue+=2,pe++;do;while(Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&Ee[++ue]===Ee[++pe]&&uefe&&--ee!=0);return De<=W.lookahead?De:W.lookahead}function le(W){var ye,pe,re,ee,ue,De,Ce,fe,Ee,je,ae=W.w_size;do{if(ee=W.window_size-W.lookahead-W.strstart,W.strstart>=ae+(ae-F)){for(a.arraySet(W.window,W.window,ae,ae,0),W.match_start-=ae,W.strstart-=ae,W.block_start-=ae,ye=pe=W.hash_size;re=W.head[--ye],W.head[ye]=ae<=re?re-ae:0,--pe;);for(ye=pe=ae;re=W.prev[--ye],W.prev[ye]=ae<=re?re-ae:0,--pe;);ee+=ae}if(W.strm.avail_in===0)break;if(De=W.strm,Ce=W.window,fe=W.strstart+W.lookahead,Ee=ee,je=void 0,je=De.avail_in,Ee=P)for(ue=W.strstart-W.insert,W.ins_h=W.window[ue],W.ins_h=(W.ins_h<=P&&(W.ins_h=(W.ins_h<=P)if(re=l._tr_tally(W,W.strstart-W.match_start,W.match_length-P),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=P){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<=P&&(W.ins_h=(W.ins_h<=P&&W.match_length<=W.prev_length){for(ee=W.strstart+W.lookahead-P,re=l._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-P),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=ee&&(W.ins_h=(W.ins_h<W.pending_buf_size-5&&(pe=W.pending_buf_size-5);;){if(W.lookahead<=1){if(le(W),W.lookahead===0&&ye===d)return A;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var re=W.block_start+pe;if((W.strstart===0||W.strstart>=re)&&(W.lookahead=W.strstart-re,W.strstart=re,G(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-F&&(G(W,!1),W.strm.avail_out===0))return A}return W.insert=0,ye===f?(G(W,!0),W.strm.avail_out===0?R:B):(W.strstart>W.block_start&&(G(W,!1),W.strm.avail_out),A)}),new xe(4,4,8,4,be),new xe(4,5,16,8,be),new xe(4,6,32,32,be),new xe(4,4,16,16,ce),new xe(8,16,32,32,ce),new xe(8,16,128,128,ce),new xe(8,32,128,256,ce),new xe(32,128,258,1024,ce),new xe(32,258,258,4096,ce)],s.deflateInit=function(W,ye){return yt(W,ye,E,15,8,0)},s.deflateInit2=yt,s.deflateReset=Pt,s.deflateResetKeep=Re,s.deflateSetHeader=function(W,ye){return W&&W.state?W.state.wrap!==2?m:(W.state.gzhead=ye,p):m},s.deflate=function(W,ye){var pe,re,ee,ue;if(!W||!W.state||5>8&255),Y(re,re.gzhead.time>>16&255),Y(re,re.gzhead.time>>24&255),Y(re,re.level===9?2:2<=re.strategy||re.level<2?4:0),Y(re,255&re.gzhead.os),re.gzhead.extra&&re.gzhead.extra.length&&(Y(re,255&re.gzhead.extra.length),Y(re,re.gzhead.extra.length>>8&255)),re.gzhead.hcrc&&(W.adler=c(W.adler,re.pending_buf,re.pending,0)),re.gzindex=0,re.status=69):(Y(re,0),Y(re,0),Y(re,0),Y(re,0),Y(re,0),Y(re,re.level===9?2:2<=re.strategy||re.level<2?4:0),Y(re,3),re.status=_);else{var De=E+(re.w_bits-8<<4)<<8;De|=(2<=re.strategy||re.level<2?0:re.level<6?1:re.level===6?2:3)<<6,re.strstart!==0&&(De|=32),De+=31-De%31,re.status=_,Q(re,De),re.strstart!==0&&(Q(re,W.adler>>>16),Q(re,65535&W.adler)),W.adler=1}if(re.status===69)if(re.gzhead.extra){for(ee=re.pending;re.gzindex<(65535&re.gzhead.extra.length)&&(re.pending!==re.pending_buf_size||(re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),J(W),ee=re.pending,re.pending!==re.pending_buf_size));)Y(re,255&re.gzhead.extra[re.gzindex]),re.gzindex++;re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),re.gzindex===re.gzhead.extra.length&&(re.gzindex=0,re.status=73)}else re.status=73;if(re.status===73)if(re.gzhead.name){ee=re.pending;do{if(re.pending===re.pending_buf_size&&(re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),J(W),ee=re.pending,re.pending===re.pending_buf_size)){ue=1;break}ue=re.gzindexee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),ue===0&&(re.gzindex=0,re.status=91)}else re.status=91;if(re.status===91)if(re.gzhead.comment){ee=re.pending;do{if(re.pending===re.pending_buf_size&&(re.gzhead.hcrc&&re.pending>ee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),J(W),ee=re.pending,re.pending===re.pending_buf_size)){ue=1;break}ue=re.gzindexee&&(W.adler=c(W.adler,re.pending_buf,re.pending-ee,ee)),ue===0&&(re.status=103)}else re.status=103;if(re.status===103&&(re.gzhead.hcrc?(re.pending+2>re.pending_buf_size&&J(W),re.pending+2<=re.pending_buf_size&&(Y(re,255&W.adler),Y(re,W.adler>>8&255),W.adler=0,re.status=_)):re.status=_),re.pending!==0){if(J(W),W.avail_out===0)return re.last_flush=-1,p}else if(W.avail_in===0&&V(ye)<=V(pe)&&ye!==f)return U(W,-5);if(re.status===666&&W.avail_in!==0)return U(W,-5);if(W.avail_in!==0||re.lookahead!==0||ye!==d&&re.status!==666){var Ce=re.strategy===2?function(fe,Ee){for(var je;;){if(fe.lookahead===0&&(le(fe),fe.lookahead===0)){if(Ee===d)return A;break}if(fe.match_length=0,je=l._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++,je&&(G(fe,!1),fe.strm.avail_out===0))return A}return fe.insert=0,Ee===f?(G(fe,!0),fe.strm.avail_out===0?R:B):fe.last_lit&&(G(fe,!1),fe.strm.avail_out===0)?A:M}(re,ye):re.strategy===3?function(fe,Ee){for(var je,ae,ve,Te,ze=fe.window;;){if(fe.lookahead<=I){if(le(fe),fe.lookahead<=I&&Ee===d)return A;if(fe.lookahead===0)break}if(fe.match_length=0,fe.lookahead>=P&&0fe.lookahead&&(fe.match_length=fe.lookahead)}if(fe.match_length>=P?(je=l._tr_tally(fe,1,fe.match_length-P),fe.lookahead-=fe.match_length,fe.strstart+=fe.match_length,fe.match_length=0):(je=l._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++),je&&(G(fe,!1),fe.strm.avail_out===0))return A}return fe.insert=0,Ee===f?(G(fe,!0),fe.strm.avail_out===0?R:B):fe.last_lit&&(G(fe,!1),fe.strm.avail_out===0)?A:M}(re,ye):o[re.level].func(re,ye);if(Ce!==R&&Ce!==B||(re.status=666),Ce===A||Ce===R)return W.avail_out===0&&(re.last_flush=-1),p;if(Ce===M&&(ye===1?l._tr_align(re):ye!==5&&(l._tr_stored_block(re,0,0,!1),ye===3&&(K(re.head),re.lookahead===0&&(re.strstart=0,re.block_start=0,re.insert=0))),J(W),W.avail_out===0))return re.last_flush=-1,p}return ye!==f?p:re.wrap<=0?1:(re.wrap===2?(Y(re,255&W.adler),Y(re,W.adler>>8&255),Y(re,W.adler>>16&255),Y(re,W.adler>>24&255),Y(re,255&W.total_in),Y(re,W.total_in>>8&255),Y(re,W.total_in>>16&255),Y(re,W.total_in>>24&255)):(Q(re,W.adler>>>16),Q(re,65535&W.adler)),J(W),0=pe.w_size&&(ue===0&&(K(pe.head),pe.strstart=0,pe.block_start=0,pe.insert=0),Ee=new a.Buf8(pe.w_size),a.arraySet(Ee,ye,je-pe.w_size,pe.w_size,0),ye=Ee,je=pe.w_size),De=W.avail_in,Ce=W.next_in,fe=W.input,W.avail_in=je,W.next_in=0,W.input=ye,le(pe);pe.lookahead>=P;){for(re=pe.strstart,ee=pe.lookahead-(P-1);pe.ins_h=(pe.ins_h<>>=P=O>>>24,D-=P,(P=O>>>16&255)===0)M[h++]=65535&O;else{if(!(16&P)){if(!(64&P)){O=C[(65535&O)+(E&(1<>>=P,D-=P),D<15&&(E+=A[u++]<>>=P=O>>>24,D-=P,!(16&(P=O>>>16&255))){if(!(64&P)){O=w[(65535&O)+(E&(1<>>=P,D-=P,(P=h-d)>3,E&=(1<<(D-=I<<3))-1,o.next_in=u,o.next_out=h,o.avail_in=u>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24)}function E(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function D(L){var _;return L&&L.state?(_=L.state,L.total_in=L.total_out=_.total=0,L.msg="",_.wrap&&(L.adler=1&_.wrap),_.mode=m,_.last=0,_.havedict=0,_.dmax=32768,_.head=null,_.hold=0,_.bits=0,_.lencode=_.lendyn=new o.Buf32(y),_.distcode=_.distdyn=new o.Buf32(b),_.sane=1,_.back=-1,f):p}function C(L){var _;return L&&L.state?((_=L.state).wsize=0,_.whave=0,_.wnext=0,D(L)):p}function w(L,_){var A,M;return L&&L.state?(M=L.state,_<0?(A=0,_=-_):(A=1+(_>>4),_<48&&(_&=15)),_&&(_<8||15<_)?p:(M.window!==null&&M.wbits!==_&&(M.window=null),M.wrap=A,M.wbits=_,C(L))):p}function T(L,_){var A,M;return L?(M=new E,(L.state=M).window=null,(A=w(L,_))!==f&&(L.state=null),A):p}var k,O,P=!0;function I(L){if(P){var _;for(k=new o.Buf32(512),O=new o.Buf32(32),_=0;_<144;)L.lens[_++]=8;for(;_<256;)L.lens[_++]=9;for(;_<280;)L.lens[_++]=7;for(;_<288;)L.lens[_++]=8;for(c(h,L.lens,0,288,k,0,L.work,{bits:9}),_=0;_<32;)L.lens[_++]=5;c(d,L.lens,0,32,O,0,L.work,{bits:5}),P=!1}L.lencode=k,L.lenbits=9,L.distcode=O,L.distbits=5}function F(L,_,A,M){var R,B=L.state;return B.window===null&&(B.wsize=1<=B.wsize?(o.arraySet(B.window,_,A-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(M<(R=B.wsize-B.wnext)&&(R=M),o.arraySet(B.window,_,A-M,R,B.wnext),(M-=R)?(o.arraySet(B.window,_,A-M,M,0),B.wnext=M,B.whave=B.wsize):(B.wnext+=R,B.wnext===B.wsize&&(B.wnext=0),B.whave>>8&255,A.check=l(A.check,ue,2,0),G=J=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&J)<<8)+(J>>8))%31){L.msg="incorrect header check",A.mode=30;break}if((15&J)!=8){L.msg="unknown compression method",A.mode=30;break}if(G-=4,W=8+(15&(J>>>=4)),A.wbits===0)A.wbits=W;else if(W>A.wbits){L.msg="invalid window size",A.mode=30;break}A.dmax=1<>8&1),512&A.flags&&(ue[0]=255&J,ue[1]=J>>>8&255,A.check=l(A.check,ue,2,0)),G=J=0,A.mode=3;case 3:for(;G<32;){if(V===0)break e;V--,J+=M[B++]<>>8&255,ue[2]=J>>>16&255,ue[3]=J>>>24&255,A.check=l(A.check,ue,4,0)),G=J=0,A.mode=4;case 4:for(;G<16;){if(V===0)break e;V--,J+=M[B++]<>8),512&A.flags&&(ue[0]=255&J,ue[1]=J>>>8&255,A.check=l(A.check,ue,2,0)),G=J=0,A.mode=5;case 5:if(1024&A.flags){for(;G<16;){if(V===0)break e;V--,J+=M[B++]<>>8&255,A.check=l(A.check,ue,2,0)),G=J=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&(V<(X=A.length)&&(X=V),X&&(A.head&&(W=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Array(A.head.extra_len)),o.arraySet(A.head.extra,M,B,X,W)),512&A.flags&&(A.check=l(A.check,M,X,B)),V-=X,B+=X,A.length-=X),A.length))break e;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(V===0)break e;for(X=0;W=M[B+X++],A.head&&W&&A.length<65536&&(A.head.name+=String.fromCharCode(W)),W&&X>9&1,A.head.done=!0),L.adler=A.check=0,A.mode=12;break;case 10:for(;G<32;){if(V===0)break e;V--,J+=M[B++]<>>=7&G,G-=7&G,A.mode=27;break}for(;G<3;){if(V===0)break e;V--,J+=M[B++]<>>=1)){case 0:A.mode=14;break;case 1:if(I(A),A.mode=20,_!==6)break;J>>>=2,G-=2;break e;case 2:A.mode=17;break;case 3:L.msg="invalid block type",A.mode=30}J>>>=2,G-=2;break;case 14:for(J>>>=7&G,G-=7&G;G<32;){if(V===0)break e;V--,J+=M[B++]<>>16^65535)){L.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&J,G=J=0,A.mode=15,_===6)break e;case 15:A.mode=16;case 16:if(X=A.length){if(V>>=5,G-=5,A.ndist=1+(31&J),J>>>=5,G-=5,A.ncode=4+(15&J),J>>>=4,G-=4,286>>=3,G-=3}for(;A.have<19;)A.lens[De[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,pe={bits:A.lenbits},ye=c(0,A.lens,0,19,A.lencode,0,A.work,pe),A.lenbits=pe.bits,ye){L.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have>>16&255,ke=65535&ee,!((ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>>=ce,G-=ce,A.lens[A.have++]=ke;else{if(ke===16){for(re=ce+2;G>>=ce,G-=ce,A.have===0){L.msg="invalid bit length repeat",A.mode=30;break}W=A.lens[A.have-1],X=3+(3&J),J>>>=2,G-=2}else if(ke===17){for(re=ce+3;G>>=ce)),J>>>=3,G-=3}else{for(re=ce+7;G>>=ce)),J>>>=7,G-=7}if(A.have+X>A.nlen+A.ndist){L.msg="invalid bit length repeat",A.mode=30;break}for(;X--;)A.lens[A.have++]=W}}if(A.mode===30)break;if(A.lens[256]===0){L.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,pe={bits:A.lenbits},ye=c(h,A.lens,0,A.nlen,A.lencode,0,A.work,pe),A.lenbits=pe.bits,ye){L.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,pe={bits:A.distbits},ye=c(d,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,pe),A.distbits=pe.bits,ye){L.msg="invalid distances set",A.mode=30;break}if(A.mode=20,_===6)break e;case 20:A.mode=21;case 21:if(6<=V&&258<=K){L.next_out=U,L.avail_out=K,L.next_in=B,L.avail_in=V,A.hold=J,A.bits=G,u(L,Q),U=L.next_out,R=L.output,K=L.avail_out,B=L.next_in,M=L.input,V=L.avail_in,J=A.hold,G=A.bits,A.mode===12&&(A.back=-1);break}for(A.back=0;xe=(ee=A.lencode[J&(1<>>16&255,ke=65535&ee,!((ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>Re)])>>>16&255,ke=65535&ee,!(Re+(ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>>=Re,G-=Re,A.back+=Re}if(J>>>=ce,G-=ce,A.back+=ce,A.length=ke,xe===0){A.mode=26;break}if(32&xe){A.back=-1,A.mode=12;break}if(64&xe){L.msg="invalid literal/length code",A.mode=30;break}A.extra=15&xe,A.mode=22;case 22:if(A.extra){for(re=A.extra;G>>=A.extra,G-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;xe=(ee=A.distcode[J&(1<>>16&255,ke=65535&ee,!((ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>Re)])>>>16&255,ke=65535&ee,!(Re+(ce=ee>>>24)<=G);){if(V===0)break e;V--,J+=M[B++]<>>=Re,G-=Re,A.back+=Re}if(J>>>=ce,G-=ce,A.back+=ce,64&xe){L.msg="invalid distance code",A.mode=30;break}A.offset=ke,A.extra=15&xe,A.mode=24;case 24:if(A.extra){for(re=A.extra;G>>=A.extra,G-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){L.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(K===0)break e;if(X=Q-K,A.offset>X){if((X=A.offset-X)>A.whave&&A.sane){L.msg="invalid distance too far back",A.mode=30;break}le=X>A.wnext?(X-=A.wnext,A.wsize-X):A.wnext-X,X>A.length&&(X=A.length),be=A.window}else be=R,le=U-A.offset,X=A.length;for(Kk?(P=le[be+b[_]],G[Y+b[_]]):(P=96,0),E=1<>U)+(D-=E)]=O<<24|P<<16|I|0,D!==0;);for(E=1<>=1;if(E!==0?(J&=E-1,J+=E):J=0,_++,--Q[L]==0){if(L===M)break;L=d[f+b[_]]}if(R>>7)]}function Y(ee,ue){ee.pending_buf[ee.pending++]=255&ue,ee.pending_buf[ee.pending++]=ue>>>8&255}function Q(ee,ue,De){ee.bi_valid>v-De?(ee.bi_buf|=ue<>v-ee.bi_valid,ee.bi_valid+=De-v):(ee.bi_buf|=ue<>>=1,De<<=1,0<--ue;);return De>>>1}function be(ee,ue,De){var Ce,fe,Ee=new Array(b+1),je=0;for(Ce=1;Ce<=b;Ce++)Ee[Ce]=je=je+De[Ce-1]<<1;for(fe=0;fe<=ue;fe++){var ae=ee[2*fe+1];ae!==0&&(ee[2*fe]=le(Ee[ae]++,ae))}}function ce(ee){var ue;for(ue=0;ue>1;1<=De;De--)Re(ee,Ee,De);for(fe=ve;De=ee.heap[1],ee.heap[1]=ee.heap[ee.heap_len--],Re(ee,Ee,1),Ce=ee.heap[1],ee.heap[--ee.heap_max]=De,ee.heap[--ee.heap_max]=Ce,Ee[2*fe]=Ee[2*De]+Ee[2*Ce],ee.depth[fe]=(ee.depth[De]>=ee.depth[Ce]?ee.depth[De]:ee.depth[Ce])+1,Ee[2*De+1]=Ee[2*Ce+1]=fe,ee.heap[1]=fe++,Re(ee,Ee,1),2<=ee.heap_len;);ee.heap[--ee.heap_max]=ee.heap[1],function(ze,at){var xt,pt,kt,nt,ht,It,sr=at.dyn_tree,ln=at.max_code,_i=at.stat_desc.static_tree,$n=at.stat_desc.has_stree,ds=at.stat_desc.extra_bits,mr=at.stat_desc.extra_base,Zr=at.stat_desc.max_length,ui=0;for(nt=0;nt<=b;nt++)ze.bl_count[nt]=0;for(sr[2*ze.heap[ze.heap_max]+1]=0,xt=ze.heap_max+1;xt>=7;fe>>=1)if(1&Te&&ae.dyn_ltree[2*ve]!==0)return a;if(ae.dyn_ltree[18]!==0||ae.dyn_ltree[20]!==0||ae.dyn_ltree[26]!==0)return l;for(ve=32;ve>>3,(Ee=ee.static_len+3+7>>>3)<=fe&&(fe=Ee)):fe=Ee=De+5,De+4<=fe&&ue!==-1?re(ee,ue,De,Ce):ee.strategy===4||Ee===fe?(Q(ee,2+(Ce?1:0),3),Pt(ee,F,L)):(Q(ee,4+(Ce?1:0),3),function(ae,ve,Te,ze){var at;for(Q(ae,ve-257,5),Q(ae,Te-1,5),Q(ae,ze-4,4),at=0;at>>8&255,ee.pending_buf[ee.d_buf+2*ee.last_lit+1]=255&ue,ee.pending_buf[ee.l_buf+ee.last_lit]=255&De,ee.last_lit++,ue===0?ee.dyn_ltree[2*De]++:(ee.matches++,ue--,ee.dyn_ltree[2*(A[De]+d+1)]++,ee.dyn_dtree[2*G(ue)]++),ee.last_lit===ee.lit_bufsize-1},s._tr_align=function(ee){Q(ee,2,3),X(ee,D,F),function(ue){ue.bi_valid===16?(Y(ue,ue.bi_buf),ue.bi_buf=0,ue.bi_valid=0):8<=ue.bi_valid&&(ue.pending_buf[ue.pending++]=255&ue.bi_buf,ue.bi_buf>>=8,ue.bi_valid-=8)}(ee)}},{"../utils/common":41}],53:[function(n,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,i,s){(function(o){(function(a,l){if(!a.setImmediate){var u,c,h,d,f=1,p={},m=!1,y=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,u={}.toString.call(a.process)==="[object process]"?function(C){process.nextTick(function(){E(C)})}:function(){if(a.postMessage&&!a.importScripts){var C=!0,w=a.onmessage;return a.onmessage=function(){C=!1},a.postMessage("","*"),a.onmessage=w,C}}()?(d="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",D,!1):a.attachEvent("onmessage",D),function(C){a.postMessage(d+C,"*")}):a.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){E(C.data)},function(C){h.port2.postMessage(C)}):y&&"onreadystatechange"in y.createElement("script")?(c=y.documentElement,function(C){var w=y.createElement("script");w.onreadystatechange=function(){E(C),w.onreadystatechange=null,c.removeChild(w),w=null},c.appendChild(w)}):function(C){setTimeout(E,0,C)},b.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var w=new Array(arguments.length-1),T=0;T"u"?o===void 0?this:o:self)}).call(this,typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(S9);var Nxe=S9.exports;const D9=Ho(Nxe),Rxe=e=>`# Custom Theme for Web This folder contains \`.css\` files you can include for you web project. @@ -1535,7 +1535,19 @@ To enable automatic light-/dark-mode you need to add a media-query: \`@media (prefers-color-scheme: dark) {\` You may want to use \`${e}-custom-colors-full.css\` or you can copy it from the file as needed. -`,Mo="replace",J2=["Functional","Regular","Expressive"],S9=["Mobile","Tablet"],w1=["3xs","2xs","xs","sm","md","lg","xl","2xl","3xl"],Rxe=e=>`package ${Mo}.theme +`,ft="DesignSystem",St="DS",zt="replace",X2=["Functional","Regular","Expressive"],E9=["Mobile","Tablet"],JC=["3xs","2xs","xs","sm","md","lg","xl","2xl","3xl"],Bxe=e=>`package ${zt}.${e.toLowerCase()} + +import ${zt}.${St}Theme +import ${zt}.${e.toLowerCase()}.data.${e}ColorMap +import ${zt}.${e.toLowerCase()}.data.${e}DimensionsMap +import ${zt}.${e.toLowerCase()}.data.${e}TypographyMap + +object ${e}Theme : ${St}Theme { + override val colorMap = ${e}ColorMap + override val dimensionsMap = ${e}DimensionsMap + override val typographyMap = ${e}TypographyMap +} +`,jxe=(e,t)=>`package ${zt} import android.app.Activity import androidx.compose.foundation.isSystemInDarkTheme @@ -1543,76 +1555,107 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.ReadOnlyComposable import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.staticCompositionLocalOf +import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.TextUnit import androidx.core.view.WindowCompat - -private val DarkColorScheme = getColorSchemeDark() - -private val LightColorScheme = getColorSchemeLight() - - -object ${e} { - val colors: ${e}ColorScheme +import ${zt}.${ft}ColorScheme.Companion.getColorSchemeDark +import ${zt}.${ft}ColorScheme.Companion.getColorSchemeLight +import ${zt}.${ft}Dimensions.Companion.getDimensionsExpressiveMobile +import ${zt}.${ft}Dimensions.Companion.getDimensionsExpressiveTablet +import ${zt}.${ft}Dimensions.Companion.getDimensionsFunctionalMobile +import ${zt}.${ft}Dimensions.Companion.getDimensionsFunctionalTablet +import ${zt}.${ft}Dimensions.Companion.getDimensionsRegularMobile +import ${zt}.${ft}Dimensions.Companion.getDimensionsRegularTablet +import ${zt}.${ft}TextStyles.Companion.getTextStyles +import ${zt}.${ft}Typography.Companion.getTypographyExpressiveMobile +import ${zt}.${ft}Typography.Companion.getTypographyExpressiveTablet +import ${zt}.${ft}Typography.Companion.getTypographyFunctionalMobile +import ${zt}.${ft}Typography.Companion.getTypographyFunctionalTablet +import ${zt}.${ft}Typography.Companion.getTypographyRegularMobile +import ${zt}.${ft}Typography.Companion.getTypographyRegularTablet +import ${zt}.core.${St}Density +import ${zt}.${t.toLowerCase()}.${e} + + +object ${ft}Theme { + val colors: ${ft}ColorScheme @Composable @ReadOnlyComposable get() = LocalColors.current - val dimensions: ${e}Dimensions + val activeColor: ${St}ColorVariant + @Composable + @ReadOnlyComposable + get() = LocalActiveColor.current + + val dimensions: ${ft}Dimensions @Composable @ReadOnlyComposable get() = LocalDimensions.current - val typography: ${e}TextStyles + val typography: ${ft}TextStyles @Composable @ReadOnlyComposable get() = LocalTypography.current } +interface ${St}Theme { + val colorMap: Map + val dimensionsMap: Map + val typographyMap: Map +} + +internal val LocalTheme = staticCompositionLocalOf<${St}Theme> { ${e} } + @Composable -fun ${e}( - density: Density = Density.REGULAR, +fun ${ft}Theme( + theme: ${St}Theme = ${e}, + density: ${St}Density = ${St}Density.REGULAR, darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit ) { - val configuration = LocalConfiguration.current + val isTablet = LocalConfiguration.current.screenWidthDp > 768 // typography - val typography: ${e}TextStyles = when { - configuration.screenWidthDp > 768 -> + val typography: ${ft}TextStyles = when(isTablet) { + true -> when (density) { - Density.FUNCTIONAL -> getTextStyles(getTypographyFunctionalTablet()) - Density.EXPRESSIVE -> getTextStyles(getTypographyExpressiveTablet()) - else -> getTextStyles(getTypographyRegularTablet()) + ${St}Density.FUNCTIONAL -> getTextStyles(getTypographyFunctionalTablet(theme.typographyMap)) + ${St}Density.EXPRESSIVE -> getTextStyles(getTypographyExpressiveTablet(theme.typographyMap)) + else -> getTextStyles(getTypographyRegularTablet(theme.typographyMap)) } else -> when (density) { - Density.FUNCTIONAL -> getTextStyles(getTypographyFunctionalMobile()) - Density.EXPRESSIVE -> getTextStyles(getTypographyExpressiveMobile()) - else -> getTextStyles(getTypographyRegularMobile()) + ${St}Density.FUNCTIONAL -> getTextStyles(getTypographyFunctionalMobile(theme.typographyMap)) + ${St}Density.EXPRESSIVE -> getTextStyles(getTypographyExpressiveMobile(theme.typographyMap)) + else -> getTextStyles(getTypographyRegularMobile(theme.typographyMap)) } } // screen - val dimensions: ${e}Dimensions = when { - configuration.screenWidthDp > 768 -> + val dimensions: ${ft}Dimensions = when(isTablet) { + true -> when (density) { - Density.FUNCTIONAL -> getDimensionsFunctionalTablet() - Density.EXPRESSIVE -> getDimensionsExpressiveTablet() - else -> getDimensionsRegularTablet() + ${St}Density.FUNCTIONAL -> getDimensionsFunctionalTablet(theme.dimensionsMap) + ${St}Density.EXPRESSIVE -> getDimensionsExpressiveTablet(theme.dimensionsMap) + else -> getDimensionsRegularTablet(theme.dimensionsMap) } else -> when (density) { - Density.FUNCTIONAL -> getDimensionsFunctionalMobile() - Density.EXPRESSIVE -> getDimensionsExpressiveMobile() - else -> getDimensionsRegularMobile() + ${St}Density.FUNCTIONAL -> getDimensionsFunctionalMobile(theme.dimensionsMap) + ${St}Density.EXPRESSIVE -> getDimensionsExpressiveMobile(theme.dimensionsMap) + else -> getDimensionsRegularMobile(theme.dimensionsMap) } } // colors - val colorScheme: ${e}ColorScheme = when { - darkTheme -> DarkColorScheme - else -> LightColorScheme + val colorScheme: ${ft}ColorScheme = when { + darkTheme -> getColorSchemeDark(theme.colorMap) + else -> getColorSchemeLight(theme.colorMap) } val view = LocalView.current if (!view.isInEditMode) { @@ -1625,181 +1668,414 @@ fun ${e}( } CompositionLocalProvider( + LocalTheme provides theme, LocalColors provides colorScheme, LocalDimensions provides dimensions, - LocalTypography provides typography + LocalTypography provides typography, ) { content() } } -`,Bxe=[{name:"onOriginDefault",light:0,dark:0},{name:"onOriginHovered",light:0,dark:0},{name:"onOriginPressed",light:0,dark:0},{name:"originDefault",light:0,dark:0},{name:"originHovered",light:0,dark:0},{name:"originPressed",light:0,dark:0}],$i=(e=Ji)=>`Color(0xff${e.replace("#","")})`,jxe=(e,t)=>{let r=`package ${Mo}.theme +`,zxe=[{name:"onOriginDefault",light:0,dark:0},{name:"onOriginHovered",light:0,dark:0},{name:"onOriginPressed",light:0,dark:0},{name:"originDefault",light:0,dark:0},{name:"originHovered",light:0,dark:0},{name:"originPressed",light:0,dark:0}],Fi=(e=Qi)=>`Color(0xff${e.replace("#","")})`,Hxe=(e,t,r)=>{let n=`package ${zt}.${e.toLowerCase()}.data import androidx.compose.ui.graphics.Color -object Colors { - -`;const n=xk(e,t);return Object.entries(e).forEach(([i,s])=>{n[i].forEach(a=>{const l=`${i}${a.index}`;r+=`val ${l} = ${$i(a.hex)} -`}),r+=`val ${i}Origin = ${$i(s.origin)} -`,r+=`val ${i}OnOriginDefaultLight = ${$i(s.onOriginLight)} -`,r+=`val ${i}OnOriginHoveredLight = ${$i(s.onOriginLightHovered)} -`,r+=`val ${i}OnOriginPressedLight = ${$i(s.onOriginLightPressed)} -`,r+=`val ${i}OriginDefaultLight = ${$i(s.originLight)} -`,r+=`val ${i}OriginHoveredLight = ${$i(s.originLightHovered)} -`,r+=`val ${i}OriginPressedLight = ${$i(s.originLightPressed)} -`,r+=`val ${i}OnOriginDefaultDark = ${$i(s.onOriginDark)} -`,r+=`val ${i}OnOriginHoveredDark = ${$i(s.onOriginDarkHovered)} -`,r+=`val ${i}OnOriginPressedDark = ${$i(s.onOriginDarkPressed)} -`,r+=`val ${i}OriginDefaultDark = ${$i(s.originDark)} -`,r+=`val ${i}OriginHoveredDark = ${$i(s.originDarkHovered)} -`,r+=`val ${i}OriginPressedDark = ${$i(s.originDarkPressed)} -`}),r+="}",r},jN=(e,t,r,n,i)=>{const s=Mr(i?"dark":"light");for(const o of r){n+=`val ${Mr(o)}Colors${s} = ${Mr(o)}Colors( -`;for(const a of t){const l=`${o}${i?a.dark:a.light}`;if(a.transparencyDark!==void 0||a.transparencyLight!==void 0){const u=(a.transparencyDark!==void 0?a.transparencyDark:a.transparencyLight||0)/100;n+=`Colors.${l}.copy(${u}f), -`}else n+=`Colors.${l}, -`}n+=`Colors.${o}OnOriginDefault${s}, -`,n+=`Colors.${o}OnOriginHovered${s}, -`,n+=`Colors.${o}OnOriginPressed${s}, -`,n+=`Colors.${o}OriginDefault${s}, -`,n+=`Colors.${o}OriginHovered${s}, -`,n+=`Colors.${o}OriginPressed${s}, -`,n+=`) -`}n+=`fun getColorScheme${s}( -`;for(const o of r){const a=`${Mr(o)}Colors`;n+=`${o}: ${a} = ${Mr(o)}Colors${s}, -`}n+=` -):${e}ColorScheme = ${e}ColorScheme( -`;for(const o of r)n+=`${o}=${o}, -`;return n+=`) -`,n},zxe=(e,t,r)=>{const n={},i=Object.keys(r);let s=`package ${Mo}.theme - -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.setValue -import androidx.compose.runtime.structuralEqualityPolicy -import androidx.compose.runtime.staticCompositionLocalOf +val ${e}ColorMap = mapOf ( +`;const i=wk(t,r);return Object.entries(t).forEach(([s,o])=>{i[s].forEach(l=>{const u=`${s}${l.index}`;n+=` "${u}" to ${Fi(l.hex)}, +`}),n+=` "${s}Origin" to ${Fi(o.origin)}, +`,n+=` "${s}OnOriginDefaultLight" to ${Fi(o.onOriginLight)}, +`,n+=` "${s}OnOriginHoveredLight" to ${Fi(o.onOriginLightHovered)}, +`,n+=` "${s}OnOriginPressedLight" to ${Fi(o.onOriginLightPressed)}, +`,n+=` "${s}OriginDefaultLight" to ${Fi(o.originLight)}, +`,n+=` "${s}OriginHoveredLight" to ${Fi(o.originLightHovered)}, +`,n+=` "${s}OriginPressedLight" to ${Fi(o.originLightPressed)}, +`,n+=` "${s}OnOriginDefaultDark" to ${Fi(o.onOriginDark)}, +`,n+=` "${s}OnOriginHoveredDark" to ${Fi(o.onOriginDarkHovered)}, +`,n+=` "${s}OnOriginPressedDark" to ${Fi(o.onOriginDarkPressed)}, +`,n+=` "${s}OriginDefaultDark" to ${Fi(o.originDark)}, +`,n+=` "${s}OriginHoveredDark" to ${Fi(o.originDarkHovered)}, +`,n+=` "${s}OriginPressedDark" to ${Fi(o.originDarkPressed)}, +`}),n+=`) +`,n},HI=(e,t,r)=>{const n=sn(r?"dark":"light");t+=` fun getColorScheme${n}(colorMap: Map): ${ft}ColorScheme = + ${ft}ColorScheme( +`;for(const i of e)t+=` ${i} = ${St}ColorVariant.${n.toLowerCase()}(colorMap, "${i}"), +`;return t+=` ) + +`,t},Uxe=(e,t,r)=>{const n=Object.keys(r);let i=`package ${zt} + +import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.graphics.Color -`;for(const o of i){const a=[...t,...Bxe];s+=`class ${Mr(o)}Colors( -`;for(const l of a){const u=`${Mr(l.name,!0)}`;n[`${o}${l.name}`]=u,s+=`${u}: Color, -`}s+=`) { -`;for(const l of a){const u=n[`${o}${l.name}`];s+=`var ${u} by mutableStateOf(${u}, structuralEqualityPolicy()) - internal set -`}s+=`} -`}s+=`class ${e}ColorScheme( -`;for(const o of i){const a=`${Mr(o)}Colors`;s+=`${o}: ${a}, -`}s+=`){ -`;for(const o of i)s+=`var ${o} by mutableStateOf(${o}, structuralEqualityPolicy()) - internal set -`;return s+=`} -`,s=jN(e,t,i,s,!0),s=jN(e,t,i,s,!1),s+=` -val LocalColors = staticCompositionLocalOf { getColorSchemeLight() } -`,s},Hxe=e=>{let t=`package ${Mo}.theme +import ${zt}.${e.toLowerCase()}.data.${e}ColorMap + +`;i+=Vxe();const s=[...t,...zxe];i+=`class ${St}ColorVariant private constructor( +`;for(const o of s){const a=`${sn(o.name,!0)}`;i+=` val ${a}: Color, +`}i+=`) { +`,i+=Gxe(),i=Wxe(t,i),i+=`class ${ft}ColorScheme( +`;for(const o of n)i+=` val ${o}: ${St}ColorVariant, +`;return i+=`) { + internal companion object { +`,i=HI(n,i,!0),i=HI(n,i,!1),i+=` } +} + +`,i+=`val LocalColors = + staticCompositionLocalOf { ${ft}ColorScheme.getColorSchemeLight(${e}ColorMap) } +val LocalActiveColor = + staticCompositionLocalOf { ${ft}ColorScheme.getColorSchemeLight(${e}ColorMap).neutral } +`,i},Wxe=(e,t)=>{const r=["dark","light"];t+=` internal companion object { +`;for(const n of r){t+=` fun ${n}(colorMap: Map, colorName: String) = ${St}ColorVariant( +`;for(const i of e){let s="";n=="light"&&i.transparencyLight!==void 0?s=`.copy(${(i.transparencyLight||0)/100}f)`:n=="dark"&&i.transparencyDark!==void 0&&(s=`.copy(${(i.transparencyDark||0)/100}f)`),t+=` colorMap.getValue(colorName + ${n=="dark"?i.dark:i.light})${s}, +`}t+=` colorMap.getValue(colorName + "OnOriginDefault${sn(n)}"), +`,t+=` colorMap.getValue(colorName + "OnOriginHovered${sn(n)}"), +`,t+=` colorMap.getValue(colorName + "OnOriginPressed${sn(n)}"), +`,t+=` colorMap.getValue(colorName + "OriginDefault${sn(n)}"), +`,t+=` colorMap.getValue(colorName + "OriginHovered${sn(n)}"), +`,t+=` colorMap.getValue(colorName + "OriginPressed${sn(n)}"), +`,t+=` ) + +`}return t+=` } +} + +`,t},Vxe=()=>`interface IStateColor { + val Default: Color + val Hovered: Color + val Pressed: Color +} + +interface IBasic { + interface IBackground { + interface ITransparent { + val Full: Color + val Semi: Color + val Hovered: Color + val Pressed: Color + } + + val Level1: IStateColor + val Level2: IStateColor + val Level3: IStateColor + val Transparent: ITransparent + } + + interface IText { + val Default: IStateColor + val Emphasis100: IStateColor + val Emphasis90: IStateColor + val Emphasis80: IStateColor + } + + interface IIcon { + val Default: IStateColor + val Emphasis100: IStateColor + val Emphasis90: IStateColor + val Emphasis80: IStateColor + val Emphasis70: IStateColor + } + + interface IBorder { + val Default: IStateColor + val Emphasis100: IStateColor + val Emphasis70: IStateColor + val Emphasis60: IStateColor + val Emphasis50: IStateColor + } + + val Background: IBackground + val Text: IText + val Icon: IIcon + val Border: IBorder +} + +interface IInverted { + interface IBackground { + val ContrastMax: IStateColor + val ContrastHigh: IStateColor + val ContrastLow: IStateColor + } + + val Background: IBackground + val OnBackground: IStateColor +} + +`,Gxe=()=>` val Basic = object : IBasic { + override val Background = object : IBasic.IBackground { + override val Level1 = object : IStateColor { + override val Default = bgBasicLevel1Default + override val Hovered = bgBasicLevel1Hovered + override val Pressed = bgBasicLevel1Pressed + } + override val Level2 = object : IStateColor { + override val Default = bgBasicLevel2Default + override val Hovered = bgBasicLevel2Hovered + override val Pressed = bgBasicLevel2Pressed + } + override val Level3 = object : IStateColor { + override val Default = bgBasicLevel3Default + override val Hovered = bgBasicLevel3Hovered + override val Pressed = bgBasicLevel3Pressed + } + override val Transparent = object : IBasic.IBackground.ITransparent { + override val Full = bgBasicTransparentFullDefault + override val Semi = bgBasicTransparentSemiDefault + override val Hovered = bgBasicTransparentHovered + override val Pressed = bgBasicTransparentPressed + } + } + + override val Text = object : IBasic.IText { + val e100 = object : IStateColor { + override val Default = onBgBasicEmphasis100Default + override val Hovered = onBgBasicEmphasis100Hovered + override val Pressed = onBgBasicEmphasis100Pressed + } + + override val Default = e100 + override val Emphasis100 = e100 + override val Emphasis90 = object : IStateColor { + override val Default = onBgBasicEmphasis90Default + override val Hovered = onBgBasicEmphasis90Hovered + override val Pressed = onBgBasicEmphasis90Pressed + } + override val Emphasis80 = object : IStateColor { + override val Default = onBgBasicEmphasis80Default + override val Hovered = onBgBasicEmphasis80Hovered + override val Pressed = onBgBasicEmphasis80Pressed + } + } + + override val Icon = object : IBasic.IIcon { + val e70 = object : IStateColor { + override val Default = onBgBasicEmphasis70Default + override val Hovered = onBgBasicEmphasis70Hovered + override val Pressed = onBgBasicEmphasis70Pressed + } + + override val Default = e70 + override val Emphasis100 = object : IStateColor { + override val Default = onBgBasicEmphasis100Default + override val Hovered = onBgBasicEmphasis100Hovered + override val Pressed = onBgBasicEmphasis100Pressed + } + override val Emphasis90 = object : IStateColor { + override val Default = onBgBasicEmphasis90Default + override val Hovered = onBgBasicEmphasis90Hovered + override val Pressed = onBgBasicEmphasis90Pressed + } + override val Emphasis80 = object : IStateColor { + override val Default = onBgBasicEmphasis80Default + override val Hovered = onBgBasicEmphasis80Hovered + override val Pressed = onBgBasicEmphasis80Pressed + } + override val Emphasis70 = e70 + } + + override val Border = object : IBasic.IBorder { + val e60 = object : IStateColor { + override val Default = onBgBasicEmphasis60Default + override val Hovered = onBgBasicEmphasis60Hovered + override val Pressed = onBgBasicEmphasis60Pressed + } + + override val Default = e60 + override val Emphasis100 = object : IStateColor { + override val Default = onBgBasicEmphasis100Default + override val Hovered = onBgBasicEmphasis100Hovered + override val Pressed = onBgBasicEmphasis100Pressed + } + override val Emphasis70 = object : IStateColor { + override val Default = onBgBasicEmphasis70Default + override val Hovered = onBgBasicEmphasis70Hovered + override val Pressed = onBgBasicEmphasis70Pressed + } + override val Emphasis60 = e60 + override val Emphasis50 = object : IStateColor { + override val Default = onBgBasicEmphasis50Default + override val Hovered = onBgBasicEmphasis50Hovered + override val Pressed = onBgBasicEmphasis50Pressed + } + } + } + + val Inverted = object : IInverted { + override val Background = object : IInverted.IBackground { + override val ContrastMax = object : IStateColor { + override val Default = bgInvertedContrastMaxDefault + override val Hovered = bgInvertedContrastMaxHovered + override val Pressed = bgInvertedContrastMaxPressed + } + override val ContrastHigh = object : IStateColor { + override val Default = bgInvertedContrastHighDefault + override val Hovered = bgInvertedContrastHighHovered + override val Pressed = bgInvertedContrastHighPressed + } + override val ContrastLow = object : IStateColor { + override val Default = bgInvertedContrastLowDefault + override val Hovered = bgInvertedContrastLowHovered + override val Pressed = bgInvertedContrastLowPressed + } + } + override val OnBackground = object : IStateColor { + override val Default = onBgInvertedDefault + override val Hovered = onBgInvertedHovered + override val Pressed = onBgInvertedPressed + } + } + + val Origin = object : IStateColor { + override val Default = originDefault + override val Hovered = originHovered + override val Pressed = originPressed + } + + val OnOrigin = object : IStateColor { + override val Default = onOriginDefault + override val Hovered = onOriginHovered + override val Pressed = onOriginPressed + } + +`,qxe=(e,t)=>{let r=`package ${zt}.${e.toLowerCase()}.data -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -object Dimensions { -`;return ec(e).forEach(function(r){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="branding"&&this.path[0]!=="colors"&&this.path[0]!=="additionalColors"&&this.path[0]!=="font"&&this.path[0]!=="transition"&&this.path[0]!=="elevation"&&this.path[0]!=="typography"&&!this.path.includes("desktop")&&!this.path.includes("_scale")){const n=`${Mr(this.path.join("-"),!0)}`,i=typeof r=="string"||r instanceof String?`${Number(r)*16}.dp`:r;t+=`val ${n}: Dp = ${i} -`}}),t+=`} -`,t},Ip={spacing:["responsive","fixed"],sizing:["base"],border:["height","radius"]},Uxe=(e,t,r,n)=>{for(const[i,s]of Object.entries(Ip)){t+=`val ${i}Dimensions${r}${n} = ${Mr(i)}Dimensions(`;for(const o of s){const a=o==="base"?"":`-${o}`,l=o==="responsive"?`-${n}`:"",u=i==="border"?"":`-${r}`;for(const c of w1)t+=`Dimensions.${Mr(`${i}${a}${u}${l}-${c}`,!0)}, -`}t+=`) -`}t+=`fun getDimensions${r}${n}(`;for(const i of Object.keys(Ip))t+=`${i}: ${Mr(i)}Dimensions = ${i}Dimensions${r}${n}, -`;t+=` -):${e}Dimensions = ${e}Dimensions( -`;for(const i of Object.keys(Ip))t+=`${i}=${i}, -`;return t+=`) -`,t},Wxe=e=>{let t=`package ${Mo}.theme +val ${e}DimensionsMap = mapOf( +`;return rc(t).forEach(function(n){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="branding"&&this.path[0]!=="colors"&&this.path[0]!=="additionalColors"&&this.path[0]!=="customColors"&&this.path[0]!=="font"&&this.path[0]!=="transition"&&this.path[0]!=="elevation"&&this.path[0]!=="typography"&&!this.path.includes("desktop")&&!this.path.includes("_scale")){const i=`${sn(this.path.join("-"),!0)}`,s=typeof n=="string"||n instanceof String?`${Number(n)*16}.dp`:n;r+=` "${i}" to ${s}, +`}}),r+=`) +`,r},XC={spacing:["responsive","fixed"],sizing:["base"],border:["height","radius"]},Kxe=(e,t,r)=>{const n=[t,r];e+=` fun getDimensions${t}${r}( + dimensionsMap: Map, + ): ${ft}Dimensions = ${ft}Dimensions(`;for(const i of Object.keys(XC))e+=` + ${i} = ${St}${sn(i)}Dimensions(dimensionsMap, ${n.map(s=>`"${s}"`).join(", ")}),`,n.pop();return e+=` + ) + +`,e},Jxe=e=>{let t=`package ${zt} import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.unit.Dp -`;for(const[r,n]of Object.entries(Ip)){t+=`data class ${Mr(r)}Dimensions( -`;for(const i of n)for(const s of w1)t+=`val ${Mr(`${i}-${s}`,!0)}: Dp, -`;t+=`) -`}t+=`data class ${e}Dimensions( -`;for(const r of Object.keys(Ip))t+=`val ${r}: ${Mr(r)}Dimensions, -`;t+=`) -`;for(const r of J2)for(const n of S9)t=Uxe(e,t,r,n);return t+=` -val LocalDimensions = staticCompositionLocalOf { getDimensionsRegularMobile() } -`,t},Vxe=()=>`package ${Mo}.theme - -import ${Mo}.R +import ${zt}.${e.toLowerCase()}.data.${e}DimensionsMap + +`;const r=["density","device"];for(const[n,i]of Object.entries(XC)){t+=`class ${St}${sn(n)}Dimensions private constructor(`;for(const s of i)for(const o of JC)t+=` + val ${sn(`${s}-${o}`,!0)}: Dp,`;t+=` +) {`,t+=` + internal constructor(dimensionsMap: Map, ${r.map(s=>`${s}: String`).join(", ")}) : this(`;for(const s of i){for(const o of JC){const a=s==="base"?"":`-${s}`,l=r.map(u=>`-\${${u}}`).join("");t+=` + dimensionsMap.getValue("${sn(`${n}${a}${l}-${o}`,!0)}"),`}(r.length==2||n=="sizing")&&r.pop()}t+=` + ) +} + +`}t+=`data class ${ft}Dimensions(`;for(const n of Object.keys(XC))t+=` + val ${n}: ${St}${sn(n)}Dimensions,`;t+=` +) { + internal companion object { +`;for(const n of X2)for(const i of E9)t=Kxe(t,n,i);return t+=` } +} + +`,t+=`val LocalDimensions = staticCompositionLocalOf { + ${ft}Dimensions.getDimensionsRegularMobile( + ${e}DimensionsMap + ) +} +`,t},Xxe=()=>`package ${zt}.core + +import ${zt}.R import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.Font -object Fonts { -// Required -val sansRegular = FontFamily( - Font(R.font.sans_regular, FontWeight.Normal) -) - -val headBlack = FontFamily( - Font(R.font.head_black, FontWeight.Black) -) - -// Optional -val headLight = FontFamily( - Font(R.font.head_light, FontWeight.Light) -) -val headRegular = FontFamily( - Font(R.font.head_regular, FontWeight.Normal) -) - -val sansDigital = FontFamily( - Font(R.font.sans_digital, FontWeight.Light) -) - -val sansMedium = FontFamily( - Font(R.font.sans_medium, FontWeight.Medium) -) - -val sansSemiBold = FontFamily( - Font(R.font.sans_semibold, FontWeight.SemiBold) -) - -val sansBold = FontFamily( - Font(R.font.sans_bold, FontWeight.Bold) -) +internal object ${St}Font { + val ${St.toLowerCase()}NeoScreenFlex = FontFamily( + Font(R.font.db_neo_screen_flex, FontWeight.Normal) + ) } -`,Gxe=e=>{let t=`package ${Mo}.theme - +`,Yxe=(e,t)=>{let r=`package ${zt}.${e.toLowerCase()}.data + import androidx.compose.ui.unit.sp -object Typography { -`;return ec(e).forEach(function(r){if(this.isLeaf&&this.path.length===6&&this.path[0]==="typography"&&!this.path.includes("desktop")&&!this.path.includes("_scale")){const n=[this.path[3],this.path[5],this.path[1],this.path[2],this.path[4]],i=`${Mr(n.join("-"),!0)}`;let s=`${Number(r)*16}.sp`;if(this.path.at(-1)==="lineHeight"){const o=[...this.path];o[o.length-1]="fontSize",s=`${Number(ec(e).get(o))*r*16}.sp`}t+=`val ${i} = ${s} -`}}),t+="}",t},Rp=["body","headline"],D9=["lineHeight","fontSize"],zN={h1:"Xl",h2:"Lg",h3:"Md",h4:"Sm",h5:"Xs",h6:"2xs",body:"Md",body3xl:"3xl",body2xl:"2xl",bodyXl:"Xl",bodyLg:"Lg",bodyMd:"Md",bodySm:"Sm",bodyXs:"Xs",body2xs:"2xs",body3xs:"3xs"},qxe=(e,t,r,n)=>{for(const i of Rp){t+=`val ${i}Typography${r}${n} = ${Mr(i)}Typography(`;for(const s of D9)for(const o of w1)t+=`Typography.${Mr(`${i}-${s}-${r}-${n}-${o}`,!0)}, -`;t+=`) -`}t+=`fun getTypography${r}${n}(`;for(const i of Rp)t+=`${i}: ${Mr(i)}Typography = ${i}Typography${r}${n}, -`;t+=` -):${e}Typography = ${e}Typography( -`;for(const i of Rp)t+=`${i}=${i}, -`;return t+=`) -`,t},Kxe=e=>{let t=`package ${Mo}.theme +val ${e}TypographyMap = mapOf( +`;return rc(t).forEach(function(n){if(this.isLeaf&&this.path.length===6&&this.path[0]==="typography"&&!this.path.includes("desktop")&&!this.path.includes("_scale")){const i=[this.path[3],this.path[5],this.path[1],this.path[2],this.path[4]],s=`${sn(i.join("-"),!0)}`;let o=`${Number(n)*16}.sp`;if(this.path.at(-1)==="lineHeight"){const a=[...this.path];a[a.length-1]="fontSize",o=`${Number(rc(t).get(a))*n*16}.sp`}r+=` "${s}" to ${o}, +`}}),r+=`) +`,r},C9=["body","headline"],Qxe=["lineHeight","fontSize"],UI={h1:"Xl",h2:"Lg",h3:"Md",h4:"Sm",h5:"Xs",h6:"2xs",body:"Md",body3xl:"3xl",body2xl:"2xl",bodyXl:"Xl",bodyLg:"Lg",bodyMd:"Md",bodySm:"Sm",bodyXs:"Xs",body2xs:"2xs",body3xs:"3xs"},Zxe=(e,t,r)=>{e+=` + fun getTypography${t}${r}( + typographyMap: Map, + ): ${ft}Typography = ${ft}Typography(`;for(const n of C9)e+=` + ${n} = ${St}Typography.create(typographyMap, "${n}", "${t}", "${r}"),`;return e+=` + ) +`,e},ewe=e=>{let t=`package ${zt} import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.text.font.FontWeight -`;for(const r of Rp){t+=`data class ${Mr(r)}Typography( -`;for(const n of w1)for(const i of D9)t+=`val ${Mr(`${i}-${n}`,!0)}: TextUnit, -`;t+=`) -`}t+=`data class ${e}Typography( -`;for(const r of Rp)t+=`val ${r}: ${Mr(r)}Typography, -`;t+=`) -`;for(const r of J2)for(const n of S9)t=qxe(e,t,r,n);t+=`data class ${e}TextStyles( -`;for(const[r]of Object.entries(zN))t+=`val ${r}: TextStyle, -`;t+=`) -`,t+=`fun getTextStyles(typo: DBThemeTypography): ${e}TextStyles = ${e}TextStyles(`;for(const[r,n]of Object.entries(zN))t+=`TextStyle( - fontFamily = Fonts.${r.includes("body")?"sansRegular":"headBlack"}, - fontWeight = FontWeight.${r.includes("body")?"Normal":"Black"}, - fontSize = typo.${r.includes("body")?"body":"headline"}.fontSize${n}, - lineHeight = typo.${r.includes("body")?"body":"headline"}.lineHeight${n} - ), -`;return t+=`) +import androidx.compose.ui.unit.TextUnit +import ${zt}.core.${St}Font +import ${zt}.${e.toLowerCase()}.data.${e}TypographyMap +`;t+=` +class ${St}Typography private constructor( +`;for(const r of JC)for(const n of Qxe)t+=` val ${sn(`${n}-${r}`,!0)}: TextUnit, +`;t+=`) { + internal companion object { + fun create( + typographyMap: Map, + typoVariant: String, + density: String, + device: String, + ): ${St}Typography { + return ${St}Typography( + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}3xs"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}3xs"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}2xs"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}2xs"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}Xs"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}Xs"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}Sm"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}Sm"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}Md"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}Md"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}Lg"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}Lg"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}Xl"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}Xl"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}2xl"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}2xl"), + typographyMap.getValue("\${typoVariant}LineHeight$density\${device}3xl"), + typographyMap.getValue("\${typoVariant}FontSize$density\${device}3xl"), + ) + } + } +} `,t+=` -val LocalTypography = staticCompositionLocalOf { getTextStyles(getTypographyRegularMobile()) } -`,t},Jxe=()=>`package ${Mo}.theme - enum class Density { - ${J2.map(e=>e.toUpperCase()).join(",")} +data class ${ft}Typography( +`;for(const r of C9)t+=` val ${r}: ${St}Typography, +`;t+=`) { + internal companion object { +`;for(const r of X2)for(const n of E9)t=Zxe(t,r,n);t+=` } +} + +`,t+=`data class ${ft}TextStyles( +`;for(const[r]of Object.entries(UI))t+=` val ${r}: TextStyle, +`;t+=`) { + internal companion object { +`,t+=` fun getTextStyles(typo: ${ft}Typography): ${ft}TextStyles = + ${ft}TextStyles(`;for(const[r,n]of Object.entries(UI))t+=` + TextStyle( + fontFamily = ${St}Font.${St.toLowerCase()}NeoScreenFlex, + fontWeight = FontWeight.${r.includes("body")?"Normal":"Black"}, + fontSize = typo.${r.includes("body")?"body":"headline"}.fontSize${n}, + lineHeight = typo.${r.includes("body")?"body":"headline"}.lineHeight${n} + ),`;return t+=` + ) + } +} + +`,t+=` +val LocalTypography = staticCompositionLocalOf { + ${ft}TextStyles.getTextStyles( + ${ft}Typography.getTypographyRegularMobile( + ${e}TypographyMap + ) + ) +} +`,t},twe=()=>`package ${zt}.core + +enum class ${St}Density { + ${X2.map(e=>e.toUpperCase()).join(", ")} } -`,HN=e=>e.includes("default")||e.includes("hovered")||e.includes("pressed"),UN=e=>{const t=e.lastIndexOf("-"),r=e.slice(t+1);return{nameWithoutState:e.slice(0,t),state:r}},Xxe=(e,t)=>e.transparencyDark!==void 0||e.transparencyLight!==void 0?t?e.transparencyDark:e.transparencyLight:0,WN=(e,t,r,n)=>{var s;const i={};for(const[o,a]of Object.entries(t)){const l=r[o];for(const u of e){const c=n?u.dark:u.light,h=((s=l[c])==null?void 0:s.hex)??Ji,d=Xxe(u,n);if(u.name.includes("on-")){const f=u.name.replace("on-","");if(HN(u.name)){const{nameWithoutState:p,state:m}=UN(f);m.replace(/^ak-/,"").replace(/^bg-/,""),i[`${ot}-${o}/on/${p}/${m}`]=`transparency ${d}%, ${h}`}else i[`${ot}-${o}/on/${f}`]=`transparency ${d}%, ${h}`}else if(HN(u.name)){const{nameWithoutState:f,state:p}=UN(u.name);i[`${ot}-${o}/${f}/${p}`]=`transparency ${d}%, ${h}`}else i[`${ot}-${o}/${u.name}`]=`transparency ${d}%, ${h}`}i[`${ot}-${o}/origin`]=`transparency 0%, ${a.origin}`,i[`${ot}-${o}/origin-light/default`]=`transparency 0%, ${a.originLight}`,i[`${ot}-${o}/origin-light/hovered`]=`transparency 0%, ${a.originLightHovered}`,i[`${ot}-${o}/origin-light/pressed`]=`transparency 0%, ${a.originLightPressed}`,i[`${ot}-${o}/on/origin-light/default`]=`transparency 0%, ${a.onOriginLight}`,i[`${ot}-${o}/on/origin-light/hovered`]=`transparency 0%, ${a.onOriginLightHovered}`,i[`${ot}-${o}/on/origin-light/pressed`]=`transparency 0%, ${a.onOriginLightPressed}`,i[`${ot}-${o}/origin-dark/default`]=`transparency 0%, ${a.originDark}`,i[`${ot}-${o}/origin-dark/hovered`]=`transparency 0%, ${a.originDarkHovered}`,i[`${ot}-${o}/origin-dark/pressed`]=`transparency 0%, ${a.originDarkPressed}`,i[`${ot}-${o}/on/origin-dark/default`]=`transparency 0%, ${a.onOriginDark}`,i[`${ot}-${o}/on/origin-dark/hovered`]=`transparency 0%, ${a.onOriginDarkHovered}`,i[`${ot}-${o}/on/origin-dark/pressed`]=`transparency 0%, ${a.onOriginDarkPressed}`}return i},Yxe=(e,t,r)=>{const n=xk(t,r),i=WN(e,t,n,!1),s=WN(e,t,n,!0);return JSON.stringify({light:i,dark:s})},Qxe=e=>{let t='@use "default.assets-paths" as assets-paths;';for(const r of["sans","head"]){const n=r==="sans"?e.font.sans:e.font.head;Object.entries(n).forEach(([i,s])=>{t+=` +`,WI=e=>e.includes("default")||e.includes("hovered")||e.includes("pressed"),VI=e=>{const t=e.lastIndexOf("-"),r=e.slice(t+1);return{nameWithoutState:e.slice(0,t),state:r}},rwe=(e,t)=>e.transparencyDark!==void 0||e.transparencyLight!==void 0?t?e.transparencyDark:e.transparencyLight:0,GI=(e,t,r,n)=>{var s;const i={};for(const[o,a]of Object.entries(t)){const l=r[o];for(const u of e){const c=n?u.dark:u.light,h=((s=l[c])==null?void 0:s.hex)??Qi,d=rwe(u,n);if(u.name.includes("on-")){const f=u.name.replace("on-","");if(WI(u.name)){const{nameWithoutState:p,state:m}=VI(f);m.replace(/^ak-/,"").replace(/^bg-/,""),i[`${ot}-${o}/on/${p}/${m}`]=`transparency ${d}%, ${h}`}else i[`${ot}-${o}/on/${f}`]=`transparency ${d}%, ${h}`}else if(WI(u.name)){const{nameWithoutState:f,state:p}=VI(u.name);i[`${ot}-${o}/${f}/${p}`]=`transparency ${d}%, ${h}`}else i[`${ot}-${o}/${u.name}`]=`transparency ${d}%, ${h}`}i[`${ot}-${o}/origin`]=`transparency 0%, ${a.origin}`,i[`${ot}-${o}/origin-light/default`]=`transparency 0%, ${a.originLight}`,i[`${ot}-${o}/origin-light/hovered`]=`transparency 0%, ${a.originLightHovered}`,i[`${ot}-${o}/origin-light/pressed`]=`transparency 0%, ${a.originLightPressed}`,i[`${ot}-${o}/on/origin-light/default`]=`transparency 0%, ${a.onOriginLight}`,i[`${ot}-${o}/on/origin-light/hovered`]=`transparency 0%, ${a.onOriginLightHovered}`,i[`${ot}-${o}/on/origin-light/pressed`]=`transparency 0%, ${a.onOriginLightPressed}`,i[`${ot}-${o}/origin-dark/default`]=`transparency 0%, ${a.originDark}`,i[`${ot}-${o}/origin-dark/hovered`]=`transparency 0%, ${a.originDarkHovered}`,i[`${ot}-${o}/origin-dark/pressed`]=`transparency 0%, ${a.originDarkPressed}`,i[`${ot}-${o}/on/origin-dark/default`]=`transparency 0%, ${a.onOriginDark}`,i[`${ot}-${o}/on/origin-dark/hovered`]=`transparency 0%, ${a.onOriginDarkHovered}`,i[`${ot}-${o}/on/origin-dark/pressed`]=`transparency 0%, ${a.onOriginDarkPressed}`}return i},nwe=(e,t,r)=>{const n=wk(t,r),i=GI(e,t,n,!1),s=GI(e,t,n,!0);return JSON.stringify({light:i,dark:s})},iwe=e=>{let t='@use "default.assets-paths" as assets-paths;';for(const r of["sans","head"]){const n=r==="sans"?e.font.sans:e.font.head;Object.entries(n).forEach(([i,s])=>{t+=` $${i}: assets-paths.$fonts-path + '${s.woff2}'; @font-face { font-family: '${s.family}'; @@ -1810,7 +2086,7 @@ $${i}: assets-paths.$fonts-path + '${s.woff2}'; local('${s.localName}'), local('${s.localShortName}'), url($${i}) format("woff2"); -}`})}return t},Zxe=e=>`[data-container-color=${e}], +}`})}return t},swe=e=>`[data-container-color=${e}], .db-container-color-${e}, [data-color=${e}-bg-basic-level-3], .db-${e}-bg-basic-level-3, [data-color=${e}-bg-basic-level-2], .db-${e}-bg-basic-level-2, [data-color=${e}-bg-basic-level-1], @@ -1996,65 +2272,159 @@ $${i}: assets-paths.$fonts-path + '${s.woff2}'; color: var(--db-adaptive-on-bg-basic-emphasis-100-default); background-color: var(--db-adaptive-bg-basic-level-1-default); } -`,ewe=e=>`# How to use the theme +`,owe=()=>`# How to use the theme 1. Move the \`theme\` directory into your project 2. Replace the string \`replace.\` inside the \`theme\` directory with your package name for example: \`com.example.myapplication.\` 3. Add your theme to the MainActivity: \`\`\`\` kotlin -import com.example.myapplication.theme.${e} +import com.example.myapplication.theme.${ft}Theme ... - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContent { - ${e} { - //... your content - } +override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + ${ft}Theme { + //... your content } } +} \`\`\`\` Use the tokens like this: \`\`\`\` kotlin - Text( - text = "Headline", - style = DBTheme.typography.h1, - color = DBTheme.colors.neutral.onBgBasicEmphasis100, - modifier = Modifier.padding(DBTheme.dimensions.spacing.fixedMd) - ) +Text( + text = "Headline", + style = ${ft}Theme.typography.h1, + color = ${ft}.colors.neutral.onBgBasicEmphasis100, + modifier = Modifier.padding(${ft}.dimensions.spacing.fixedMd) +) +\`\`\`\` + +To use another theme, export it and copy the \`theme/\` folder to your project and set it like this: +\`\`\`\` kotlin +// Code from step 3 +override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + ${ft}Theme( + theme = Theme, + ) { + //... your content + } + } +} \`\`\`\` ## Fonts -[Download](https://marketingportal.extranet.deutschebahn.com/marketingportal/Design-Anwendungen/db-ux-design-system/version-2/foundation/Typografie) fonts and use the \`.ttf\` files. -You might rename it based on the names in \`~/theme/data/Fonts.kt\` and move the \`.ttf\` files into \`~/res/font\` folder. -`,E9=(e,t)=>{const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)},twe=async e=>{const t=new w9;for(const[n,i]of Object.entries(e))t.file(`${n}.json`,i);const r=await t.generateAsync({type:"blob"});E9("Playground.zip",r)},rwe=async(e,t,r)=>{const n={...r.colors,...r.additionalColors,...r.customColors},i=(r.branding.name||"default-theme")+"Theme",s=JSON.stringify(r),o=Jne(r),a=Mr(i),l=new w9;l.file(`${i}.json`,s);const u="Android",c=`${u}/theme`,h=`${c}/data`;l.file(`${u}/README.md`,ewe(a)),l.file(`${c}/${a}.kt`,Rxe(a)),l.file(`${c}/${a}ColorScheme.kt`,zxe(a,e,n)),l.file(`${c}/${a}Dimensions.kt`,Wxe(a)),l.file(`${c}/${a}Typography.kt`,Kxe(a)),l.file(`${h}/Fonts.kt`,Vxe()),l.file(`${h}/Dimensions.kt`,Hxe(r)),l.file(`${h}/Typography.kt`,Gxe(r)),l.file(`${h}/Colors.kt`,jxe(n,t)),l.file(`${h}/Density.kt`,Jxe());const d="Utils";l.file(`${d}/${i}-sketch-colors.json`,Yxe(e,n,t)),l.file(`${d}/${i}-font-faces.scss`,Qxe(r));const f="Web";l.file(`${f}/${i}-theme.css`,o);const p=tF(nC(n,t),"color"),m=rC(iC(e,n),!0);if(l.file(`${f}/${i}-colors-full.css`,rF(p,m)),l.file(`${f}/${i}-palette.css`,p),l.file(`${f}/${i}-speaking-names.css`,m),l.file(`${f}/README.md`,Ixe(i)),r.customColors){const b="Custom Colors",v=tF(nC(r.customColors,t),"color"),E=rC(iC(e,r.customColors),!0);let D="";for(const C of Object.keys(r.customColors)){const w=Zxe(C);l.file(`${f}/${b}/classes/${C}.css`,w),D+=w}l.file(`${f}/${b}/classes/all.css`,D),l.file(`${f}/${b}/${i}-custom-colors-full.css`,rF(v,E)),l.file(`${f}/${b}/${i}-custom-colors-palette.css`,v),l.file(`${f}/${b}/${i}-speaking-names-custom-colors.css`,E)}const y=await l.generateAsync({type:"blob"});E9(`${i}.zip`,y)},nwe=()=>{const{t:e}=Yt(),{resetDefaults:t,luminanceSteps:r,theme:n,speakingNames:i,developerMode:s}=tr(o=>o);return j.jsxs(j.Fragment,{children:[s&&j.jsx(wt,{icon:"undo",onClick:()=>t(),children:e("reset")}),j.jsx(x0,{label:"import",accept:"application/JSON",onUpload:o=>{try{const a=atob(o.split("base64,")[1]),l=JSON.parse(a);tr.setState({theme:l})}catch(a){tr.setState({notification:a.message}),console.error(a)}}}),j.jsx(wt,{variant:"brand",icon:"download",onClick:()=>rwe(i,r,n),children:e("export")})]})},iwe=()=>{const{speakingNames:e}=tr(i=>i),{t}=Yt(),r=(i,s)=>{const o=[...e];o[s]=i,tr.setState({speakingNames:o})},n=(i,s)=>{tr.setState({speakingNames:e.map(o=>{const a={...o};return i?a.light=s?a.light+1:a.light-1:a.dark=s?a.dark+1:a.dark-1,a})})};return j.jsxs("div",{"data-density":"functional",className:"grid grid-cols-3 gap-fix-md",children:[j.jsx("div",{className:"flex items-center",children:j.jsx("h6",{children:t("colorName")})}),j.jsxs("div",{className:"flex items-center",children:[j.jsx("h6",{className:"mr-auto",children:t("dark")}),j.jsx(wt,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!1,!1),children:"Decrease"}),j.jsx(wt,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!1,!0),children:"Increase"})]}),j.jsxs("div",{className:"flex items-center",children:[j.jsx("h6",{className:"mr-auto",children:t("light")}),j.jsx(wt,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!0,!1),children:"Decrease"}),j.jsx(wt,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!0,!0),children:"Increase"})]}),e.map((i,s)=>j.jsxs(z.Fragment,{children:[j.jsx("span",{children:t(i.name)}),j.jsxs("div",{className:"flex gap-fix-md",children:[j.jsx(Gr,{className:"w-full",variant:"floating",label:t("dark"),value:i.dark,type:"number",min:"0",onChange:o=>r({...i,dark:Number(o.target.value)},s)}),i.transparencyDark!==void 0&&j.jsx(Gr,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyDark,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyDark:Number(o.target.value)},s)})]}),j.jsxs("div",{className:"flex gap-fix-md",children:[j.jsx(Gr,{className:"w-full",variant:"floating",label:t("light"),value:i.light,type:"number",min:"0",onChange:o=>r({...i,light:Number(o.target.value)},s)}),i.transparencyLight!==void 0&&j.jsx(Gr,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyLight,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyLight:Number(o.target.value)},s)})]})]},i.name))]})},swe=z.memo(()=>{const{t:e}=Yt(),{theme:t}=tr(r=>r);return j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("logo")}),j.jsxs("div",{className:"flex gap-fix-md",children:[j.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"light",children:[j.jsx(ur,{icon:"sun",children:"Light"}),j.jsx("img",{className:"h-siz-md mx-auto",src:Dg(t.branding.image.light),alt:"logo"}),j.jsx(x0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{tr.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,light:r}}}})}})]}),j.jsx(oo,{margin:"none",variant:"vertical"}),j.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"dark",children:[j.jsx(ur,{icon:"moon",children:"Dark"}),j.jsx("img",{className:"h-siz-md mx-auto",src:Dg(t.branding.image.dark||t.branding.image.light),alt:"logo"}),j.jsx(x0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{tr.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,dark:r}}}})}})]})]})]})}),owe=["folder_open","document","person","wrench","toys"],awe=()=>{const{t:e}=Yt();return j.jsx("div",{className:`demo-side-nav w-full min-w-auto md:min-w-fit md:w-auto db-neutral-bg-basic-level-1 +[Download](https://marketingportal.extranet.deutschebahn.com/marketingportal/Marke-und-Design/Basiselemente/Typografie/DB-Neo-Font-Downloads) fonts and use the \`.ttf\` files. +You might rename it based on the names in \`~/theme/core/Fonts.kt\` and move the \`.ttf\` files into \`~/src/main/res/font\` folder. +`,awe=e=>{let t=`package ${zt}.core + +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithCache +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Paint +import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.graphics.drawOutline +import androidx.compose.ui.graphics.drawscope.drawIntoCanvas +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.DpOffset +import androidx.compose.ui.unit.dp + +fun Modifier.${St.toLowerCase()}Shadow( + elevation: ${St}Elevation, + shape: Shape = RectangleShape, + clip: Boolean = true, +): Modifier { + return drawWithCache { + onDrawWithContent { + fun drawShadow(config: ${St}ElevationShadowConfig) { + drawIntoCanvas { canvas -> + val spreadRadiusPx = config.spread.toPx() + val hasSpreadRadius = spreadRadiusPx != 0f + + val shadowOutline = shape.createOutline(size = when { + hasSpreadRadius -> size.let { (width, height) -> + (2 * spreadRadiusPx).let { outset -> + Size( + width = width + outset, height = height + outset + ) + } + } + + else -> size + }, layoutDirection = layoutDirection, density = this) + + canvas.save() + + canvas.drawOutline(outline = shadowOutline, paint = Paint().also { paint -> + paint.asFrameworkPaint().apply { + this.color = Color.Transparent.toArgb() + setShadowLayer( + config.blur.toPx(), + config.offset.x.toPx() - spreadRadiusPx, + config.offset.y.toPx() - spreadRadiusPx, + config.color.toArgb(), + ) + } + }) + + canvas.restore() + } + } + + elevation.config.forEach(::drawShadow) + drawContent() + } + }.let { modifier -> if (clip) modifier.clip(shape) else modifier } +} + +internal data class ${St}ElevationShadowConfig( + val offset: DpOffset, + val blur: Dp, + val spread: Dp, + val color: Color, +) + +enum class ${St}Elevation(internal val config: List<${St}ElevationShadowConfig>) { +`;return Object.entries(e).forEach(([r,n])=>{if(r=="_scale")return;const i=n.toString().replaceAll(" "," ").replaceAll("rgba(","").replaceAll("), ","#").replaceAll(")","").replaceAll(",","").replaceAll("px","").split("#");t+=` ${r.toUpperCase()}( + listOf(`;for(const s of i){const o=s.split(" "),a=o[0],l=o[1],u=o[2],c=o[3],h=o[4],d=o[5],f=o[6],p=o[7];t+=` + ${St}ElevationShadowConfig(DpOffset(${a}.dp, ${l}.dp), ${u}.dp, ${c.startsWith("-")?"("+c+")":c}.dp, Color(${h}f, ${d}f, ${f}f, ${p}f)),`}t+=` + ), + ), +`}),t+=`} +`,t},T9=(e,t)=>{const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)},lwe=async e=>{const t=new D9;for(const[n,i]of Object.entries(e))t.file(`${n}.json`,i);const r=await t.generateAsync({type:"blob"});T9("Playground.zip",r)},uwe=async(e,t,r)=>{const n={...r.colors,...r.additionalColors,...r.customColors},i=(r.branding.name||"default-theme")+"Theme",s=JSON.stringify(r),o=Xne(r),a=sn(r.branding.name),l=sn(i),u=new D9;u.file(`${i}.json`,s);const c="Android",h=`${c}/theme`,d=`${h}/core`,f=`${h}/${sn(r.branding.name).toLowerCase()}`,p=`${f}/data`;u.file(`${c}/README.md`,owe()),u.file(`${h}/${ft}Theme.kt`,jxe(l,a)),u.file(`${h}/${ft}ColorScheme.kt`,Uxe(a,e,n)),u.file(`${h}/${ft}Dimensions.kt`,Jxe(a)),u.file(`${h}/${ft}Typography.kt`,ewe(a)),u.file(`${d}/${St}Font.kt`,Xxe()),u.file(`${p}/${a}Dimensions.kt`,qxe(a,r)),u.file(`${d}/${St}Elevations.kt`,awe(r.elevation)),u.file(`${p}/${a}Typography.kt`,Yxe(a,r)),u.file(`${p}/${a}Colors.kt`,Hxe(a,n,t)),u.file(`${f}/${a}Theme.kt`,Bxe(a)),u.file(`${d}/${St}Density.kt`,twe());const m="Utils";u.file(`${m}/${i}-sketch-colors.json`,nwe(e,n,t)),u.file(`${m}/${i}-font-faces.scss`,iwe(r));const y="Web";u.file(`${y}/${i}-theme.css`,o);const b=nF(rC(n,t),"color"),v=tC(nC(e,n),!0);if(u.file(`${y}/${i}-colors-full.css`,iF(b,v)),u.file(`${y}/${i}-palette.css`,b),u.file(`${y}/${i}-speaking-names.css`,v),u.file(`${y}/README.md`,Rxe(i)),r.customColors){const D="Custom Colors",C=nF(rC(r.customColors,t),"color"),w=tC(nC(e,r.customColors),!0);let T="";for(const k of Object.keys(r.customColors)){const O=swe(k);u.file(`${y}/${D}/classes/${k}.css`,O),T+=O}u.file(`${y}/${D}/classes/all.css`,T),u.file(`${y}/${D}/${i}-custom-colors-full.css`,iF(C,w)),u.file(`${y}/${D}/${i}-custom-colors-palette.css`,C),u.file(`${y}/${D}/${i}-speaking-names-custom-colors.css`,w)}const E=await u.generateAsync({type:"blob"});T9(`${i}.zip`,E)},cwe=()=>{const{t:e}=er(),{resetDefaults:t,luminanceSteps:r,theme:n,speakingNames:i,developerMode:s}=ir(o=>o);return j.jsxs(j.Fragment,{children:[s&&j.jsx(Dt,{icon:"undo",onClick:()=>t(),children:e("reset")}),j.jsx(b0,{label:"import",accept:"application/JSON",onUpload:o=>{try{const a=atob(o.split("base64,")[1]),l=JSON.parse(a);ir.setState({theme:l})}catch(a){ir.setState({notification:a.message}),console.error(a)}}}),j.jsx(Dt,{variant:"brand",icon:"download",onClick:()=>uwe(i,r,n),children:e("export")})]})},hwe=()=>{const{speakingNames:e}=ir(i=>i),{t}=er(),r=(i,s)=>{const o=[...e];o[s]=i,ir.setState({speakingNames:o})},n=(i,s)=>{ir.setState({speakingNames:e.map(o=>{const a={...o};return i?a.light=s?a.light+1:a.light-1:a.dark=s?a.dark+1:a.dark-1,a})})};return j.jsxs("div",{"data-density":"functional",className:"grid grid-cols-3 gap-fix-md",children:[j.jsx("div",{className:"flex items-center",children:j.jsx("h6",{children:t("colorName")})}),j.jsxs("div",{className:"flex items-center",children:[j.jsx("h6",{className:"mr-auto",children:t("dark")}),j.jsx(Dt,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!1,!1),children:"Decrease"}),j.jsx(Dt,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!1,!0),children:"Increase"})]}),j.jsxs("div",{className:"flex items-center",children:[j.jsx("h6",{className:"mr-auto",children:t("light")}),j.jsx(Dt,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!0,!1),children:"Decrease"}),j.jsx(Dt,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!0,!0),children:"Increase"})]}),e.map((i,s)=>j.jsxs(z.Fragment,{children:[j.jsx("span",{children:t(i.name)}),j.jsxs("div",{className:"flex gap-fix-md",children:[j.jsx(Kr,{className:"w-full",variant:"floating",label:t("dark"),value:i.dark,type:"number",min:"0",onChange:o=>r({...i,dark:Number(o.target.value)},s)}),i.transparencyDark!==void 0&&j.jsx(Kr,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyDark,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyDark:Number(o.target.value)},s)})]}),j.jsxs("div",{className:"flex gap-fix-md",children:[j.jsx(Kr,{className:"w-full",variant:"floating",label:t("light"),value:i.light,type:"number",min:"0",onChange:o=>r({...i,light:Number(o.target.value)},s)}),i.transparencyLight!==void 0&&j.jsx(Kr,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyLight,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyLight:Number(o.target.value)},s)})]})]},i.name))]})},dwe=z.memo(()=>{const{t:e}=er(),{theme:t}=ir(r=>r);return j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("logo")}),j.jsxs("div",{className:"flex gap-fix-md",children:[j.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"light",children:[j.jsx(dr,{icon:"sun",children:"Light"}),j.jsx("img",{className:"h-siz-md mx-auto",src:Dg(t.branding.image.light),alt:"logo"}),j.jsx(b0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{ir.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,light:r}}}})}})]}),j.jsx(uo,{margin:"none",variant:"vertical"}),j.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"dark",children:[j.jsx(dr,{icon:"moon",children:"Dark"}),j.jsx("img",{className:"h-siz-md mx-auto",src:Dg(t.branding.image.dark||t.branding.image.light),alt:"logo"}),j.jsx(b0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{ir.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,dark:r}}}})}})]})]})]})}),fwe=["folder_open","document","person","wrench","toys"],pwe=()=>{const{t:e}=er();return j.jsx("div",{className:`demo-side-nav w-full min-w-auto md:min-w-fit md:w-auto db-neutral-bg-basic-level-1 p-fix-md gap-fix-md mx-[1px] md:mx-0 border-b md:border-b-0 md:border-r flex md:flex-col h-auto md:h-full - overflow-x-auto overflow-y-hidden md:overflow-x-hidden md:overflow-y-auto`,children:owe.map(t=>j.jsx(wt,{icon:t,variant:"ghost",width:"full",children:e(t)},`dashboard-sidenav-button-${t}`))})},X2=({linkToDemo:e,density:t})=>{const{t:r}=Yt();return j.jsx(x1,{name:"Demo",density:t,actionBar:j.jsx(j.Fragment,{children:j.jsx(hb,{to:e?"/demo":"/",className:"db-button","data-variant":"brand",children:r(e?"openDemo":"openMainPage")})}),children:j.jsxs("div",{className:"flex flex-col md:flex-row h-full",children:[j.jsx(awe,{}),j.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md px-res-sm db-neutral-bg-basic-level-2 w-full h-full overflow-y-auto",children:[j.jsx("h1",{children:r("Dashboard")}),j.jsxs("div",{className:"demo-dashboard grid gap-fix-md h-full",children:[j.jsx(Mi,{spacing:"small",className:"dashboard-short1 db-neutral-bg-basic-level-1",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Mobile Users"}),j.jsx("h3",{children:"500"}),j.jsx(ur,{className:"mt-auto",semantic:"successful",children:"Good capacity"})]})}),j.jsx(Mi,{spacing:"small",className:"dashboard-short2 db-neutral-bg-basic-level-1",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Tablet Users"}),j.jsx("h3",{children:"200"}),j.jsx(ur,{className:"mt-auto",semantic:"warning",children:"Medium capacity"})]})}),j.jsx(Mi,{spacing:"small",className:"dashboard-long db-brand-bg",elevationLevel:"1",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Progress"}),j.jsx("div",{className:"dashboard-progress",children:j.jsx("h5",{className:"m-auto",children:"50%"})})]})}),j.jsx(Mi,{spacing:"small",className:"dashboard-big db-neutral-bg-basic-level-1 flex-row justify-between",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Desktop Users"}),j.jsx("h3",{children:"100"}),j.jsx(ur,{className:"mt-auto",semantic:"critical",children:"Bad capacity"})]})})]})]})]})})},lwe=z.memo(()=>{const{t:e}=Yt(),[t,r]=z.useState("regular");return j.jsxs("div",{className:"flex-col flex w-full h-full gap-fix-md p-fix-sm overflow-hidden relative",children:[j.jsx("div",{className:"flex gap-fix-md",children:j.jsxs(Iu,{label:e("density"),variant:"floating",value:t,onChange:n=>r(n.target.value),children:[j.jsx("option",{value:"functional",children:"functional"}),j.jsx("option",{value:"regular",children:"regular"}),j.jsx("option",{value:"expressive",children:"expressive"})]})}),j.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:j.jsx(X2,{linkToDemo:!0,density:t})})]})}),Hf=ec(zT),uwe=(e,t)=>{if(t.at(-1)==="_scale")return e;let r=1;if(e==="none"?r=0:e==="full"?r=5:r=Number(e.replace("%",""))/100,!(t.length<1&&!Hf.has(t))){if(t[0]==="elevation"){if(t.at(-1)==="sm")return`0 0 ${r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${4*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${2*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="md")return`0 0 ${2*r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${4*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="lg")return`0 0 ${4*r}px -${3*r}px rgba(0, 0, 0, 0.2),0 0 ${16*r}px ${3*r}px rgba(0, 0, 0, 0.12),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.14)`}if(!(t.length<2)){if(t[0]==="border"){if(t[1]==="radius")return`${Number(Hf.get(t))*r}`;if(t[1]==="height"){const n=Number(Hf.get(t));return`${n+n*(r-1)}`}}if(t[0]==="sizing"&&!t.includes("fixed")){const n=Number(Hf.get(t));return`${n+n*(r-1)}`}if(t[0]==="spacing"){const n=Number(Hf.get(t));return`${n+n*(r-1)}`}}}},cwe=(e,t)=>{try{let r=t;return e.forEach(n=>{r=r[n]}),r}catch(r){console.error(r)}return 1},Uf=({label:e,params:t})=>{const{t:r}=Yt(),{theme:n}=tr(s=>s),i=s=>{const o=[...t];let a={...n};a=ec(a).map(function(l){this.isLeaf&&this.path.length>0&&o.every((u,c)=>u===this.path[c])&&this.update(uwe(s,this.path)||l)}),tr.setState({theme:a})};return j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:r(e)}),j.jsxs(Iu,{label:`${r(e)} ${r("scale")}`,variant:"floating",value:cwe([...t,"_scale"],n),onChange:s=>{i(s.target.value)},children:[t.includes("sizing")&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"90%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"110%"}),j.jsx("option",{children:"120%"})]}),t.includes("spacing")&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"90%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"110%"}),j.jsx("option",{children:"120%"})]}),t.includes("height")&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"90%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"110%"}),j.jsx("option",{children:"120%"})]}),(t.includes("elevation")||t.includes("radius"))&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"none"}),j.jsx("option",{children:"50%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"150%"}),j.jsx("option",{children:"200%"})]}),t.includes("radius")&&j.jsx("option",{children:"full"})]})]})},hwe=({tabs:e})=>{const{t}=Yt(),{developerMode:r}=tr(n=>n);return j.jsxs(B5,{alignment:"center",width:"full",className:"h-full",children:[j.jsx(UT,{children:e.filter(n=>r||!n.onlyDeveloper).map(n=>j.jsx(Bv,{children:t(n.text)},`tab-${n.text}`))}),e.filter(n=>r||!n.onlyDeveloper).map(n=>j.jsx(zv,{className:"h-full",children:n.component},`tab-panel-${n.text}`))]})},dwe=()=>j.jsx("div",{className:"grid grid-cols-3 md:grid-cols-9 gap-fix-md",children:S1.map(e=>j.jsxs("div",{className:"flex flex-col h-full justify-between items-center",children:[j.jsx("div",{className:"rounded w-siz-xl",style:{height:`var(--db-border-height-${e})`,border:`var(--db-border-height-${e}) solid var(--db-brand-on-bg-basic-emphasis-60-default)`}}),j.jsx(ur,{semantic:"informational",icon:"none",children:e})]},`border-height-${e}`))}),fwe=()=>j.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-fix-md",children:[...S1,"full"].map(e=>j.jsx("div",{className:"flex w-siz-xl h-siz-xl md:w-siz-2xl md:h-siz-2xl db-successful-bg-basic-level-1 items-center justify-center",style:{borderRadius:`var(--db-border-radius-${e})`,border:"var(--db-border-height-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default)"},children:e},`border-radius-${e}`))}),pwe=()=>j.jsx("div",{className:"grid grid-cols-3 gap-fix-md",children:C9.map(e=>j.jsx("div",{className:"db-card items-center","data-spacing":"medium",style:{boxShadow:`var(--db-elevation-${e})`},children:e},`elevation-${e}`))}),gwe=()=>j.jsx("div",{className:"flex flex-wrap gap-fix-md",children:S1.map(e=>j.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[j.jsx("div",{className:"flex db-informational-bg-basic-level-1 items-center justify-center",style:{width:`var(--db-sizing-${e})`,height:`var(--db-sizing-${e})`,border:"var(--db-border-height-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default)"},children:j.jsx("span",{className:"hidden",children:e})}),j.jsx(ur,{semantic:"informational",icon:"none",children:e})]},`sizing-${e}`))}),mwe=()=>j.jsx("div",{className:"flex flex-wrap gap-fix-md",children:S1.map(e=>j.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[j.jsx("div",{className:"flex db-warning-bg-basic-level-1 items-center justify-center",style:{width:`var(--db-spacing-fixed-${e})`,height:`var(--db-spacing-fixed-${e})`,border:"var(--db-border-height-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default)"},children:j.jsx("span",{className:"hidden",children:e})}),j.jsx(ur,{semantic:"informational",icon:"none",children:e})]},`spacing-${e}`))}),C9=["sm","md","lg"],S1=["3xs","2xs","xs",...C9,"xl","2xl","3xl"],ywe=[{title:"spacing",component:j.jsx(mwe,{})},{title:"sizing",component:j.jsx(gwe,{})},{title:"elevation",component:j.jsx(pwe,{})},{title:"borderHeight",component:j.jsx(dwe,{})},{title:"borderRadius",component:j.jsx(fwe,{})}],qn=({colorName:e,type:t,bgTransparent:r})=>j.jsxs("div",{className:"flex flex-col gap-fix-md text-center h-full",children:[j.jsx("p",{className:"font-bold",children:Mr(`${t}${r?`-${r}`:""}`,!1," ")}),j.jsx("div",{className:"flex flex-col mt-auto",children:["default","hovered","pressed"].map(n=>{const i=`var(--db-${e}-${t}${r&&n==="default"?`-${r}`:""}-${n}`,s=`var(--db-${e}-on-bg-basic-emphasis-60-default)`;let o=`var(--db-${e}-on-bg-basic-emphasis-100-default)`;return t.startsWith("on-bg")?o=`var(--db-${e}-bg-basic-level-1-default)`:t==="origin"?o=`var(--db-${e}-on-origin-default)`:t==="on-origin"?o=`var(--db-${e}-origin-default)`:(t==="bg-inverted-contrast-high"||t==="bg-inverted-contrast-low"||t==="bg-inverted-contrast-max")&&(o=`var(--db-${e}-on-bg-inverted-default)`),j.jsx("div",{className:"flex w-full md:min-w-siz-2xl h-siz-md mx-auto rounded-sm",style:{backgroundColor:i,border:`1px solid ${s}`,color:o},children:j.jsx("span",{className:"m-auto",children:n})},`color-preview-${e}-${t}-${n}`)})})]}),vwe=({colorName:e})=>j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(qn,{colorName:e,type:"on-origin"}),j.jsx(qn,{colorName:e,type:"origin"})]}),j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(qn,{colorName:e,type:"bg-inverted-contrast-max"}),j.jsx(qn,{colorName:e,type:"bg-inverted-contrast-high"}),j.jsx(qn,{colorName:e,type:"bg-inverted-contrast-low"})]}),j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(qn,{colorName:e,type:"bg-basic-level-1"}),j.jsx(qn,{colorName:e,type:"bg-basic-level-2"}),j.jsx(qn,{colorName:e,type:"bg-basic-level-3"}),j.jsx(qn,{colorName:e,type:"bg-basic-transparent",bgTransparent:"full"}),j.jsx(qn,{colorName:e,type:"bg-basic-transparent",bgTransparent:"semi"})]}),j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(qn,{colorName:e,type:"on-bg-basic-emphasis-100"}),j.jsx(qn,{colorName:e,type:"on-bg-basic-emphasis-90"}),j.jsx(qn,{colorName:e,type:"on-bg-basic-emphasis-80"}),j.jsx(qn,{colorName:e,type:"on-bg-basic-emphasis-70"}),j.jsx(qn,{colorName:e,type:"on-bg-basic-emphasis-60"}),j.jsx(qn,{colorName:e,type:"on-bg-basic-emphasis-50"})]})]}),bwe=()=>{const{theme:e}=tr(o=>o),[t,r]=z.useState(""),[n,i]=z.useState([]),{t:s}=Yt();return z.useEffect(()=>{i(Object.keys({...e.colors,...e.additionalColors,...e.customColors}).map(o=>({title:o,component:j.jsx(vwe,{colorName:o}),isColor:!0})))},[s,e.additionalColors,e.colors,e.customColors]),j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx(Gr,{variant:"floating",label:s("search"),placeholder:s("search"),type:"search",onChange:o=>r(o.target.value)}),j.jsx("div",{className:"flex flex-col gap-fix-sm w-full",children:[...ywe,...n].map(({title:o,component:a,isColor:l})=>(l?`${s("color")}: ${o}`:s(o)).toLowerCase().includes(t.toLowerCase())?j.jsx(Mi,{spacing:"small",className:"w-full",children:j.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[j.jsx("h5",{children:l?`${s("color")}: ${o}`:s(o)}),a]})},`token-card-${o}`):null)})]})},xwe=[{text:"demo",component:j.jsx(lwe,{})},{text:"components",component:j.jsx(Oxe,{})},{text:"token",component:j.jsx(bwe,{})},{text:"colorPalettes",component:j.jsx(Nxe,{}),onlyDeveloper:!0},{text:"speakingColors",component:j.jsx(iwe,{}),onlyDeveloper:!0}],wwe=()=>{const{t:e}=Yt(),{theme:t}=tr(r=>r);return j.jsx(x1,{withDevMode:!0,actionBar:j.jsx(nwe,{}),name:e("customization"),children:j.jsxs("div",{className:"content flex flex-col md:flex-row md:h-full md:overflow-hidden",children:[j.jsxs("div",{className:"flex flex-col p-fix-lg w-full md:w-2/5 md:h-full md:overflow-auto border-r gap-fix-xl",children:[j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("name")}),j.jsx(Gr,{variant:"floating",label:e("themeName"),placeholder:e("themeName"),value:t.branding.name,onChange:r=>tr.setState({theme:{...t,branding:{...t.branding,name:r.target.value}}})})]}),j.jsx(swe,{}),j.jsx(oo,{margin:"none"}),j.jsx(Pxe,{}),j.jsx(oo,{margin:"none"}),j.jsx(Uf,{label:"spacing",params:["spacing"]}),j.jsx(Uf,{label:"sizing",params:["sizing"]}),j.jsx(Uf,{label:"elevation",params:["elevation"]}),j.jsx(Uf,{label:"borderHeight",params:["border","height"]}),j.jsx(Uf,{label:"borderRadius",params:["border","radius"]})]}),j.jsx("div",{className:`db-neutral-bg-basic-level-2 p-fix-sm md:p-res-sm - flex flex-col gap-res-sm w-full md:overflow-auto`,children:j.jsx(hwe,{tabs:xwe})})]})})},Swe=["accessible","adaptive","efficient"],Dwe=()=>{const{t:e}=Yt();return j.jsx(j.Fragment,{children:Swe.map((t,r)=>j.jsx(Wg,{spacing:"medium",width:"large",className:`flex h-[100vh] items-center${r%2===0?" db-neutral-bg-basic-level-2":""}`,children:j.jsxs("div",{className:"flex flex-col text-balance text-center items-center gap-fix-md",children:[j.jsx("h6",{children:e(`landingHowItFeature${r+1}Title`)}),j.jsxs("h2",{children:[e(`landingHowItFeature${r+1}Strong`),e(`landingHowItFeature${r+1}Desc`)]})]})},`feature-card-${t}`))})},Ewe=()=>{const{t:e}=Yt();return j.jsx(Wg,{spacing:"medium",width:"large",className:"flex items-center db-brand-bg-basic-level-3",children:j.jsxs("div",{className:"flex flex-col gap-fix-xl items-center text-center text-balance",children:[j.jsx("h2",{"data-icon-after":"heart",children:e("landingMoreTitle")}),j.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md mx-auto items-center",children:[j.jsx(hb,{to:"/playground",className:"db-button capitalize hidden md:block",target:"_blank","data-variant":"filled","data-width":"full",children:e("tryIt")}),j.jsx("a",{className:"db-button capitalize","data-variant":"brand",href:"https://marketingportal.extranet.deutschebahn.com/marketingportal",target:"_blank","data-width":"full",children:e("gettingStarted")})]})]})})},Cwe=()=>{const{theme:e,darkMode:t}=tr(r=>r);return j.jsx(Wg,{spacing:"none",width:"large",children:j.jsxs("div",{className:"flex justify-between min-h-siz-md py-fix-xs md:py-fix-md",children:[j.jsx("img",{className:"logo",src:Dg(t&&e.branding.image.dark?e.branding.image.dark:e.branding.image.light),alt:"brand"}),j.jsx("a",{href:"https://github.com/db-ui/theme-builder",target:"_blank",referrerPolicy:"no-referrer",children:j.jsx("img",{className:"my-auto logo",src:`${Ab}/assets/images/github-mark${t?"-white":""}.svg`,alt:"GitHub Mark"})})]})})},Awe={name:"Deutsche Bahn",image:{light:"db_logo.svg"}},Twe={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},kwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},_we={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},$we={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Lwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Pwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},Fwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Owe={neutral:{origin:"#646973",originBgLight:"#edeef0",originBgDark:"#070709",originLight:"#646973",originLightAlternative:"#646973",originLightAccessible:!0,originLightHovered:"#4d5159",originLightPressed:"#373a40",originDark:"#646973",originDarkAlternative:"#646973",originDarkAccessible:!0,originDarkHovered:"#7c828e",originDarkPressed:"#969ca9",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},brand:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},informational:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},warning:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},successful:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"},critical:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"}},Nwe={yellow:{origin:"#FFD800",originBgLight:"#ffedbc",originBgDark:"#0a0700",originLight:"#FFD800",originLightAlternative:"#8c7600",originLightAccessible:!1,originLightHovered:"#dfbc00",originLightPressed:"#bfa200",originDark:"#FFD800",originDarkAlternative:"#FFD800",originDarkAccessible:!0,originDarkHovered:"#dfbc00",originDarkPressed:"#bfa200",onOriginLight:"#0a0700",onOriginLightHovered:"#261f00",onOriginLightPressed:"#3f3400",onOriginLightAccessible:!0,onOriginLightAlternative:"#0a0700",onOriginDark:"#0a0700",onOriginDarkHovered:"#261f00",onOriginDarkPressed:"#3f3400",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#0a0700"},orange:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},red:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},pink:{origin:"#E93E8F",originBgLight:"#fce9ef",originBgDark:"#160209",originLight:"#E93E8F",originLightAlternative:"#E93E8F",originLightAccessible:!0,originLightHovered:"#be3174",originLightPressed:"#95245a",originDark:"#E93E8F",originDarkAlternative:"#E93E8F",originDarkAccessible:!0,originDarkHovered:"#ef75a6",originDarkPressed:"#f3a0be",onOriginLight:"#260413",onOriginLightHovered:"#490e29",onOriginLightPressed:"#6e1941",onOriginLightAccessible:!0,onOriginLightAlternative:"#260413",onOriginDark:"#260413",onOriginDarkHovered:"#490e29",onOriginDarkPressed:"#6e1941",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#260413"},violet:{origin:"#814997",originBgLight:"#f3ebf7",originBgDark:"#0d0412",originLight:"#814997",originLightAlternative:"#814997",originLightAccessible:!0,originLightHovered:"#623673",originLightPressed:"#452452",originDark:"#814997",originDarkAlternative:"#814997",originDarkAccessible:!0,originDarkHovered:"#a15dbc",originDarkPressed:"#b67cce",onOriginLight:"#fbf8fc",onOriginLightHovered:"#e9d7ee",onOriginLightPressed:"#d7b5e1",onOriginLightAccessible:!0,onOriginLightAlternative:"#fbf8fc",onOriginDark:"#fbf8fc",onOriginDarkHovered:"#e9d7ee",onOriginDarkPressed:"#d7b5e1",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#fbf8fc"},blue:{origin:"#1455C0",originBgLight:"#eaedfe",originBgDark:"#00061b",originLight:"#1455C0",originLightAlternative:"#1455C0",originLightAccessible:!0,originLightHovered:"#0c3f92",originLightPressed:"#062a67",originDark:"#1455C0",originDarkAlternative:"#1558c6",originDarkAccessible:!1,originDarkHovered:"#1c6cf0",originDarkPressed:"#5c87fa",onOriginLight:"#f8f9ff",onOriginLightHovered:"#d5dbff",onOriginLightPressed:"#b0beff",onOriginLightAccessible:!0,onOriginLightAlternative:"#f8f9ff",onOriginDark:"#f8f9ff",onOriginDarkHovered:"#d5dbff",onOriginDarkPressed:"#b0beff",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f8f9ff"},cyan:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},turquoise:{origin:"#00A099",originBgLight:"#9bfff8",originBgDark:"#000908",originLight:"#00A099",originLightAlternative:"#00857f",originLightAccessible:!1,originLightHovered:"#00847e",originLightPressed:"#006864",originDark:"#00A099",originDarkAlternative:"#00A099",originDarkAccessible:!0,originDarkHovered:"#00bdb5",originDarkPressed:"#00dcd2",onOriginLight:"#000908",onOriginLightHovered:"#002422",onOriginLightPressed:"#003c38",onOriginLightAccessible:!0,onOriginLightAlternative:"#000908",onOriginDark:"#000908",onOriginDarkHovered:"#002422",onOriginDarkPressed:"#003c38",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#000908"},green:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"}},Mwe={branding:Awe,spacing:Twe,sizing:kwe,typography:_we,border:$we,elevation:Lwe,transition:Pwe,font:Fwe,colors:Owe,additionalColors:Nwe},Iwe={name:"S-Bahn",image:{light:"sbahn_logo.svg"}},Rwe={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Bwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},jwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},zwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Hwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Uwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},Wwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Vwe={neutral:{origin:"#646973",originBgLight:"#edeef0",originBgDark:"#070709",originLight:"#646973",originLightAlternative:"#646973",originLightAccessible:!0,originLightHovered:"#4d5159",originLightPressed:"#373a40",originDark:"#646973",originDarkAlternative:"#646973",originDarkAccessible:!0,originDarkHovered:"#7c828e",originDarkPressed:"#969ca9",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},brand:{origin:"#408335",originBgLight:"#cbfac7",originBgDark:"#ffffff",originLight:"#408335",originLightAlternative:"#408335",originLightAccessible:!0,originLightHovered:"#3d7236",originLightPressed:"#2d5828",originDark:"#408335",originDarkAlternative:"#408335",originDarkAccessible:!0,originDarkHovered:"#5eab54",originDarkPressed:"#6fc864",onOriginLight:"#ffffff",onOriginLightHovered:"#12240d",onOriginLightPressed:"#203b19",onOriginLightAccessible:!0,onOriginLightAlternative:"#ffffff",onOriginDark:"#ffffff",onOriginDarkHovered:"#12240d",onOriginDarkPressed:"#203b19",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},informational:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},warning:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},successful:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"},critical:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"}},Gwe={yellow:{origin:"#FFD800",originBgLight:"#ffedbc",originBgDark:"#0a0700",originLight:"#FFD800",originLightAlternative:"#8c7600",originLightAccessible:!1,originLightHovered:"#dfbc00",originLightPressed:"#bfa200",originDark:"#FFD800",originDarkAlternative:"#FFD800",originDarkAccessible:!0,originDarkHovered:"#dfbc00",originDarkPressed:"#bfa200",onOriginLight:"#0a0700",onOriginLightHovered:"#261f00",onOriginLightPressed:"#3f3400",onOriginLightAccessible:!0,onOriginLightAlternative:"#0a0700",onOriginDark:"#0a0700",onOriginDarkHovered:"#261f00",onOriginDarkPressed:"#3f3400",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#0a0700"},orange:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},red:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},pink:{origin:"#E93E8F",originBgLight:"#fce9ef",originBgDark:"#160209",originLight:"#E93E8F",originLightAlternative:"#E93E8F",originLightAccessible:!0,originLightHovered:"#be3174",originLightPressed:"#95245a",originDark:"#E93E8F",originDarkAlternative:"#E93E8F",originDarkAccessible:!0,originDarkHovered:"#ef75a6",originDarkPressed:"#f3a0be",onOriginLight:"#260413",onOriginLightHovered:"#490e29",onOriginLightPressed:"#6e1941",onOriginLightAccessible:!0,onOriginLightAlternative:"#260413",onOriginDark:"#260413",onOriginDarkHovered:"#490e29",onOriginDarkPressed:"#6e1941",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#260413"},violet:{origin:"#814997",originBgLight:"#f3ebf7",originBgDark:"#0d0412",originLight:"#814997",originLightAlternative:"#814997",originLightAccessible:!0,originLightHovered:"#623673",originLightPressed:"#452452",originDark:"#814997",originDarkAlternative:"#814997",originDarkAccessible:!0,originDarkHovered:"#a15dbc",originDarkPressed:"#b67cce",onOriginLight:"#fbf8fc",onOriginLightHovered:"#e9d7ee",onOriginLightPressed:"#d7b5e1",onOriginLightAccessible:!0,onOriginLightAlternative:"#fbf8fc",onOriginDark:"#fbf8fc",onOriginDarkHovered:"#e9d7ee",onOriginDarkPressed:"#d7b5e1",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#fbf8fc"},blue:{origin:"#1455C0",originBgLight:"#eaedfe",originBgDark:"#00061b",originLight:"#1455C0",originLightAlternative:"#1455C0",originLightAccessible:!0,originLightHovered:"#0c3f92",originLightPressed:"#062a67",originDark:"#1455C0",originDarkAlternative:"#1558c6",originDarkAccessible:!1,originDarkHovered:"#1c6cf0",originDarkPressed:"#5c87fa",onOriginLight:"#f8f9ff",onOriginLightHovered:"#d5dbff",onOriginLightPressed:"#b0beff",onOriginLightAccessible:!0,onOriginLightAlternative:"#f8f9ff",onOriginDark:"#f8f9ff",onOriginDarkHovered:"#d5dbff",onOriginDarkPressed:"#b0beff",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f8f9ff"},cyan:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},turquoise:{origin:"#00A099",originBgLight:"#9bfff8",originBgDark:"#000908",originLight:"#00A099",originLightAlternative:"#00857f",originLightAccessible:!1,originLightHovered:"#00847e",originLightPressed:"#006864",originDark:"#00A099",originDarkAlternative:"#00A099",originDarkAccessible:!0,originDarkHovered:"#00bdb5",originDarkPressed:"#00dcd2",onOriginLight:"#000908",onOriginLightHovered:"#002422",onOriginLightPressed:"#003c38",onOriginLightAccessible:!0,onOriginLightAlternative:"#000908",onOriginDark:"#000908",onOriginDarkHovered:"#002422",onOriginDarkPressed:"#003c38",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#000908"},green:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"}},qwe={branding:Iwe,spacing:Rwe,sizing:Bwe,typography:jwe,border:zwe,elevation:Hwe,transition:Uwe,font:Wwe,colors:Vwe,additionalColors:Gwe},Kwe=zT,Jwe=qwe,Xwe=Mwe,Ywe={neutralTheme:Kwe,dbTheme:Xwe,sbahnTheme:Jwe},Qwe=()=>{const{t:e}=Yt(),[t,r]=z.useState("neutralTheme"),{darkMode:n,theme:i}=tr(s=>s);return j.jsx(Wg,{width:"large",spacing:"large",className:"flex md:h-[100vh] items-center",children:j.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-fix-md md:gap-fix-3xl",children:[j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsxs("h1",{children:[j.jsx("span",{className:"brand-name",children:i.branding.name}),j.jsx("br",{}),e("product")]}),j.jsx("h4",{"data-variant":"light",children:e("claim")}),j.jsx("p",{children:e("landingDesignSystemText")}),j.jsxs("div",{className:"grid grid-cols-4 gap-fix-md",children:[Object.entries(Ywe).map(([s,o])=>j.jsx("button",{onClick:()=>{r(s),tr.setState({theme:o,luminanceSteps:Iv,speakingNames:$E})},children:j.jsxs(Mi,{className:"min-h-siz-xl",spacing:"small","data-selected":t===s,elevationLevel:"2",behaviour:"interactive",children:[j.jsx("img",{className:"logo m-auto",src:Dg(n&&o.branding.image.dark?o.branding.image.dark:o.branding.image.light),alt:"brand"}),j.jsx(gs,{placement:"bottom",children:e(s)})]})},s)),j.jsx(hb,{className:"no-underline",to:"/customization",children:j.jsx(Mi,{className:"items-center justify-center min-h-siz-xl",spacing:"small","data-selected":"false",elevationLevel:"2",behaviour:"interactive",children:j.jsx(Ld,{icon:"plus",children:"Add custom theme"})})})]})]}),j.jsx("div",{className:"flex col-span-2 relative",children:j.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:j.jsx(X2,{linkToDemo:!0})})})]})})},Zwe=()=>j.jsxs("div",{className:"flex flex-col overflow-y-auto h-full",children:[j.jsx(Cwe,{}),j.jsxs("main",{children:[j.jsx(Qwe,{}),j.jsx(Dwe,{}),j.jsx(Ewe,{})]})]});function Fn(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:D1(e)?2:E1(e)?3:0}function Eg(e,t){return jl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function iv(e,t){return jl(e)===2?e.get(t):e[t]}function A9(e,t,r){var n=jl(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function eSe(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function D1(e){return oSe&&e instanceof Map}function E1(e){return aSe&&e instanceof Set}function yn(e){return e.o||e.t}function Y2(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=uSe(e);delete t[ar];for(var r=r_(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=tSe),Object.freeze(e),t&&dc(e,function(r,n){return Q2(n,!0)},!0)),e}function tSe(){Fn(2)}function Z2(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Po(e){var t=YC[e];return t||Fn(18,e),t}function T9(e,t){YC[e]||(YC[e]=t)}function w0(){return Ag}function YS(e,t){t&&(Po("Patches"),e.u=[],e.s=[],e.v=t)}function S0(e){XC(e),e.p.forEach(rSe),e.p=null}function XC(e){e===Ag&&(Ag=e.l)}function VN(e){return Ag={p:[],l:Ag,h:e,m:!0,_:0}}function rSe(e){var t=e[ar];t.i===0||t.i===1?t.j():t.g=!0}function QS(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Po("ES5").S(t,e,n),n?(r[ar].P&&(S0(t),Fn(4)),Io(e)&&(e=D0(t,e),t.l||E0(t,e)),t.u&&Po("Patches").M(r[ar].t,e,t.u,t.s)):e=D0(t,r,[]),S0(t),t.u&&t.v(t.u,t.s),e!==t_?e:void 0}function D0(e,t,r){if(Z2(t))return t;var n=t[ar];if(!n)return dc(t,function(a,l){return GN(e,n,t,a,l,r)},!0),t;if(n.A!==e)return t;if(!n.P)return E0(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Y2(n.k):n.o,s=i,o=!1;n.i===3&&(s=new Set(i),i.clear(),o=!0),dc(s,function(a,l){return GN(e,n,i,a,l,r,o)}),E0(e,i,!1),r&&e.u&&Po("Patches").N(n,r,e.u,e.s)}return n.o}function GN(e,t,r,n,i,s,o){if(hc(i)){var a=D0(e,i,s&&t&&t.i!==3&&!Eg(t.R,n)?s.concat(n):void 0);if(A9(r,n,a),!hc(a))return;e.m=!1}else o&&r.add(i);if(Io(i)&&!Z2(i)){if(!e.h.D&&e._<1)return;D0(e,i),t&&t.A.l||E0(e,i)}}function E0(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Q2(t,r)}function ZS(e,t){var r=e[ar];return(r?yn(r):e)[t]}function qN(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function sa(e){e.P||(e.P=!0,e.l&&sa(e.l))}function eD(e){e.o||(e.o=Y2(e.t))}function Cg(e,t,r){var n=D1(t)?Po("MapSet").F(t,r):E1(t)?Po("MapSet").T(t,r):e.O?function(i,s){var o=Array.isArray(i),a={i:o?1:0,A:s?s.A:w0(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},l=a,u=QC;o&&(l=[a],u=ap);var c=Proxy.revocable(l,u),h=c.revoke,d=c.proxy;return a.k=d,a.j=h,d}(t,r):Po("ES5").J(t,r);return(r?r.A:w0()).p.push(n),n}function nSe(e){return hc(e)||Fn(22,e),function t(r){if(!Io(r))return r;var n,i=r[ar],s=jl(r);if(i){if(!i.P&&(i.i<4||!Po("ES5").K(i)))return i.t;i.I=!0,n=KN(r,s),i.I=!1}else n=KN(r,s);return dc(n,function(o,a){i&&iv(i.t,o)===a||A9(n,o,t(a))}),s===3?new Set(n):n}(e)}function KN(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Y2(e)}function iSe(){function e(n){if(!Io(n))return n;if(Array.isArray(n))return n.map(e);if(D1(n))return new Map(Array.from(n.entries()).map(function(o){return[o[0],e(o[1])]}));if(E1(n))return new Set(Array.from(n).map(e));var i=Object.create(Object.getPrototypeOf(n));for(var s in n)i[s]=e(n[s]);return Eg(n,Bp)&&(i[Bp]=n[Bp]),i}function t(n){return hc(n)?e(n):n}var r="add";T9("Patches",{$:function(n,i){return i.forEach(function(s){for(var o=s.path,a=s.op,l=n,u=0;u1?b-1:0),E=1;E1?c-1:0),d=1;d=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var o=Po("Patches").$;return hc(r)?o(r,n):this.produce(r,function(a){return o(a,n)})},e}(),ns=new cSe,hSe=ns.produce,YN=ns.produceWithPatches.bind(ns);ns.setAutoFreeze.bind(ns);ns.setUseProxies.bind(ns);var QN=ns.applyPatches.bind(ns);ns.createDraft.bind(ns);ns.finishDraft.bind(ns);function dSe(){this.__data__=[],this.size=0}var fSe=dSe;function pSe(e,t){return e===t||e!==e&&t!==t}var k9=pSe,gSe=k9;function mSe(e,t){for(var r=e.length;r--;)if(gSe(e[r][0],t))return r;return-1}var C1=mSe,ySe=C1,vSe=Array.prototype,bSe=vSe.splice;function xSe(e){var t=this.__data__,r=ySe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():bSe.call(t,r,1),--this.size,!0}var wSe=xSe,SSe=C1;function DSe(e){var t=this.__data__,r=SSe(t,e);return r<0?void 0:t[r][1]}var ESe=DSe,CSe=C1;function ASe(e){return CSe(this.__data__,e)>-1}var TSe=ASe,kSe=C1;function _Se(e,t){var r=this.__data__,n=kSe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var $Se=_Se,LSe=fSe,PSe=wSe,FSe=ESe,OSe=TSe,NSe=$Se;function nf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ta))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=r&SCe?new vCe:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=PAe}var I9=FAe,OAe=k1,NAe=I9,MAe=L1,IAe="[object Arguments]",RAe="[object Array]",BAe="[object Boolean]",jAe="[object Date]",zAe="[object Error]",HAe="[object Function]",UAe="[object Map]",WAe="[object Number]",VAe="[object Object]",GAe="[object RegExp]",qAe="[object Set]",KAe="[object String]",JAe="[object WeakMap]",XAe="[object ArrayBuffer]",YAe="[object DataView]",QAe="[object Float32Array]",ZAe="[object Float64Array]",eTe="[object Int8Array]",tTe="[object Int16Array]",rTe="[object Int32Array]",nTe="[object Uint8Array]",iTe="[object Uint8ClampedArray]",sTe="[object Uint16Array]",oTe="[object Uint32Array]",kr={};kr[QAe]=kr[ZAe]=kr[eTe]=kr[tTe]=kr[rTe]=kr[nTe]=kr[iTe]=kr[sTe]=kr[oTe]=!0;kr[IAe]=kr[RAe]=kr[XAe]=kr[BAe]=kr[YAe]=kr[jAe]=kr[zAe]=kr[HAe]=kr[UAe]=kr[WAe]=kr[VAe]=kr[GAe]=kr[qAe]=kr[KAe]=kr[JAe]=!1;function aTe(e){return MAe(e)&&NAe(e.length)&&!!kr[OAe(e)]}var lTe=aTe;function uTe(e){return function(t){return e(t)}}var cTe=uTe,T0={exports:{}};T0.exports;(function(e,t){var r=_9,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a})(T0,T0.exports);var o_=T0.exports,hTe=lTe,dTe=cTe,cM=o_,hM=cM&&cM.isTypedArray,fTe=hM?dTe(hM):hTe,R9=fTe,pTe=pAe,gTe=CAe,mTe=s_,yTe=M9,vTe=LAe,bTe=R9,xTe=Object.prototype,wTe=xTe.hasOwnProperty;function STe(e,t){var r=mTe(e),n=!r&&gTe(e),i=!r&&!n&&yTe(e),s=!r&&!n&&!i&&bTe(e),o=r||n||i||s,a=o?pTe(e.length,String):[],l=a.length;for(var u in e)(t||wTe.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||vTe(u,l)))&&a.push(u);return a}var DTe=STe,ETe=Object.prototype;function CTe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ETe;return e===r}var ATe=CTe;function TTe(e,t){return function(r){return e(t(r))}}var kTe=TTe,_Te=kTe,$Te=_Te(Object.keys,Object),LTe=$Te,PTe=ATe,FTe=LTe,OTe=Object.prototype,NTe=OTe.hasOwnProperty;function MTe(e){if(!PTe(e))return FTe(e);var t=[];for(var r in Object(e))NTe.call(e,r)&&r!="constructor"&&t.push(r);return t}var ITe=MTe,RTe=n_,BTe=I9;function jTe(e){return e!=null&&BTe(e.length)&&!RTe(e)}var zTe=jTe,HTe=DTe,UTe=ITe,WTe=zTe;function VTe(e){return WTe(e)?HTe(e):UTe(e)}var GTe=VTe,qTe=rAe,KTe=dAe,JTe=GTe;function XTe(e){return qTe(e,JTe,KTe)}var YTe=XTe,dM=YTe,QTe=1,ZTe=Object.prototype,eke=ZTe.hasOwnProperty;function tke(e,t,r,n,i,s){var o=r&QTe,a=dM(e),l=a.length,u=dM(t),c=u.length;if(l!=c&&!o)return!1;for(var h=l;h--;){var d=a[h];if(!(o?d in t:eke.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=o;++hcrypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");var Uke="Invariant failed";function wr(e,t){if(!e)throw new Error(Uke)}typeof window<"u"&&(window.__CRAFTJS__||(window.__CRAFTJS__={}),window.__CRAFTJS__["@craftjs/utils"]="0.2.4");var pa="ROOT",z9="canvas-ROOT",Wke="Attempting to add a node with duplicated id",Vke="Node cannot be dropped into target parent",Gke="Target parent rejects incoming node",qke="Current parent rejects outgoing node",CM="Cannot move node that is not a direct child of a Canvas node",Kke="Cannot move node into a non-Canvas parent",AM="A top-level Node cannot be moved",Jke="Cannot move node into a descendant",H9="The component type specified for this node (%node_type%) does not exist in the resolver",Xke="The node has specified a canDrag() rule that prevents it from being dragged",Yke=`An Error occurred while deserializing components: Cannot find component <%displayName% /> in resolver map. Please check your resolver in + overflow-x-auto overflow-y-hidden md:overflow-x-hidden md:overflow-y-auto`,children:fwe.map(t=>j.jsx(Dt,{icon:t,variant:"ghost",width:"full",children:e(t)},`dashboard-sidenav-button-${t}`))})},Y2=({linkToDemo:e,density:t})=>{const{t:r}=er();return j.jsx(b1,{name:"Demo",density:t,actionBar:j.jsx(j.Fragment,{children:j.jsx(cb,{to:e?"/demo":"/",className:"db-button","data-variant":"brand",children:r(e?"openDemo":"openMainPage")})}),children:j.jsxs("div",{className:"flex flex-col md:flex-row h-full",children:[j.jsx(pwe,{}),j.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md px-res-sm db-neutral-bg-basic-level-2 w-full h-full overflow-y-auto",children:[j.jsx("h1",{children:r("Dashboard")}),j.jsxs("div",{className:"demo-dashboard grid gap-fix-md h-full",children:[j.jsx(Bi,{spacing:"small",className:"dashboard-short1 db-neutral-bg-basic-level-1",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Mobile Users"}),j.jsx("h3",{children:"500"}),j.jsx(dr,{className:"mt-auto",semantic:"successful",children:"Good capacity"})]})}),j.jsx(Bi,{spacing:"small",className:"dashboard-short2 db-neutral-bg-basic-level-1",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Tablet Users"}),j.jsx("h3",{children:"200"}),j.jsx(dr,{className:"mt-auto",semantic:"warning",children:"Medium capacity"})]})}),j.jsx(Bi,{spacing:"small",className:"dashboard-long db-brand-bg",elevationLevel:"1",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Progress"}),j.jsx("div",{className:"dashboard-progress",children:j.jsx("h5",{className:"m-auto",children:"50%"})})]})}),j.jsx(Bi,{spacing:"small",className:"dashboard-big db-neutral-bg-basic-level-1 flex-row justify-between",children:j.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[j.jsx("h5",{children:"Desktop Users"}),j.jsx("h3",{children:"100"}),j.jsx(dr,{className:"mt-auto",semantic:"critical",children:"Bad capacity"})]})})]})]})]})})},gwe=z.memo(()=>{const{t:e}=er(),[t,r]=z.useState("regular");return j.jsxs("div",{className:"flex-col flex w-full h-full gap-fix-md p-fix-sm overflow-hidden relative",children:[j.jsx("div",{className:"flex gap-fix-md",children:j.jsxs(Bu,{label:e("density"),variant:"floating",value:t,onChange:n=>r(n.target.value),children:[j.jsx("option",{value:"functional",children:"functional"}),j.jsx("option",{value:"regular",children:"regular"}),j.jsx("option",{value:"expressive",children:"expressive"})]})}),j.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:j.jsx(Y2,{linkToDemo:!0,density:t})})]})}),Wf=rc(HA),mwe=(e,t)=>{if(t.at(-1)==="_scale")return e;let r=1;if(e==="none"?r=0:e==="full"?r=5:r=Number(e.replace("%",""))/100,!(t.length<1&&!Wf.has(t))){if(t[0]==="elevation"){if(t.at(-1)==="sm")return`0 0 ${r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${4*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${2*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="md")return`0 0 ${2*r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${4*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="lg")return`0 0 ${4*r}px -${3*r}px rgba(0, 0, 0, 0.2),0 0 ${16*r}px ${3*r}px rgba(0, 0, 0, 0.12),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.14)`}if(!(t.length<2)){if(t[0]==="border"){if(t[1]==="radius")return`${Number(Wf.get(t))*r}`;if(t[1]==="height"){const n=Number(Wf.get(t));return`${n+n*(r-1)}`}}if(t[0]==="sizing"&&!t.includes("fixed")){const n=Number(Wf.get(t));return`${n+n*(r-1)}`}if(t[0]==="spacing"){const n=Number(Wf.get(t));return`${n+n*(r-1)}`}}}},ywe=(e,t)=>{try{let r=t;return e.forEach(n=>{r=r[n]}),r}catch(r){console.error(r)}return 1},Vf=({label:e,params:t})=>{const{t:r}=er(),{theme:n}=ir(s=>s),i=s=>{const o=[...t];let a={...n};a=rc(a).map(function(l){this.isLeaf&&this.path.length>0&&o.every((u,c)=>u===this.path[c])&&this.update(mwe(s,this.path)||l)}),ir.setState({theme:a})};return j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:r(e)}),j.jsxs(Bu,{label:`${r(e)} ${r("scale")}`,variant:"floating",value:ywe([...t,"_scale"],n),onChange:s=>{i(s.target.value)},children:[t.includes("sizing")&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"90%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"110%"}),j.jsx("option",{children:"120%"})]}),t.includes("spacing")&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"90%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"110%"}),j.jsx("option",{children:"120%"})]}),t.includes("height")&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"90%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"110%"}),j.jsx("option",{children:"120%"})]}),(t.includes("elevation")||t.includes("radius"))&&j.jsxs(j.Fragment,{children:[j.jsx("option",{children:"none"}),j.jsx("option",{children:"50%"}),j.jsx("option",{children:"100%"}),j.jsx("option",{children:"150%"}),j.jsx("option",{children:"200%"})]}),t.includes("radius")&&j.jsx("option",{children:"full"})]})]})},vwe=({tabs:e})=>{const{t}=er(),{developerMode:r}=ir(n=>n);return j.jsxs(z5,{alignment:"center",width:"full",className:"h-full",children:[j.jsx(WA,{children:e.filter(n=>r||!n.onlyDeveloper).map(n=>j.jsx(Rv,{children:t(n.text)},`tab-${n.text}`))}),e.filter(n=>r||!n.onlyDeveloper).map(n=>j.jsx(jv,{className:"h-full",children:n.component},`tab-panel-${n.text}`))]})},bwe=()=>j.jsx("div",{className:"grid grid-cols-3 md:grid-cols-9 gap-fix-md",children:x1.map(e=>j.jsxs("div",{className:"flex flex-col h-full justify-between items-center",children:[j.jsx("div",{className:"rounded w-siz-xl",style:{height:`var(--db-border-height-${e})`,border:`var(--db-border-height-${e}) solid var(--db-brand-on-bg-basic-emphasis-60-default)`}}),j.jsx(dr,{semantic:"informational",icon:"none",children:e})]},`border-height-${e}`))}),xwe=()=>j.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-fix-md",children:[...x1,"full"].map(e=>j.jsx("div",{className:"flex w-siz-xl h-siz-xl md:w-siz-2xl md:h-siz-2xl db-successful-bg-basic-level-1 items-center justify-center",style:{borderRadius:`var(--db-border-radius-${e})`,border:"var(--db-border-height-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default)"},children:e},`border-radius-${e}`))}),wwe=()=>j.jsx("div",{className:"grid grid-cols-3 gap-fix-md",children:A9.map(e=>j.jsx("div",{className:"db-card items-center","data-spacing":"medium",style:{boxShadow:`var(--db-elevation-${e})`},children:e},`elevation-${e}`))}),Swe=()=>j.jsx("div",{className:"flex flex-wrap gap-fix-md",children:x1.map(e=>j.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[j.jsx("div",{className:"flex db-informational-bg-basic-level-1 items-center justify-center",style:{width:`var(--db-sizing-${e})`,height:`var(--db-sizing-${e})`,border:"var(--db-border-height-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default)"},children:j.jsx("span",{className:"hidden",children:e})}),j.jsx(dr,{semantic:"informational",icon:"none",children:e})]},`sizing-${e}`))}),Dwe=()=>j.jsx("div",{className:"flex flex-wrap gap-fix-md",children:x1.map(e=>j.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[j.jsx("div",{className:"flex db-warning-bg-basic-level-1 items-center justify-center",style:{width:`var(--db-spacing-fixed-${e})`,height:`var(--db-spacing-fixed-${e})`,border:"var(--db-border-height-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default)"},children:j.jsx("span",{className:"hidden",children:e})}),j.jsx(dr,{semantic:"informational",icon:"none",children:e})]},`spacing-${e}`))}),A9=["sm","md","lg"],x1=["3xs","2xs","xs",...A9,"xl","2xl","3xl"],Ewe=[{title:"spacing",component:j.jsx(Dwe,{})},{title:"sizing",component:j.jsx(Swe,{})},{title:"elevation",component:j.jsx(wwe,{})},{title:"borderHeight",component:j.jsx(bwe,{})},{title:"borderRadius",component:j.jsx(xwe,{})}],Xn=({colorName:e,type:t,bgTransparent:r})=>j.jsxs("div",{className:"flex flex-col gap-fix-md text-center h-full",children:[j.jsx("p",{className:"font-bold",children:sn(`${t}${r?`-${r}`:""}`,!1," ")}),j.jsx("div",{className:"flex flex-col mt-auto",children:["default","hovered","pressed"].map(n=>{const i=`var(--db-${e}-${t}${r&&n==="default"?`-${r}`:""}-${n}`,s=`var(--db-${e}-on-bg-basic-emphasis-60-default)`;let o=`var(--db-${e}-on-bg-basic-emphasis-100-default)`;return t.startsWith("on-bg")?o=`var(--db-${e}-bg-basic-level-1-default)`:t==="origin"?o=`var(--db-${e}-on-origin-default)`:t==="on-origin"?o=`var(--db-${e}-origin-default)`:(t==="bg-inverted-contrast-high"||t==="bg-inverted-contrast-low"||t==="bg-inverted-contrast-max")&&(o=`var(--db-${e}-on-bg-inverted-default)`),j.jsx("div",{className:"flex w-full md:min-w-siz-2xl h-siz-md mx-auto rounded-sm",style:{backgroundColor:i,border:`1px solid ${s}`,color:o},children:j.jsx("span",{className:"m-auto",children:n})},`color-preview-${e}-${t}-${n}`)})})]}),Cwe=({colorName:e})=>j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(Xn,{colorName:e,type:"on-origin"}),j.jsx(Xn,{colorName:e,type:"origin"})]}),j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(Xn,{colorName:e,type:"bg-inverted-contrast-max"}),j.jsx(Xn,{colorName:e,type:"bg-inverted-contrast-high"}),j.jsx(Xn,{colorName:e,type:"bg-inverted-contrast-low"})]}),j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(Xn,{colorName:e,type:"bg-basic-level-1"}),j.jsx(Xn,{colorName:e,type:"bg-basic-level-2"}),j.jsx(Xn,{colorName:e,type:"bg-basic-level-3"}),j.jsx(Xn,{colorName:e,type:"bg-basic-transparent",bgTransparent:"full"}),j.jsx(Xn,{colorName:e,type:"bg-basic-transparent",bgTransparent:"semi"})]}),j.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-fix-md",children:[j.jsx(Xn,{colorName:e,type:"on-bg-basic-emphasis-100"}),j.jsx(Xn,{colorName:e,type:"on-bg-basic-emphasis-90"}),j.jsx(Xn,{colorName:e,type:"on-bg-basic-emphasis-80"}),j.jsx(Xn,{colorName:e,type:"on-bg-basic-emphasis-70"}),j.jsx(Xn,{colorName:e,type:"on-bg-basic-emphasis-60"}),j.jsx(Xn,{colorName:e,type:"on-bg-basic-emphasis-50"})]})]}),Twe=()=>{const{theme:e}=ir(o=>o),[t,r]=z.useState(""),[n,i]=z.useState([]),{t:s}=er();return z.useEffect(()=>{i(Object.keys({...e.colors,...e.additionalColors,...e.customColors}).map(o=>({title:o,component:j.jsx(Cwe,{colorName:o}),isColor:!0})))},[s,e.additionalColors,e.colors,e.customColors]),j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx(Kr,{variant:"floating",label:s("search"),placeholder:s("search"),type:"search",onChange:o=>r(o.target.value)}),j.jsx("div",{className:"flex flex-col gap-fix-sm w-full",children:[...Ewe,...n].map(({title:o,component:a,isColor:l})=>(l?`${s("color")}: ${o}`:s(o)).toLowerCase().includes(t.toLowerCase())?j.jsx(Bi,{spacing:"small",className:"w-full",children:j.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[j.jsx("h5",{children:l?`${s("color")}: ${o}`:s(o)}),a]})},`token-card-${o}`):null)})]})},Awe=[{text:"demo",component:j.jsx(gwe,{})},{text:"components",component:j.jsx(Ixe,{})},{text:"token",component:j.jsx(Twe,{})},{text:"colorPalettes",component:j.jsx(Mxe,{}),onlyDeveloper:!0},{text:"speakingColors",component:j.jsx(hwe,{}),onlyDeveloper:!0}],kwe=()=>{const{t:e}=er(),{theme:t}=ir(r=>r);return j.jsx(b1,{withDevMode:!0,actionBar:j.jsx(cwe,{}),name:e("customization"),children:j.jsxs("div",{className:"content flex flex-col md:flex-row md:h-full md:overflow-hidden",children:[j.jsxs("div",{className:"flex flex-col p-fix-lg w-full md:w-2/5 md:h-full md:overflow-auto border-r gap-fix-xl",children:[j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsx("h5",{children:e("name")}),j.jsx(Kr,{variant:"floating",label:e("themeName"),placeholder:e("themeName"),value:t.branding.name,onChange:r=>ir.setState({theme:{...t,branding:{...t.branding,name:r.target.value}}})})]}),j.jsx(dwe,{}),j.jsx(uo,{margin:"none"}),j.jsx(Fxe,{}),j.jsx(uo,{margin:"none"}),j.jsx(Vf,{label:"spacing",params:["spacing"]}),j.jsx(Vf,{label:"sizing",params:["sizing"]}),j.jsx(Vf,{label:"elevation",params:["elevation"]}),j.jsx(Vf,{label:"borderHeight",params:["border","height"]}),j.jsx(Vf,{label:"borderRadius",params:["border","radius"]})]}),j.jsx("div",{className:`db-neutral-bg-basic-level-2 p-fix-sm md:p-res-sm + flex flex-col gap-res-sm w-full md:overflow-auto`,children:j.jsx(vwe,{tabs:Awe})})]})})},_we=["accessible","adaptive","efficient"],$we=()=>{const{t:e}=er();return j.jsx(j.Fragment,{children:_we.map((t,r)=>j.jsx(Wg,{spacing:"medium",width:"large",className:`flex h-[100vh] items-center${r%2===0?" db-neutral-bg-basic-level-2":""}`,children:j.jsxs("div",{className:"flex flex-col text-balance text-center items-center gap-fix-md",children:[j.jsx("h6",{children:e(`landingHowItFeature${r+1}Title`)}),j.jsxs("h2",{children:[e(`landingHowItFeature${r+1}Strong`),e(`landingHowItFeature${r+1}Desc`)]})]})},`feature-card-${t}`))})},Lwe=()=>{const{t:e}=er();return j.jsx(Wg,{spacing:"medium",width:"large",className:"flex items-center db-brand-bg-basic-level-3",children:j.jsxs("div",{className:"flex flex-col gap-fix-xl items-center text-center text-balance",children:[j.jsx("h2",{"data-icon-after":"heart",children:e("landingMoreTitle")}),j.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md mx-auto items-center",children:[j.jsx(cb,{to:"/playground",className:"db-button capitalize hidden md:block",target:"_blank","data-variant":"filled","data-width":"full",children:e("tryIt")}),j.jsx("a",{className:"db-button capitalize","data-variant":"brand",href:"https://marketingportal.extranet.deutschebahn.com/marketingportal",target:"_blank","data-width":"full",children:e("gettingStarted")})]})]})})},Pwe=()=>{const{theme:e,darkMode:t}=ir(r=>r);return j.jsx(Wg,{spacing:"none",width:"large",children:j.jsxs("div",{className:"flex justify-between min-h-siz-md py-fix-xs md:py-fix-md",children:[j.jsx("img",{className:"logo",src:Dg(t&&e.branding.image.dark?e.branding.image.dark:e.branding.image.light),alt:"brand"}),j.jsx("a",{href:"https://github.com/db-ui/theme-builder",target:"_blank",referrerPolicy:"no-referrer",children:j.jsx("img",{className:"my-auto logo",src:`${Cb}/assets/images/github-mark${t?"-white":""}.svg`,alt:"GitHub Mark"})})]})})},Fwe={name:"Deutsche Bahn",image:{light:"db_logo.svg"}},Owe={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Iwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},Mwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},Nwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Rwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Bwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},jwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},zwe={neutral:{origin:"#646973",originBgLight:"#edeef0",originBgDark:"#070709",originLight:"#646973",originLightAlternative:"#646973",originLightAccessible:!0,originLightHovered:"#4d5159",originLightPressed:"#373a40",originDark:"#646973",originDarkAlternative:"#646973",originDarkAccessible:!0,originDarkHovered:"#7c828e",originDarkPressed:"#969ca9",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},brand:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},informational:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},warning:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},successful:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"},critical:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"}},Hwe={yellow:{origin:"#FFD800",originBgLight:"#ffedbc",originBgDark:"#0a0700",originLight:"#FFD800",originLightAlternative:"#8c7600",originLightAccessible:!1,originLightHovered:"#dfbc00",originLightPressed:"#bfa200",originDark:"#FFD800",originDarkAlternative:"#FFD800",originDarkAccessible:!0,originDarkHovered:"#dfbc00",originDarkPressed:"#bfa200",onOriginLight:"#0a0700",onOriginLightHovered:"#261f00",onOriginLightPressed:"#3f3400",onOriginLightAccessible:!0,onOriginLightAlternative:"#0a0700",onOriginDark:"#0a0700",onOriginDarkHovered:"#261f00",onOriginDarkPressed:"#3f3400",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#0a0700"},orange:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},red:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},pink:{origin:"#E93E8F",originBgLight:"#fce9ef",originBgDark:"#160209",originLight:"#E93E8F",originLightAlternative:"#E93E8F",originLightAccessible:!0,originLightHovered:"#be3174",originLightPressed:"#95245a",originDark:"#E93E8F",originDarkAlternative:"#E93E8F",originDarkAccessible:!0,originDarkHovered:"#ef75a6",originDarkPressed:"#f3a0be",onOriginLight:"#260413",onOriginLightHovered:"#490e29",onOriginLightPressed:"#6e1941",onOriginLightAccessible:!0,onOriginLightAlternative:"#260413",onOriginDark:"#260413",onOriginDarkHovered:"#490e29",onOriginDarkPressed:"#6e1941",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#260413"},violet:{origin:"#814997",originBgLight:"#f3ebf7",originBgDark:"#0d0412",originLight:"#814997",originLightAlternative:"#814997",originLightAccessible:!0,originLightHovered:"#623673",originLightPressed:"#452452",originDark:"#814997",originDarkAlternative:"#814997",originDarkAccessible:!0,originDarkHovered:"#a15dbc",originDarkPressed:"#b67cce",onOriginLight:"#fbf8fc",onOriginLightHovered:"#e9d7ee",onOriginLightPressed:"#d7b5e1",onOriginLightAccessible:!0,onOriginLightAlternative:"#fbf8fc",onOriginDark:"#fbf8fc",onOriginDarkHovered:"#e9d7ee",onOriginDarkPressed:"#d7b5e1",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#fbf8fc"},blue:{origin:"#1455C0",originBgLight:"#eaedfe",originBgDark:"#00061b",originLight:"#1455C0",originLightAlternative:"#1455C0",originLightAccessible:!0,originLightHovered:"#0c3f92",originLightPressed:"#062a67",originDark:"#1455C0",originDarkAlternative:"#1558c6",originDarkAccessible:!1,originDarkHovered:"#1c6cf0",originDarkPressed:"#5c87fa",onOriginLight:"#f8f9ff",onOriginLightHovered:"#d5dbff",onOriginLightPressed:"#b0beff",onOriginLightAccessible:!0,onOriginLightAlternative:"#f8f9ff",onOriginDark:"#f8f9ff",onOriginDarkHovered:"#d5dbff",onOriginDarkPressed:"#b0beff",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f8f9ff"},cyan:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},turquoise:{origin:"#00A099",originBgLight:"#9bfff8",originBgDark:"#000908",originLight:"#00A099",originLightAlternative:"#00857f",originLightAccessible:!1,originLightHovered:"#00847e",originLightPressed:"#006864",originDark:"#00A099",originDarkAlternative:"#00A099",originDarkAccessible:!0,originDarkHovered:"#00bdb5",originDarkPressed:"#00dcd2",onOriginLight:"#000908",onOriginLightHovered:"#002422",onOriginLightPressed:"#003c38",onOriginLightAccessible:!0,onOriginLightAlternative:"#000908",onOriginDark:"#000908",onOriginDarkHovered:"#002422",onOriginDarkPressed:"#003c38",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#000908"},green:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"}},Uwe={branding:Fwe,spacing:Owe,sizing:Iwe,typography:Mwe,border:Nwe,elevation:Rwe,transition:Bwe,font:jwe,colors:zwe,additionalColors:Hwe},Wwe={name:"S-Bahn",image:{light:"sbahn_logo.svg"}},Vwe={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Gwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},qwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},Kwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Jwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Xwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},Ywe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Qwe={neutral:{origin:"#646973",originBgLight:"#edeef0",originBgDark:"#070709",originLight:"#646973",originLightAlternative:"#646973",originLightAccessible:!0,originLightHovered:"#4d5159",originLightPressed:"#373a40",originDark:"#646973",originDarkAlternative:"#646973",originDarkAccessible:!0,originDarkHovered:"#7c828e",originDarkPressed:"#969ca9",onOriginLight:"#f9f9fa",onOriginLightHovered:"#dcdce2",onOriginLightPressed:"#c0c0cb",onOriginLightAccessible:!0,onOriginLightAlternative:"#f9f9fa",onOriginDark:"#f9f9fa",onOriginDarkHovered:"#dcdce2",onOriginDarkPressed:"#c0c0cb",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f9f9fa"},brand:{origin:"#408335",originBgLight:"#cbfac7",originBgDark:"#ffffff",originLight:"#408335",originLightAlternative:"#408335",originLightAccessible:!0,originLightHovered:"#3d7236",originLightPressed:"#2d5828",originDark:"#408335",originDarkAlternative:"#408335",originDarkAccessible:!0,originDarkHovered:"#5eab54",originDarkPressed:"#6fc864",onOriginLight:"#ffffff",onOriginLightHovered:"#12240d",onOriginLightPressed:"#203b19",onOriginLightAccessible:!0,onOriginLightAlternative:"#ffffff",onOriginDark:"#ffffff",onOriginDarkHovered:"#12240d",onOriginDarkPressed:"#203b19",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},informational:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},warning:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},successful:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"},critical:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"}},Zwe={yellow:{origin:"#FFD800",originBgLight:"#ffedbc",originBgDark:"#0a0700",originLight:"#FFD800",originLightAlternative:"#8c7600",originLightAccessible:!1,originLightHovered:"#dfbc00",originLightPressed:"#bfa200",originDark:"#FFD800",originDarkAlternative:"#FFD800",originDarkAccessible:!0,originDarkHovered:"#dfbc00",originDarkPressed:"#bfa200",onOriginLight:"#0a0700",onOriginLightHovered:"#261f00",onOriginLightPressed:"#3f3400",onOriginLightAccessible:!0,onOriginLightAlternative:"#0a0700",onOriginDark:"#0a0700",onOriginDarkHovered:"#261f00",onOriginDarkPressed:"#3f3400",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#0a0700"},orange:{origin:"#F39200",originBgLight:"#ffeadf",originBgDark:"#100500",originLight:"#F39200",originLightAlternative:"#ad6600",originLightAccessible:!1,originLightHovered:"#ce7b00",originLightPressed:"#aa6500",originDark:"#F39200",originDarkAlternative:"#F39200",originDarkAccessible:!0,originDarkHovered:"#ffb47b",originDarkPressed:"#ffd9c3",onOriginLight:"#100500",onOriginLightHovered:"#331900",onOriginLightPressed:"#512b00",onOriginLightAccessible:!0,onOriginLightAlternative:"#100500",onOriginDark:"#100500",onOriginDarkHovered:"#331900",onOriginDarkPressed:"#512b00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#100500"},red:{origin:"#EC0016",originBgLight:"#ffe9e9",originBgDark:"#1a0000",originLight:"#EC0016",originLightAlternative:"#EC0016",originLightAccessible:!0,originLightHovered:"#bd000f",originLightPressed:"#900009",originDark:"#EC0016",originDarkAlternative:"#EC0016",originDarkAccessible:!0,originDarkHovered:"#ff4f53",originDarkPressed:"#ff8587",onOriginLight:"#ffffff",onOriginLightHovered:"#ffdada",onOriginLightPressed:"#ffb3b4",onOriginLightAccessible:!0,onOriginLightAlternative:"#000000",onOriginDark:"#ffffff",onOriginDarkHovered:"#ffdada",onOriginDarkPressed:"#ffb3b4",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#ffffff"},pink:{origin:"#E93E8F",originBgLight:"#fce9ef",originBgDark:"#160209",originLight:"#E93E8F",originLightAlternative:"#E93E8F",originLightAccessible:!0,originLightHovered:"#be3174",originLightPressed:"#95245a",originDark:"#E93E8F",originDarkAlternative:"#E93E8F",originDarkAccessible:!0,originDarkHovered:"#ef75a6",originDarkPressed:"#f3a0be",onOriginLight:"#260413",onOriginLightHovered:"#490e29",onOriginLightPressed:"#6e1941",onOriginLightAccessible:!0,onOriginLightAlternative:"#260413",onOriginDark:"#260413",onOriginDarkHovered:"#490e29",onOriginDarkPressed:"#6e1941",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#260413"},violet:{origin:"#814997",originBgLight:"#f3ebf7",originBgDark:"#0d0412",originLight:"#814997",originLightAlternative:"#814997",originLightAccessible:!0,originLightHovered:"#623673",originLightPressed:"#452452",originDark:"#814997",originDarkAlternative:"#814997",originDarkAccessible:!0,originDarkHovered:"#a15dbc",originDarkPressed:"#b67cce",onOriginLight:"#fbf8fc",onOriginLightHovered:"#e9d7ee",onOriginLightPressed:"#d7b5e1",onOriginLightAccessible:!0,onOriginLightAlternative:"#fbf8fc",onOriginDark:"#fbf8fc",onOriginDarkHovered:"#e9d7ee",onOriginDarkPressed:"#d7b5e1",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#fbf8fc"},blue:{origin:"#1455C0",originBgLight:"#eaedfe",originBgDark:"#00061b",originLight:"#1455C0",originLightAlternative:"#1455C0",originLightAccessible:!0,originLightHovered:"#0c3f92",originLightPressed:"#062a67",originDark:"#1455C0",originDarkAlternative:"#1558c6",originDarkAccessible:!1,originDarkHovered:"#1c6cf0",originDarkPressed:"#5c87fa",onOriginLight:"#f8f9ff",onOriginLightHovered:"#d5dbff",onOriginLightPressed:"#b0beff",onOriginLightAccessible:!0,onOriginLightAlternative:"#f8f9ff",onOriginDark:"#f8f9ff",onOriginDarkHovered:"#d5dbff",onOriginDarkPressed:"#b0beff",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#f8f9ff"},cyan:{origin:"#309FD1",originBgLight:"#e0f0fe",originBgDark:"#01080f",originLight:"#309FD1",originLightAlternative:"#257fa8",originLightAccessible:!1,originLightHovered:"#2684ae",originLightPressed:"#1d698c",originDark:"#309FD1",originDarkAlternative:"#309FD1",originDarkAccessible:!0,originDarkHovered:"#3abbf5",originDarkPressed:"#96d2fb",onOriginLight:"#01080f",onOriginLightHovered:"#072231",onOriginLightPressed:"#0f384f",onOriginLightAccessible:!0,onOriginLightAlternative:"#01080f",onOriginDark:"#01080f",onOriginDarkHovered:"#072231",onOriginDarkPressed:"#0f384f",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#01080f"},turquoise:{origin:"#00A099",originBgLight:"#9bfff8",originBgDark:"#000908",originLight:"#00A099",originLightAlternative:"#00857f",originLightAccessible:!1,originLightHovered:"#00847e",originLightPressed:"#006864",originDark:"#00A099",originDarkAlternative:"#00A099",originDarkAccessible:!0,originDarkHovered:"#00bdb5",originDarkPressed:"#00dcd2",onOriginLight:"#000908",onOriginLightHovered:"#002422",onOriginLightPressed:"#003c38",onOriginLightAccessible:!0,onOriginLightAlternative:"#000908",onOriginDark:"#000908",onOriginDarkHovered:"#002422",onOriginDarkPressed:"#003c38",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#000908"},green:{origin:"#63A615",originBgLight:"#c3ff9d",originBgDark:"#030900",originLight:"#63A615",originLightAlternative:"#4e850f",originLightAccessible:!1,originLightHovered:"#51890f",originLightPressed:"#406e0a",originDark:"#63A615",originDarkAlternative:"#63A615",originDarkAccessible:!0,originDarkHovered:"#75c31b",originDarkPressed:"#88e221",onOriginLight:"#030900",onOriginLightHovered:"#122400",onOriginLightPressed:"#213c00",onOriginLightAccessible:!0,onOriginLightAlternative:"#030900",onOriginDark:"#030900",onOriginDarkHovered:"#122400",onOriginDarkPressed:"#213c00",onOriginDarkAccessible:!0,onOriginDarkAlternative:"#030900"}},eSe={branding:Wwe,spacing:Vwe,sizing:Gwe,typography:qwe,border:Kwe,elevation:Jwe,transition:Xwe,font:Ywe,colors:Qwe,additionalColors:Zwe},tSe=HA,rSe=eSe,nSe=Uwe,iSe={neutralTheme:tSe,dbTheme:nSe,sbahnTheme:rSe},sSe=()=>{const{t:e}=er(),[t,r]=z.useState("neutralTheme"),{darkMode:n,theme:i}=ir(s=>s);return j.jsx(Wg,{width:"large",spacing:"large",className:"flex md:h-[100vh] items-center",children:j.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-fix-md md:gap-fix-3xl",children:[j.jsxs("div",{className:"flex flex-col gap-fix-md",children:[j.jsxs("h1",{children:[j.jsx("span",{className:"brand-name",children:i.branding.name}),j.jsx("br",{}),e("product")]}),j.jsx("h4",{"data-variant":"light",children:e("claim")}),j.jsx("p",{children:e("landingDesignSystemText")}),j.jsxs("div",{className:"grid grid-cols-4 gap-fix-md",children:[Object.entries(iSe).map(([s,o])=>j.jsx("button",{onClick:()=>{r(s),ir.setState({theme:o,luminanceSteps:Mv,speakingNames:_E})},children:j.jsxs(Bi,{className:"min-h-siz-xl",spacing:"small","data-selected":t===s,elevationLevel:"2",behaviour:"interactive",children:[j.jsx("img",{className:"logo m-auto",src:Dg(n&&o.branding.image.dark?o.branding.image.dark:o.branding.image.light),alt:"brand"}),j.jsx(vs,{placement:"bottom",children:e(s)})]})},s)),j.jsx(cb,{className:"no-underline",to:"/customization",children:j.jsx(Bi,{className:"items-center justify-center min-h-siz-xl",spacing:"small","data-selected":"false",elevationLevel:"2",behaviour:"interactive",children:j.jsx(Fd,{icon:"plus",children:"Add custom theme"})})})]})]}),j.jsx("div",{className:"flex col-span-2 relative",children:j.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:j.jsx(Y2,{linkToDemo:!0})})})]})})},oSe=()=>j.jsxs("div",{className:"flex flex-col overflow-y-auto h-full",children:[j.jsx(Pwe,{}),j.jsxs("main",{children:[j.jsx(sSe,{}),j.jsx($we,{}),j.jsx(Lwe,{})]})]});function Mn(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:w1(e)?2:S1(e)?3:0}function Eg(e,t){return Hl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nv(e,t){return Hl(e)===2?e.get(t):e[t]}function k9(e,t,r){var n=Hl(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function aSe(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function w1(e){return fSe&&e instanceof Map}function S1(e){return pSe&&e instanceof Set}function xn(e){return e.o||e.t}function Q2(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mSe(e);delete t[cr];for(var r=n_(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=lSe),Object.freeze(e),t&&pc(e,function(r,n){return Z2(n,!0)},!0)),e}function lSe(){Mn(2)}function e_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Io(e){var t=QC[e];return t||Mn(18,e),t}function _9(e,t){QC[e]||(QC[e]=t)}function x0(){return Tg}function XS(e,t){t&&(Io("Patches"),e.u=[],e.s=[],e.v=t)}function w0(e){YC(e),e.p.forEach(uSe),e.p=null}function YC(e){e===Tg&&(Tg=e.l)}function qI(e){return Tg={p:[],l:Tg,h:e,m:!0,_:0}}function uSe(e){var t=e[cr];t.i===0||t.i===1?t.j():t.g=!0}function YS(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Io("ES5").S(t,e,n),n?(r[cr].P&&(w0(t),Mn(4)),Bo(e)&&(e=S0(t,e),t.l||D0(t,e)),t.u&&Io("Patches").M(r[cr].t,e,t.u,t.s)):e=S0(t,r,[]),w0(t),t.u&&t.v(t.u,t.s),e!==r_?e:void 0}function S0(e,t,r){if(e_(t))return t;var n=t[cr];if(!n)return pc(t,function(a,l){return KI(e,n,t,a,l,r)},!0),t;if(n.A!==e)return t;if(!n.P)return D0(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Q2(n.k):n.o,s=i,o=!1;n.i===3&&(s=new Set(i),i.clear(),o=!0),pc(s,function(a,l){return KI(e,n,i,a,l,r,o)}),D0(e,i,!1),r&&e.u&&Io("Patches").N(n,r,e.u,e.s)}return n.o}function KI(e,t,r,n,i,s,o){if(fc(i)){var a=S0(e,i,s&&t&&t.i!==3&&!Eg(t.R,n)?s.concat(n):void 0);if(k9(r,n,a),!fc(a))return;e.m=!1}else o&&r.add(i);if(Bo(i)&&!e_(i)){if(!e.h.D&&e._<1)return;S0(e,i),t&&t.A.l||D0(e,i)}}function D0(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Z2(t,r)}function QS(e,t){var r=e[cr];return(r?xn(r):e)[t]}function JI(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function aa(e){e.P||(e.P=!0,e.l&&aa(e.l))}function ZS(e){e.o||(e.o=Q2(e.t))}function Cg(e,t,r){var n=w1(t)?Io("MapSet").F(t,r):S1(t)?Io("MapSet").T(t,r):e.O?function(i,s){var o=Array.isArray(i),a={i:o?1:0,A:s?s.A:x0(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},l=a,u=ZC;o&&(l=[a],u=up);var c=Proxy.revocable(l,u),h=c.revoke,d=c.proxy;return a.k=d,a.j=h,d}(t,r):Io("ES5").J(t,r);return(r?r.A:x0()).p.push(n),n}function cSe(e){return fc(e)||Mn(22,e),function t(r){if(!Bo(r))return r;var n,i=r[cr],s=Hl(r);if(i){if(!i.P&&(i.i<4||!Io("ES5").K(i)))return i.t;i.I=!0,n=XI(r,s),i.I=!1}else n=XI(r,s);return pc(n,function(o,a){i&&nv(i.t,o)===a||k9(n,o,t(a))}),s===3?new Set(n):n}(e)}function XI(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Q2(e)}function hSe(){function e(n){if(!Bo(n))return n;if(Array.isArray(n))return n.map(e);if(w1(n))return new Map(Array.from(n.entries()).map(function(o){return[o[0],e(o[1])]}));if(S1(n))return new Set(Array.from(n).map(e));var i=Object.create(Object.getPrototypeOf(n));for(var s in n)i[s]=e(n[s]);return Eg(n,Bp)&&(i[Bp]=n[Bp]),i}function t(n){return fc(n)?e(n):n}var r="add";_9("Patches",{$:function(n,i){return i.forEach(function(s){for(var o=s.path,a=s.op,l=n,u=0;u1?b-1:0),E=1;E1?c-1:0),d=1;d=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var o=Io("Patches").$;return fc(r)?o(r,n):this.produce(r,function(a){return o(a,n)})},e}(),as=new ySe,vSe=as.produce,ZI=as.produceWithPatches.bind(as);as.setAutoFreeze.bind(as);as.setUseProxies.bind(as);var eM=as.applyPatches.bind(as);as.createDraft.bind(as);as.finishDraft.bind(as);function bSe(){this.__data__=[],this.size=0}var xSe=bSe;function wSe(e,t){return e===t||e!==e&&t!==t}var $9=wSe,SSe=$9;function DSe(e,t){for(var r=e.length;r--;)if(SSe(e[r][0],t))return r;return-1}var D1=DSe,ESe=D1,CSe=Array.prototype,TSe=CSe.splice;function ASe(e){var t=this.__data__,r=ESe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():TSe.call(t,r,1),--this.size,!0}var kSe=ASe,_Se=D1;function $Se(e){var t=this.__data__,r=_Se(t,e);return r<0?void 0:t[r][1]}var LSe=$Se,PSe=D1;function FSe(e){return PSe(this.__data__,e)>-1}var OSe=FSe,ISe=D1;function MSe(e,t){var r=this.__data__,n=ISe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NSe=MSe,RSe=xSe,BSe=kSe,jSe=LSe,zSe=OSe,HSe=NSe;function of(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ta))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=r&_Ce?new CCe:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=BTe}var B9=jTe,zTe=T1,HTe=B9,UTe=_1,WTe="[object Arguments]",VTe="[object Array]",GTe="[object Boolean]",qTe="[object Date]",KTe="[object Error]",JTe="[object Function]",XTe="[object Map]",YTe="[object Number]",QTe="[object Object]",ZTe="[object RegExp]",eAe="[object Set]",tAe="[object String]",rAe="[object WeakMap]",nAe="[object ArrayBuffer]",iAe="[object DataView]",sAe="[object Float32Array]",oAe="[object Float64Array]",aAe="[object Int8Array]",lAe="[object Int16Array]",uAe="[object Int32Array]",cAe="[object Uint8Array]",hAe="[object Uint8ClampedArray]",dAe="[object Uint16Array]",fAe="[object Uint32Array]",Lr={};Lr[sAe]=Lr[oAe]=Lr[aAe]=Lr[lAe]=Lr[uAe]=Lr[cAe]=Lr[hAe]=Lr[dAe]=Lr[fAe]=!0;Lr[WTe]=Lr[VTe]=Lr[nAe]=Lr[GTe]=Lr[iAe]=Lr[qTe]=Lr[KTe]=Lr[JTe]=Lr[XTe]=Lr[YTe]=Lr[QTe]=Lr[ZTe]=Lr[eAe]=Lr[tAe]=Lr[rAe]=!1;function pAe(e){return UTe(e)&&HTe(e.length)&&!!Lr[zTe(e)]}var gAe=pAe;function mAe(e){return function(t){return e(t)}}var yAe=mAe,T0={exports:{}};T0.exports;(function(e,t){var r=L9,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a})(T0,T0.exports);var a_=T0.exports,vAe=gAe,bAe=yAe,dM=a_,fM=dM&&dM.isTypedArray,xAe=fM?bAe(fM):vAe,j9=xAe,wAe=wTe,SAe=PTe,DAe=o_,EAe=R9,CAe=RTe,TAe=j9,AAe=Object.prototype,kAe=AAe.hasOwnProperty;function _Ae(e,t){var r=DAe(e),n=!r&&SAe(e),i=!r&&!n&&EAe(e),s=!r&&!n&&!i&&TAe(e),o=r||n||i||s,a=o?wAe(e.length,String):[],l=a.length;for(var u in e)(t||kAe.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||CAe(u,l)))&&a.push(u);return a}var $Ae=_Ae,LAe=Object.prototype;function PAe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||LAe;return e===r}var FAe=PAe;function OAe(e,t){return function(r){return e(t(r))}}var IAe=OAe,MAe=IAe,NAe=MAe(Object.keys,Object),RAe=NAe,BAe=FAe,jAe=RAe,zAe=Object.prototype,HAe=zAe.hasOwnProperty;function UAe(e){if(!BAe(e))return jAe(e);var t=[];for(var r in Object(e))HAe.call(e,r)&&r!="constructor"&&t.push(r);return t}var WAe=UAe,VAe=i_,GAe=B9;function qAe(e){return e!=null&&GAe(e.length)&&!VAe(e)}var KAe=qAe,JAe=$Ae,XAe=WAe,YAe=KAe;function QAe(e){return YAe(e)?JAe(e):XAe(e)}var ZAe=QAe,eke=uTe,tke=bTe,rke=ZAe;function nke(e){return eke(e,rke,tke)}var ike=nke,pM=ike,ske=1,oke=Object.prototype,ake=oke.hasOwnProperty;function lke(e,t,r,n,i,s){var o=r&ske,a=pM(e),l=a.length,u=pM(t),c=u.length;if(l!=c&&!o)return!1;for(var h=l;h--;){var d=a[h];if(!(o?d in t:ake.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=o;++hcrypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");var Xke="Invariant failed";function Er(e,t){if(!e)throw new Error(Xke)}typeof window<"u"&&(window.__CRAFTJS__||(window.__CRAFTJS__={}),window.__CRAFTJS__["@craftjs/utils"]="0.2.4");var ma="ROOT",U9="canvas-ROOT",Yke="Attempting to add a node with duplicated id",Qke="Node cannot be dropped into target parent",Zke="Target parent rejects incoming node",e2e="Current parent rejects outgoing node",AM="Cannot move node that is not a direct child of a Canvas node",t2e="Cannot move node into a non-Canvas parent",kM="A top-level Node cannot be moved",r2e="Cannot move node into a descendant",W9="The component type specified for this node (%node_type%) does not exist in the resolver",n2e="The node has specified a canDrag() rule that prevents it from being dragged",i2e=`An Error occurred while deserializing components: Cannot find component <%displayName% /> in resolver map. Please check your resolver in Available components in resolver: %availableComponents% -More info: https://craft.js.org/r/docs/api/editor#props`;function TM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ps(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:500;if(t.length!==0||r.length!==0){if(this.timeline.length&&this.pointer>=0){var i=this.timeline[this.pointer],s=i.patches,o=i.inversePatches,a=i.timestamp;if(new Date().getTime()-a=0){var n=this.timeline[this.pointer],i=n.inversePatches;this.timeline[this.pointer]={timestamp:n.timestamp,patches:[].concat(pi(n.patches),pi(t)),inversePatches:[].concat(pi(r),pi(i))}}else this.add(t,r)}},{key:"clear",value:function(){this.timeline=[],this.pointer=-1}},{key:"canUndo",value:function(){return this.pointer>=0}},{key:"canRedo",value:function(){return this.pointer-1)return this.subscribers.splice(r,1)}}},{key:"notify",value:function(){this.subscribers.forEach(function(t){return t.collect()})}}]),e}(),r2e=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];uf(this,e),pn(this,"collected",void 0),pn(this,"collector",void 0),pn(this,"onChange",void 0),pn(this,"id",void 0),this.collector=t,this.onChange=r,n&&this.collect()}return cf(e,[{key:"collect",value:function(){try{var t=this.collector();Bke(t,this.collected)||(this.collected=t,this.onChange&&this.onChange(this.collected))}catch(r){console.warn(r)}}}]),e}(),Tg=function(e){var t=e.getBoundingClientRect(),r=t.x,n=t.y,i=t.top,s=t.left,o=t.bottom,a=t.right,l=t.width,u=t.height,c=window.getComputedStyle(e),h={left:parseInt(c.marginLeft),right:parseInt(c.marginRight),bottom:parseInt(c.marginBottom),top:parseInt(c.marginTop)},d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight),bottom:parseInt(c.paddingBottom),top:parseInt(c.paddingTop)};return{x:r,y:n,top:i,left:s,bottom:o,right:a,width:l,height:u,outerWidth:Math.round(l+h.left+h.right),outerHeight:Math.round(u+h.top+h.bottom),margin:h,padding:d,inFlow:e.parentElement&&!!function(f){var p=getComputedStyle(f);if(!(c.overflow&&c.overflow!=="visible"||p.float!=="none"||p.display==="grid"||p.display==="flex"&&p["flex-direction"]!=="column")){switch(c.position){case"static":case"relative":break;default:return}switch(e.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(c.display){case"block":case"list-item":case"table":case"flex":case"grid":return!0}}}(e.parentElement)}};function n2e(e,t){const{subscribe:r,getState:n,actions:i,query:s}=e,o=z.useRef(!0),a=z.useRef(null),l=z.useRef(t);l.current=t;const u=z.useCallback(d=>({...d,actions:i,query:s}),[i,s]);o.current&&t&&(a.current=t(n(),s),o.current=!1);const[c,h]=z.useState(u(a.current));return z.useEffect(()=>{let d;return l.current&&(d=r(f=>l.current(f,s),f=>{h(u(f))})),()=>{d&&d()}},[u,s,r]),c}var xd,K9=function(){return Hke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:10)},i2e=function(){function e(){uf(this,e),pn(this,"isEnabled",!0),pn(this,"elementIdMap",new WeakMap),pn(this,"registry",new Map)}return cf(e,[{key:"getElementId",value:function(t){var r=this.elementIdMap.get(t);if(r)return r;var n=K9();return this.elementIdMap.set(t,n),n}},{key:"getConnectorId",value:function(t,r){var n=this.getElementId(t);return"".concat(r,"--").concat(n)}},{key:"register",value:function(t,r){var n=this,i=this.getByElement(t,r.name);if(i){if(zke(r.required,i.required))return i;this.getByElement(t,r.name).disable()}var s=null,o=this.getConnectorId(t,r.name);return this.registry.set(o,{id:o,required:r.required,enable:function(){s&&s(),s=r.connector(t,r.required,r.options)},disable:function(){s&&s()},remove:function(){return n.remove(o)}}),this.isEnabled&&this.registry.get(o).enable(),this.registry.get(o)}},{key:"get",value:function(t){return this.registry.get(t)}},{key:"remove",value:function(t){var r=this.get(t);r&&(r.disable(),this.registry.delete(r.id))}},{key:"enable",value:function(){this.isEnabled=!0,this.registry.forEach(function(t){t.enable()})}},{key:"disable",value:function(){this.isEnabled=!1,this.registry.forEach(function(t){t.disable()})}},{key:"getByElement",value:function(t,r){return this.get(this.getConnectorId(t,r))}},{key:"removeByElement",value:function(t,r){return this.remove(this.getConnectorId(t,r))}},{key:"clear",value:function(){this.disable(),this.elementIdMap=new WeakMap,this.registry=new Map}}]),e}();(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(xd||(xd={}));var J9=function(){function e(t){uf(this,e),pn(this,"options",void 0),pn(this,"registry",new i2e),pn(this,"subscribers",new Set),this.options=t}return cf(e,[{key:"listen",value:function(t){var r=this;return this.subscribers.add(t),function(){return r.subscribers.delete(t)}}},{key:"disable",value:function(){this.onDisable&&this.onDisable(),this.registry.disable(),this.subscribers.forEach(function(t){t(xd.HandlerDisabled)})}},{key:"enable",value:function(){this.onEnable&&this.onEnable(),this.registry.enable(),this.subscribers.forEach(function(t){t(xd.HandlerEnabled)})}},{key:"cleanup",value:function(){this.disable(),this.subscribers.clear(),this.registry.clear()}},{key:"addCraftEventListener",value:function(t,r,n,i){var s=function(o){(function(a,l,u){a.craft||(a.craft={stopPropagation:function(){},blockedEvents:{}});for(var c=a.craft&&a.craft.blockedEvents[l]||[],h=0;h1?c-1:0),d=1;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,o=Kh(t);if(r){var a=Kh(this).constructor;s=Reflect.construct(o,arguments,a)}else s=o.apply(this,arguments);return function(l,u){if(u&&(typeof u=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iD(l)}(this,s)});function i(s,o){var a;return uf(this,i),pn(iD(a=n.call(this,o)),"derived",void 0),pn(iD(a),"unsubscribeParentHandlerListener",void 0),a.derived=s,a.options=o,a.unsubscribeParentHandlerListener=a.derived.listen(function(l){switch(l){case xd.HandlerEnabled:return a.enable();case xd.HandlerDisabled:return a.disable();default:return}}),a}return cf(i,[{key:"inherit",value:function(s){return this.createProxyHandlers(this.derived,s)}},{key:"cleanup",value:function(){sA(Kh(i.prototype),"cleanup",this).call(this),this.unsubscribeParentHandlerListener()}}]),i}();function _M(e,t){t&&(typeof e=="function"?e(t):e.current=t)}function o2e(e,t){const r=e.ref;return wr(typeof r!="string"),z.cloneElement(e,r?{ref:n=>{_M(r,n),_M(t,n)}}:{ref:t})}function a2e(e){return(t=null,...r)=>{if(!z.isValidElement(t)){if(!t)return;const i=t;return i&&e(i,...r),i}const n=t;return function(i){if(typeof i.type!="string")throw new Error}(n),o2e(n,e)}}function X9(e){return Object.keys(e).reduce((t,r)=>(t[r]=a2e((...n)=>e[r](...n)),t),{})}const l2e=({style:e,className:t,parentDom:r})=>{const n=pt.createElement("div",{className:t,style:{position:"fixed",display:"block",opacity:1,borderStyle:"solid",borderWidth:"1px",borderColor:"transparent",zIndex:99999,...e}});return r&&r.ownerDocument!==document?OT.createPortal(n,r.ownerDocument.body):n};var zl=function(e,t){var r="Deprecation warning: ".concat(e," will be deprecated in future relases."),n=t.suggest,i=t.doc;n&&(r+=" Please use ".concat(n," instead.")),i&&(r+="(".concat(i,")")),console.warn(r)},Y9=function(){return typeof window<"u"},u2e=function(){return Y9()&&/Linux/i.test(window.navigator.userAgent)},c2e=function(){return Y9()&&/Chrome/i.test(window.navigator.userAgent)},h2e=Mc;(function(){try{var e=h2e(Object,"defineProperty");return e({},"",{}),e}catch{}})();var k0={exports:{}};k0.exports;(function(e,t){var r=Wo,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var h=u.length,d=a?a(h):new u.constructor(h);return u.copy(d),d}e.exports=l})(k0,k0.exports);k0.exports;var $M=T1,LM=$M?$M.prototype:void 0;LM&&LM.valueOf;var PM=o_;PM&&PM.isMap;var FM=o_;FM&&FM.isSet;typeof window<"u"&&(window.__CRAFTJS__||(window.__CRAFTJS__={}),window.__CRAFTJS__["@craftjs/core"]="0.2.10");const Q9=pt.createContext(null),Z9=({id:e,related:t=!1,children:r})=>pt.createElement(Q9.Provider,{value:{id:e,related:t}},r);function OM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t=0||(c[l]=o[l]);return c}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=_0(e);if(t){var i=_0(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(s,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lp(s)}(this,r)}}function eH(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,a,l,u=[],c=!0,h=!1;try{if(a=(i=i.call(r)).next,n!==0)for(;!(c=(s=a.call(i)).done)&&(u.push(s.value),u.length!==n);c=!0);}catch(d){h=!0,o=d}finally{try{if(!c&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(h)throw o}}return u}}(e,t)||tH(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kg(e){return function(t){if(Array.isArray(t))return uA(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||tH(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function tH(e,t){if(e){if(typeof e=="string")return uA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uA(e,t):void 0}}function uA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{const{connectors:{connect:t,drag:r}}=Vo();return typeof e.type=="string"?t(r(pt.cloneElement(e))):e},m2e=()=>{const{type:e,props:t,nodes:r,hydrationTimestamp:n}=O1(i=>({type:i.data.type,props:i.data.props,nodes:i.data.nodes,hydrationTimestamp:i._hydrationTimestamp}));return z.useMemo(()=>{let i=t.children;r&&r.length>0&&(i=pt.createElement(pt.Fragment,null,r.map(o=>pt.createElement(d_,{id:o,key:o}))));const s=pt.createElement(e,t,i);return typeof e=="string"?pt.createElement(g2e,{render:s}):s},[e,t,n,r])},y2e=({render:e})=>{const{hidden:t}=O1(n=>({hidden:n.data.hidden})),{onRender:r}=Ic(n=>({onRender:n.options.onRender}));return t?null:pt.createElement(r,{render:e||pt.createElement(m2e,null)})},d_=({id:e,render:t})=>pt.createElement(Z9,{id:e},pt.createElement(y2e,{render:t})),cA={is:"div",canvas:!1,custom:{},hidden:!1},v2e={is:"type",canvas:"isCanvas"};function hf({id:e,children:t,...r}){const{is:n}={...cA,...r},{query:i,actions:s}=Ic(),{id:o,inNodeContext:a}=O1(),[l]=z.useState(()=>{wr(!!e);const u=i.node(o).get();if(a){const c=u.data.linkedNodes[e]?i.node(u.data.linkedNodes[e]).get():null;if(c&&c.data.type===n)return c.id;const h=pt.createElement(hf,r,t),d=i.parseReactElement(h).toNodeTree();return s.history.ignore().addLinkedNodeFromTree(d,o,e),d.rootNodeId}return null});return l?pt.createElement(d_,{id:l}):null}const sH=()=>zl("",{suggest:""});function hA({...e}){return z.useEffect(()=>sH(),[]),pt.createElement(hf,{...e,canvas:!0})}const b2e=()=>{const{timestamp:e}=Ic(t=>({timestamp:t.nodes[pa]&&t.nodes[pa]._hydrationTimestamp}));return e?pt.createElement(d_,{id:pa,key:e}):null},x2e=({children:e,json:t,data:r})=>{const{actions:n,query:i}=Ic();t&&zl("",{suggest:""});const s=z.useRef(!1);if(!s.current){const o=r||t;if(o)n.history.ignore().deserialize(o);else if(e){const a=pt.Children.only(e),l=i.parseReactElement(a).toNodeTree((u,c)=>(c===a&&(u.id=pa),u));n.history.ignore().addNodeTree(l)}s.current=!0}return pt.createElement(b2e,null)};var NM;(function(e){e[e.Any=0]="Any",e[e.Id=1]="Id",e[e.Obj=2]="Obj"})(NM||(NM={}));const sD=e=>{const{addLinkedNodeFromTree:t,setDOM:r,setNodeEvent:n,replaceNodes:i,reset:s,...o}=e;return o};function ii(e){const{connectors:t,actions:r,query:n,store:i,...s}=Ic(e),o=sD(r);return{connectors:t,actions:z.useMemo(()=>({...o,history:{...o.history,ignore:(...a)=>sD(o.history.ignore(...a)),throttle:(...a)=>sD(o.history.throttle(...a))}}),[o]),query:n,store:i,...s}}var oH=function(e){return Object.fromEntries?Object.fromEntries(e):e.reduce(function(t,r){var n=eH(r,2),i=n[0],s=n[1];return _r(_r({},t),{},cn({},i,s))},{})},oa=function(e,t,r){var n=Array.isArray(t)?t:[t],i=_r({existOnly:!1,idOnly:!1},r||{}),s=n.filter(function(o){return!!o}).map(function(o){return typeof o=="string"?{node:e[o],exists:!!e[o]}:aA(o)!=="object"||i.idOnly?{node:null,exists:!1}:{node:o,exists:!!e[o.id]}});return i.existOnly&&wr(s.filter(function(o){return!o.exists}).length===0),s},w2e=["history"],hh=null,$0=function(e,t){if(typeof t=="string")return t;var r,n=function(i,s){var o=function(a){if(hh&&hh.resolver===a)return hh.reversed;hh={resolver:a,reversed:new Map};for(var l=0,u=Object.entries(a);ltypeof e=="string"?e:{resolvedName:$0(t,e)},dA=(e,t)=>{let{type:r,isCanvas:n,props:i}=e;return i=Object.keys(i).reduce((s,o)=>{const a=i[o];return a==null||typeof a=="function"||(s[o]=o==="children"&&typeof a!="string"?z.Children.map(a,l=>typeof l=="string"?l:dA(l,t)):typeof a.type=="function"?dA(a,t):a),s},{}),{type:S2e(r,t),isCanvas:!!n,props:i}},D2e=(e,t)=>{const{type:r,props:n,isCanvas:i,name:s,...o}=e;return{...dA({type:r,isCanvas:i,props:n},t),...o}};function fA(e,t){wr(typeof t=="string");var r=e.nodes[t],n=function(i){return fA(e,i)};return{isCanvas:function(){return!!r.data.isCanvas},isRoot:function(){return r.id===pa},isLinkedNode:function(){return r.data.parent&&n(r.data.parent).linkedNodes().includes(r.id)},isTopLevelNode:function(){return this.isRoot()||this.isLinkedNode()},isDeletable:function(){return!this.isTopLevelNode()},isParentOfTopLevelNodes:function(){return r.data.linkedNodes&&Object.keys(r.data.linkedNodes).length>0},isParentOfTopLevelCanvas:function(){return zl("query.node(id).isParentOfTopLevelCanvas",{suggest:"query.node(id).isParentOfTopLevelNodes"}),this.isParentOfTopLevelNodes()},isSelected:function(){return e.events.selected.has(t)},isHovered:function(){return e.events.hovered.has(t)},isDragged:function(){return e.events.dragged.has(t)},get:function(){return r},ancestors:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return function s(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=e.nodes[o];return u?(a.push(o),u.data.parent&&(i||!i&&l===0)&&(a=s(u.data.parent,a,l+1)),a):a}(r.data.parent)},descendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=arguments.length>1?arguments[1]:void 0;return function o(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return(i||!i&&u===0)&&e.nodes[a]&&(s!=="childNodes"&&n(a).linkedNodes().forEach(function(c){l.push(c),l=o(c,l,u+1)}),s!=="linkedNodes"&&n(a).childNodes().forEach(function(c){l.push(c),l=o(c,l,u+1)})),l}(t)},linkedNodes:function(){return Object.values(r.data.linkedNodes||{})},childNodes:function(){return r.data.nodes||[]},isDraggable:function(i){try{var s=r;return wr(!this.isTopLevelNode(),AM),wr(fA(e,s.data.parent).isCanvas(),CM),wr(s.rules.canDrag(s,n),Xke),!0}catch(o){return i&&i(o),!1}},isDroppable:function(i,s){var o=oa(e.nodes,i),a=r;try{wr(this.isCanvas(),Kke),wr(a.rules.canMoveIn(o.map(function(u){return u.node}),a,n),Gke);var l={};return o.forEach(function(u){var c=u.node,h=u.exists;if(wr(c.rules.canDrop(a,c,n),Vke),h){wr(!n(c.id).isTopLevelNode(),AM);var d=n(c.id).descendants(!0);wr(!d.includes(a.id)&&a.id!==c.id,Jke);var f=c.data.parent&&e.nodes[c.data.parent];wr(f.data.isCanvas,CM),wr(f||!f&&!e.nodes[c.id],Wke),f.id!==a.id&&(l[f.id]||(l[f.id]=[]),l[f.id].push(c))}}),Object.keys(l).forEach(function(u){var c=e.nodes[u];wr(c.rules.canMoveOut(l[u],c,n),qke)}),!0}catch(u){return s&&s(u),!1}},toSerializedNode:function(){return D2e(r.data,e.options.resolver)},toNodeTree:function(i){var s=[t].concat(kg(this.descendants(!0,i))).reduce(function(o,a){return o[a]=n(a).get(),o},{});return{rootNodeId:t,nodes:s}},decendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return zl("query.node(id).decendants",{suggest:"query.node(id).descendants"}),this.descendants(i)},isTopLevelCanvas:function(){return!this.isRoot()&&!r.data.parent}}}function aH(e,t,r,n){for(var i={parent:e,index:0,where:"before"},s=0,o=0,a=0,l=0,u=0,c=0,h=0,d=t.length;ho||a&&u>=a||s&&f.left+f.outerWidth{let{type:n,props:i}=e;const s=((a,l)=>typeof a=="object"&&a.resolvedName?a.resolvedName==="Canvas"?hA:l[a.resolvedName]:typeof a=="string"?a:null)(n,t);if(!s)return;i=Object.keys(i).reduce((a,l)=>{const u=i[l];return a[l]=u==null?null:typeof u=="object"&&u.resolvedName?pA(u,t):l==="children"&&Array.isArray(u)?u.map(c=>typeof c=="string"?c:pA(c,t)):u,a},{});const o={...pt.createElement(s,{...i})};return{...o,name:$0(t,o.type)}},E2e=(e,t)=>{const{type:r,props:n,...i}=e;wr(r!==void 0&&typeof r=="string"||r!==void 0&&r.resolvedName!==void 0,Yke.replace("%displayName%",e.displayName).replace("%availableComponents%",Object.keys(t).join(", ")));const{type:s,name:o,props:a}=pA(e,t),{parent:l,custom:u,displayName:c,isCanvas:h,nodes:d,hidden:f}=i;return{type:s,name:o,displayName:c||o,props:a,custom:u||{},isCanvas:!!h,hidden:!!f,parent:l,linkedNodes:i.linkedNodes||i._childCanvas||{},nodes:d||[]}},C2e=(e,t)=>{if(t.length<1)return{[e.id]:e};const r=t.map(({rootNodeId:i})=>i),n={...e,data:{...e.data,nodes:r}};return t.reduce((i,s)=>{const o=s.nodes[s.rootNodeId];return{...i,...s.nodes,[o.id]:{...o,data:{...o.data,parent:e.id}}}},{[e.id]:n})},A2e=(e,t)=>({rootNodeId:e.id,nodes:C2e(e,t)});function lH(e){const t=e&&e.options,r=()=>lH(e);return{getDropPlaceholder:(n,i,s,o=a=>e.nodes[a.id].dom)=>{const a=e.nodes[i],l=r().node(a.id).isCanvas()?a:e.nodes[a.data.parent];if(!l)return;const u=l.data.nodes||[],c=aH(l,u?u.reduce((f,p)=>{const m=o(e.nodes[p]);if(m){const y={id:p,...Tg(m)};f.push(y)}return f},[]):[],s.x,s.y),h=u.length&&e.nodes[u[c.index]],d={placement:{...c,currentNode:h},error:null};return oa(e.nodes,n).forEach(({node:f,exists:p})=>{p&&r().node(f.id).isDraggable(m=>d.error=m)}),r().node(l.id).isDroppable(n,f=>d.error=f),d},getOptions:()=>t,getNodes:()=>e.nodes,node:n=>fA(e,n),getSerializedNodes(){const n=Object.keys(e.nodes).map(i=>[i,this.node(i).toSerializedNode()]);return oH(n)},getEvent:n=>function(i,s){var o=i.events[s];return{contains:function(a){return o.has(a)},isEmpty:function(){return this.all().length===0},first:function(){return this.all()[0]},last:function(){var a=this.all();return a[a.length-1]},all:function(){return Array.from(o)},size:function(){return this.all().length},at:function(a){return this.all()[a]},raw:function(){return o}}}(e,n),serialize(){return JSON.stringify(this.getSerializedNodes())},parseReactElement:n=>({toNodeTree(i){let s=function(a,l){let u=a;return typeof u=="string"&&(u=pt.createElement(z.Fragment,{},u)),MM({data:{type:u.type,props:{...u.props}}},c=>{l&&l(c,u)})}(n,(a,l)=>{const u=$0(e.options.resolver,a.data.type);a.data.displayName=a.data.displayName||u,a.data.name=u,i&&i(a,l)}),o=[];return n.props&&n.props.children&&(o=pt.Children.toArray(n.props.children).reduce((a,l)=>(pt.isValidElement(l)&&a.push(r().parseReactElement(l).toNodeTree(i)),a),[])),A2e(s,o)}}),parseSerializedNode:n=>({toNode(i){const s=E2e(n,e.options.resolver);wr(s.type);const o=typeof i=="string"&&i;return o&&zl("query.parseSerializedNode(...).toNode(id)",{suggest:"query.parseSerializedNode(...).toNode(node => node.id = id)"}),r().parseFreshNode({...o?{id:o}:{},data:s}).toNode(!o&&i)}}),parseFreshNode:n=>({toNode:i=>MM(n,s=>{s.data.parent===z9&&(s.data.parent=pa);const o=$0(e.options.resolver,s.data.type);wr(o!==null),s.data.displayName=s.data.displayName||o,s.data.name=o,i&&i(s)})}),createNode(n,i){zl(`query.createNode(${n})`,{suggest:`query.parseReactElement(${n}).toNodeTree()`});const s=this.parseReactElement(n).toNodeTree(),o=s.nodes[s.rootNodeId];return i&&(i.id&&(o.id=i.id),i.data&&(o.data={...o.data,...i.data})),o},getState:()=>e}}var T2e=function(e){l_(r,J9);var t=c_(r);function r(){return P1(this,r),t.apply(this,arguments)}return F1(r,[{key:"handlers",value:function(){return{connect:function(n,i){},select:function(n,i){},hover:function(n,i){},drag:function(n,i){},drop:function(n,i){},create:function(n,i,s){}}}}]),r}();(function(e){l_(r,s2e);var t=c_(r);function r(){return P1(this,r),t.apply(this,arguments)}return F1(r)})();var IM=function(e){e.preventDefault()},gA=function(){function e(t,r){P1(this,e),cn(this,"store",void 0),cn(this,"dragTarget",void 0),cn(this,"currentDropTargetId",void 0),cn(this,"currentDropTargetCanvasAncestorId",void 0),cn(this,"currentIndicator",null),cn(this,"currentTargetId",void 0),cn(this,"currentTargetChildDimensions",void 0),cn(this,"dragError",void 0),cn(this,"draggedNodes",void 0),cn(this,"onScrollListener",void 0),this.store=t,this.dragTarget=r,this.currentDropTargetId=null,this.currentDropTargetCanvasAncestorId=null,this.currentTargetId=null,this.currentTargetChildDimensions=null,this.currentIndicator=null,this.dragError=null,this.draggedNodes=this.getDraggedNodes(),this.validateDraggedNodes(),this.onScrollListener=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollListener,!0),window.addEventListener("dragover",IM,!1)}return F1(e,[{key:"cleanup",value:function(){window.removeEventListener("scroll",this.onScrollListener,!0),window.removeEventListener("dragover",IM,!1)}},{key:"onScroll",value:function(t){var r=t.target,n=this.store.query.node(pa).get();r instanceof Element&&n&&n.dom&&r.contains(n.dom)&&(this.currentTargetChildDimensions=null)}},{key:"getDraggedNodes",value:function(){return oa(this.store.query.getNodes(),this.dragTarget.type==="new"?this.dragTarget.tree.nodes[this.dragTarget.tree.rootNodeId]:this.dragTarget.nodes)}},{key:"validateDraggedNodes",value:function(){var t=this;this.dragTarget.type!=="new"&&this.draggedNodes.forEach(function(r){r.exists&&t.store.query.node(r.node.id).isDraggable(function(n){t.dragError=n})})}},{key:"isNearBorders",value:function(t,r,n){return t.top+e.BORDER_OFFSET>n||t.bottom-e.BORDER_OFFSETr||t.right-e.BORDER_OFFSET2&&arguments[2]!==void 0&&arguments[2]){var r=t[0].getBoundingClientRect(),n=r.width,i=r.height,s=t[0].cloneNode(!0);return s.style.position="absolute",s.style.left="-100%",s.style.top="-100%",s.style.width="".concat(n,"px"),s.style.height="".concat(i,"px"),s.style.pointerEvents="none",s.classList.add("drag-shadow"),document.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0),s}var o=document.createElement("div");return o.style.position="absolute",o.style.left="-100%",o.style.top="-100%",o.style.width="100%",o.style.height="100%",o.style.pointerEvents="none",o.classList.add("drag-shadow-container"),t.forEach(function(a){var l=a.getBoundingClientRect(),u=l.width,c=l.height,h=l.top,d=l.left,f=a.cloneNode(!0);f.style.position="absolute",f.style.left="".concat(d,"px"),f.style.top="".concat(h,"px"),f.style.width="".concat(u,"px"),f.style.height="".concat(c,"px"),f.classList.add("drag-shadow"),o.appendChild(f)}),document.body.appendChild(o),e.dataTransfer.setDragImage(o,e.clientX,e.clientY),o},uH=function(e){l_(r,T2e);var t=c_(r);function r(){var n;P1(this,r);for(var i=arguments.length,s=new Array(i),o=0;o1&&i.actions.setNodeEvent("selected",f=[o]),n.currentSelectedElementIds=f});return function(){a(),l()}},hover:function(s,o){var a=n.addCraftEventListener(s,"mouseover",function(l){l.craft.stopPropagation(),i.actions.setNodeEvent("hovered",o)});return n.options.removeHoverOnMouseleave&&n.addCraftEventListener(s,"mouseleave",function(l){l.craft.stopPropagation(),i.actions.setNodeEvent("hovered",null)}),function(){a()}},drop:function(s,o){var a=n.addCraftEventListener(s,"dragover",function(u){if(u.craft.stopPropagation(),u.preventDefault(),n.positioner){var c=n.positioner.computeIndicator(o,u.clientX,u.clientY);c&&i.actions.setIndicator(c)}}),l=n.addCraftEventListener(s,"dragenter",function(u){u.craft.stopPropagation(),u.preventDefault()});return function(){l(),a()}},drag:function(s,o){if(!i.query.node(o).isDraggable())return function(){};s.setAttribute("draggable","true");var a=n.addCraftEventListener(s,"dragstart",function(u){u.craft.stopPropagation();var c=i.query,h=i.actions,d=c.getEvent("selected").all(),f=n.options.isMultiSelectEnabled(u);n.currentSelectedElementIds.includes(o)||(d=f?[].concat(kg(d),[o]):[o],i.actions.setNodeEvent("selected",d)),h.setNodeEvent("dragged",d);var p=d.map(function(m){return c.node(m).get().dom});n.draggedElementShadow=RM(u,p,r.forceSingleDragShadow),n.dragTarget={type:"existing",nodes:d},n.positioner=new gA(n.options.store,n.dragTarget)}),l=n.addCraftEventListener(s,"dragend",function(u){u.craft.stopPropagation(),n.dropElement(function(c,h){c.type!=="new"&&i.actions.move(c.nodes,h.placement.parent.id,h.placement.index+(h.placement.where==="after"?1:0))})});return function(){s.setAttribute("draggable","false"),a(),l()}},create:function(s,o,a){s.setAttribute("draggable","true");var l=n.addCraftEventListener(s,"dragstart",function(c){var h;if(c.craft.stopPropagation(),typeof o=="function"){var d=o();h=pt.isValidElement(d)?i.query.parseReactElement(d).toNodeTree():d}else h=i.query.parseReactElement(o).toNodeTree();n.draggedElementShadow=RM(c,[c.currentTarget],r.forceSingleDragShadow),n.dragTarget={type:"new",tree:h},n.positioner=new gA(n.options.store,n.dragTarget)}),u=n.addCraftEventListener(s,"dragend",function(c){c.craft.stopPropagation(),n.dropElement(function(h,d){h.type!=="existing"&&(i.actions.addNodeTree(h.tree,d.placement.parent.id,d.placement.index+(d.placement.where==="after"?1:0)),a&&vDe(a.onCreate)&&a.onCreate(h.tree))})});return function(){s.removeAttribute("draggable"),l(),u()}}}}},{key:"dropElement",value:function(n){var i=this.options.store;if(this.positioner){var s=this.draggedElementShadow,o=this.positioner.getIndicator();this.dragTarget&&o&&!o.error&&n(this.dragTarget,o),s&&(s.parentNode.removeChild(s),this.draggedElementShadow=null),this.dragTarget=null,i.actions.setIndicator(null),i.actions.setNodeEvent("dragged",null),this.positioner.cleanup(),this.positioner=null}}}]),r}();function k2e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:2,i=0,s=0,o=0,a=0,l=e.where;return r?r.inFlow?(o=r.outerWidth,a=n,i=l==="before"?r.top:r.bottom,s=r.left):(o=n,a=r.outerHeight,i=r.top,s=l==="before"?r.left:r.left+r.outerWidth):t&&(i=t.top+t.padding.top,s=t.left+t.padding.left,o=t.outerWidth-t.padding.right-t.padding.left-t.margin.left-t.margin.right,a=n),{top:"".concat(i,"px"),left:"".concat(s,"px"),width:"".concat(o,"px"),height:"".concat(a,"px")}}cn(uH,"forceSingleDragShadow",c2e()&&u2e());const _2e=()=>{const{indicator:e,indicatorOptions:t,enabled:r}=Ic(i=>({indicator:i.indicator,indicatorOptions:i.options.indicator,enabled:i.options.enabled})),n=iH();return z.useEffect(()=>{n&&(r?n.enable():n.disable())},[r,n]),e?pt.createElement(l2e,{className:t.className,style:{...k2e(e.placement,Tg(e.placement.parent.dom),e.placement.currentNode&&Tg(e.placement.currentNode.dom),t.thickness),backgroundColor:e.error?t.error:t.success,transition:t.transition||"0.2s ease-in",...t.style??{}},parentDom:e.placement.parent.dom}):null},$2e=({children:e})=>{const t=z.useContext(h_),r=z.useMemo(()=>t.query.getOptions().handlers(t),[t]);return r?pt.createElement(nH.Provider,{value:r},pt.createElement(_2e,null),e):null},BM={nodes:{},events:{dragged:new Set,selected:new Set,hovered:new Set},indicator:null,options:{onNodesChange:()=>null,onRender:({render:e})=>e,onBeforeMoveEnd:()=>null,resolver:{},enabled:!0,indicator:{error:"red",success:"rgb(98, 196, 98)"},handlers:e=>new uH({store:e,removeHoverOnMouseleave:!1,isMultiSelectEnabled:t=>!!t.metaKey}),normalizeNodes:()=>{}}},L2e={methods:function(e,t){return _r(_r({},function(r,n){var i=function(a,l,u){if(function d(f,p){var m=a.nodes[f];typeof m.data.type!="string"&&wr(r.options.resolver[m.data.name],H9.replace("%node_type%","".concat(m.data.type.name))),r.nodes[f]=_r(_r({},m),{},{data:_r(_r({},m.data),{},{parent:p})}),m.data.nodes.length>0&&(delete r.nodes[f].data.props.children,m.data.nodes.forEach(function(y){return d(y,m.id)})),Object.values(m.data.linkedNodes).forEach(function(y){return d(y,m.id)})}(a.rootNodeId,l),l||a.rootNodeId!==pa){var c=s(l);if(u.type!=="child")c.data.linkedNodes[u.id]=a.rootNodeId;else{var h=u.index;h!=null?c.data.nodes.splice(h,0,a.rootNodeId):c.data.nodes.push(a.rootNodeId)}}},s=function(a){wr(a);var l=r.nodes[a];return wr(l),l},o=function a(l){var u=r.nodes[l],c=r.nodes[u.data.parent];if(u.data.nodes&&kg(u.data.nodes).forEach(function(f){return a(f)}),u.data.linkedNodes&&Object.values(u.data.linkedNodes).map(function(f){return a(f)}),c.data.nodes.includes(l)){var h=c.data.nodes;h.splice(h.indexOf(l),1)}else{var d=Object.keys(c.data.linkedNodes).find(function(f){return c.data.linkedNodes[f]===f});d&&delete c.data.linkedNodes[d]}(function(f,p){Object.keys(f.events).forEach(function(m){var y=f.events[m];y&&y.has&&y.has(p)&&(f.events[m]=new Set(Array.from(y).filter(function(b){return p!==b})))})})(r,l),delete r.nodes[l]};return{addLinkedNodeFromTree:function(a,l,u){var c=s(l).data.linkedNodes[u];c&&o(c),i(a,l,{type:"linked",id:u})},add:function(a,l,u){var c=[a];Array.isArray(a)&&(zl("actions.add(node: Node[])",{suggest:"actions.add(node: Node)"}),c=a),c.forEach(function(h){i({nodes:cn({},h.id,h),rootNodeId:h.id},l,{type:"child",index:u})})},addNodeTree:function(a,l,u){i(a,l,{type:"child",index:u})},delete:function(a){oa(r.nodes,a,{existOnly:!0,idOnly:!0}).forEach(function(l){var u=l.node;wr(!n.node(u.id).isTopLevelNode()),o(u.id)})},deserialize:function(a){var l=typeof a=="string"?JSON.parse(a):a,u=Object.keys(l).map(function(c){var h=c;return c===z9&&(h=pa),[h,n.parseSerializedNode(l[c]).toNode(function(d){return d.id=h})]});this.replaceNodes(oH(u))},move:function(a,l,u){var c=oa(r.nodes,a,{existOnly:!0}),h=r.nodes[l],d=new Set;c.forEach(function(f,p){var m=f.node,y=m.id,b=m.data.parent;n.node(l).isDroppable([y],function(D){throw new Error(D)}),r.options.onBeforeMoveEnd(m,h,r.nodes[b]);var v=r.nodes[b].data.nodes;d.add(v);var E=v.indexOf(y);v[E]="$$",h.data.nodes.splice(u+p,0,y),r.nodes[y].data.parent=l}),d.forEach(function(f){var p=f.length;kg(f).reverse().forEach(function(m,y){m==="$$"&&f.splice(p-1-y,1)})})},replaceNodes:function(a){this.clearEvents(),r.nodes=a},clearEvents:function(){this.setNodeEvent("selected",null),this.setNodeEvent("hovered",null),this.setNodeEvent("dragged",null),this.setIndicator(null)},reset:function(){this.clearEvents(),this.replaceNodes({})},setOptions:function(a){a(r.options)},setNodeEvent:function(a,l){if(r.events[a].forEach(function(h){r.nodes[h]&&(r.nodes[h].events[a]=!1)}),r.events[a]=new Set,l){var u=oa(r.nodes,l,{idOnly:!0,existOnly:!0}),c=new Set(u.map(function(h){return h.node.id}));c.forEach(function(h){r.nodes[h].events[a]=!0}),r.events[a]=c}},setCustom:function(a,l){oa(r.nodes,a,{idOnly:!0,existOnly:!0}).forEach(function(u){return l(r.nodes[u.node.id].data.custom)})},setDOM:function(a,l){r.nodes[a]&&(r.nodes[a].dom=l)},setIndicator:function(a){a&&(!a.placement.parent.dom||a.placement.currentNode&&!a.placement.currentNode.dom)||(r.indicator=a)},setHidden:function(a,l){r.nodes[a].data.hidden=l},setProp:function(a,l){oa(r.nodes,a,{idOnly:!0,existOnly:!0}).forEach(function(u){return l(r.nodes[u.node.id].data.props)})},selectNode:function(a){if(a){var l=oa(r.nodes,a,{idOnly:!0,existOnly:!0});this.setNodeEvent("selected",l.map(function(u){return u.node.id}))}else this.setNodeEvent("selected",null);this.setNodeEvent("hovered",null)}}}(e,t)),{},{setState:function(r){var n=u_(this,w2e);r(e,n)}})},ignoreHistoryForActions:["setDOM","setNodeEvent","selectNode","clearEvents","setOptions","setIndicator"],normalizeHistory:e=>{Object.keys(e.events).forEach(t=>{Array.from(e.events[t]||[]).forEach(r=>{e.nodes[r]||e.events[t].delete(r)})}),Object.keys(e.nodes).forEach(t=>{const r=e.nodes[t];Object.keys(r.events).forEach(n=>{r.events[n]&&e.events[n]&&!e.events[n].has(r.id)&&(r.events[n]=!1)})})}},P2e=(e,t)=>e2e(L2e,{...BM,options:{...BM.options,...e}},lH,t),F2e=({children:e,...t})=>{t.resolver!==void 0&&wr(typeof t.resolver=="object"&&!Array.isArray(t.resolver)&&t.resolver!==null);const r=z.useRef(t),n=P2e(r.current,(i,s,o,a,l)=>{if(!o)return;const{patches:u,...c}=o;for(let h=0;h2&&d[0]==="nodes"&&d[2]==="data";if([Wr.IGNORE,Wr.THROTTLE].includes(c.type)&&c.params&&(c.type=c.params[0]),["setState","deserialize"].includes(c.type)||f){l(p=>{i.options.normalizeNodes&&i.options.normalizeNodes(p,s,c,a)});break}}});return z.useEffect(()=>{n&&t.enabled!==void 0&&n.query.getOptions().enabled!==t.enabled&&n.actions.setOptions(i=>{i.enabled=t.enabled})},[n,t.enabled]),z.useEffect(()=>{n.subscribe(i=>({json:n.query.serialize()}),()=>{n.query.getOptions().onNodesChange(n.query)})},[n]),n?pt.createElement(h_.Provider,{value:n},pt.createElement($2e,null,e)):null},O2e=({className:e,onIconPick:t,selectedIcon:r})=>{const{t:n}=Yt(),[i,s]=z.useState(!1),[o,a]=z.useState("");return j.jsxs(j.Fragment,{children:[j.jsxs(wt,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectIcon"),j.jsx(gs,{placement:"left",children:n("playgroundSelectIcon")})]}),j.jsx($d,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},drawerHeader:j.jsxs("div",{className:"flex gap-fix-3xl",children:[j.jsx("span",{className:"my-auto",children:n("playgroundSelectIcon")}),j.jsx(Gr,{type:"search",variant:"floating",label:n("search"),value:o,onChange:l=>a(l.target.value)})]}),className:"select-icon-dialog",children:j.jsx("div",{className:"grid-cols-3 md:grid-cols-6 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:["none",...AJ].filter(l=>l.includes(o)).map(l=>j.jsx("button",{className:l==="none"?"h-full":"h-fit",onClick:()=>t(l),children:j.jsxs(Mi,{"data-interactive":"elevation",className:`items-center ${l==="none"?" h-full":""}${l===r?" db-successful-bg-basic-level-3":""}`,spacing:"small",children:[l!=="none"&&j.jsx(Ld,{icon:l}),j.jsx("span",{className:"break-all m-auto",children:l})]})},`icon-button-${l}`))})})]})};function $n(e){this.content=e}$n.prototype={constructor:$n,find:function(e){for(var t=0;t>1}};$n.from=function(e){if(e instanceof $n)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new $n(t)};function cH(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let i=e.child(n),s=t.child(n);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)r++;return r}if(i.content.size||s.content.size){let o=cH(i.content,s.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function hH(e,t,r,n){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:r,b:n};let o=e.child(--i),a=t.child(--s),l=o.nodeSize;if(o==a){r-=l,n-=l;continue}if(!o.sameMarkup(a))return{a:r,b:n};if(o.isText&&o.text!=a.text){let u=0,c=Math.min(o.text.length,a.text.length);for(;ut&&n(l,i+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,r-c),n,i+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,i){let s="",o=!0;return this.nodesBetween(t,r,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,r-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&n&&(o?o=!1:s+=n),s+=u},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,i=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),s=1);st)for(let s=0,o=0;ot&&((or)&&(a.isText?a=a.cut(Math.max(0,t-o),Math.min(a.text.length,r-o)):a=a.cut(Math.max(0,t-o-1),Math.min(a.content.size,r-o-1))),n.push(a),i+=a.nodeSize),o=l}return new Oe(n,i)}cutByIndex(t,r){return t==r?Oe.empty:t==0&&r==this.content.length?this:new Oe(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let i=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return i[t]=r,new Oe(i,s)}addToStart(t){return new Oe([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Oe(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t||r>0?wy(n+1,o):wy(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return Oe.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Oe.empty;let r,n=0;for(let i=0;ithis.type.rank&&(r||(r=t.slice(0,i)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-i.type.rank),r}};br.none=[];class P0 extends Error{}class Je{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=fH(this.content,t+this.openStart,r);return n&&new Je(n,this.openStart,this.openEnd)}removeBetween(t,r){return new Je(dH(this.content,t+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,r){if(!r)return Je.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Je(Oe.fromJSON(t,r.content),n,i)}static maxOpen(t,r=!0){let n=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=t.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)i++;return new Je(t,n,i)}}Je.empty=new Je(Oe.empty,0,0);function dH(e,t,r){let{index:n,offset:i}=e.findIndex(t),s=e.maybeChild(n),{index:o,offset:a}=e.findIndex(r);if(i==t||s.isText){if(a!=r&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(n,s.copy(dH(s.content,t-i-1,r-i-1)))}function fH(e,t,r,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return e.cut(0,t).append(r).append(e.cut(t));let a=fH(o.content,t-s-1,r);return a&&e.replaceChild(i,o.copy(a))}function N2e(e,t,r){if(r.openStart>e.depth)throw new P0("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new P0("Inconsistent open depths");return pH(e,t,r,0)}function pH(e,t,r,n){let i=e.index(n),s=e.node(n);if(i==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function jp(e,t,r,n){let i=(t||e).node(r),s=0,o=t?t.index(r):i.childCount;e&&(s=e.index(r),e.depth>r?s++:e.textOffset&&(Uu(e.nodeAfter,n),s++));for(let a=s;ai&&yA(e,t,i+1),o=n.depth>i&&yA(r,n,i+1),a=[];return jp(null,e,i,a),s&&o&&t.index(i)==r.index(i)?(gH(s,o),Uu(Wu(s,mH(e,t,r,n,i+1)),a)):(s&&Uu(Wu(s,F0(e,t,i+1)),a),jp(t,r,i,a),o&&Uu(Wu(o,F0(r,n,i+1)),a)),jp(n,null,i,a),new Oe(a)}function F0(e,t,r){let n=[];if(jp(null,e,r,n),e.depth>r){let i=yA(e,t,r+1);Uu(Wu(i,F0(e,t,r+1)),n)}return jp(t,null,r,n),new Oe(n)}function M2e(e,t){let r=t.depth-e.openStart,i=t.node(r).copy(e.content);for(let s=r-1;s>=0;s--)i=t.node(s).copy(Oe.from(i));return{start:i.resolveNoCache(e.openStart+r),end:i.resolveNoCache(i.content.size-e.openEnd-r)}}class _g{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=t.child(r);return n?t.child(r).cut(n):i}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let s=0;s0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new O0(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,s=r;for(let o=t;;){let{index:a,offset:l}=o.content.findIndex(s),u=s-l;if(n.push(o,a,i+l),!u||(o=o.child(a),o.isText))break;s=u-1,i+=l+1}return new _g(r,n,s)}static resolveCached(t,r){let n=jM.get(t);if(n)for(let s=0;st&&this.nodesBetween(t,r,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),yH(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=Oe.empty,i=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,i,s),a=o&&o.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=i;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let i=Oe.fromJSON(t,r.content),s=t.nodeType(r.type).create(r.attrs,i,n);return s.type.checkAttrs(s.attrs),s}};Vu.prototype.text=void 0;class N0 extends Vu{constructor(t,r,n,i){if(super(t,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):yH(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new N0(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new N0(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function yH(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class fc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new j2e(t,r);if(n.next==null)return fc.empty;let i=vH(n);n.next&&n.err("Unexpected trailing text");let s=q2e(G2e(i));return K2e(s,n),s}matchType(t){for(let r=0;ru.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+t.indexOf(n.next[o].next);return s}).join(` -`)}}fc.empty=new fc(!0);class j2e{constructor(t,r){this.string=t,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function vH(e){let t=[];do t.push(z2e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function z2e(e){let t=[];do t.push(H2e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function H2e(e){let t=V2e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=U2e(e,t);else break;return t}function zM(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function U2e(e,t){let r=zM(e),n=r;return e.eat(",")&&(e.next!="}"?n=zM(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function W2e(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let i=[];for(let s in r){let o=r[s];o.groups.indexOf(t)>-1&&i.push(o)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function V2e(e){if(e.eat("(")){let t=vH(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=W2e(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function G2e(e){let t=[[]];return i(s(e,0),r()),t;function r(){return t.push([])-1}function n(o,a,l){let u={term:l,to:a};return t[o].push(u),u}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(s(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=s(o.exprs[l],a);if(l==o.exprs.length-1)return u;i(u,a=r())}else if(o.type=="star"){let l=r();return n(a,l),i(s(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=r();return i(s(o.expr,a),l),i(s(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u{e[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=t[n.join(",")]=new fc(n.indexOf(e.length-1)>-1);for(let o=0;o-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[s]=new EH(s,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function J2e(e,t,r){let n=r.split("|");return i=>{let s=i===null?"null":typeof i;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${t} on type ${e}, got ${s}`)}}class X2e{constructor(t,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?J2e(t,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class N1{constructor(t,r,n,i){this.name=t,this.rank=r,this.schema=n,this.spec=i,this.attrs=DH(t,i.attrs),this.excluded=null;let s=xH(this.attrs);this.instance=s?new br(this,s):null}create(t=null){return!t&&this.instance?this.instance:new br(this,wH(this.attrs,t))}static compile(t,r){let n=Object.create(null),i=0;return t.forEach((s,o)=>n[s]=new N1(s,i++,r,o)),n}removeFromSet(t){for(var r=0;r-1}}class CH{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in t)r[i]=t[i];r.nodes=$n.from(t.nodes),r.marks=$n.from(t.marks||{}),this.nodes=UM.compile(this.spec.nodes,this),this.marks=N1.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=fc.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?WM(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:WM(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,r=null,n,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof UM){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(r,n,i)}text(t,r){let n=this.nodes.text;return new N0(n,n.defaultAttrs,t,br.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return Vu.fromJSON(this,t)}markFromJSON(t){return br.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}}function WM(e,t){let r=[];for(let n=0;n-1)&&r.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}function Y2e(e){return e.tag!=null}function Q2e(e){return e.style!=null}class El{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(Y2e(i))this.tags.push(i);else if(Q2e(i)){let s=/[^=]*/.exec(i.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=t.nodes[i.node];return s.contentMatch.matchType(s)})}parse(t,r={}){let n=new GM(this,r,!1);return n.addAll(t,br.none,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new GM(this,r,!0);return n.addAll(t,br.none,r.from,r.to),Je.maxOpen(n.finish())}matchTag(t,r,n){for(let i=n?this.tags.indexOf(n)+1:0;it.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=r))){if(o.getAttrs){let l=o.getAttrs(r);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(t){let r=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=qM(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=qM(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new El(t,El.schemaRules(t)))}}const AH={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Z2e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},TH={ol:!0,ul:!0},M0=1,I0=2,zp=4;function VM(e,t,r){return t!=null?(t?M0:0)|(t==="full"?I0:0):e&&e.whitespace=="pre"?M0|I0:r&~zp}class Sy{constructor(t,r,n,i,s,o){this.type=t,this.attrs=r,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=br.none,this.match=s||(o&zp?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(Oe.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(t.type))?(this.match=n,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&M0)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let r=Oe.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(Oe.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!AH.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class GM{constructor(t,r,n){this.parser=t,this.options=r,this.isOpen=n,this.open=0;let i=r.topNode,s,o=VM(null,r.preserveWhitespace,0)|(n?zp:0);i?s=new Sy(i.type,i.attrs,br.none,!0,r.topMatch||i.type.contentMatch,o):n?s=new Sy(null,null,br.none,!0,null,o):s=new Sy(t.schema.topNodeType,null,br.none,!0,null,o),this.nodes=[s],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,r){t.nodeType==3?this.addTextNode(t,r):t.nodeType==1&&this.addElement(t,r)}addTextNode(t,r){let n=t.nodeValue,i=this.top;if(i.options&I0||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i.options&M0)i.options&I0?n=n.replace(/\r\n?/g,` -`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],o=t.previousSibling;(!s||o&&o.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),r),this.findInText(t)}else this.findInside(t)}addElement(t,r,n){let i=t.nodeName.toLowerCase(),s;TH.hasOwnProperty(i)&&this.parser.normalizeLists&&e_e(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,n));if(o?o.ignore:Z2e.hasOwnProperty(i))this.findInside(t),this.ignoreFallback(t,r);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,l=this.top,u=this.needsBlock;if(AH.hasOwnProperty(i))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),a=!0,l.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,r);return}let c=o&&o.skip?r:this.readStyles(t,r);c&&this.addAll(t,c),a&&this.sync(l),this.needsBlock=u}else{let a=this.readStyles(t,r);a&&this.addElementByRule(t,o,a,o.consuming===!1?s:void 0)}}leafFallback(t,r){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`),r)}ignoreFallback(t,r){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r)}readStyles(t,r){let n=t.style;if(n&&n.length)for(let i=0;i!l.clearMark(u)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return r}addElementByRule(t,r,n,i){let s,o;if(r.node)if(o=this.parser.schema.nodes[r.node],o.isLeaf)this.insertNode(o.create(r.attrs),n)||this.leafFallback(t,n);else{let l=this.enter(o,r.attrs||null,n,r.preserveWhitespace);l&&(s=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,n,i);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,n));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l,n)}s&&this.sync(a)&&this.open--}addAll(t,r,n,i){let s=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=i==null?null:t.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(o,r);this.findAtPoint(t,s)}findPlace(t,r){let n,i;for(let s=this.open;s>=0;s--){let o=this.nodes[s],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,i=o,!a.length)||o.solid)break}if(!n)return null;this.sync(i);for(let s=0;s(o.type?o.type.allowsMarkType(u.type):KM(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Sy(t,r,l,i,null,a)),this.open++,n}closeExtra(t=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)t+=n[i].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let u=r[a];if(u==""){if(a==r.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function e_e(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&TH.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function t_e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function qM(e){let t={};for(let r in e)t[r]=e[r];return t}function KM(e,t){let r=t.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(e))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(t,r,n={}){let i=this.marks[t.type.name];return i&&sv(aD(n),i(t,r),null,t.attrs)}static renderSpec(t,r,n=null,i){return sv(t,r,n,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Rc(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=JM(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return JM(t.marks)}}function JM(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function aD(e){return e.document||window.document}const XM=new WeakMap;function r_e(e){let t=XM.get(e);return t===void 0&&XM.set(e,t=n_e(e)),t}function n_e(e){let t=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")t||(t=[]),t.push(n);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,l=r?e.createElementNS(r,i):e.createElement(i),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let h in u)if(u[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),u[h]):l.setAttribute(h,u[h])}}for(let h=c;hc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=sv(e,d,r,n);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const kH=65535,_H=Math.pow(2,16);function i_e(e,t){return e+t*_H}function YM(e){return e&kH}function s_e(e){return(e-(e&kH))/_H}const $H=1,LH=2,ov=4,PH=8;class bA{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&PH)>0}get deletedBefore(){return(this.delInfo&($H|ov))>0}get deletedAfter(){return(this.delInfo&(LH|ov))>0}get deletedAcross(){return(this.delInfo&ov)>0}}class Xi{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&Xi.empty)return Xi.empty}recover(t){let r=0,n=YM(t);if(!this.inverted)for(let i=0;it)break;let u=this.ranges[a+s],c=this.ranges[a+o],h=l+u;if(t<=h){let d=u?t==l?-1:t==h?1:r:r,f=l+i+(d<0?0:c);if(n)return f;let p=t==(r<0?l:h)?null:i_e(a/3,t-l),m=t==l?LH:t==h?$H:ov;return(r<0?t!=l:t!=h)&&(m|=PH),new bA(f,m,p)}i+=c-u}return n?t+i:new bA(t+i,0,null)}touches(t,r){let n=0,i=YM(r),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+s],c=l+u;if(t<=c&&a==i*3)return!0;n+=this.ranges[a+o]-u}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;r--){let i=t.getMirror(r);this.appendMap(t.maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let t=new Hp;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ns&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return nn.fromReplace(t,this.from,this.to,s)}invert(){return new To(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new dl(r.pos,n.pos,this.mark)}merge(t){return t instanceof dl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new dl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dl(r.from,r.to,t.markFromJSON(r.mark))}}si.jsonID("addMark",dl);class To extends si{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new Je(f_(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),r.openStart,r.openEnd);return nn.fromReplace(t,this.from,this.to,n)}invert(){return new dl(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new To(r.pos,n.pos,this.mark)}merge(t){return t instanceof To&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new To(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new To(r.from,r.to,t.markFromJSON(r.mark))}}si.jsonID("removeMark",To);class fl extends si{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return nn.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return nn.fromReplace(t,this.pos,this.pos+1,new Je(Oe.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;in.pos?null:new Cn(r.pos,n.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Cn(r.from,r.to,r.gapFrom,r.gapTo,Je.fromJSON(t,r.slice),r.insert,!!r.structure)}}si.jsonID("replaceAround",Cn);function xA(e,t,r){let n=e.resolve(t),i=r-t,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function o_e(e,t,r,n){let i=[],s=[],o,a;e.doc.nodesBetween(t,r,(l,u,c)=>{if(!l.isInline)return;let h=l.marks;if(!n.isInSet(h)&&c.type.allowsMarkType(n.type)){let d=Math.max(u,t),f=Math.min(u+l.nodeSize,r),p=n.addToSet(h);for(let m=0;me.step(l)),s.forEach(l=>e.step(l))}function a_e(e,t,r,n){let i=[],s=0;e.doc.nodesBetween(t,r,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(n instanceof N1){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,r);for(let c=0;ce.step(new To(o.from,o.to,o.style)))}function FH(e,t,r,n=r.contentMatch,i=!0){let s=e.doc.nodeAt(t),o=[],a=t+1;for(let l=0;l=0;l--)e.step(o[l])}function l_e(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function df(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let i=e.$from.node(n),s=e.$from.index(n),o=e.$to.indexAfter(n);if(nr;p--)m||n.index(p)>0?(m=!0,c=Oe.from(n.node(p).copy(c)),h++):l--;let d=Oe.empty,f=0;for(let p=s,m=!1;p>r;p--)m||i.after(p+1)=0;o--){if(n.size){let a=r[o].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=Oe.from(r[o].type.create(r[o].attrs,n))}let i=t.start,s=t.end;e.step(new Cn(i,s,i,s,new Je(n,0,0),r.length,!0))}function f_e(e,t,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,r,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&m_e(e.doc,e.mapping.slice(s).map(a),n)){let u=null;if(n.schema.linebreakReplacement){let f=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);f&&!p?u=!1:!f&&p&&(u=!0)}u===!1&&g_e(e,o,a,s),FH(e,e.mapping.slice(s).map(a,1),n,void 0,u===null);let c=e.mapping.slice(s),h=c.map(a,1),d=c.map(a+o.nodeSize,1);return e.step(new Cn(h,d,h+1,d-1,new Je(Oe.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&p_e(e,o,a,s),!1}})}function p_e(e,t,r,n){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=e.mapping.slice(n).map(r+1+s+o.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function g_e(e,t,r,n){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=e.mapping.slice(n).map(r+1+s);e.replaceWith(o,o+1,t.type.schema.text(` -`))}})}function m_e(e,t,r){let n=e.resolve(t),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function y_e(e,t,r,n,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let o=r.create(n,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,o);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new Cn(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new Je(Oe.from(o),0,0),1,!0))}function Jh(e,t,r=1,n){let i=e.resolve(t),s=i.depth-r,o=n&&n[n.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=r-2;u>s;u--,c--){let h=i.node(u),d=i.index(u);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(d,h.childCount),p=n&&n[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=n&&n[c]||h;if(!h.canReplace(d+1,h.childCount)||!m.type.validContent(f))return!1}let a=i.indexAfter(s),l=n&&n[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function v_e(e,t,r=1,n){let i=e.doc.resolve(t),s=Oe.empty,o=Oe.empty;for(let a=i.depth,l=i.depth-r,u=r-1;a>l;a--,u--){s=Oe.from(i.node(a).copy(s));let c=n&&n[u];o=Oe.from(c?c.type.create(c.attrs,o):i.node(a).copy(o))}e.step(new wn(t,t,new Je(s.append(o),r,r),!0))}function Bc(e,t){let r=e.resolve(t),n=r.index();return NH(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function NH(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function M1(e,t,r=-1){let n=e.resolve(t);for(let i=n.depth;;i--){let s,o,a=n.index(i);if(i==n.depth?(s=n.nodeBefore,o=n.nodeAfter):r>0?(s=n.node(i+1),a++,o=n.node(i).maybeChild(a)):(s=n.node(i).maybeChild(a-1),o=n.node(i+1)),s&&!s.isTextblock&&NH(s,o)&&n.node(i).canReplace(a,a+1))return t;if(i==0)break;t=r<0?n.before(i):n.after(i)}}function b_e(e,t,r){let n=new wn(t-r,t+r,Je.empty,!0);e.step(n)}function x_e(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let s=n.index(i);if(n.node(i).canReplaceWith(s,s,r))return n.before(i+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let s=n.indexAfter(i);if(n.node(i).canReplaceWith(s,s,r))return n.after(i+1);if(s=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),u=n.node(o),c=!1;if(s==1)c=u.canReplace(l,l,i);else{let h=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=h&&u.canReplaceWith(l,l,h[0])}if(c)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function I1(e,t,r=t,n=Je.empty){if(t==r&&!n.size)return null;let i=e.resolve(t),s=e.resolve(r);return MH(i,s,n)?new wn(t,r,n):new S_e(i,s,n).fit()}function MH(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class S_e{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=Oe.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Oe.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new Je(s,o,a);return t>-1?new Cn(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new wn(n.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),s.type.spec.isolating&&i<=n){t=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let i,s=null;n?(s=uD(this.unplaced.content,n-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,h=null;if(r==1&&(o?u.matchType(o.type)||(h=u.fillBefore(Oe.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:h};if(r==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=uD(t,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Je(t,r+1,Math.max(n,i.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=uD(t,r);if(i.childCount<=1&&r>0){let s=t.size-r<=r+i.size;this.unplaced=new Je(up(t,r-1,1),r-1,s?r-1:n)}else this.unplaced=new Je(up(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:i,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let m=0;m1||l==0||m.content.size)&&(h=y,c.push(IH(m.mark(d.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?f:-1)))}let p=u==a.childCount;p||(f=-1),this.placed=cp(this.placed,r,Oe.from(c)),this.frontier[r].match=h,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=a;m1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],s=r=0;a--){let{match:l,type:u}=this.frontier[a],c=cD(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:r,fit:o,move:s?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=cp(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let i=t.node(n),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(n));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=cp(this.placed,this.depth,Oe.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(Oe.empty,!0);r.childCount&&(this.placed=cp(this.placed,this.frontier.length,r))}}function up(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(up(e.firstChild.content,t-1,r)))}function cp(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(cp(e.lastChild.content,t-1,r)))}function uD(e,t){for(let r=0;r1&&(n=n.replaceChild(0,IH(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(Oe.empty,!0)))),e.copy(n)}function cD(e,t,r,n,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!r.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!D_e(r,s.content,o)?a:null}function D_e(e,t,r){for(let n=r;n0;d--,f--){let p=i.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(d)>-1?a=d:i.before(d)==f&&o.splice(1,0,-d)}let l=o.indexOf(a),u=[],c=n.openStart;for(let d=n.content,f=0;;f++){let p=d.firstChild;if(u.push(p),f==n.openStart)break;d=p.content}for(let d=c-1;d>=0;d--){let f=u[d],p=E_e(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))c=d;else if(p||!f.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let f=(d+c+1)%(n.openStart+1),p=u[f];if(p)for(let m=0;m=0&&(e.replace(t,r,n),!(e.steps.length>h));d--){let f=o[d];f<0||(t=i.before(f),r=s.after(f))}}function RH(e,t,r,n,i){if(tn){let s=i.contentMatchAt(0),o=s.fillBefore(e).append(e);e=o.append(s.matchFragment(o).fillBefore(Oe.empty,!0))}return e}function A_e(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let i=x_e(e.doc,t,n.type);i!=null&&(t=r=i)}e.replaceRange(t,r,new Je(Oe.from(n),0,0))}function T_e(e,t,r){let n=e.doc.resolve(t),i=e.doc.resolve(r),s=BH(n,i);for(let o=0;o0&&(l||n.node(a-1).canReplace(n.index(a-1),i.indexAfter(a-1))))return e.delete(n.before(a),i.after(a))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o)return e.delete(n.before(o),r);e.delete(t,r)}function BH(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let i=n;i>=0;i--){let s=e.start(i);if(st.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&r.push(i)}return r}class Xh extends si{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return nn.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return nn.fromReplace(t,this.pos,this.pos+1,new Je(Oe.from(i),0,r.isLeaf?0:1))}getMap(){return Xi.empty}invert(t){return new Xh(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new Xh(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Xh(r.pos,r.attr,r.value)}}si.jsonID("attr",Xh);class $g extends si{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return nn.ok(n)}getMap(){return Xi.empty}invert(t){return new $g(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new $g(r.attr,r.value)}}si.jsonID("docAttr",$g);let Sd=class extends Error{};Sd=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};Sd.prototype=Object.create(Error.prototype);Sd.prototype.constructor=Sd;Sd.prototype.name="TransformError";class k_e{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Hp}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new Sd(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=Je.empty){let i=I1(this.doc,t,r,n);return i&&this.step(i),this}replaceWith(t,r,n){return this.replace(t,r,new Je(Oe.from(n),0,0))}delete(t,r){return this.replace(t,r,Je.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return C_e(this,t,r,n),this}replaceRangeWith(t,r,n){return A_e(this,t,r,n),this}deleteRange(t,r){return T_e(this,t,r),this}lift(t,r){return u_e(this,t,r),this}join(t,r=1){return b_e(this,t,r),this}wrap(t,r){return d_e(this,t,r),this}setBlockType(t,r=t,n,i=null){return f_e(this,t,r,n,i),this}setNodeMarkup(t,r,n=null,i){return y_e(this,t,r,n,i),this}setNodeAttribute(t,r,n){return this.step(new Xh(t,r,n)),this}setDocAttribute(t,r){return this.step(new $g(t,r)),this}addNodeMark(t,r){return this.step(new fl(t,r)),this}removeNodeMark(t,r){if(!(r instanceof br)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new wd(t,r)),this}split(t,r=1,n){return v_e(this,t,r,n),this}addMark(t,r,n){return o_e(this,t,r,n),this}removeMark(t,r,n){return a_e(this,t,r,n),this}clearIncompatible(t,r,n){return FH(this,t,r,n),this}}const hD=Object.create(null);class Ht{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new __e(t.min(r),t.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let r=0;r=0;s--){let o=r<0?vh(t.node(0),t.node(s),t.before(s+1),t.index(s),r,n):vh(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,r,n);if(o)return o}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new io(t.node(0))}static atStart(t){return vh(t,t,0,0,1)||new io(t)}static atEnd(t){return vh(t,t,t.content.size,t.childCount,-1)||new io(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=hD[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in hD)throw new RangeError("Duplicate use of selection JSON ID "+t);return hD[t]=r,r.prototype.jsonID=t,r}getBookmark(){return It.between(this.$anchor,this.$head).getBookmark()}}Ht.prototype.visible=!0;class __e{constructor(t,r){this.$from=t,this.$to=r}}let ZM=!1;function eI(e){!ZM&&!e.parent.inlineContent&&(ZM=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class It extends Ht{constructor(t,r=t){eI(t),eI(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return Ht.near(n);let i=t.resolve(r.map(this.anchor));return new It(i.parent.inlineContent?i:n,n)}replace(t,r=Je.empty){if(super.replace(t,r),r==Je.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof It&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new R1(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new It(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let i=t.resolve(r);return new this(i,n==r?i:t.resolve(n))}static between(t,r,n){let i=t.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let s=Ht.findFrom(r,n,!0)||Ht.findFrom(r,-n,!0);if(s)r=s.$head;else return Ht.near(r,n)}return t.parent.inlineContent||(i==0?t=r:(t=(Ht.findFrom(t,-n,!0)||Ht.findFrom(t,n,!0)).$anchor,t.pos0?0:1);i>0?o=0;o+=i){let a=t.child(o);if(a.isAtom){if(!s&>.isSelectable(a))return gt.create(e,r-(i<0?a.nodeSize:0))}else{let l=vh(e,a,r+i,i<0?a.childCount:0,i,s);if(l)return l}r+=a.nodeSize*i}return null}function tI(e,t,r){let n=e.steps.length-1;if(n{o==null&&(o=c)}),e.setSelection(Ht.near(e.doc.resolve(o),r))}const rI=1,Dy=2,nI=4;class L_e extends k_e{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Dy,this}ensureMarks(t){return br.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Dy)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~Dy,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||br.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let i=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(r);s=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(t,s)),this.selection.empty||this.setSelection(Ht.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=nI,this}get scrolledIntoView(){return(this.updated&nI)>0}}function iI(e,t){return!t||!e?e:e.bind(t)}class hp{constructor(t,r,n){this.name=t,this.init=iI(r.init,n),this.apply=iI(r.apply,n)}}const P_e=[new hp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new hp("selection",{init(e,t){return e.selection||Ht.atStart(t.doc)},apply(e){return e.selection}}),new hp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new hp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class dD{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=P_e.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new hp(n.key,n.spec.state,n))})}}class Rh{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[n],s=i.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(i,this[i.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new dD(t.schema,t.plugins),s=new Rh(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Vu.fromJSON(t.schema,r.doc);else if(o.name=="selection")s.selection=Ht.fromJSON(s.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){s[o.name]=u.fromJSON.call(l,t,r[a],s);return}}s[o.name]=o.init(t,s)}}),s}}function jH(e,t,r){for(let n in e){let i=e[n];i instanceof Function?i=i.bind(t):n=="handleDOMEvents"&&(i=jH(i,t,{})),r[n]=i}return r}class Go{constructor(t){this.spec=t,this.props={},t.props&&jH(t.props,this,this.props),this.key=t.key?t.key.key:zH("plugin")}getState(t){return t[this.key]}}const fD=Object.create(null);function zH(e){return e in fD?e+"$"+ ++fD[e]:(fD[e]=0,e+"$")}class jc{constructor(t="key"){this.key=zH(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Ln=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Lg=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let wA=null;const ra=function(e,t,r){let n=wA||(wA=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},F_e=function(){wA=null},pc=function(e,t,r,n){return r&&(sI(e,t,r,n,-1)||sI(e,t,r,n,1))},O_e=/^(img|br|input|textarea|hr)$/i;function sI(e,t,r,n,i){for(;;){if(e==r&&t==n)return!0;if(t==(i<0?0:ys(e))){let s=e.parentNode;if(!s||s.nodeType!=1||am(e)||O_e.test(e.nodeName)||e.contentEditable=="false")return!1;t=Ln(e)+(i<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?ys(e):0}else return!1}}function ys(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function N_e(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=ys(e)}else if(e.parentNode&&!am(e))t=Ln(e),e=e.parentNode;else return null}}function M_e(e,t){for(;;){if(e.nodeType==3&&t2),hs=Dd||(Ro?/Mac/.test(Ro.platform):!1),j_e=Ro?/Win/.test(Ro.platform):!1,Js=/Android \d/.test(au),lm=!!oI&&"webkitFontSmoothing"in oI.documentElement.style,z_e=lm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function H_e(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Zo(e,t){return typeof e=="number"?e:e[t]}function U_e(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function aI(e,t,r){let n=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let o=r||e.dom;o;o=Lg(o)){if(o.nodeType!=1)continue;let a=o,l=a==s.body,u=l?H_e(s):U_e(a),c=0,h=0;if(t.topu.bottom-Zo(n,"bottom")&&(h=t.bottom-t.top>u.bottom-u.top?t.top+Zo(i,"top")-u.top:t.bottom-u.bottom+Zo(i,"bottom")),t.leftu.right-Zo(n,"right")&&(c=t.right-u.right+Zo(i,"right")),c||h)if(l)s.defaultView.scrollBy(c,h);else{let d=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),c&&(a.scrollLeft+=c);let p=a.scrollLeft-d,m=a.scrollTop-f;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function W_e(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,i;for(let s=(t.left+t.right)/2,o=r+1;o=r-20){n=a,i=l.top;break}}return{refDOM:n,refTop:i,stack:WH(e.dom)}}function WH(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=Lg(n));return t}function V_e({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;VH(r,n==0?0:n-t)}function VH(e,t){for(let r=0;r=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let m=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!r&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=h+1)}}return!r&&l&&(r=l,i=u,n=0),r&&r.nodeType==3?q_e(r,i):!r||n&&r.nodeType==1?{node:e,offset:s}:GH(r,i)}function q_e(e,t){let r=e.nodeValue.length,n=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function g_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function K_e(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(n,i,s)}function X_e(e,t,r,n){let i=-1;for(let s=t,o=!1;s!=e.dom;){let a=e.docView.nearestDesc(s,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!o&&l.left>n.left||l.top>n.top?i=a.posBefore:(!o&&l.right-1?i:e.docView.posFromDOM(t,r,-1)}function qH(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&i++}let u;lm&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(a=X_e(e,n,i,t))}a==null&&(a=J_e(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function lI(e){return e.top=0&&i==n.nodeValue.length?(l--,c=1):r<0?l--:u++,Vf(Ya(ra(n,l,u),c),c<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(r<0||i==ys(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return pD(l.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(r<0||i==ys(n))){let l=n.childNodes[i-1],u=l.nodeType==3?ra(l,ys(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Vf(Ya(u,1),!1)}if(s==null&&i=0)}function Vf(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function pD(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function JH(e,t,r){let n=e.state,i=e.root.activeElement;n!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),i!=e.dom&&i&&i.focus()}}function Z_e(e,t,r){let n=t.selection,i=r=="up"?n.$from:n.$to;return JH(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=KH(e,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=ra(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(r=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const e$e=/[\u0590-\u08ac]/;function t$e(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,s=!i,o=i==n.parent.content.size,a=e.domSelection();return a?!e$e.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?s:o:JH(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:h}=e.domSelectionRange(),d=a.caretBidiLevel;a.modify("move",r,"character");let f=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:p,focusOffset:m}=e.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==m;try{a.collapse(c,h),l&&(l!=c||u!=h)&&a.extend&&a.extend(l,u)}catch{}return d!=null&&(a.caretBidiLevel=d),y}):n.pos==n.start()||n.pos==n.end()}let uI=null,cI=null,hI=!1;function r$e(e,t,r){return uI==t&&cI==r?hI:(uI=t,cI=r,hI=r=="up"||r=="down"?Z_e(e,t,r):t$e(e,t,r))}const ws=0,dI=1,Pu=2,Bo=3;class um{constructor(t,r,n,i){this.parent=t,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=ws,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rLn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&r==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!r||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))n=!1;else return s}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||o instanceof YH){i=t-s;break}s=a}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof XH&&s.side>=0;n--);if(r<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&r&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?Ln(s.dom)+1:0}}else{let s,o=!0;for(;s=n=c&&r<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,c);t=o;for(let h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=Ln(d.dom)+1;break}t-=d.size}i==-1&&(i=0)}if(i>-1&&(u>r||a==this.children.length-1)){r=u;for(let c=a+1;cf&&or){let f=a;a=l,l=f}let d=document.createRange();d.setEnd(l.node,l.offset),d.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(d)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,i=0;i=n:tn){let a=n+s.border,l=o-s.border;if(t>=a&&r<=l){this.dirty=t==n||r==o?Pu:dI,t==a&&r==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Bo:s.markDirty(t-a,r-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Pu:Bo}n=o}this.dirty=Pu}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?Pu:dI;r.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=r,this.widget=r,s=this}matchesWidget(t){return this.dirty==ws&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class n$e extends um{constructor(t,r,n,i){super(t,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class gc extends um{constructor(t,r,n,i){super(t,[],n,i),this.mark=r}static create(t,r,n,i){let s=i.nodeViews[r.type.name],o=s&&s(r,i,n);return(!o||!o.dom)&&(o=Rc.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new gc(t,r,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&Bo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Bo&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=ws){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(s=AA(s,0,t,n));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),c=u&&u.dom,h=u&&u.contentDOM;if(r.isText){if(!c)c=document.createTextNode(r.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:h}=Rc.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!h&&!r.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),r.type.spec.draggable&&(c.draggable=!0));let d=c;return c=eU(c,n,r),u?l=new i$e(t,r,n,i,c,h||null,d,u,s,o+1):r.isText?new j1(t,r,n,i,c,d,s):new Al(t,r,n,i,c,h||null,d,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Oe.empty)}return t}matchesNode(t,r,n){return this.dirty==ws&&t.eq(this.node)&&R0(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,i=r,s=t.composing?this.localCompositionInfo(t,r):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new o$e(this,o&&o.node,t);u$e(this.node,this.innerDeco,(u,c,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,n,t):u.type.side>=0&&!h&&l.syncToMarks(c==this.node.childCount?br.none:this.node.child(c).marks,n,t),l.placeWidget(u,t,i)},(u,c,h,d)=>{l.syncToMarks(u.marks,n,t);let f;l.findNodeMatch(u,c,h,d)||a&&t.state.selection.from>i&&t.state.selection.to-1&&l.updateNodeAt(u,c,h,f,t)||l.updateNextNode(u,c,h,t,d,i)||l.addNode(u,c,h,t,i),i+=u.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Pu)&&(o&&this.protectLocalComposition(t,o),QH(this.contentDOM,this.children,t),Dd&&c$e(this.dom))}localCompositionInfo(t,r){let{from:n,to:i}=t.state.selection;if(!(t.state.selection instanceof It)||nr+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=h$e(this.node.content,o,n-r,i-r);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new n$e(this,s,r,i);t.input.compositionNodes.push(o),this.children=AA(this.children,n,n+i.length,t,o)}update(t,r,n,i){return this.dirty==Bo||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,i),!0)}updateInner(t,r,n,i){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=ws}updateOuterDeco(t){if(R0(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=ZH(this.dom,this.nodeDOM,CA(this.outerDeco,this.node,r),CA(t,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function fI(e,t,r,n,i){eU(n,t,e);let s=new Al(void 0,e,t,r,n,n,n,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class j1 extends Al{constructor(t,r,n,i,s,o,a){super(t,r,n,i,s,null,o,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,i){return this.dirty==Bo||this.dirty!=ws&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=ws||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=ws,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let i=this.node.cut(t,r),s=document.createTextNode(i.text);return new j1(this.parent,i,this.outerDeco,this.innerDeco,s,s,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Bo)}get domAtom(){return!1}isText(t){return this.node.text==t}}class YH extends um{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==ws&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class i$e extends Al{constructor(t,r,n,i,s,o,a,l,u,c){super(t,r,n,i,s,o,a,u,c),this.spec=l}update(t,r,n,i){if(this.dirty==Bo)return!1;if(this.spec.update){let s=this.spec.update(t,r,n);return s&&this.updateInner(t,r,n,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,i){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function QH(e,t,r){let n=e.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,t.length);for(;i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=gc.create(this.top,t[s],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(t,r,n,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,r,n))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let u=r.children[n-1];if(u instanceof gc)r=u,n=u.children.length;else{a=u,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function l$e(e,t){return e.type.side-t.type.side}function u$e(e,t,r,n){let i=t.locals(e),s=0;if(i.length==0){for(let u=0;us;)a.push(i[o++]);let p=s+d.nodeSize;if(d.isText){let y=p;o!y.inline):a.slice();n(d,m,t.forChild(s,d),f),s=p}}function c$e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function h$e(e,t,r,n){for(let i=0,s=0;i=r){if(s>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let u=a=0&&u+t.length+a>=r)return a+u;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return-1}function AA(e,t,r,n,i){let s=[];for(let o=0,a=0;o=r||c<=t?s.push(l):(ur&&s.push(l.slice(r-u,l.size,n)))}return s}function m_(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let i=e.docView.nearestDesc(r.focusNode),s=i&&i.size==0,o=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let a=n.resolve(o),l,u;if(B1(r)){for(l=o;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&>.isSelectable(h)&&i.parent&&!(h.isInline&&I_e(r.focusNode,r.focusOffset,i.dom))){let d=i.posBefore;u=new gt(o==d?a:n.resolve(d))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let h=o,d=o;for(let f=0;f{(r.anchorNode!=n||r.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!tU(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function f$e(e){let t=e.domSelection(),r=document.createRange();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?r.setStart(n.parentNode,Ln(n)+1):r.setStart(n,0),r.collapse(!0),t.removeAllRanges(),t.addRange(r),!i&&!e.state.selection.visible&&Hi&&Cl<=11&&(n.disabled=!0,n.disabled=!1)}function rU(e,t){if(t instanceof gt){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(vI(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else vI(e)}function vI(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function y_(e,t,r,n){return e.someProp("createSelectionBetween",i=>i(e,t,r))||It.between(t,r,n)}function bI(e){return e.editable&&!e.hasFocus()?!1:nU(e)}function nU(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function p$e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return pc(t.node,t.offset,r.anchorNode,r.anchorOffset)}function TA(e,t){let{$anchor:r,$head:n}=e.selection,i=t>0?r.max(n):r.min(n),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&Ht.findFrom(s,t)}function tl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function xI(e,t,r){let n=e.state.selection;if(n instanceof It)if(r.indexOf("s")>-1){let{$head:i}=n,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return tl(e,new It(n.$anchor,o))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=TA(e.state,t);return i&&i instanceof gt?tl(e,i):!1}else if(!(hs&&r.indexOf("m")>-1)){let i=n.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=e.docView.descAt(a))&&!o.contentDOM?gt.isSelectable(s)?tl(e,new gt(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):lm?tl(e,new It(e.state.doc.resolve(t<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof gt&&n.node.isInline)return tl(e,new It(t>0?n.$to:n.$from));{let i=TA(e.state,t);return i?tl(e,i):!1}}}function B0(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Wp(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function fh(e,t){return t<0?g$e(e):m$e(e)}function g$e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i,s,o=!1;for(ho&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(Wp(a,-1))i=r,s=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(iU(r))break;{let a=r.previousSibling;for(;a&&Wp(a,-1);)i=r.parentNode,s=Ln(a),a=a.previousSibling;if(a)r=a,n=B0(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}o?kA(e,r,n):i&&kA(e,i,s)}function m$e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i=B0(r),s,o;for(;;)if(n{e.state==i&&ga(e)},50)}function wI(e,t){let r=e.state.doc.resolve(t);if(!(Zn||j_e)&&r.parent.inlineContent){let i=e.coordsAtPos(t);if(t>r.start()){let s=e.coordsAtPos(t-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function SI(e,t,r){let n=e.state.selection;if(n instanceof It&&!n.empty||r.indexOf("s")>-1||hs&&r.indexOf("m")>-1)return!1;let{$from:i,$to:s}=n;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=TA(e.state,t);if(o&&o instanceof gt)return tl(e,o)}if(!i.parent.inlineContent){let o=t<0?i:s,a=n instanceof io?Ht.near(o,t):Ht.findFrom(o,t);return a?tl(e,a):!1}return!1}function DI(e,t){if(!(e.state.selection instanceof It))return!0;let{$head:r,$anchor:n,empty:i}=e.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let o=e.state.tr;return t<0?o.delete(r.pos-s.nodeSize,r.pos):o.delete(r.pos,r.pos+s.nodeSize),e.dispatch(o),!0}return!1}function EI(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function b$e(e){if(!bi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;EI(e,n,"true"),setTimeout(()=>EI(e,n,"false"),20)}return!1}function x$e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function w$e(e,t){let r=t.keyCode,n=x$e(t);if(r==8||hs&&r==72&&n=="c")return DI(e,-1)||fh(e,-1);if(r==46&&!t.shiftKey||hs&&r==68&&n=="c")return DI(e,1)||fh(e,1);if(r==13||r==27)return!0;if(r==37||hs&&r==66&&n=="c"){let i=r==37?wI(e,e.state.selection.from)=="ltr"?-1:1:-1;return xI(e,i,n)||fh(e,i)}else if(r==39||hs&&r==70&&n=="c"){let i=r==39?wI(e,e.state.selection.from)=="ltr"?1:-1:1;return xI(e,i,n)||fh(e,i)}else{if(r==38||hs&&r==80&&n=="c")return SI(e,-1,n)||fh(e,-1);if(r==40||hs&&r==78&&n=="c")return b$e(e)||SI(e,1,n)||fh(e,1);if(n==(hs?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function sU(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let r=[],{content:n,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,s--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=e.someProp("clipboardSerializer")||Rc.fromSchema(e.state.schema),a=hU(),l=a.createElement("div");l.appendChild(o.serializeFragment(n,{document:a}));let u=l.firstChild,c,h=0;for(;u&&u.nodeType==1&&(c=cU[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=a.createElement(c[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(r)}`);let d=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` - -`);return{dom:l,text:d,slice:t}}function oU(e,t,r,n,i){let s=i.parent.type.spec.code,o,a;if(!r&&!t)return null;let l=t&&(n||s||!r);if(l){if(e.someProp("transformPastedText",d=>{t=d(t,s||n,e)}),s)return t?new Je(Oe.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0):Je.empty;let h=e.someProp("clipboardTextParser",d=>d(t,i,n,e));if(h)a=h;else{let d=i.marks(),{schema:f}=e.state,p=Rc.fromSchema(f);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=o.appendChild(document.createElement("p"));m&&y.appendChild(p.serializeNode(f.text(m,d)))})}}else e.someProp("transformPastedHTML",h=>{r=h(r,e)}),o=C$e(r),lm&&A$e(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let h=+c[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||El.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!S$e.test(d.parentNode.nodeName)?{ignore:!0}:null}})),c)a=T$e(CI(a,+c[1],+c[2]),c[4]);else if(a=Je.maxOpen(D$e(a.content,i),!0),a.openStart||a.openEnd){let h=0,d=0;for(let f=a.content.firstChild;h{a=h(a,e)}),a}const S$e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function D$e(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),s,o=[];if(e.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&s.length&&lU(l,s,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=uU(o[o.length-1],s.length));let c=aU(a,l);o.push(c),i=i.matchType(c.type),s=l}}),o)return Oe.from(o)}return e}function aU(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,Oe.from(e));return e}function lU(e,t,r,n,i){if(i1&&(s=0),i=r&&(a=t<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(Oe.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(a))}function CI(e,t,r){return tr}).createHTML(e):e}function C$e(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=hU().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),i;if((i=n&&cU[n[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"").reverse().join("")),r.innerHTML=E$e(e),i)for(let s=0;s=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;i=Oe.from(l.create(n[a+1],i)),s++,o++}return new Je(i,s,o)}const xi={},wi={},k$e={touchstart:!0,touchmove:!0};class _$e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function $$e(e){for(let t in xi){let r=xi[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{P$e(e,n)&&!v_(e,n)&&(e.editable||!(n.type in wi))&&r(e,n)},k$e[t]?{passive:!0}:void 0)}bi&&e.dom.addEventListener("input",()=>null),$A(e)}function pl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function L$e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function $A(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>v_(e,n))})}function v_(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function P$e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function F$e(e,t){!v_(e,t)&&xi[t.type]&&(e.editable||!(t.type in wi))&&xi[t.type](e,t)}wi.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!fU(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Js&&Zn&&r.keyCode==13)))if(e.domObserver.selectionChanged(e.domSelectionRange())?e.domObserver.flush():r.keyCode!=229&&e.domObserver.forceFlush(),Dd&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",i=>i(e,Eu(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||w$e(e,r)?r.preventDefault():pl(e,"key")};wi.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};wi.keypress=(e,t)=>{let r=t;if(fU(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||hs&&r.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof It)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,n.$from.pos,n.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),r.preventDefault()}};function z1(e){return{left:e.clientX,top:e.clientY}}function O$e(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function b_(e,t,r,n,i){if(n==-1)return!1;let s=e.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,a=>o>s.depth?a(e,r,s.nodeAfter,s.before(o),i,!0):a(e,r,s.node(o),s.before(o),i,!1)))return!0;return!1}function Yh(e,t,r){if(e.focused||e.focus(),e.state.selection.eq(t))return;let n=e.state.tr.setSelection(t);n.setMeta("pointer",!0),e.dispatch(n)}function N$e(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&>.isSelectable(n)?(Yh(e,new gt(r)),!0):!1}function M$e(e,t){if(t==-1)return!1;let r=e.state.selection,n,i;r instanceof gt&&(n=r.node);let s=e.state.doc.resolve(t);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(gt.isSelectable(a)){n&&r.$from.depth>0&&o>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?i=s.before(r.$from.depth):i=s.before(o);break}}return i!=null?(Yh(e,gt.create(e.state.doc,i)),!0):!1}function I$e(e,t,r,n,i){return b_(e,"handleClickOn",t,r,n)||e.someProp("handleClick",s=>s(e,t,n))||(i?M$e(e,r):N$e(e,r))}function R$e(e,t,r,n){return b_(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",i=>i(e,t,n))}function B$e(e,t,r,n){return b_(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",i=>i(e,t,n))||j$e(e,r,n)}function j$e(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?(Yh(e,It.create(n,0,n.content.size)),!0):!1;let i=n.resolve(t);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)Yh(e,It.create(n,a+1,a+1+o.content.size));else if(gt.isSelectable(o))Yh(e,gt.create(n,a));else continue;return!0}}function x_(e){return j0(e)}const dU=hs?"metaKey":"ctrlKey";xi.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=x_(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&O$e(r,e.input.lastClick)&&!r[dU]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:s};let o=e.posAtCoords(z1(r));o&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new z$e(e,o,r,!!n)):(s=="doubleClick"?R$e:B$e)(e,o.pos,o.inside,r)?r.preventDefault():pl(e,"pointer"))};class z$e{constructor(t,r,n,i){this.view=t,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[dU],this.allowDefault=n.shiftKey;let s,o;if(r.inside>-1)s=t.state.doc.nodeAt(r.inside),o=r.inside;else{let c=t.state.doc.resolve(r.pos);s=c.parent,o=c.depth?c.before():0}const a=i?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=t.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof gt&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ho&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),pl(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ga(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(z1(t))),this.updateAllowDefault(t),this.allowDefault||!r?pl(this.view,"pointer"):I$e(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||bi&&this.mightDrag&&!this.mightDrag.node.isAtom||Zn&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Yh(this.view,Ht.near(this.view.state.doc.resolve(r.pos))),t.preventDefault()):pl(this.view,"pointer")}move(t){this.updateAllowDefault(t),pl(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}xi.touchstart=e=>{e.input.lastTouch=Date.now(),x_(e),pl(e,"pointer")};xi.touchmove=e=>{e.input.lastTouch=Date.now(),pl(e,"pointer")};xi.contextmenu=e=>x_(e);function fU(e,t){return e.composing?!0:bi&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const H$e=Js?5e3:-1;wi.compositionstart=wi.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$to;if(t.selection instanceof It&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),j0(e,!0),e.markCursor=null;else if(j0(e,!t.selection.empty),ho&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let i=n.focusNode,s=n.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=e.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}e.input.composing=!0}pU(e,H$e)};wi.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,pU(e,20))};function pU(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>j0(e),t))}function gU(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=W$e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function U$e(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let r=N_e(t.focusNode,t.focusOffset),n=M_e(t.focusNode,t.focusOffset);if(r&&n&&r!=n){let i=n.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(r==s||n==s)return s;if(!i||!i.isText(n.nodeValue))return n;if(e.input.compositionNode==n){let o=r.pmViewDesc;if(!(!o||!o.isText(r.nodeValue)))return n}}return r||n}function W$e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function j0(e,t=!1){if(!(Js&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),gU(e),t||e.docView&&e.docView.dirty){let r=m_(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function V$e(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const Pg=Hi&&Cl<15||Dd&&z_e<604;xi.copy=wi.cut=(e,t)=>{let r=t,n=e.state.selection,i=r.type=="cut";if(n.empty)return;let s=Pg?null:r.clipboardData,o=n.content(),{dom:a,text:l}=sU(e,o);s?(r.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):V$e(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function G$e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function q$e(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Fg(e,n.value,null,i,t):Fg(e,n.textContent,n.innerHTML,i,t)},50)}function Fg(e,t,r,n,i){let s=oU(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,s||Je.empty)))return!0;if(!s)return!1;let o=G$e(s),a=o?e.state.tr.replaceSelectionWith(o,n):e.state.tr.replaceSelection(s);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function mU(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let r=e.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}wi.paste=(e,t)=>{let r=t;if(e.composing&&!Js)return;let n=Pg?null:r.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&Fg(e,mU(n),n.getData("text/html"),i,r)?r.preventDefault():q$e(e,r)};class yU{constructor(t,r,n){this.slice=t,this.move=r,this.node=n}}const vU=hs?"altKey":"ctrlKey";xi.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(z1(r)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof gt?i.to-1:i.to))){if(n&&n.mightDrag)o=gt.create(e.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let h=e.docView.nearestDesc(r.target,!0);h&&h.node.type.spec.draggable&&h!=e.docView&&(o=gt.create(e.state.doc,h.posBefore))}}let a=(o||e.state.selection).content(),{dom:l,text:u,slice:c}=sU(e,a);(!r.dataTransfer.files.length||!Zn||UH>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(Pg?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",Pg||r.dataTransfer.setData("text/plain",u),e.dragging=new yU(c,!r[vU],o)};xi.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};wi.dragover=wi.dragenter=(e,t)=>t.preventDefault();wi.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let i=e.posAtCoords(z1(r));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",p=>{o=p(o,e)}):o=oU(e,mU(r.dataTransfer),Pg?null:r.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&!r[vU]);if(e.someProp("handleDrop",p=>p(e,r,o||Je.empty,a))){r.preventDefault();return}if(!o)return;r.preventDefault();let l=o?w_e(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let u=e.state.tr;if(a){let{node:p}=n;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(l),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=u.doc;if(h?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(d))return;let f=u.doc.resolve(c);if(h&>.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new gt(f));else{let p=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,y,b,v)=>p=v),u.setSelection(y_(e,f,u.doc.resolve(p)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};xi.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ga(e)},20))};xi.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};xi.beforeinput=(e,t)=>{if(Zn&&Js&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,Eu(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in wi)xi[e]=wi[e];function Og(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class z0{constructor(t,r){this.toDOM=t,this.spec=r||Gu,this.side=this.spec.side||0}map(t,r,n,i){let{pos:s,deleted:o}=t.mapResult(r.from+i,this.side<0?-1:1);return o?null:new Zs(s-n,s-n,this)}valid(){return!0}eq(t){return this==t||t instanceof z0&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Og(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Tl{constructor(t,r){this.attrs=t,this.spec=r||Gu}map(t,r,n,i){let s=t.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,o=t.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new Zs(s,o,this)}valid(t,r){return r.from=t&&(!s||s(a.spec))&&n.push(a.copy(a.from+i,a.to+i))}for(let o=0;ot){let a=this.children[o]+1;this.children[o+2].findInner(t-a,r-a,n,i+a,s)}}map(t,r,n){return this==Kn||t.maps.length==0?this:this.mapInner(t,r,0,0,n||Gu)}mapInner(t,r,n,i,s){let o;for(let a=0;a{let u=l+n,c;if(c=xU(r,a,u)){for(i||(i=this.children.slice());sa&&h.to=t){this.children[a]==t&&(n=this.children[a+2]);break}let s=t+1,o=s+r.content.size;for(let a=0;as&&l.type instanceof Tl){let u=Math.max(s,l.from)-s,c=Math.min(o,l.to)-s;ui.map(t,r,Gu));return sl.from(n)}forChild(t,r){if(r.isLeaf)return xn.empty;let n=[];for(let i=0;ir instanceof xn)?t:t.reduce((r,n)=>r.concat(n instanceof xn?n:n.members),[]))}}forEachSet(t){for(let r=0;r{let y=m-p-(f-d);for(let b=0;bv+c-h)continue;let E=a[b]+c-h;f>=E?a[b+1]=d<=E?-2:-1:d>=c&&y&&(a[b]+=y,a[b+1]+=y)}h+=y}),c=r.maps[u].map(c,-1)}let l=!1;for(let u=0;u=n.content.size){l=!0;continue}let d=r.map(e[u+1]+s,-1),f=d-i,{index:p,offset:m}=n.content.findIndex(h),y=n.maybeChild(p);if(y&&m==h&&m+y.nodeSize==f){let b=a[u+2].mapInner(r,y,c+1,e[u]+s+1,o);b!=Kn?(a[u]=h,a[u+1]=f,a[u+2]=b):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=J$e(a,e,t,r,i,s,o),c=H0(u,n,0,o);t=c.local;for(let h=0;hr&&o.to{let u=xU(e,a,l+r);if(u){s=!0;let c=H0(u,a,r+l+1,n);c!=Kn&&i.push(l,l+a.nodeSize,c)}});let o=bU(s?wU(e):e,-r).sort(qu);for(let a=0;a0;)t++;e.splice(t,0,r)}function mD(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=Kn&&t.push(n)}),e.cursorWrapper&&t.push(xn.create(e.state.doc,[e.cursorWrapper.deco])),sl.from(t)}const X$e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Y$e=Hi&&Cl<=11;class Q$e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Z$e{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Q$e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Y$e&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,X$e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let r=0;rthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(bI(this.view)){if(this.suppressingSelectionUpdates)return ga(this.view);if(Hi&&Cl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&pc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let r=new Set,n;for(let s=t.focusNode;s;s=Lg(s))r.add(s);for(let s=t.anchorNode;s;s=Lg(s))if(r.has(s)){n=s;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}selectionChanged(t){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&bI(this.view)&&!this.ignoreSelectionChange(t)}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),i=this.selectionChanged(n),s=-1,o=-1,a=!1,l=[];if(t.editable)for(let c=0;ch.nodeName=="BR");if(c.length==2){let[h,d]=c;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of c){let f=d.parentNode;f&&f.nodeName=="LI"&&(!h||r3e(t,h)!=f)&&d.remove()}}}let u=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||i)&&(s>-1&&(t.docView.markDirty(s,o),e3e(t)),this.handleDOMChange(s,o,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||ga(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;ci;y--){let b=n.childNodes[y-1],v=b.pmViewDesc;if(b.nodeName=="BR"&&!v){s=y;break}if(!v||v.size)break}let h=e.state.doc,d=e.someProp("domParser")||El.fromSchema(e.state.schema),f=h.resolve(o),p=null,m=d.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:i3e,context:f});if(u&&u[0].pos!=null){let y=u[0].pos,b=u[1]&&u[1].pos;b==null&&(b=y),p={anchor:y+o,head:b+o}}return{doc:m,sel:p,from:o,to:a}}function i3e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(bi&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||bi&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const s3e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function o3e(e,t,r,n,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,P=m_(e,O);if(P&&!e.state.selection.eq(P)){if(Zn&&Js&&e.input.lastKeyCode===13&&Date.now()-100F(e,Eu(13,"Enter"))))return;let N=e.state.tr.setSelection(P);O=="pointer"?N.setMeta("pointer",!0):O=="key"&&N.scrollIntoView(),s&&N.setMeta("composition",s),e.dispatch(N)}return}let o=e.state.doc.resolve(t),a=o.sharedDepth(r);t=o.before(a+1),r=e.state.doc.resolve(r).after(a+1);let l=e.state.selection,u=n3e(e,t,r),c=e.state.doc,h=c.slice(u.from,u.to),d,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Js)&&i.some(O=>O.nodeType==1&&!s3e.test(O.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",O=>O(e,Eu(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(n&&l instanceof It&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let O=LI(e,e.state.doc,u.sel);if(O&&!O.eq(e.state.selection)){let P=e.state.tr.setSelection(O);s&&P.setMeta("composition",s),e.dispatch(P)}}return}e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),Hi&&Cl<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=u.doc.resolveNoCache(p.start-u.from),y=u.doc.resolveNoCache(p.endB-u.from),b=c.resolve(p.start),v=m.sameParent(y)&&m.parent.inlineContent&&b.end()>=p.endA,E;if((Dd&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!v&&m.posO(e,Eu(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&l3e(c,p.start,p.endA,m,y)&&e.someProp("handleKeyDown",O=>O(e,Eu(8,"Backspace")))){Js&&Zn&&e.domObserver.suppressSelectionUpdates();return}Zn&&Js&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),Js&&!v&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,y=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(O){return O(e,Eu(13,"Enter"))})},20));let D=p.start,C=p.endA,w,A,$;if(v){if(m.pos==y.pos)Hi&&Cl<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ga(e),20)),w=e.state.tr.delete(D,C),A=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&($=a3e(m.parent.content.cut(m.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start()))))w=e.state.tr,$.type=="add"?w.addMark(D,C,$.mark):w.removeMark(D,C,$.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let O=m.parent.textBetween(m.parentOffset,y.parentOffset);if(e.someProp("handleTextInput",P=>P(e,D,C,O)))return;w=e.state.tr.insertText(O,D,C)}}if(w||(w=e.state.tr.replace(D,C,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let O=LI(e,w.doc,u.sel);O&&!(Zn&&Js&&e.composing&&O.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:y_(e,t.resolve(r.anchor),t.resolve(r.head))}function a3e(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,i=r,s=n,o,a,l;for(let c=0;cc.mark(a.addToSet(c.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cr||yD(o,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,i++,t=!1;if(r){let s=e.node(n).maybeChild(e.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function u3e(e,t,r,n,i){let s=e.findDiffStart(t,r);if(s==null)return null;let{a:o,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,s&&s=a?s-n:0;s-=l,s&&s=56320&&t<=57343&&r>=55296&&r<=56319}class c3e{constructor(t,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new _$e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(II),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=NI(this),OI(this),this.nodeViews=MI(this),this.docView=fI(this.state.doc,FI(this),mD(this),this.dom,this),this.domObserver=new Z$e(this,(n,i,s,o)=>o3e(this,n,i,s,o)),this.domObserver.start(),$$e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&$A(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(II),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){var n;let i=this.state,s=!1,o=!1;t.storedMarks&&this.composing&&(gU(this),o=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=r.plugins;if(a||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=MI(this);d3e(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(a||r.handleDOMEvents!=this._props.handleDOMEvents)&&$A(this),this.editable=NI(this),OI(this);let l=mD(this),u=FI(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",h=s||!this.docView.matchesNode(t.doc,u,l);(h||!t.selection.eq(i.selection))&&(o=!0);let d=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&W_e(this);if(o){this.domObserver.stop();let f=h&&(Hi||Zn)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&h3e(i.selection,t.selection);if(h){let p=Zn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=U$e(this)),(s||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=fI(t.doc,u,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&p$e(this))?ga(this,f):(rU(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&V_e(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof gt){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&aI(this,r.getBoundingClientRect(),t)}else aI(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r0&&this.state.doc.nodeAt(s))==n.node&&(i=s)}this.dragging=new yU(t.slice,t.move,i<0?void 0:gt.create(this.state.doc,i))}someProp(t,r){let n=this._props&&this._props[t],i;if(n!=null&&(i=r?r(n):n))return i;for(let o=0;or.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return Y_e(this,t)}coordsAtPos(t,r=1){return KH(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let i=this.docView.posFromDOM(t,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,r){return r$e(this,r||this.state,t)}pasteHTML(t,r){return Fg(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return Fg(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(L$e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],mD(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,F_e())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return F$e(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?bi&&this.root.nodeType===11&&R_e(this.dom.ownerDocument)==this.dom&&t3e(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function FI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[Zs.node(0,e.state.doc.content.size,t)]}function OI(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Zs.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function NI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function h3e(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function MI(e){let t=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n[i])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function d3e(e,t){let r=0,n=0;for(let i in e){if(e[i]!=t[i])return!0;r++}for(let i in t)n++;return r!=n}function II(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Hl={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:"'"},U0={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},f3e=typeof navigator<"u"&&/Mac/.test(navigator.platform),p3e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Pn=0;Pn<10;Pn++)Hl[48+Pn]=Hl[96+Pn]=String(Pn);for(var Pn=1;Pn<=24;Pn++)Hl[Pn+111]="F"+Pn;for(var Pn=65;Pn<=90;Pn++)Hl[Pn]=String.fromCharCode(Pn+32),U0[Pn]=String.fromCharCode(Pn);for(var vD in Hl)U0.hasOwnProperty(vD)||(U0[vD]=Hl[vD]);function g3e(e){var t=f3e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||p3e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?U0:Hl)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const m3e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function y3e(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;a127)&&(s=Hl[n.keyCode])&&s!=i){let a=t[bD(s,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}const w3e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function SU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const S3e=(e,t,r)=>{let n=SU(e,r);if(!n)return!1;let i=D_(n);if(!i){let o=n.blockRange(),a=o&&df(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(AU(e,i,t,-1))return!0;if(n.parent.content.size==0&&(Ed(s,"end")||gt.isSelectable(s)))for(let o=n.depth;;o--){let a=I1(e.doc,n.before(o),n.after(o),Je.empty);if(a&&a.slice.size1)break}return s.isAtom&&i.depth==n.depth-1?(t&&t(e.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},D3e=(e,t,r)=>{let n=SU(e,r);if(!n)return!1;let i=D_(n);return i?DU(e,i,t):!1},E3e=(e,t,r)=>{let n=EU(e,r);if(!n)return!1;let i=E_(n);return i?DU(e,i,t):!1};function DU(e,t,r){let n=t.nodeBefore,i=n,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=t.nodeAfter,a=o,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=I1(e.doc,s,l,Je.empty);if(!u||u.from!=s||u instanceof wn&&u.slice.size>=l-s)return!1;if(r){let c=e.tr.step(u);c.setSelection(It.create(c.doc,s)),r(c.scrollIntoView())}return!0}function Ed(e,t,r=!1){for(let n=e;n;n=t=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const C3e=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;s=D_(n)}let o=s&&s.nodeBefore;return!o||!gt.isSelectable(o)?!1:(t&&t(e.tr.setSelection(gt.create(e.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function D_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function EU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=EU(e,r);if(!n)return!1;let i=E_(n);if(!i)return!1;let s=i.nodeAfter;if(AU(e,i,t,1))return!0;if(n.parent.content.size==0&&(Ed(s,"start")||gt.isSelectable(s))){let o=I1(e.doc,n.before(),n.after(),Je.empty);if(o&&o.slice.size{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let r=e.selection,n=r instanceof gt,i;if(n){if(r.node.isTextblock||!Bc(e.doc,r.from))return!1;i=r.from}else if(i=M1(e.doc,r.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);n&&s.setSelection(gt.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},_3e=(e,t)=>{let r=e.selection,n;if(r instanceof gt){if(r.node.isTextblock||!Bc(e.doc,r.to))return!1;n=r.to}else if(n=M1(e.doc,r.to,1),n==null)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},$3e=(e,t)=>{let{$from:r,$to:n}=e.selection,i=r.blockRange(n),s=i&&df(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},L3e=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function CU(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),o=CU(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(t){let a=r.after(),l=e.tr.replaceWith(a,a,o.createAndFill());l.setSelection(Ht.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},F3e=(e,t)=>{let r=e.selection,{$from:n,$to:i}=r;if(r instanceof io||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=CU(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let o=(!n.parentOffset&&i.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(Jh(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),i=n&&df(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)},N3e=(e,t)=>{let{$from:r,to:n}=e.selection,i,s=r.sharedDepth(n);return s==0?!1:(i=r.before(s),t&&t(e.tr.setSelection(gt.create(e.doc,i))),!0)};function M3e(e,t,r){let n=t.nodeBefore,i=t.nodeAfter,s=t.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&t.parent.canReplace(s-1,s)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||Bc(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function AU(e,t,r,n){let i=t.nodeBefore,s=t.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&M3e(e,t,r))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(r){let f=t.pos+s.nodeSize,p=Oe.empty;for(let b=o.length-1;b>=0;b--)p=Oe.from(o[b].create(null,p));p=Oe.from(i.copy(p));let m=e.tr.step(new Cn(t.pos-1,f,t.pos,f,new Je(p,1,0),o.length,!0)),y=f+2*o.length;Bc(m.doc,y)&&m.join(y),r(m.scrollIntoView())}return!0}let c=s.type.spec.isolating||n>0&&l?null:Ht.findFrom(t,1),h=c&&c.$from.blockRange(c.$to),d=h&&df(h);if(d!=null&&d>=t.depth)return r&&r(e.tr.lift(h,d).scrollIntoView()),!0;if(u&&Ed(s,"start",!0)&&Ed(i,"end")){let f=i,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let m=s,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(r){let b=Oe.empty;for(let E=p.length-1;E>=0;E--)b=Oe.from(p[E].copy(b));let v=e.tr.step(new Cn(t.pos-p.length,t.pos+s.nodeSize,t.pos+y,t.pos+s.nodeSize-y,new Je(b,p.length,0),0,!0));r(v.scrollIntoView())}return!0}}return!1}function TU(e){return function(t,r){let n=t.selection,i=e<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(r&&r(t.tr.setSelection(It.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const I3e=TU(-1),R3e=TU(1);function B3e(e,t=null){return function(r,n){let{$from:i,$to:s}=r.selection,o=i.blockRange(s),a=o&&OH(o,e,t);return a?(n&&n(r.tr.wrap(o,a).scrollIntoView()),!0):!1}}function RI(e,t=null){return function(r,n){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let c=r.doc.resolve(u),h=c.index();i=c.parent.canReplaceWith(h,h+1,e)}})}if(!i)return!1;if(n){let s=r.tr;for(let o=0;o=2&&i.node(o.depth-1).type.compatibleContent(e)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let c=r.doc.resolve(o.start-2);l=new O0(c,c,o.depth),o.endIndex=0;c--)s=Oe.from(r[c].type.create(r[c].attrs,s));e.step(new Cn(t.start-(n?2:0),t.end,t.start,t.end,new Je(s,0,0),r.length,!0));let o=0;for(let c=0;co.childCount>0&&o.firstChild.type==e);return s?r?n.node(s.depth-1).type==e?U3e(t,r,e,s):W3e(t,r,s):!0:!1}}function U3e(e,t,r,n){let i=e.tr,s=n.end,o=n.$to.end(n.depth);sm;p--)f-=i.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(r.start),o=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(a?0:1),c+1,o.content.append(l?Oe.empty:Oe.from(i))))return!1;let h=s.pos,d=h+o.nodeSize;return n.step(new Cn(h-(a?1:0),d+(l?1:0),h+1,d-1,new Je((a?Oe.empty:Oe.from(i.copy(Oe.empty))).append(l?Oe.empty:Oe.from(i.copy(Oe.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}function V3e(e){return function(t,r){let{$from:n,$to:i}=t.selection,s=n.blockRange(i,u=>u.childCount>0&&u.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=e)return!1;if(r){let u=l.lastChild&&l.lastChild.type==a.type,c=Oe.from(u?e.create():null),h=new Je(Oe.from(e.create(null,Oe.from(a.type.create(null,c)))),u?3:1,0),d=s.start,f=s.end;r(t.tr.step(new Cn(d-(u?3:1),f,d,f,h,1,!0)).scrollIntoView())}return!0}}function H1(e){const{state:t,transaction:r}=e;let{selection:n}=r,{doc:i}=r,{storedMarks:s}=r;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,s=r.storedMarks,r}}}class U1{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:r,state:n}=this,{view:i}=r,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>{const h=l(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a=[],l=!!t,u=t||s.tr,c=()=>(!l&&r&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),a.every(d=>d===!0)),h={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...m)=>{const y=this.buildProps(u,r),b=f(...m)(y);return a.push(b),h}])),run:c};return h}createCan(t){const{rawCommands:r,state:n}=this,i=!1,s=t||n.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a={tr:t,editor:i,view:o,state:H1({state:s,transaction:t}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(t,r),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}}class G3e{constructor(){this.callbacks={}}on(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),this}emit(t,...r){const n=this.callbacks[t];return n&&n.forEach(i=>i.apply(this,r)),this}off(t,r){const n=this.callbacks[t];return n&&(r?this.callbacks[t]=n.filter(i=>i!==r):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function st(e,t,r){return e.config[t]===void 0&&e.parent?st(e.parent,t,r):typeof e.config[t]=="function"?e.config[t].bind({...r,parent:e.parent?st(e.parent,t,r):null}):e.config[t]}function W1(e){const t=e.filter(i=>i.type==="extension"),r=e.filter(i=>i.type==="node"),n=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:r,markExtensions:n}}function kU(e){const t=[],{nodeExtensions:r,markExtensions:n}=W1(e),i=[...r,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=st(o,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(h=>{Object.entries(c.attributes).forEach(([d,f])=>{t.push({type:h,name:d,attribute:{...s,...f}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=st(o,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([c,h])=>{const d={...s,...h};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,t.push({type:o.name,name:c,attribute:d})})}),t}function An(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function zc(...e){return e.filter(t=>!!t).reduce((t,r)=>{const n={...t};return Object.entries(r).forEach(([i,s])=>{if(!n[i]){n[i]=s;return}if(i==="class"){const a=s?s.split(" "):[],l=n[i]?n[i].split(" "):[],u=a.filter(c=>!l.includes(c));n[i]=[...l,...u].join(" ")}else if(i==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],l=n[i]?n[i].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[h,d]=c.split(":").map(f=>f.trim());u.set(h,d)}),a.forEach(c=>{const[h,d]=c.split(":").map(f=>f.trim());u.set(h,d)}),n[i]=Array.from(u.entries()).map(([c,h])=>`${c}: ${h}`).join("; ")}else n[i]=s}),n},{})}function LA(e,t){return t.filter(r=>r.type===e.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(e.attrs)||{}:{[r.name]:e.attrs[r.name]}).reduce((r,n)=>zc(r,n),{})}function _U(e){return typeof e=="function"}function Jt(e,t=void 0,...r){return _U(e)?t?e.bind(t)(...r):e(...r):e}function q3e(e={}){return Object.keys(e).length===0&&e.constructor===Object}function K3e(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function BI(e,t){return"style"in e?e:{...e,getAttrs:r=>{const n=e.getAttrs?e.getAttrs(r):e.attrs;if(n===!1)return!1;const i=t.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(r):K3e(r.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...n,...i}}}}function jI(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>t==="attrs"&&q3e(r)?!1:r!=null))}function J3e(e,t){var r;const n=kU(e),{nodeExtensions:i,markExtensions:s}=W1(e),o=(r=i.find(u=>st(u,"topNode")))===null||r===void 0?void 0:r.name,a=Object.fromEntries(i.map(u=>{const c=n.filter(b=>b.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:t},d=e.reduce((b,v)=>{const E=st(v,"extendNodeSchema",h);return{...b,...E?E(u):{}}},{}),f=jI({...d,content:Jt(st(u,"content",h)),marks:Jt(st(u,"marks",h)),group:Jt(st(u,"group",h)),inline:Jt(st(u,"inline",h)),atom:Jt(st(u,"atom",h)),selectable:Jt(st(u,"selectable",h)),draggable:Jt(st(u,"draggable",h)),code:Jt(st(u,"code",h)),whitespace:Jt(st(u,"whitespace",h)),defining:Jt(st(u,"defining",h)),isolating:Jt(st(u,"isolating",h)),attrs:Object.fromEntries(c.map(b=>{var v;return[b.name,{default:(v=b==null?void 0:b.attribute)===null||v===void 0?void 0:v.default}]}))}),p=Jt(st(u,"parseHTML",h));p&&(f.parseDOM=p.map(b=>BI(b,c)));const m=st(u,"renderHTML",h);m&&(f.toDOM=b=>m({node:b,HTMLAttributes:LA(b,c)}));const y=st(u,"renderText",h);return y&&(f.toText=y),[u.name,f]})),l=Object.fromEntries(s.map(u=>{const c=n.filter(y=>y.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:t},d=e.reduce((y,b)=>{const v=st(b,"extendMarkSchema",h);return{...y,...v?v(u):{}}},{}),f=jI({...d,inclusive:Jt(st(u,"inclusive",h)),excludes:Jt(st(u,"excludes",h)),group:Jt(st(u,"group",h)),spanning:Jt(st(u,"spanning",h)),code:Jt(st(u,"code",h)),attrs:Object.fromEntries(c.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),p=Jt(st(u,"parseHTML",h));p&&(f.parseDOM=p.map(y=>BI(y,c)));const m=st(u,"renderHTML",h);return m&&(f.toDOM=y=>m({mark:y,HTMLAttributes:LA(y,c)})),[u.name,f]}));return new CH({topNode:o,nodes:a,marks:l})}function xD(e,t){return t.nodes[e]||t.marks[e]||null}function zI(e,t){return Array.isArray(t)?t.some(r=>(typeof r=="string"?r:r.name)===e.name):t}const X3e=(e,t=500)=>{let r="";const n=e.parentOffset;return e.parent.nodesBetween(Math.max(0,n-t),n,(i,s,o,a)=>{var l,u;const c=((u=(l=i.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";r+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,n-s))}),r};function C_(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class Y3e{constructor(t){this.find=t.find,this.handler=t.handler}}const Q3e=(e,t)=>{if(C_(t))return t.exec(e);const r=t(e);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=e,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function Ey(e){var t;const{editor:r,from:n,to:i,text:s,rules:o,plugin:a}=e,{view:l}=r;if(l.composing)return!1;const u=l.state.doc.resolve(n);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(d=>d.type.spec.code))return!1;let c=!1;const h=X3e(u)+s;return o.forEach(d=>{if(c)return;const f=Q3e(h,d.find);if(!f)return;const p=l.state.tr,m=H1({state:l.state,transaction:p}),y={from:n-(f[0].length-s.length),to:i},{commands:b,chain:v,can:E}=new U1({editor:r,state:m});d.handler({state:m,range:y,match:f,commands:b,chain:v,can:E})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:n,to:i,text:s}),l.dispatch(p),c=!0)}),c}function Z3e(e){const{editor:t,rules:r}=e,n=new Go({state:{init(){return null},apply(i,s){const o=i.getMeta(n);if(o)return o;const a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:u,text:c}=a,h=u+c.length;Ey({editor:t,from:u,to:h,text:c,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return Ey({editor:t,from:s,to:o,text:a,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&Ey({editor:t,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?Ey({editor:t,from:o.pos,to:o.pos,text:` -`,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function eLe(e){return Object.prototype.toString.call(e).slice(8,-1)}function Cy(e){return eLe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function V1(e,t){const r={...e};return Cy(e)&&Cy(t)&&Object.keys(t).forEach(n=>{Cy(t[n])&&Cy(e[n])?r[n]=V1(e[n],t[n]):r[n]=t[n]}),r}class Ta{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(st(this,"addOptions",{name:this.name}))),this.storage=Jt(st(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ta(t)}configure(t={}){const r=this.extend({...this.config,addOptions:()=>V1(this.options,t)});return r.name=this.name,r.parent=this.parent,r}extend(t={}){const r=new Ta(t);return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=Jt(st(r,"addOptions",{name:r.name})),r.storage=Jt(st(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:t,mark:r}){const{tr:n}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===r.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===r.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),t.view.dispatch(n),!0}return!1}}function tLe(e){return typeof e=="number"}class rLe{constructor(t){this.find=t.find,this.handler=t.handler}}const nLe=(e,t,r)=>{if(C_(t))return[...e.matchAll(t)];const n=t(e,r);return n?n.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function iLe(e){const{editor:t,state:r,from:n,to:i,rule:s,pasteEvent:o,dropEvent:a}=e,{commands:l,chain:u,can:c}=new U1({editor:t,state:r}),h=[];return r.doc.nodesBetween(n,i,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const m=Math.max(n,p),y=Math.min(i,p+f.content.size),b=f.textBetween(m-p,y-p,void 0,"");nLe(b,s.find,o).forEach(E=>{if(E.index===void 0)return;const D=m+E.index+1,C=D+E[0].length,w={from:r.tr.mapping.map(D),to:r.tr.mapping.map(C)},A=s.handler({state:r,range:w,match:E,commands:l,chain:u,can:c,pasteEvent:o,dropEvent:a});h.push(A)})}),h.every(f=>f!==null)}const sLe=e=>{var t;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=r.clipboardData)===null||t===void 0||t.setData("text/html",e),r};function oLe(e){const{editor:t,rules:r}=e;let n=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const l=({state:c,from:h,to:d,rule:f,pasteEvt:p})=>{const m=c.tr,y=H1({state:c,transaction:m});if(!(!iLe({editor:t,state:y,from:Math.max(h-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:a})||!m.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m};return r.map(c=>new Go({view(h){const d=f=>{var p;n=!((p=h.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?h.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(h,d)=>(s=n===h.dom.parentElement,a=d,!1),paste:(h,d)=>{var f;const p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=d,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(h,d,f)=>{const p=h[0],m=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,b=p.getMeta("applyPasteRules"),v=!!b;if(!m&&!y&&!v)return;if(v){const{from:C,text:w}=b,A=C+w.length,$=sLe(w);return l({rule:c,state:f,from:C,to:{b:A},pasteEvt:$})}const E=d.doc.content.findDiffStart(f.doc.content),D=d.doc.content.findDiffEnd(f.doc.content);if(!(!tLe(E)||!D||E===D.b))return l({rule:c,state:f,from:E,to:D,pasteEvt:o})}}))}function aLe(e){const t=e.filter((r,n)=>e.indexOf(r)!==n);return Array.from(new Set(t))}class Bh{constructor(t,r){this.splittableMarks=[],this.editor=r,this.extensions=Bh.resolve(t),this.schema=J3e(this.extensions,r),this.setupExtensions()}static resolve(t){const r=Bh.sort(Bh.flatten(t)),n=aLe(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(t){return t.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=st(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(t){return t.sort((n,i)=>{const s=st(n,"priority")||100,o=st(i,"priority")||100;return s>o?-1:s{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:xD(r.name,this.schema)},i=st(r,"addCommands",n);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,r=Bh.sort([...this.extensions].reverse()),n=[],i=[],s=r.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:t,type:xD(o.name,this.schema)},l=[],u=st(o,"addKeyboardShortcuts",a);let c={};if(o.type==="mark"&&st(o,"exitable",a)&&(c.ArrowRight=()=>Ta.handleExit({editor:t,mark:o})),u){const m=Object.fromEntries(Object.entries(u()).map(([y,b])=>[y,()=>b({editor:t})]));c={...c,...m}}const h=b3e(c);l.push(h);const d=st(o,"addInputRules",a);zI(o,t.options.enableInputRules)&&d&&n.push(...d());const f=st(o,"addPasteRules",a);zI(o,t.options.enablePasteRules)&&f&&i.push(...f());const p=st(o,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[Z3e({editor:t,rules:n}),...oLe({editor:t,rules:i}),...s]}get attributes(){return kU(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:r}=W1(this.extensions);return Object.fromEntries(r.filter(n=>!!st(n,"addNodeView")).map(n=>{const i=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:t,type:An(n.name,this.schema)},o=st(n,"addNodeView",s);if(!o)return[];const a=(l,u,c,h,d)=>{const f=LA(l,i);return o()({node:l,view:u,getPos:c,decorations:h,innerDecorations:d,editor:t,extension:n,HTMLAttributes:f})};return[n.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var r;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:xD(t.name,this.schema)};t.type==="mark"&&(!((r=Jt(st(t,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(t.name);const i=st(t,"onBeforeCreate",n),s=st(t,"onCreate",n),o=st(t,"onUpdate",n),a=st(t,"onSelectionUpdate",n),l=st(t,"onTransaction",n),u=st(t,"onFocus",n),c=st(t,"onBlur",n),h=st(t,"onDestroy",n);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),h&&this.editor.on("destroy",h)})}}class fo{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(st(this,"addOptions",{name:this.name}))),this.storage=Jt(st(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new fo(t)}configure(t={}){const r=this.extend({...this.config,addOptions:()=>V1(this.options,t)});return r.name=this.name,r.parent=this.parent,r}extend(t={}){const r=new fo({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=Jt(st(r,"addOptions",{name:r.name})),r.storage=Jt(st(r,"addStorage",{name:r.name,options:r.options})),r}}function $U(e,t,r){const{from:n,to:i}=t,{blockSeparator:s=` - -`,textSerializers:o={}}=r||{};let a="";return e.nodesBetween(n,i,(l,u,c,h)=>{var d;l.isBlock&&u>n&&(a+=s);const f=o==null?void 0:o[l.type.name];if(f)return c&&(a+=f({node:l,pos:u,parent:c,index:h,range:t})),!1;l.isText&&(a+=(d=l==null?void 0:l.text)===null||d===void 0?void 0:d.slice(Math.max(n,u)-u,i-u))}),a}function LU(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,r])=>[t,r.spec.toText]))}const lLe=fo.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Go({key:new jc("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:r}=e,{doc:n,selection:i}=t,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=LU(r);return $U(n,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),uLe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var r;e.isDestroyed||(t.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),cLe=(e=!1)=>({commands:t})=>t.setContent("",e),hLe=()=>({state:e,tr:t,dispatch:r})=>{const{selection:n}=t,{ranges:i}=n;return r&&i.forEach(({$from:s,$to:o})=>{e.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=t,h=u.resolve(c.map(l)),d=u.resolve(c.map(l+a.nodeSize)),f=h.blockRange(d);if(!f)return;const p=df(f);if(a.type.isTextblock){const{defaultType:m}=h.parent.contentMatchAt(h.index());t.setNodeMarkup(f.start,m)}(p||p===0)&&t.lift(f,p)})}),!0},dLe=e=>t=>e(t),fLe=()=>({state:e,dispatch:t})=>F3e(e,t),pLe=(e,t)=>({editor:r,tr:n})=>{const{state:i}=r,s=i.doc.slice(e.from,e.to);n.deleteRange(e.from,e.to);const o=n.mapping.map(t);return n.insert(o,s.content),n.setSelection(new It(n.doc.resolve(o-1))),!0},gLe=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,n=r.$anchor.node();if(n.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===n.type){if(t){const a=i.before(s),l=i.after(s);e.delete(a,l).scrollIntoView()}return!0}return!1},mLe=e=>({tr:t,state:r,dispatch:n})=>{const i=An(e,r.schema),s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(n){const l=s.before(o),u=s.after(o);t.delete(l,u).scrollIntoView()}return!0}return!1},yLe=e=>({tr:t,dispatch:r})=>{const{from:n,to:i}=e;return r&&t.delete(n,i),!0},vLe=()=>({state:e,dispatch:t})=>w3e(e,t),bLe=()=>({commands:e})=>e.keyboardShortcut("Enter"),xLe=()=>({state:e,dispatch:t})=>P3e(e,t);function W0(e,t,r={strict:!0}){const n=Object.keys(t);return n.length?n.every(i=>r.strict?t[i]===e[i]:C_(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function PA(e,t,r={}){return e.find(n=>n.type===t&&W0(n.attrs,r))}function wLe(e,t,r={}){return!!PA(e,t,r)}function A_(e,t,r={}){if(!e||!t)return;let n=e.parent.childAfter(e.parentOffset);if((!n.node||!n.node.marks.some(u=>u.type===t))&&(n=e.parent.childBefore(e.parentOffset)),!n.node||!n.node.marks.some(u=>u.type===t))return;const i=PA([...n.node.marks],t,r);if(!i)return;let s=n.index,o=e.start()+n.offset,a=s+1,l=o+n.node.nodeSize;for(PA([...n.node.marks],t,r);s>0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,o-=e.parent.child(s).nodeSize;for(;a({tr:r,state:n,dispatch:i})=>{const s=lu(e,n.schema),{doc:o,selection:a}=r,{$from:l,from:u,to:c}=a;if(i){const h=A_(l,s,t);if(h&&h.from<=u&&h.to>=c){const d=It.create(o,h.from,h.to);r.setSelection(d)}}return!0},DLe=e=>t=>{const r=typeof e=="function"?e(t):e;for(let n=0;n({editor:r,view:n,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const o=()=>{T_()&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),t!=null&&t.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!PU(r.state.selection))return o(),!0;const a=FU(i.doc,e)||r.state.selection,l=r.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},CLe=(e,t)=>r=>e.every((n,i)=>t(n,{...r,index:i})),ALe=(e,t)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},e,t),OU=e=>{const t=e.childNodes;for(let r=t.length-1;r>=0;r-=1){const n=t[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?e.removeChild(n):n.nodeType===1&&OU(n)}return e};function Ay(e){const t=`${e}`,r=new window.DOMParser().parseFromString(t,"text/html").body;return OU(r)}function V0(e,t,r){r={slice:!0,parseOptions:{},...r};const n=typeof e=="object"&&e!==null,i=typeof e=="string";if(n)try{if(Array.isArray(e)&&e.length>0)return Oe.fromArray(e.map(a=>t.nodeFromJSON(a)));const o=t.nodeFromJSON(e);return r.errorOnInvalidContent&&o.check(),o}catch(s){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),V0("",t,r)}if(i){if(r.errorOnInvalidContent){let o=!1,a="";const l=new CH({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(r.slice?El.fromSchema(l).parseSlice(Ay(e),r.parseOptions):El.fromSchema(l).parse(Ay(e),r.parseOptions),r.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=El.fromSchema(t);return r.slice?s.parseSlice(Ay(e),r.parseOptions).content:s.parse(Ay(e),r.parseOptions)}return V0("",t,r)}function TLe(e,t,r){const n=e.steps.length-1;if(n{o===0&&(o=c)}),e.setSelection(Ht.near(e.doc.resolve(o),r))}const kLe=e=>!("type"in e),_Le=(e,t,r)=>({tr:n,dispatch:i,editor:s})=>{var o;if(i){r={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let a;try{a=V0(t,s.schema,{parseOptions:{preserveWhitespace:"full",...r.parseOptions},errorOnInvalidContent:(o=r.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(p){return s.emit("contentError",{editor:s,error:p,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:u}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,h=!0;if((kLe(a)?a:[a]).forEach(p=>{p.check(),c=c?p.isText&&p.marks.length===0:!1,h=h?p.isBlock:!1}),l===u&&h){const{parent:p}=n.doc.resolve(l);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(l-=1,u+=1)}let f;c?(Array.isArray(t)?f=t.map(p=>p.text||"").join(""):typeof t=="object"&&t&&t.text?f=t.text:f=t,n.insertText(f,l,u)):(f=a,n.replaceWith(l,u,f)),r.updateSelection&&TLe(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:l,text:f}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:l,text:f})}return!0},$Le=()=>({state:e,dispatch:t})=>k3e(e,t),LLe=()=>({state:e,dispatch:t})=>_3e(e,t),PLe=()=>({state:e,dispatch:t})=>S3e(e,t),FLe=()=>({state:e,dispatch:t})=>A3e(e,t),OLe=()=>({state:e,dispatch:t,tr:r})=>{try{const n=M1(e.doc,e.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),t&&t(r),!0)}catch{return!1}},NLe=()=>({state:e,dispatch:t,tr:r})=>{try{const n=M1(e.doc,e.selection.$from.pos,1);return n==null?!1:(r.join(n,2),t&&t(r),!0)}catch{return!1}},MLe=()=>({state:e,dispatch:t})=>D3e(e,t),ILe=()=>({state:e,dispatch:t})=>E3e(e,t);function NU(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function RLe(e){const t=e.split(/-(?!$)/);let r=t[t.length-1];r==="Space"&&(r=" ");let n,i,s,o;for(let a=0;a({editor:t,view:r,tr:n,dispatch:i})=>{const s=RLe(e).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{r.someProp("handleKeyDown",u=>u(r,a))});return l==null||l.steps.forEach(u=>{const c=u.map(n.mapping);c&&i&&n.maybeStep(c)}),!0};function Ng(e,t,r={}){const{from:n,to:i,empty:s}=e.selection,o=t?An(t,e.schema):null,a=[];e.doc.nodesBetween(n,i,(h,d)=>{if(h.isText)return;const f=Math.max(n,d),p=Math.min(i,d+h.nodeSize);a.push({node:h,from:f,to:p})});const l=i-n,u=a.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>W0(h.node.attrs,r,{strict:!1}));return s?!!u.length:u.reduce((h,d)=>h+d.to-d.from,0)>=l}const jLe=(e,t={})=>({state:r,dispatch:n})=>{const i=An(e,r.schema);return Ng(r,i,t)?$3e(r,n):!1},zLe=()=>({state:e,dispatch:t})=>O3e(e,t),HLe=e=>({state:t,dispatch:r})=>{const n=An(e,t.schema);return H3e(n)(t,r)},ULe=()=>({state:e,dispatch:t})=>L3e(e,t);function G1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function HI(e,t){const r=typeof t=="string"?[t]:t;return Object.keys(e).reduce((n,i)=>(r.includes(i)||(n[i]=e[i]),n),{})}const WLe=(e,t)=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=G1(typeof e=="string"?e:e.name,n.schema);return a?(a==="node"&&(s=An(e,n.schema)),a==="mark"&&(o=lu(e,n.schema)),i&&r.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{s&&s===u.type&&r.setNodeMarkup(c,void 0,HI(u.attrs,t)),o&&u.marks.length&&u.marks.forEach(h=>{o===h.type&&r.addMark(c,c+u.nodeSize,o.create(HI(h.attrs,t)))})})}),!0):!1},VLe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),GLe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),qLe=()=>({state:e,dispatch:t})=>C3e(e,t),KLe=()=>({state:e,dispatch:t})=>T3e(e,t),JLe=()=>({state:e,dispatch:t})=>N3e(e,t),XLe=()=>({state:e,dispatch:t})=>R3e(e,t),YLe=()=>({state:e,dispatch:t})=>I3e(e,t);function FA(e,t,r={},n={}){return V0(e,t,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}const QLe=(e,t=!1,r={},n={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{var l,u;const{doc:c}=s;if(r.preserveWhitespace!=="full"){const h=FA(e,i.schema,r,{errorOnInvalidContent:(l=n.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&s.replaceWith(0,c.content.size,h).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:(u=n.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function k_(e,t){const r=lu(t,e.schema),{from:n,to:i,empty:s}=e.selection,o=[];s?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(n,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function ZLe(e){for(let t=0;t0;r-=1){const n=e.node(r);if(t(n))return{pos:r>0?e.before(r):0,start:e.start(r),depth:r,node:n}}}function __(e){return t=>ePe(t.$from,e)}function tPe(e,t){const r=Rc.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}function rPe(e,t){const r={from:0,to:e.content.size};return $U(e,r,t)}function nPe(e,t){const r=An(t,e.schema),{from:n,to:i}=e.selection,s=[];e.doc.nodesBetween(n,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===r.name);return o?{...o.attrs}:{}}function iPe(e,t){const r=G1(typeof t=="string"?t:t.name,e.schema);return r==="node"?nPe(e,t):r==="mark"?k_(e,t):{}}function MU(e,t,r){const n=[];return e===t?r.resolve(e).marks().forEach(i=>{const s=r.resolve(e),o=A_(s,i.type);o&&n.push({mark:i,...o})}):r.nodesBetween(e,t,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),n}function av(e,t,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=e.find(s=>s.type===t&&s.name===n);return i?i.attribute.keepOnSplit:!1}))}function OA(e,t,r={}){const{empty:n,ranges:i}=e.selection,s=t?lu(t,e.schema):null;if(n)return!!(e.storedMarks||e.selection.$from.marks()).filter(h=>s?s.name===h.type.name:!0).find(h=>W0(h.attrs,r,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:h,$to:d})=>{const f=h.pos,p=d.pos;e.doc.nodesBetween(f,p,(m,y)=>{if(!m.isText&&!m.marks.length)return;const b=Math.max(f,y),v=Math.min(p,y+m.nodeSize),E=v-b;o+=E,a.push(...m.marks.map(D=>({mark:D,from:b,to:v})))})}),o===0)return!1;const l=a.filter(h=>s?s.name===h.mark.type.name:!0).filter(h=>W0(h.mark.attrs,r,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),u=a.filter(h=>s?h.mark.type!==s&&h.mark.type.excludes(s):!0).reduce((h,d)=>h+d.to-d.from,0);return(l>0?l+u:l)>=o}function sPe(e,t,r={}){if(!t)return Ng(e,null,r)||OA(e,null,r);const n=G1(t,e.schema);return n==="node"?Ng(e,t,r):n==="mark"?OA(e,t,r):!1}function UI(e,t){const{nodeExtensions:r}=W1(t),n=r.find(o=>o.name===e);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},s=Jt(st(n,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function $_(e,{checkChildren:t=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((n=e.text)!==null&&n!==void 0?n:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(s=>{i!==!1&&($_(s,{ignoreWhitespace:r,checkChildren:t})||(i=!1))}),i}return!1}function oPe(e,t,r){var n;const{selection:i}=t;let s=null;if(PU(i)&&(s=i.$cursor),s){const a=(n=e.storedMarks)!==null&&n!==void 0?n:s.marks();return!!r.isInSet(a)||!a.some(l=>l.type.excludes(r))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(r):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,h,d)=>{if(u)return!1;if(c.isInline){const f=!d||d.type.allowsMarkType(r),p=!!r.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(r));u=f&&p}return!u}),u})}const aPe=(e,t={})=>({tr:r,state:n,dispatch:i})=>{const{selection:s}=r,{empty:o,ranges:a}=s,l=lu(e,n.schema);if(i)if(o){const u=k_(n,l);r.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{const c=u.$from.pos,h=u.$to.pos;n.doc.nodesBetween(c,h,(d,f)=>{const p=Math.max(f,c),m=Math.min(f+d.nodeSize,h);d.marks.find(b=>b.type===l)?d.marks.forEach(b=>{l===b.type&&r.addMark(p,m,l.create({...b.attrs,...t}))}):r.addMark(p,m,l.create(t))})});return oPe(n,r,l)},lPe=(e,t)=>({tr:r})=>(r.setMeta(e,t),!0),uPe=(e,t={})=>({state:r,dispatch:n,chain:i})=>{const s=An(e,r.schema);return s.isTextblock?i().command(({commands:o})=>RI(s,t)(r)?!0:o.clearNodes()).command(({state:o})=>RI(s,t)(o,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},cPe=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,i=Ou(e,0,n.content.size),s=gt.create(n,i);t.setSelection(s)}return!0},hPe=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,o=It.atStart(n).from,a=It.atEnd(n).to,l=Ou(i,o,a),u=Ou(s,o,a),c=It.create(n,l,u);t.setSelection(c)}return!0},dPe=e=>({state:t,dispatch:r})=>{const n=An(e,t.schema);return V3e(n)(t,r)};function WI(e,t){const r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(r){const n=r.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(n)}}const fPe=({keepMarks:e=!0}={})=>({tr:t,state:r,dispatch:n,editor:i})=>{const{selection:s,doc:o}=t,{$from:a,$to:l}=s,u=i.extensionManager.attributes,c=av(u,a.node().type.name,a.node().attrs);if(s instanceof gt&&s.node.isBlock)return!a.parentOffset||!Jh(o,a.pos)?!1:(n&&(e&&WI(r,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,d=a.depth===0?void 0:ZLe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=h&&d?[{type:d,attrs:c}]:void 0,p=Jh(t.doc,t.mapping.map(a.pos),1,f);if(!f&&!p&&Jh(t.doc,t.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(p=!0,f=d?[{type:d,attrs:c}]:void 0),n){if(p&&(s instanceof It&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,f),d&&!h&&!a.parentOffset&&a.parent.type!==d)){const m=t.mapping.map(a.before()),y=t.doc.resolve(m);a.node(-1).canReplaceWith(y.index(),y.index()+1,d)&&t.setNodeMarkup(t.mapping.map(a.before()),d)}e&&WI(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return p},pPe=(e,t={})=>({tr:r,state:n,dispatch:i,editor:s})=>{var o;const a=An(e,n.schema),{$from:l,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const h=l.node(-1);if(h.type!==a)return!1;const d=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let b=Oe.empty;const v=l.index(-1)?1:l.index(-2)?2:3;for(let $=l.depth-v;$>=l.depth-3;$-=1)b=Oe.from(l.node($).copy(b));const E=l.indexAfter(-1){if(A>-1)return!1;$.isTextblock&&$.content.size===0&&(A=O+1)}),A>-1&&r.setSelection(It.near(r.doc.resolve(A))),r.scrollIntoView()}return!0}const f=u.pos===l.end()?h.contentMatchAt(0).defaultType:null,p={...av(d,h.type.name,h.attrs),...t},m={...av(d,l.node().type.name,l.node().attrs),...t};r.delete(l.pos,u.pos);const y=f?[{type:a,attrs:p},{type:f,attrs:m}]:[{type:a,attrs:p}];if(!Jh(r.doc,l.pos,2))return!1;if(i){const{selection:b,storedMarks:v}=n,{splittableMarks:E}=s.extensionManager,D=v||b.$to.parentOffset&&b.$from.marks();if(r.split(l.pos,2,y).scrollIntoView(),!D||!i)return!0;const C=D.filter(w=>E.includes(w.type.name));r.ensureMarks(C)}return!0},wD=(e,t)=>{const r=__(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Bc(e.doc,r.pos)&&e.join(r.pos),!0},SD=(e,t)=>{const r=__(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Bc(e.doc,n)&&e.join(n),!0},gPe=(e,t,r,n={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:h,splittableMarks:d}=i.extensionManager,f=An(e,o.schema),p=An(t,o.schema),{selection:m,storedMarks:y}=o,{$from:b,$to:v}=m,E=b.blockRange(v),D=y||m.$to.parentOffset&&m.$from.marks();if(!E)return!1;const C=__(w=>UI(w.type.name,h))(m);if(E.depth>=1&&C&&E.depth-C.depth<=1){if(C.node.type===f)return u.liftListItem(p);if(UI(C.node.type.name,h)&&f.validContent(C.node.content)&&a)return l().command(()=>(s.setNodeMarkup(C.pos,f),!0)).command(()=>wD(s,f)).command(()=>SD(s,f)).run()}return!r||!D||!a?l().command(()=>c().wrapInList(f,n)?!0:u.clearNodes()).wrapInList(f,n).command(()=>wD(s,f)).command(()=>SD(s,f)).run():l().command(()=>{const w=c().wrapInList(f,n),A=D.filter($=>d.includes($.type.name));return s.ensureMarks(A),w?!0:u.clearNodes()}).wrapInList(f,n).command(()=>wD(s,f)).command(()=>SD(s,f)).run()},mPe=(e,t={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:s=!1}=r,o=lu(e,n.schema);return OA(n,o,t)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,t)},yPe=(e,t,r={})=>({state:n,commands:i})=>{const s=An(e,n.schema),o=An(t,n.schema),a=Ng(n,s,r);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...r})},vPe=(e,t={})=>({state:r,commands:n})=>{const i=An(e,r.schema);return Ng(r,i,t)?n.lift(i):n.wrapIn(i,t)},bPe=()=>({state:e,dispatch:t})=>{const r=e.plugins;for(let n=0;n=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,e.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},xPe=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,{empty:n,ranges:i}=r;return n||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},wPe=(e,t={})=>({tr:r,state:n,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=t,{selection:a}=r,l=lu(e,n.schema),{$from:u,empty:c,ranges:h}=a;if(!i)return!0;if(c&&o){let{from:d,to:f}=a;const p=(s=u.marks().find(y=>y.type===l))===null||s===void 0?void 0:s.attrs,m=A_(u,l,p);m&&(d=m.from,f=m.to),r.removeMark(d,f,l)}else h.forEach(d=>{r.removeMark(d.$from.pos,d.$to.pos,l)});return r.removeStoredMark(l),!0},SPe=(e,t={})=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=G1(typeof e=="string"?e:e.name,n.schema);return a?(a==="node"&&(s=An(e,n.schema)),a==="mark"&&(o=lu(e,n.schema)),i&&r.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;n.doc.nodesBetween(u,c,(h,d)=>{s&&s===h.type&&r.setNodeMarkup(d,void 0,{...h.attrs,...t}),o&&h.marks.length&&h.marks.forEach(f=>{if(o===f.type){const p=Math.max(d,u),m=Math.min(d+h.nodeSize,c);r.addMark(p,m,o.create({...f.attrs,...t}))}})})}),!0):!1},DPe=(e,t={})=>({state:r,dispatch:n})=>{const i=An(e,r.schema);return B3e(i,t)(r,n)},EPe=(e,t={})=>({state:r,dispatch:n})=>{const i=An(e,r.schema);return j3e(i,t)(r,n)};var CPe=Object.freeze({__proto__:null,blur:uLe,clearContent:cLe,clearNodes:hLe,command:dLe,createParagraphNear:fLe,cut:pLe,deleteCurrentNode:gLe,deleteNode:mLe,deleteRange:yLe,deleteSelection:vLe,enter:bLe,exitCode:xLe,extendMarkRange:SLe,first:DLe,focus:ELe,forEach:CLe,insertContent:ALe,insertContentAt:_Le,joinBackward:PLe,joinDown:LLe,joinForward:FLe,joinItemBackward:OLe,joinItemForward:NLe,joinTextblockBackward:MLe,joinTextblockForward:ILe,joinUp:$Le,keyboardShortcut:BLe,lift:jLe,liftEmptyBlock:zLe,liftListItem:HLe,newlineInCode:ULe,resetAttributes:WLe,scrollIntoView:VLe,selectAll:GLe,selectNodeBackward:qLe,selectNodeForward:KLe,selectParentNode:JLe,selectTextblockEnd:XLe,selectTextblockStart:YLe,setContent:QLe,setMark:aPe,setMeta:lPe,setNode:uPe,setNodeSelection:cPe,setTextSelection:hPe,sinkListItem:dPe,splitBlock:fPe,splitListItem:pPe,toggleList:gPe,toggleMark:mPe,toggleNode:yPe,toggleWrap:vPe,undoInputRule:bPe,unsetAllMarks:xPe,unsetMark:wPe,updateAttributes:SPe,wrapIn:DPe,wrapInList:EPe});const APe=fo.create({name:"commands",addCommands(){return{...CPe}}}),TPe=fo.create({name:"drop",addProseMirrorPlugins(){return[new Go({key:new jc("tiptapDrop"),props:{handleDrop:(e,t,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:r,moved:n})}}})]}}),kPe=fo.create({name:"editable",addProseMirrorPlugins(){return[new Go({key:new jc("editable"),props:{editable:()=>this.editor.options.editable}})]}}),_Pe=fo.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Go({key:new jc("focusEvents"),props:{handleDOMEvents:{focus:(t,r)=>{e.isFocused=!0;const n=e.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1},blur:(t,r)=>{e.isFocused=!1;const n=e.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1}}}})]}}),$Pe=fo.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:h}=l,{pos:d,parent:f}=h,p=h.parent.isTextblock&&d>0?a.doc.resolve(d-1):h,m=p.parent.type.spec.isolating,y=h.pos-h.parentOffset,b=m&&p.parent.childCount===1?y===h.pos:Ht.atStart(u).from===d;return!c||!f.type.isTextblock||f.textContent.length||!b||b&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},s={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return T_()||NU()?s:i},addProseMirrorPlugins(){return[new Go({key:new jc("clearDocument"),appendTransaction:(e,t,r)=>{const n=e.some(m=>m.docChanged)&&!t.doc.eq(r.doc),i=e.some(m=>m.getMeta("preventClearDocument"));if(!n||i)return;const{empty:s,from:o,to:a}=t.selection,l=Ht.atStart(t.doc).from,u=Ht.atEnd(t.doc).to;if(s||!(o===l&&a===u)||!$_(r.doc))return;const d=r.tr,f=H1({state:r,transaction:d}),{commands:p}=new U1({editor:this.editor,state:f});if(p.clearNodes(),!!d.steps.length)return d}})]}}),LPe=fo.create({name:"paste",addProseMirrorPlugins(){return[new Go({key:new jc("tiptapPaste"),props:{handlePaste:(e,t,r)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:r})}}})]}}),PPe=fo.create({name:"tabindex",addProseMirrorPlugins(){return[new Go({key:new jc("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Cu{get name(){return this.node.type.name}constructor(t,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=r,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(t);return new Cu(r,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Cu(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Cu(t,this.editor)}get children(){const t=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,s=r.isAtom&&!r.isText,o=this.pos+n+(s?0:1),a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new Cu(a,this.editor,i,i?r:null);i&&(l.actualDepth=this.depth+1),t.push(new Cu(a,this.editor,i,i?r:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===t)if(Object.keys(r).length>0){const s=i.node.attrs,o=Object.keys(r);for(let a=0;a{n&&i.length>0||(o.node.type.name===t&&s.every(l=>r[l]===o.node.attrs[l])&&i.push(o),!(n&&i.length>0)&&(i=i.concat(o.querySelectorAll(t,r,n))))}),i}setAttribute(t){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(r)}}const FPe=`.ProseMirror { +More info: https://craft.js.org/r/docs/api/editor#props`;function _M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ys(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:500;if(t.length!==0||r.length!==0){if(this.timeline.length&&this.pointer>=0){var i=this.timeline[this.pointer],s=i.patches,o=i.inversePatches,a=i.timestamp;if(new Date().getTime()-a=0){var n=this.timeline[this.pointer],i=n.inversePatches;this.timeline[this.pointer]={timestamp:n.timestamp,patches:[].concat(yi(n.patches),yi(t)),inversePatches:[].concat(yi(r),yi(i))}}else this.add(t,r)}},{key:"clear",value:function(){this.timeline=[],this.pointer=-1}},{key:"canUndo",value:function(){return this.pointer>=0}},{key:"canRedo",value:function(){return this.pointer-1)return this.subscribers.splice(r,1)}}},{key:"notify",value:function(){this.subscribers.forEach(function(t){return t.collect()})}}]),e}(),u2e=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];hf(this,e),yn(this,"collected",void 0),yn(this,"collector",void 0),yn(this,"onChange",void 0),yn(this,"id",void 0),this.collector=t,this.onChange=r,n&&this.collect()}return df(e,[{key:"collect",value:function(){try{var t=this.collector();Gke(t,this.collected)||(this.collected=t,this.onChange&&this.onChange(this.collected))}catch(r){console.warn(r)}}}]),e}(),Ag=function(e){var t=e.getBoundingClientRect(),r=t.x,n=t.y,i=t.top,s=t.left,o=t.bottom,a=t.right,l=t.width,u=t.height,c=window.getComputedStyle(e),h={left:parseInt(c.marginLeft),right:parseInt(c.marginRight),bottom:parseInt(c.marginBottom),top:parseInt(c.marginTop)},d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight),bottom:parseInt(c.paddingBottom),top:parseInt(c.paddingTop)};return{x:r,y:n,top:i,left:s,bottom:o,right:a,width:l,height:u,outerWidth:Math.round(l+h.left+h.right),outerHeight:Math.round(u+h.top+h.bottom),margin:h,padding:d,inFlow:e.parentElement&&!!function(f){var p=getComputedStyle(f);if(!(c.overflow&&c.overflow!=="visible"||p.float!=="none"||p.display==="grid"||p.display==="flex"&&p["flex-direction"]!=="column")){switch(c.position){case"static":case"relative":break;default:return}switch(e.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(c.display){case"block":case"list-item":case"table":case"flex":case"grid":return!0}}}(e.parentElement)}};function c2e(e,t){const{subscribe:r,getState:n,actions:i,query:s}=e,o=z.useRef(!0),a=z.useRef(null),l=z.useRef(t);l.current=t;const u=z.useCallback(d=>({...d,actions:i,query:s}),[i,s]);o.current&&t&&(a.current=t(n(),s),o.current=!1);const[c,h]=z.useState(u(a.current));return z.useEffect(()=>{let d;return l.current&&(d=r(f=>l.current(f,s),f=>{h(u(f))})),()=>{d&&d()}},[u,s,r]),c}var Sd,X9=function(){return Jke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:10)},h2e=function(){function e(){hf(this,e),yn(this,"isEnabled",!0),yn(this,"elementIdMap",new WeakMap),yn(this,"registry",new Map)}return df(e,[{key:"getElementId",value:function(t){var r=this.elementIdMap.get(t);if(r)return r;var n=X9();return this.elementIdMap.set(t,n),n}},{key:"getConnectorId",value:function(t,r){var n=this.getElementId(t);return"".concat(r,"--").concat(n)}},{key:"register",value:function(t,r){var n=this,i=this.getByElement(t,r.name);if(i){if(Kke(r.required,i.required))return i;this.getByElement(t,r.name).disable()}var s=null,o=this.getConnectorId(t,r.name);return this.registry.set(o,{id:o,required:r.required,enable:function(){s&&s(),s=r.connector(t,r.required,r.options)},disable:function(){s&&s()},remove:function(){return n.remove(o)}}),this.isEnabled&&this.registry.get(o).enable(),this.registry.get(o)}},{key:"get",value:function(t){return this.registry.get(t)}},{key:"remove",value:function(t){var r=this.get(t);r&&(r.disable(),this.registry.delete(r.id))}},{key:"enable",value:function(){this.isEnabled=!0,this.registry.forEach(function(t){t.enable()})}},{key:"disable",value:function(){this.isEnabled=!1,this.registry.forEach(function(t){t.disable()})}},{key:"getByElement",value:function(t,r){return this.get(this.getConnectorId(t,r))}},{key:"removeByElement",value:function(t,r){return this.remove(this.getConnectorId(t,r))}},{key:"clear",value:function(){this.disable(),this.elementIdMap=new WeakMap,this.registry=new Map}}]),e}();(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(Sd||(Sd={}));var Y9=function(){function e(t){hf(this,e),yn(this,"options",void 0),yn(this,"registry",new h2e),yn(this,"subscribers",new Set),this.options=t}return df(e,[{key:"listen",value:function(t){var r=this;return this.subscribers.add(t),function(){return r.subscribers.delete(t)}}},{key:"disable",value:function(){this.onDisable&&this.onDisable(),this.registry.disable(),this.subscribers.forEach(function(t){t(Sd.HandlerDisabled)})}},{key:"enable",value:function(){this.onEnable&&this.onEnable(),this.registry.enable(),this.subscribers.forEach(function(t){t(Sd.HandlerEnabled)})}},{key:"cleanup",value:function(){this.disable(),this.subscribers.clear(),this.registry.clear()}},{key:"addCraftEventListener",value:function(t,r,n,i){var s=function(o){(function(a,l,u){a.craft||(a.craft={stopPropagation:function(){},blockedEvents:{}});for(var c=a.craft&&a.craft.blockedEvents[l]||[],h=0;h1?c-1:0),d=1;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,o=Xh(t);if(r){var a=Xh(this).constructor;s=Reflect.construct(o,arguments,a)}else s=o.apply(this,arguments);return function(l,u){if(u&&(typeof u=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nD(l)}(this,s)});function i(s,o){var a;return hf(this,i),yn(nD(a=n.call(this,o)),"derived",void 0),yn(nD(a),"unsubscribeParentHandlerListener",void 0),a.derived=s,a.options=o,a.unsubscribeParentHandlerListener=a.derived.listen(function(l){switch(l){case Sd.HandlerEnabled:return a.enable();case Sd.HandlerDisabled:return a.disable();default:return}}),a}return df(i,[{key:"inherit",value:function(s){return this.createProxyHandlers(this.derived,s)}},{key:"cleanup",value:function(){oT(Xh(i.prototype),"cleanup",this).call(this),this.unsubscribeParentHandlerListener()}}]),i}();function LM(e,t){t&&(typeof e=="function"?e(t):e.current=t)}function f2e(e,t){const r=e.ref;return Er(typeof r!="string"),z.cloneElement(e,r?{ref:n=>{LM(r,n),LM(t,n)}}:{ref:t})}function p2e(e){return(t=null,...r)=>{if(!z.isValidElement(t)){if(!t)return;const i=t;return i&&e(i,...r),i}const n=t;return function(i){if(typeof i.type!="string")throw new Error}(n),f2e(n,e)}}function Q9(e){return Object.keys(e).reduce((t,r)=>(t[r]=p2e((...n)=>e[r](...n)),t),{})}const g2e=({style:e,className:t,parentDom:r})=>{const n=gt.createElement("div",{className:t,style:{position:"fixed",display:"block",opacity:1,borderStyle:"solid",borderWidth:"1px",borderColor:"transparent",zIndex:99999,...e}});return r&&r.ownerDocument!==document?IA.createPortal(n,r.ownerDocument.body):n};var Ul=function(e,t){var r="Deprecation warning: ".concat(e," will be deprecated in future relases."),n=t.suggest,i=t.doc;n&&(r+=" Please use ".concat(n," instead.")),i&&(r+="(".concat(i,")")),console.warn(r)},Z9=function(){return typeof window<"u"},m2e=function(){return Z9()&&/Linux/i.test(window.navigator.userAgent)},y2e=function(){return Z9()&&/Chrome/i.test(window.navigator.userAgent)},v2e=Rc;(function(){try{var e=v2e(Object,"defineProperty");return e({},"",{}),e}catch{}})();var A0={exports:{}};A0.exports;(function(e,t){var r=Go,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var h=u.length,d=a?a(h):new u.constructor(h);return u.copy(d),d}e.exports=l})(A0,A0.exports);A0.exports;var PM=C1,FM=PM?PM.prototype:void 0;FM&&FM.valueOf;var OM=a_;OM&&OM.isMap;var IM=a_;IM&&IM.isSet;typeof window<"u"&&(window.__CRAFTJS__||(window.__CRAFTJS__={}),window.__CRAFTJS__["@craftjs/core"]="0.2.11");const eH=gt.createContext(null),tH=({id:e,related:t=!1,children:r})=>gt.createElement(eH.Provider,{value:{id:e,related:t}},r);function MM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t=0||(c[l]=o[l]);return c}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function cp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=k0(e);if(t){var i=k0(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(s,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cp(s)}(this,r)}}function rH(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,a,l,u=[],c=!0,h=!1;try{if(a=(i=i.call(r)).next,n!==0)for(;!(c=(s=a.call(i)).done)&&(u.push(s.value),u.length!==n);c=!0);}catch(d){h=!0,o=d}finally{try{if(!c&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(h)throw o}}return u}}(e,t)||nH(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kg(e){return function(t){if(Array.isArray(t))return cT(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||nH(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function nH(e,t){if(e){if(typeof e=="string")return cT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cT(e,t):void 0}}function cT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{const{connectors:{connect:t,drag:r}}=qo();return typeof e.type=="string"?t(r(gt.cloneElement(e))):e},D2e=()=>{const{type:e,props:t,nodes:r,hydrationTimestamp:n}=P1(i=>({type:i.data.type,props:i.data.props,nodes:i.data.nodes,hydrationTimestamp:i._hydrationTimestamp}));return z.useMemo(()=>{let i=t.children;r&&r.length>0&&(i=gt.createElement(gt.Fragment,null,r.map(o=>gt.createElement(f_,{id:o,key:o}))));const s=gt.createElement(e,t,i);return typeof e=="string"?gt.createElement(S2e,{render:s}):s},[e,t,n,r])},E2e=({render:e})=>{const{hidden:t}=P1(n=>({hidden:n.data.hidden})),{onRender:r}=Bc(n=>({onRender:n.options.onRender}));return t?null:gt.createElement(r,{render:e||gt.createElement(D2e,null)})},f_=({id:e,render:t})=>gt.createElement(tH,{id:e},gt.createElement(E2e,{render:t})),hT={is:"div",canvas:!1,custom:{},hidden:!1},C2e={is:"type",canvas:"isCanvas"};function ff({id:e,children:t,...r}){const{is:n}={...hT,...r},{query:i,actions:s}=Bc(),{id:o,inNodeContext:a}=P1(),[l]=z.useState(()=>{Er(!!e);const u=i.node(o).get();if(a){const c=u.data.linkedNodes[e]?i.node(u.data.linkedNodes[e]).get():null;if(c&&c.data.type===n)return c.id;const h=gt.createElement(ff,r,t),d=i.parseReactElement(h).toNodeTree();return s.history.ignore().addLinkedNodeFromTree(d,o,e),d.rootNodeId}return null});return l?gt.createElement(f_,{id:l}):null}const aH=()=>Ul("",{suggest:""});function dT({...e}){return z.useEffect(()=>aH(),[]),gt.createElement(ff,{...e,canvas:!0})}const T2e=()=>{const{timestamp:e}=Bc(t=>({timestamp:t.nodes[ma]&&t.nodes[ma]._hydrationTimestamp}));return e?gt.createElement(f_,{id:ma,key:e}):null},A2e=({children:e,json:t,data:r})=>{const{actions:n,query:i}=Bc();t&&Ul("",{suggest:""});const s=z.useRef(!1);if(!s.current){const o=r||t;if(o)n.history.ignore().deserialize(o);else if(e){const a=gt.Children.only(e),l=i.parseReactElement(a).toNodeTree((u,c)=>(c===a&&(u.id=ma),u));n.history.ignore().addNodeTree(l)}s.current=!0}return gt.createElement(T2e,null)};var NM;(function(e){e[e.Any=0]="Any",e[e.Id=1]="Id",e[e.Obj=2]="Obj"})(NM||(NM={}));const iD=e=>{const{addLinkedNodeFromTree:t,setDOM:r,setNodeEvent:n,replaceNodes:i,reset:s,...o}=e;return o};function ai(e){const{connectors:t,actions:r,query:n,store:i,...s}=Bc(e),o=iD(r);return{connectors:t,actions:z.useMemo(()=>({...o,history:{...o.history,ignore:(...a)=>iD(o.history.ignore(...a)),throttle:(...a)=>iD(o.history.throttle(...a))}}),[o]),query:n,store:i,...s}}var lH=function(e){return Object.fromEntries?Object.fromEntries(e):e.reduce(function(t,r){var n=rH(r,2),i=n[0],s=n[1];return Pr(Pr({},t),{},fn({},i,s))},{})},la=function(e,t,r){var n=Array.isArray(t)?t:[t],i=Pr({existOnly:!1,idOnly:!1},r||{}),s=n.filter(function(o){return!!o}).map(function(o){return typeof o=="string"?{node:e[o],exists:!!e[o]}:lT(o)!=="object"||i.idOnly?{node:null,exists:!1}:{node:o,exists:!!e[o.id]}});return i.existOnly&&Er(s.filter(function(o){return!o.exists}).length===0),s},k2e=["history"],fh=null,_0=function(e,t){if(typeof t=="string")return t;var r,n=function(i,s){var o=function(a){if(fh&&fh.resolver===a)return fh.reversed;fh={resolver:a,reversed:new Map};for(var l=0,u=Object.entries(a);ltypeof e=="string"?e:{resolvedName:_0(t,e)},fT=(e,t)=>{let{type:r,isCanvas:n,props:i}=e;return i=Object.keys(i).reduce((s,o)=>{const a=i[o];return a==null||typeof a=="function"||(s[o]=o==="children"&&typeof a!="string"?z.Children.map(a,l=>typeof l=="string"?l:fT(l,t)):typeof a.type=="function"?fT(a,t):a),s},{}),{type:_2e(r,t),isCanvas:!!n,props:i}},$2e=(e,t)=>{const{type:r,props:n,isCanvas:i,name:s,...o}=e;return{...fT({type:r,isCanvas:i,props:n},t),...o}};function pT(e,t){Er(typeof t=="string");var r=e.nodes[t],n=function(i){return pT(e,i)};return{isCanvas:function(){return!!r.data.isCanvas},isRoot:function(){return r.id===ma},isLinkedNode:function(){return r.data.parent&&n(r.data.parent).linkedNodes().includes(r.id)},isTopLevelNode:function(){return this.isRoot()||this.isLinkedNode()},isDeletable:function(){return!this.isTopLevelNode()},isParentOfTopLevelNodes:function(){return r.data.linkedNodes&&Object.keys(r.data.linkedNodes).length>0},isParentOfTopLevelCanvas:function(){return Ul("query.node(id).isParentOfTopLevelCanvas",{suggest:"query.node(id).isParentOfTopLevelNodes"}),this.isParentOfTopLevelNodes()},isSelected:function(){return e.events.selected.has(t)},isHovered:function(){return e.events.hovered.has(t)},isDragged:function(){return e.events.dragged.has(t)},get:function(){return r},ancestors:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return function s(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=e.nodes[o];return u?(a.push(o),u.data.parent&&(i||!i&&l===0)&&(a=s(u.data.parent,a,l+1)),a):a}(r.data.parent)},descendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=arguments.length>1?arguments[1]:void 0;return function o(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return(i||!i&&u===0)&&e.nodes[a]&&(s!=="childNodes"&&n(a).linkedNodes().forEach(function(c){l.push(c),l=o(c,l,u+1)}),s!=="linkedNodes"&&n(a).childNodes().forEach(function(c){l.push(c),l=o(c,l,u+1)})),l}(t)},linkedNodes:function(){return Object.values(r.data.linkedNodes||{})},childNodes:function(){return r.data.nodes||[]},isDraggable:function(i){try{var s=r;return Er(!this.isTopLevelNode(),kM),Er(pT(e,s.data.parent).isCanvas(),AM),Er(s.rules.canDrag(s,n),n2e),!0}catch(o){return i&&i(o),!1}},isDroppable:function(i,s){var o=la(e.nodes,i),a=r;try{Er(this.isCanvas(),t2e),Er(a.rules.canMoveIn(o.map(function(u){return u.node}),a,n),Zke);var l={};return o.forEach(function(u){var c=u.node,h=u.exists;if(Er(c.rules.canDrop(a,c,n),Qke),h){Er(!n(c.id).isTopLevelNode(),kM);var d=n(c.id).descendants(!0);Er(!d.includes(a.id)&&a.id!==c.id,r2e);var f=c.data.parent&&e.nodes[c.data.parent];Er(f.data.isCanvas,AM),Er(f||!f&&!e.nodes[c.id],Yke),f.id!==a.id&&(l[f.id]||(l[f.id]=[]),l[f.id].push(c))}}),Object.keys(l).forEach(function(u){var c=e.nodes[u];Er(c.rules.canMoveOut(l[u],c,n),e2e)}),!0}catch(u){return s&&s(u),!1}},toSerializedNode:function(){return $2e(r.data,e.options.resolver)},toNodeTree:function(i){var s=[t].concat(kg(this.descendants(!0,i))).reduce(function(o,a){return o[a]=n(a).get(),o},{});return{rootNodeId:t,nodes:s}},decendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return Ul("query.node(id).decendants",{suggest:"query.node(id).descendants"}),this.descendants(i)},isTopLevelCanvas:function(){return!this.isRoot()&&!r.data.parent}}}function uH(e,t,r,n){for(var i={parent:e,index:0,where:"before"},s=0,o=0,a=0,l=0,u=0,c=0,h=0,d=t.length;ho||a&&u>=a||s&&f.left+f.outerWidth{let{type:n,props:i}=e;const s=((a,l)=>typeof a=="object"&&a.resolvedName?a.resolvedName==="Canvas"?dT:l[a.resolvedName]:typeof a=="string"?a:null)(n,t);if(!s)return;i=Object.keys(i).reduce((a,l)=>{const u=i[l];return a[l]=u==null?null:typeof u=="object"&&u.resolvedName?gT(u,t):l==="children"&&Array.isArray(u)?u.map(c=>typeof c=="string"?c:gT(c,t)):u,a},{});const o={...gt.createElement(s,{...i})};return{...o,name:_0(t,o.type)}},L2e=(e,t)=>{const{type:r,props:n,...i}=e;Er(r!==void 0&&typeof r=="string"||r!==void 0&&r.resolvedName!==void 0,i2e.replace("%displayName%",e.displayName).replace("%availableComponents%",Object.keys(t).join(", ")));const{type:s,name:o,props:a}=gT(e,t),{parent:l,custom:u,displayName:c,isCanvas:h,nodes:d,hidden:f}=i;return{type:s,name:o,displayName:c||o,props:a,custom:u||{},isCanvas:!!h,hidden:!!f,parent:l,linkedNodes:i.linkedNodes||i._childCanvas||{},nodes:d||[]}},P2e=(e,t)=>{if(t.length<1)return{[e.id]:e};const r=t.map(({rootNodeId:i})=>i),n={...e,data:{...e.data,nodes:r}};return t.reduce((i,s)=>{const o=s.nodes[s.rootNodeId];return{...i,...s.nodes,[o.id]:{...o,data:{...o.data,parent:e.id}}}},{[e.id]:n})},F2e=(e,t)=>({rootNodeId:e.id,nodes:P2e(e,t)});function cH(e){const t=e&&e.options,r=()=>cH(e);return{getDropPlaceholder:(n,i,s,o=a=>e.nodes[a.id].dom)=>{const a=e.nodes[i],l=r().node(a.id).isCanvas()?a:e.nodes[a.data.parent];if(!l)return;const u=l.data.nodes||[],c=uH(l,u?u.reduce((f,p)=>{const m=o(e.nodes[p]);if(m){const y={id:p,...Ag(m)};f.push(y)}return f},[]):[],s.x,s.y),h=u.length&&e.nodes[u[c.index]],d={placement:{...c,currentNode:h},error:null};return la(e.nodes,n).forEach(({node:f,exists:p})=>{p&&r().node(f.id).isDraggable(m=>d.error=m)}),r().node(l.id).isDroppable(n,f=>d.error=f),d},getOptions:()=>t,getNodes:()=>e.nodes,node:n=>pT(e,n),getSerializedNodes(){const n=Object.keys(e.nodes).map(i=>[i,this.node(i).toSerializedNode()]);return lH(n)},getEvent:n=>function(i,s){var o=i.events[s];return{contains:function(a){return o.has(a)},isEmpty:function(){return this.all().length===0},first:function(){return this.all()[0]},last:function(){var a=this.all();return a[a.length-1]},all:function(){return Array.from(o)},size:function(){return this.all().length},at:function(a){return this.all()[a]},raw:function(){return o}}}(e,n),serialize(){return JSON.stringify(this.getSerializedNodes())},parseReactElement:n=>({toNodeTree(i){let s=function(a,l){let u=a;return typeof u=="string"&&(u=gt.createElement(z.Fragment,{},u)),RM({data:{type:u.type,props:{...u.props}}},c=>{l&&l(c,u)})}(n,(a,l)=>{const u=_0(e.options.resolver,a.data.type);a.data.displayName=a.data.displayName||u,a.data.name=u,i&&i(a,l)}),o=[];return n.props&&n.props.children&&(o=gt.Children.toArray(n.props.children).reduce((a,l)=>(gt.isValidElement(l)&&a.push(r().parseReactElement(l).toNodeTree(i)),a),[])),F2e(s,o)}}),parseSerializedNode:n=>({toNode(i){const s=L2e(n,e.options.resolver);Er(s.type);const o=typeof i=="string"&&i;return o&&Ul("query.parseSerializedNode(...).toNode(id)",{suggest:"query.parseSerializedNode(...).toNode(node => node.id = id)"}),r().parseFreshNode({...o?{id:o}:{},data:s}).toNode(!o&&i)}}),parseFreshNode:n=>({toNode:i=>RM(n,s=>{s.data.parent===U9&&(s.data.parent=ma);const o=_0(e.options.resolver,s.data.type);Er(o!==null),s.data.displayName=s.data.displayName||o,s.data.name=o,i&&i(s)})}),createNode(n,i){Ul(`query.createNode(${n})`,{suggest:`query.parseReactElement(${n}).toNodeTree()`});const s=this.parseReactElement(n).toNodeTree(),o=s.nodes[s.rootNodeId];return i&&(i.id&&(o.id=i.id),i.data&&(o.data={...o.data,...i.data})),o},getState:()=>e}}var O2e=function(e){u_(r,Y9);var t=h_(r);function r(){return $1(this,r),t.apply(this,arguments)}return L1(r,[{key:"handlers",value:function(){return{connect:function(n,i){},select:function(n,i){},hover:function(n,i){},drag:function(n,i){},drop:function(n,i){},create:function(n,i,s){}}}}]),r}();(function(e){u_(r,d2e);var t=h_(r);function r(){return $1(this,r),t.apply(this,arguments)}return L1(r)})();var BM=function(e){e.preventDefault()},mT=function(){function e(t,r){$1(this,e),fn(this,"store",void 0),fn(this,"dragTarget",void 0),fn(this,"currentDropTargetId",void 0),fn(this,"currentDropTargetCanvasAncestorId",void 0),fn(this,"currentIndicator",null),fn(this,"currentTargetId",void 0),fn(this,"currentTargetChildDimensions",void 0),fn(this,"dragError",void 0),fn(this,"draggedNodes",void 0),fn(this,"onScrollListener",void 0),this.store=t,this.dragTarget=r,this.currentDropTargetId=null,this.currentDropTargetCanvasAncestorId=null,this.currentTargetId=null,this.currentTargetChildDimensions=null,this.currentIndicator=null,this.dragError=null,this.draggedNodes=this.getDraggedNodes(),this.validateDraggedNodes(),this.onScrollListener=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollListener,!0),window.addEventListener("dragover",BM,!1)}return L1(e,[{key:"cleanup",value:function(){window.removeEventListener("scroll",this.onScrollListener,!0),window.removeEventListener("dragover",BM,!1)}},{key:"onScroll",value:function(t){var r=t.target,n=this.store.query.node(ma).get();r instanceof Element&&n&&n.dom&&r.contains(n.dom)&&(this.currentTargetChildDimensions=null)}},{key:"getDraggedNodes",value:function(){return la(this.store.query.getNodes(),this.dragTarget.type==="new"?this.dragTarget.tree.nodes[this.dragTarget.tree.rootNodeId]:this.dragTarget.nodes)}},{key:"validateDraggedNodes",value:function(){var t=this;this.dragTarget.type!=="new"&&this.draggedNodes.forEach(function(r){r.exists&&t.store.query.node(r.node.id).isDraggable(function(n){t.dragError=n})})}},{key:"isNearBorders",value:function(t,r,n){return t.top+e.BORDER_OFFSET>n||t.bottom-e.BORDER_OFFSETr||t.right-e.BORDER_OFFSET2&&arguments[2]!==void 0&&arguments[2]){var r=t[0].getBoundingClientRect(),n=r.width,i=r.height,s=t[0].cloneNode(!0);return s.style.position="absolute",s.style.left="-100%",s.style.top="-100%",s.style.width="".concat(n,"px"),s.style.height="".concat(i,"px"),s.style.pointerEvents="none",s.classList.add("drag-shadow"),document.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0),s}var o=document.createElement("div");return o.style.position="absolute",o.style.left="-100%",o.style.top="-100%",o.style.width="100%",o.style.height="100%",o.style.pointerEvents="none",o.classList.add("drag-shadow-container"),t.forEach(function(a){var l=a.getBoundingClientRect(),u=l.width,c=l.height,h=l.top,d=l.left,f=a.cloneNode(!0);f.style.position="absolute",f.style.left="".concat(d,"px"),f.style.top="".concat(h,"px"),f.style.width="".concat(u,"px"),f.style.height="".concat(c,"px"),f.classList.add("drag-shadow"),o.appendChild(f)}),document.body.appendChild(o),e.dataTransfer.setDragImage(o,e.clientX,e.clientY),o},hH=function(e){u_(r,O2e);var t=h_(r);function r(){var n;$1(this,r);for(var i=arguments.length,s=new Array(i),o=0;o1&&i.actions.setNodeEvent("selected",f=[o]),n.currentSelectedElementIds=f});return function(){a(),l()}},hover:function(s,o){var a=n.addCraftEventListener(s,"mouseover",function(u){u.craft.stopPropagation(),i.actions.setNodeEvent("hovered",o)}),l=null;return n.options.removeHoverOnMouseleave&&(l=n.addCraftEventListener(s,"mouseleave",function(u){u.craft.stopPropagation(),i.actions.setNodeEvent("hovered",null)})),function(){a(),l&&l()}},drop:function(s,o){var a=n.addCraftEventListener(s,"dragover",function(u){if(u.craft.stopPropagation(),u.preventDefault(),n.positioner){var c=n.positioner.computeIndicator(o,u.clientX,u.clientY);c&&i.actions.setIndicator(c)}}),l=n.addCraftEventListener(s,"dragenter",function(u){u.craft.stopPropagation(),u.preventDefault()});return function(){l(),a()}},drag:function(s,o){if(!i.query.node(o).isDraggable())return function(){};s.setAttribute("draggable","true");var a=n.addCraftEventListener(s,"dragstart",function(u){u.craft.stopPropagation();var c=i.query,h=i.actions,d=c.getEvent("selected").all(),f=n.options.isMultiSelectEnabled(u);n.currentSelectedElementIds.includes(o)||(d=f?[].concat(kg(d),[o]):[o],i.actions.setNodeEvent("selected",d)),h.setNodeEvent("dragged",d);var p=d.map(function(m){return c.node(m).get().dom});n.draggedElementShadow=jM(u,p,r.forceSingleDragShadow),n.dragTarget={type:"existing",nodes:d},n.positioner=new mT(n.options.store,n.dragTarget)}),l=n.addCraftEventListener(s,"dragend",function(u){u.craft.stopPropagation(),n.dropElement(function(c,h){c.type!=="new"&&i.actions.move(c.nodes,h.placement.parent.id,h.placement.index+(h.placement.where==="after"?1:0))})});return function(){s.setAttribute("draggable","false"),a(),l()}},create:function(s,o,a){s.setAttribute("draggable","true");var l=n.addCraftEventListener(s,"dragstart",function(c){var h;if(c.craft.stopPropagation(),typeof o=="function"){var d=o();h=gt.isValidElement(d)?i.query.parseReactElement(d).toNodeTree():d}else h=i.query.parseReactElement(o).toNodeTree();n.draggedElementShadow=jM(c,[c.currentTarget],r.forceSingleDragShadow),n.dragTarget={type:"new",tree:h},n.positioner=new mT(n.options.store,n.dragTarget)}),u=n.addCraftEventListener(s,"dragend",function(c){c.craft.stopPropagation(),n.dropElement(function(h,d){h.type!=="existing"&&(i.actions.addNodeTree(h.tree,d.placement.parent.id,d.placement.index+(d.placement.where==="after"?1:0)),a&&CDe(a.onCreate)&&a.onCreate(h.tree))})});return function(){s.removeAttribute("draggable"),l(),u()}}}}},{key:"dropElement",value:function(n){var i=this.options.store;if(this.positioner){var s=this.draggedElementShadow,o=this.positioner.getIndicator();this.dragTarget&&o&&!o.error&&n(this.dragTarget,o),s&&(s.parentNode.removeChild(s),this.draggedElementShadow=null),this.dragTarget=null,i.actions.setIndicator(null),i.actions.setNodeEvent("dragged",null),this.positioner.cleanup(),this.positioner=null}}}]),r}();function I2e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:2,i=0,s=0,o=0,a=0,l=e.where;return r?r.inFlow?(o=r.outerWidth,a=n,i=l==="before"?r.top:r.bottom,s=r.left):(o=n,a=r.outerHeight,i=r.top,s=l==="before"?r.left:r.left+r.outerWidth):t&&(i=t.top+t.padding.top,s=t.left+t.padding.left,o=t.outerWidth-t.padding.right-t.padding.left-t.margin.left-t.margin.right,a=n),{top:"".concat(i,"px"),left:"".concat(s,"px"),width:"".concat(o,"px"),height:"".concat(a,"px")}}fn(hH,"forceSingleDragShadow",y2e()&&m2e());const M2e=()=>{const{indicator:e,indicatorOptions:t,enabled:r}=Bc(i=>({indicator:i.indicator,indicatorOptions:i.options.indicator,enabled:i.options.enabled})),n=oH();return z.useEffect(()=>{n&&(r?n.enable():n.disable())},[r,n]),e?gt.createElement(g2e,{className:t.className,style:{...I2e(e.placement,Ag(e.placement.parent.dom),e.placement.currentNode&&Ag(e.placement.currentNode.dom),t.thickness),backgroundColor:e.error?t.error:t.success,transition:t.transition||"0.2s ease-in",...t.style??{}},parentDom:e.placement.parent.dom}):null},N2e=({children:e})=>{const t=z.useContext(d_),r=z.useMemo(()=>t.query.getOptions().handlers(t),[t]);return r?gt.createElement(sH.Provider,{value:r},gt.createElement(M2e,null),e):null},zM={nodes:{},events:{dragged:new Set,selected:new Set,hovered:new Set},indicator:null,options:{onNodesChange:()=>null,onRender:({render:e})=>e,onBeforeMoveEnd:()=>null,resolver:{},enabled:!0,indicator:{error:"red",success:"rgb(98, 196, 98)"},handlers:e=>new hH({store:e,removeHoverOnMouseleave:!1,isMultiSelectEnabled:t=>!!t.metaKey}),normalizeNodes:()=>{}}},R2e={methods:function(e,t){return Pr(Pr({},function(r,n){var i=function(a,l,u){if(function d(f,p){var m=a.nodes[f];typeof m.data.type!="string"&&Er(r.options.resolver[m.data.name],W9.replace("%node_type%","".concat(m.data.type.name))),r.nodes[f]=Pr(Pr({},m),{},{data:Pr(Pr({},m.data),{},{parent:p})}),m.data.nodes.length>0&&(delete r.nodes[f].data.props.children,m.data.nodes.forEach(function(y){return d(y,m.id)})),Object.values(m.data.linkedNodes).forEach(function(y){return d(y,m.id)})}(a.rootNodeId,l),l||a.rootNodeId!==ma){var c=s(l);if(u.type!=="child")c.data.linkedNodes[u.id]=a.rootNodeId;else{var h=u.index;h!=null?c.data.nodes.splice(h,0,a.rootNodeId):c.data.nodes.push(a.rootNodeId)}}},s=function(a){Er(a);var l=r.nodes[a];return Er(l),l},o=function a(l){var u=r.nodes[l],c=r.nodes[u.data.parent];if(u.data.nodes&&kg(u.data.nodes).forEach(function(f){return a(f)}),u.data.linkedNodes&&Object.values(u.data.linkedNodes).map(function(f){return a(f)}),c.data.nodes.includes(l)){var h=c.data.nodes;h.splice(h.indexOf(l),1)}else{var d=Object.keys(c.data.linkedNodes).find(function(f){return c.data.linkedNodes[f]===f});d&&delete c.data.linkedNodes[d]}(function(f,p){Object.keys(f.events).forEach(function(m){var y=f.events[m];y&&y.has&&y.has(p)&&(f.events[m]=new Set(Array.from(y).filter(function(b){return p!==b})))})})(r,l),delete r.nodes[l]};return{addLinkedNodeFromTree:function(a,l,u){var c=s(l).data.linkedNodes[u];c&&o(c),i(a,l,{type:"linked",id:u})},add:function(a,l,u){var c=[a];Array.isArray(a)&&(Ul("actions.add(node: Node[])",{suggest:"actions.add(node: Node)"}),c=a),c.forEach(function(h){i({nodes:fn({},h.id,h),rootNodeId:h.id},l,{type:"child",index:u})})},addNodeTree:function(a,l,u){i(a,l,{type:"child",index:u})},delete:function(a){la(r.nodes,a,{existOnly:!0,idOnly:!0}).forEach(function(l){var u=l.node;Er(!n.node(u.id).isTopLevelNode()),o(u.id)})},deserialize:function(a){var l=typeof a=="string"?JSON.parse(a):a,u=Object.keys(l).map(function(c){var h=c;return c===U9&&(h=ma),[h,n.parseSerializedNode(l[c]).toNode(function(d){return d.id=h})]});this.replaceNodes(lH(u))},move:function(a,l,u){var c=la(r.nodes,a,{existOnly:!0}),h=r.nodes[l],d=new Set;c.forEach(function(f,p){var m=f.node,y=m.id,b=m.data.parent;n.node(l).isDroppable([y],function(D){throw new Error(D)}),r.options.onBeforeMoveEnd(m,h,r.nodes[b]);var v=r.nodes[b].data.nodes;d.add(v);var E=v.indexOf(y);v[E]="$$",h.data.nodes.splice(u+p,0,y),r.nodes[y].data.parent=l}),d.forEach(function(f){var p=f.length;kg(f).reverse().forEach(function(m,y){m==="$$"&&f.splice(p-1-y,1)})})},replaceNodes:function(a){this.clearEvents(),r.nodes=a},clearEvents:function(){this.setNodeEvent("selected",null),this.setNodeEvent("hovered",null),this.setNodeEvent("dragged",null),this.setIndicator(null)},reset:function(){this.clearEvents(),this.replaceNodes({})},setOptions:function(a){a(r.options)},setNodeEvent:function(a,l){if(r.events[a].forEach(function(h){r.nodes[h]&&(r.nodes[h].events[a]=!1)}),r.events[a]=new Set,l){var u=la(r.nodes,l,{idOnly:!0,existOnly:!0}),c=new Set(u.map(function(h){return h.node.id}));c.forEach(function(h){r.nodes[h].events[a]=!0}),r.events[a]=c}},setCustom:function(a,l){la(r.nodes,a,{idOnly:!0,existOnly:!0}).forEach(function(u){return l(r.nodes[u.node.id].data.custom)})},setDOM:function(a,l){r.nodes[a]&&(r.nodes[a].dom=l)},setIndicator:function(a){a&&(!a.placement.parent.dom||a.placement.currentNode&&!a.placement.currentNode.dom)||(r.indicator=a)},setHidden:function(a,l){r.nodes[a].data.hidden=l},setProp:function(a,l){la(r.nodes,a,{idOnly:!0,existOnly:!0}).forEach(function(u){return l(r.nodes[u.node.id].data.props)})},selectNode:function(a){if(a){var l=la(r.nodes,a,{idOnly:!0,existOnly:!0});this.setNodeEvent("selected",l.map(function(u){return u.node.id}))}else this.setNodeEvent("selected",null);this.setNodeEvent("hovered",null)}}}(e,t)),{},{setState:function(r){var n=c_(this,k2e);r(e,n)}})},ignoreHistoryForActions:["setDOM","setNodeEvent","selectNode","clearEvents","setOptions","setIndicator"],normalizeHistory:e=>{Object.keys(e.events).forEach(t=>{Array.from(e.events[t]||[]).forEach(r=>{e.nodes[r]||e.events[t].delete(r)})}),Object.keys(e.nodes).forEach(t=>{const r=e.nodes[t];Object.keys(r.events).forEach(n=>{r.events[n]&&e.events[n]&&!e.events[n].has(r.id)&&(r.events[n]=!1)})})}},B2e=(e,t)=>a2e(R2e,{...zM,options:{...zM.options,...e}},cH,t),j2e=({children:e,...t})=>{t.resolver!==void 0&&Er(typeof t.resolver=="object"&&!Array.isArray(t.resolver)&&t.resolver!==null);const r=z.useRef(t),n=B2e(r.current,(i,s,o,a,l)=>{if(!o)return;const{patches:u,...c}=o;for(let h=0;h2&&d[0]==="nodes"&&d[2]==="data";if([Gr.IGNORE,Gr.THROTTLE].includes(c.type)&&c.params&&(c.type=c.params[0]),["setState","deserialize"].includes(c.type)||f){l(p=>{i.options.normalizeNodes&&i.options.normalizeNodes(p,s,c,a)});break}}});return z.useEffect(()=>{n&&t.enabled!==void 0&&n.query.getOptions().enabled!==t.enabled&&n.actions.setOptions(i=>{i.enabled=t.enabled})},[n,t.enabled]),z.useEffect(()=>{n.subscribe(i=>({json:n.query.serialize()}),()=>{n.query.getOptions().onNodesChange(n.query)})},[n]),n?gt.createElement(d_.Provider,{value:n},gt.createElement(N2e,null,e)):null},z2e=({className:e,onIconPick:t,selectedIcon:r})=>{const{t:n}=er(),[i,s]=z.useState(!1),[o,a]=z.useState("");return j.jsxs(j.Fragment,{children:[j.jsxs(Dt,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectIcon"),j.jsx(vs,{placement:"left",children:n("playgroundSelectIcon")})]}),j.jsx(Pd,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},drawerHeader:j.jsxs("div",{className:"flex gap-fix-3xl",children:[j.jsx("span",{className:"my-auto",children:n("playgroundSelectIcon")}),j.jsx(Kr,{type:"search",variant:"floating",label:n("search"),value:o,onChange:l=>a(l.target.value)})]}),className:"select-icon-dialog",children:j.jsx("div",{className:"grid-cols-3 md:grid-cols-6 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:["none",...kJ].filter(l=>l.includes(o)).map(l=>j.jsx("button",{className:l==="none"?"h-full":"h-fit",onClick:()=>t(l),children:j.jsxs(Bi,{"data-interactive":"elevation",className:`items-center ${l==="none"?" h-full":""}${l===r?" db-successful-bg-basic-level-3":""}`,spacing:"small",children:[l!=="none"&&j.jsx(Fd,{icon:l}),j.jsx("span",{className:"break-all m-auto",children:l})]})},`icon-button-${l}`))})})]})};function Fn(e){this.content=e}Fn.prototype={constructor:Fn,find:function(e){for(var t=0;t>1}};Fn.from=function(e){if(e instanceof Fn)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new Fn(t)};function dH(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let i=e.child(n),s=t.child(n);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)r++;return r}if(i.content.size||s.content.size){let o=dH(i.content,s.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function fH(e,t,r,n){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:r,b:n};let o=e.child(--i),a=t.child(--s),l=o.nodeSize;if(o==a){r-=l,n-=l;continue}if(!o.sameMarkup(a))return{a:r,b:n};if(o.isText&&o.text!=a.text){let u=0,c=Math.min(o.text.length,a.text.length);for(;ut&&n(l,i+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,r-c),n,i+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,i){let s="",o=!0;return this.nodesBetween(t,r,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,r-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&n&&(o?o=!1:s+=n),s+=u},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,i=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),s=1);st)for(let s=0,o=0;ot&&((or)&&(a.isText?a=a.cut(Math.max(0,t-o),Math.min(a.text.length,r-o)):a=a.cut(Math.max(0,t-o-1),Math.min(a.content.size,r-o-1))),n.push(a),i+=a.nodeSize),o=l}return new Oe(n,i)}cutByIndex(t,r){return t==r?Oe.empty:t==0&&r==this.content.length?this:new Oe(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let i=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return i[t]=r,new Oe(i,s)}addToStart(t){return new Oe([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Oe(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t||r>0?wy(n+1,o):wy(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return Oe.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Oe.empty;let r,n=0;for(let i=0;ithis.type.rank&&(r||(r=t.slice(0,i)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-i.type.rank),r}};Sr.none=[];class L0 extends Error{}class Je{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=gH(this.content,t+this.openStart,r);return n&&new Je(n,this.openStart,this.openEnd)}removeBetween(t,r){return new Je(pH(this.content,t+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,r){if(!r)return Je.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Je(Oe.fromJSON(t,r.content),n,i)}static maxOpen(t,r=!0){let n=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=t.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)i++;return new Je(t,n,i)}}Je.empty=new Je(Oe.empty,0,0);function pH(e,t,r){let{index:n,offset:i}=e.findIndex(t),s=e.maybeChild(n),{index:o,offset:a}=e.findIndex(r);if(i==t||s.isText){if(a!=r&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(n,s.copy(pH(s.content,t-i-1,r-i-1)))}function gH(e,t,r,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return e.cut(0,t).append(r).append(e.cut(t));let a=gH(o.content,t-s-1,r);return a&&e.replaceChild(i,o.copy(a))}function H2e(e,t,r){if(r.openStart>e.depth)throw new L0("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new L0("Inconsistent open depths");return mH(e,t,r,0)}function mH(e,t,r,n){let i=e.index(n),s=e.node(n);if(i==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function jp(e,t,r,n){let i=(t||e).node(r),s=0,o=t?t.index(r):i.childCount;e&&(s=e.index(r),e.depth>r?s++:e.textOffset&&(Vu(e.nodeAfter,n),s++));for(let a=s;ai&&vT(e,t,i+1),o=n.depth>i&&vT(r,n,i+1),a=[];return jp(null,e,i,a),s&&o&&t.index(i)==r.index(i)?(yH(s,o),Vu(Gu(s,vH(e,t,r,n,i+1)),a)):(s&&Vu(Gu(s,P0(e,t,i+1)),a),jp(t,r,i,a),o&&Vu(Gu(o,P0(r,n,i+1)),a)),jp(n,null,i,a),new Oe(a)}function P0(e,t,r){let n=[];if(jp(null,e,r,n),e.depth>r){let i=vT(e,t,r+1);Vu(Gu(i,P0(e,t,r+1)),n)}return jp(t,null,r,n),new Oe(n)}function U2e(e,t){let r=t.depth-e.openStart,i=t.node(r).copy(e.content);for(let s=r-1;s>=0;s--)i=t.node(s).copy(Oe.from(i));return{start:i.resolveNoCache(e.openStart+r),end:i.resolveNoCache(i.content.size-e.openEnd-r)}}class _g{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=t.child(r);return n?t.child(r).cut(n):i}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let s=0;s0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new F0(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,s=r;for(let o=t;;){let{index:a,offset:l}=o.content.findIndex(s),u=s-l;if(n.push(o,a,i+l),!u||(o=o.child(a),o.isText))break;s=u-1,i+=l+1}return new _g(r,n,s)}static resolveCached(t,r){let n=HM.get(t);if(n)for(let s=0;st&&this.nodesBetween(t,r,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),bH(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=Oe.empty,i=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,i,s),a=o&&o.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=i;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let i=Oe.fromJSON(t,r.content),s=t.nodeType(r.type).create(r.attrs,i,n);return s.type.checkAttrs(s.attrs),s}};qu.prototype.text=void 0;class O0 extends qu{constructor(t,r,n,i){if(super(t,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bH(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new O0(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new O0(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function bH(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class gc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new q2e(t,r);if(n.next==null)return gc.empty;let i=xH(n);n.next&&n.err("Unexpected trailing text");let s=e_e(Z2e(i));return t_e(s,n),s}matchType(t){for(let r=0;ru.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+t.indexOf(n.next[o].next);return s}).join(` +`)}}gc.empty=new gc(!0);class q2e{constructor(t,r){this.string=t,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function xH(e){let t=[];do t.push(K2e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function K2e(e){let t=[];do t.push(J2e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function J2e(e){let t=Q2e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=X2e(e,t);else break;return t}function UM(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function X2e(e,t){let r=UM(e),n=r;return e.eat(",")&&(e.next!="}"?n=UM(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function Y2e(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let i=[];for(let s in r){let o=r[s];o.groups.indexOf(t)>-1&&i.push(o)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function Q2e(e){if(e.eat("(")){let t=xH(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=Y2e(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Z2e(e){let t=[[]];return i(s(e,0),r()),t;function r(){return t.push([])-1}function n(o,a,l){let u={term:l,to:a};return t[o].push(u),u}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(s(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=s(o.exprs[l],a);if(l==o.exprs.length-1)return u;i(u,a=r())}else if(o.type=="star"){let l=r();return n(a,l),i(s(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=r();return i(s(o.expr,a),l),i(s(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u{e[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=t[n.join(",")]=new gc(n.indexOf(e.length-1)>-1);for(let o=0;o-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[s]=new TH(s,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function r_e(e,t,r){let n=r.split("|");return i=>{let s=i===null?"null":typeof i;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${t} on type ${e}, got ${s}`)}}class n_e{constructor(t,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?r_e(t,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class F1{constructor(t,r,n,i){this.name=t,this.rank=r,this.schema=n,this.spec=i,this.attrs=CH(t,i.attrs),this.excluded=null;let s=SH(this.attrs);this.instance=s?new Sr(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Sr(this,DH(this.attrs,t))}static compile(t,r){let n=Object.create(null),i=0;return t.forEach((s,o)=>n[s]=new F1(s,i++,r,o)),n}removeFromSet(t){for(var r=0;r-1}}class AH{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in t)r[i]=t[i];r.nodes=Fn.from(t.nodes),r.marks=Fn.from(t.marks||{}),this.nodes=VM.compile(this.spec.nodes,this),this.marks=F1.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=gc.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?GM(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:GM(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,r=null,n,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof VM){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(r,n,i)}text(t,r){let n=this.nodes.text;return new O0(n,n.defaultAttrs,t,Sr.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return qu.fromJSON(this,t)}markFromJSON(t){return Sr.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}}function GM(e,t){let r=[];for(let n=0;n-1)&&r.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}function i_e(e){return e.tag!=null}function s_e(e){return e.style!=null}class Tl{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(i_e(i))this.tags.push(i);else if(s_e(i)){let s=/[^=]*/.exec(i.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=t.nodes[i.node];return s.contentMatch.matchType(s)})}parse(t,r={}){let n=new KM(this,r,!1);return n.addAll(t,Sr.none,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new KM(this,r,!0);return n.addAll(t,Sr.none,r.from,r.to),Je.maxOpen(n.finish())}matchTag(t,r,n){for(let i=n?this.tags.indexOf(n)+1:0;it.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=r))){if(o.getAttrs){let l=o.getAttrs(r);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(t){let r=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=JM(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=JM(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Tl(t,Tl.schemaRules(t)))}}const kH={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},o_e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_H={ol:!0,ul:!0},I0=1,M0=2,zp=4;function qM(e,t,r){return t!=null?(t?I0:0)|(t==="full"?M0:0):e&&e.whitespace=="pre"?I0|M0:r&~zp}class Sy{constructor(t,r,n,i,s,o){this.type=t,this.attrs=r,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=Sr.none,this.match=s||(o&zp?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(Oe.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(t.type))?(this.match=n,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&I0)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let r=Oe.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(Oe.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!kH.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class KM{constructor(t,r,n){this.parser=t,this.options=r,this.isOpen=n,this.open=0;let i=r.topNode,s,o=qM(null,r.preserveWhitespace,0)|(n?zp:0);i?s=new Sy(i.type,i.attrs,Sr.none,!0,r.topMatch||i.type.contentMatch,o):n?s=new Sy(null,null,Sr.none,!0,null,o):s=new Sy(t.schema.topNodeType,null,Sr.none,!0,null,o),this.nodes=[s],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,r){t.nodeType==3?this.addTextNode(t,r):t.nodeType==1&&this.addElement(t,r)}addTextNode(t,r){let n=t.nodeValue,i=this.top;if(i.options&M0||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i.options&I0)i.options&M0?n=n.replace(/\r\n?/g,` +`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],o=t.previousSibling;(!s||o&&o.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),r),this.findInText(t)}else this.findInside(t)}addElement(t,r,n){let i=t.nodeName.toLowerCase(),s;_H.hasOwnProperty(i)&&this.parser.normalizeLists&&a_e(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,n));if(o?o.ignore:o_e.hasOwnProperty(i))this.findInside(t),this.ignoreFallback(t,r);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,l=this.top,u=this.needsBlock;if(kH.hasOwnProperty(i))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),a=!0,l.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,r);return}let c=o&&o.skip?r:this.readStyles(t,r);c&&this.addAll(t,c),a&&this.sync(l),this.needsBlock=u}else{let a=this.readStyles(t,r);a&&this.addElementByRule(t,o,a,o.consuming===!1?s:void 0)}}leafFallback(t,r){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` +`),r)}ignoreFallback(t,r){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r)}readStyles(t,r){let n=t.style;if(n&&n.length)for(let i=0;i!l.clearMark(u)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return r}addElementByRule(t,r,n,i){let s,o;if(r.node)if(o=this.parser.schema.nodes[r.node],o.isLeaf)this.insertNode(o.create(r.attrs),n)||this.leafFallback(t,n);else{let l=this.enter(o,r.attrs||null,n,r.preserveWhitespace);l&&(s=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,n,i);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,n));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l,n)}s&&this.sync(a)&&this.open--}addAll(t,r,n,i){let s=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=i==null?null:t.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(o,r);this.findAtPoint(t,s)}findPlace(t,r){let n,i;for(let s=this.open;s>=0;s--){let o=this.nodes[s],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,i=o,!a.length)||o.solid)break}if(!n)return null;this.sync(i);for(let s=0;s(o.type?o.type.allowsMarkType(u.type):XM(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Sy(t,r,l,i,null,a)),this.open++,n}closeExtra(t=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)t+=n[i].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let u=r[a];if(u==""){if(a==r.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function a_e(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&_H.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function l_e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function JM(e){let t={};for(let r in e)t[r]=e[r];return t}function XM(e,t){let r=t.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(e))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(t,r,n={}){let i=this.marks[t.type.name];return i&&iv(oD(n),i(t,r),null,t.attrs)}static renderSpec(t,r,n=null,i){return iv(t,r,n,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new jc(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=YM(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return YM(t.marks)}}function YM(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function oD(e){return e.document||window.document}const QM=new WeakMap;function u_e(e){let t=QM.get(e);return t===void 0&&QM.set(e,t=c_e(e)),t}function c_e(e){let t=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")t||(t=[]),t.push(n);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,l=r?e.createElementNS(r,i):e.createElement(i),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let h in u)if(u[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),u[h]):l.setAttribute(h,u[h])}}for(let h=c;hc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=iv(e,d,r,n);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const $H=65535,LH=Math.pow(2,16);function h_e(e,t){return e+t*LH}function ZM(e){return e&$H}function d_e(e){return(e-(e&$H))/LH}const PH=1,FH=2,sv=4,OH=8;class xT{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&OH)>0}get deletedBefore(){return(this.delInfo&(PH|sv))>0}get deletedAfter(){return(this.delInfo&(FH|sv))>0}get deletedAcross(){return(this.delInfo&sv)>0}}class Zi{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&Zi.empty)return Zi.empty}recover(t){let r=0,n=ZM(t);if(!this.inverted)for(let i=0;it)break;let u=this.ranges[a+s],c=this.ranges[a+o],h=l+u;if(t<=h){let d=u?t==l?-1:t==h?1:r:r,f=l+i+(d<0?0:c);if(n)return f;let p=t==(r<0?l:h)?null:h_e(a/3,t-l),m=t==l?FH:t==h?PH:sv;return(r<0?t!=l:t!=h)&&(m|=OH),new xT(f,m,p)}i+=c-u}return n?t+i:new xT(t+i,0,null)}touches(t,r){let n=0,i=ZM(r),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+s],c=l+u;if(t<=c&&a==i*3)return!0;n+=this.ranges[a+o]-u}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;r--){let i=t.getMirror(r);this.appendMap(t.maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let t=new Hp;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ns&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return an.fromReplace(t,this.from,this.to,s)}invert(){return new $o(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new pl(r.pos,n.pos,this.mark)}merge(t){return t instanceof pl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new pl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new pl(r.from,r.to,t.markFromJSON(r.mark))}}li.jsonID("addMark",pl);class $o extends li{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new Je(p_(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),r.openStart,r.openEnd);return an.fromReplace(t,this.from,this.to,n)}invert(){return new pl(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new $o(r.pos,n.pos,this.mark)}merge(t){return t instanceof $o&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new $o(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $o(r.from,r.to,t.markFromJSON(r.mark))}}li.jsonID("removeMark",$o);class gl extends li{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return an.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return an.fromReplace(t,this.pos,this.pos+1,new Je(Oe.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;in.pos?null:new kn(r.pos,n.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new kn(r.from,r.to,r.gapFrom,r.gapTo,Je.fromJSON(t,r.slice),r.insert,!!r.structure)}}li.jsonID("replaceAround",kn);function wT(e,t,r){let n=e.resolve(t),i=r-t,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function f_e(e,t,r,n){let i=[],s=[],o,a;e.doc.nodesBetween(t,r,(l,u,c)=>{if(!l.isInline)return;let h=l.marks;if(!n.isInSet(h)&&c.type.allowsMarkType(n.type)){let d=Math.max(u,t),f=Math.min(u+l.nodeSize,r),p=n.addToSet(h);for(let m=0;me.step(l)),s.forEach(l=>e.step(l))}function p_e(e,t,r,n){let i=[],s=0;e.doc.nodesBetween(t,r,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(n instanceof F1){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,r);for(let c=0;ce.step(new $o(o.from,o.to,o.style)))}function IH(e,t,r,n=r.contentMatch,i=!0){let s=e.doc.nodeAt(t),o=[],a=t+1;for(let l=0;l=0;l--)e.step(o[l])}function g_e(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function pf(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let i=e.$from.node(n),s=e.$from.index(n),o=e.$to.indexAfter(n);if(nr;p--)m||n.index(p)>0?(m=!0,c=Oe.from(n.node(p).copy(c)),h++):l--;let d=Oe.empty,f=0;for(let p=s,m=!1;p>r;p--)m||i.after(p+1)=0;o--){if(n.size){let a=r[o].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=Oe.from(r[o].type.create(r[o].attrs,n))}let i=t.start,s=t.end;e.step(new kn(i,s,i,s,new Je(n,0,0),r.length,!0))}function x_e(e,t,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,r,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&D_e(e.doc,e.mapping.slice(s).map(a),n)){let u=null;if(n.schema.linebreakReplacement){let f=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);f&&!p?u=!1:!f&&p&&(u=!0)}u===!1&&S_e(e,o,a,s),IH(e,e.mapping.slice(s).map(a,1),n,void 0,u===null);let c=e.mapping.slice(s),h=c.map(a,1),d=c.map(a+o.nodeSize,1);return e.step(new kn(h,d,h+1,d-1,new Je(Oe.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&w_e(e,o,a,s),!1}})}function w_e(e,t,r,n){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=e.mapping.slice(n).map(r+1+s+o.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function S_e(e,t,r,n){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=e.mapping.slice(n).map(r+1+s);e.replaceWith(o,o+1,t.type.schema.text(` +`))}})}function D_e(e,t,r){let n=e.resolve(t),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function E_e(e,t,r,n,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let o=r.create(n,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,o);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new kn(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new Je(Oe.from(o),0,0),1,!0))}function Yh(e,t,r=1,n){let i=e.resolve(t),s=i.depth-r,o=n&&n[n.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=r-2;u>s;u--,c--){let h=i.node(u),d=i.index(u);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(d,h.childCount),p=n&&n[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=n&&n[c]||h;if(!h.canReplace(d+1,h.childCount)||!m.type.validContent(f))return!1}let a=i.indexAfter(s),l=n&&n[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function C_e(e,t,r=1,n){let i=e.doc.resolve(t),s=Oe.empty,o=Oe.empty;for(let a=i.depth,l=i.depth-r,u=r-1;a>l;a--,u--){s=Oe.from(i.node(a).copy(s));let c=n&&n[u];o=Oe.from(c?c.type.create(c.attrs,o):i.node(a).copy(o))}e.step(new En(t,t,new Je(s.append(o),r,r),!0))}function zc(e,t){let r=e.resolve(t),n=r.index();return NH(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function NH(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function O1(e,t,r=-1){let n=e.resolve(t);for(let i=n.depth;;i--){let s,o,a=n.index(i);if(i==n.depth?(s=n.nodeBefore,o=n.nodeAfter):r>0?(s=n.node(i+1),a++,o=n.node(i).maybeChild(a)):(s=n.node(i).maybeChild(a-1),o=n.node(i+1)),s&&!s.isTextblock&&NH(s,o)&&n.node(i).canReplace(a,a+1))return t;if(i==0)break;t=r<0?n.before(i):n.after(i)}}function T_e(e,t,r){let n=new En(t-r,t+r,Je.empty,!0);e.step(n)}function A_e(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let s=n.index(i);if(n.node(i).canReplaceWith(s,s,r))return n.before(i+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let s=n.indexAfter(i);if(n.node(i).canReplaceWith(s,s,r))return n.after(i+1);if(s=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),u=n.node(o),c=!1;if(s==1)c=u.canReplace(l,l,i);else{let h=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=h&&u.canReplaceWith(l,l,h[0])}if(c)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function I1(e,t,r=t,n=Je.empty){if(t==r&&!n.size)return null;let i=e.resolve(t),s=e.resolve(r);return RH(i,s,n)?new En(t,r,n):new __e(i,s,n).fit()}function RH(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class __e{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=Oe.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Oe.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new Je(s,o,a);return t>-1?new kn(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new En(n.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),s.type.spec.isolating&&i<=n){t=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let i,s=null;n?(s=lD(this.unplaced.content,n-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,h=null;if(r==1&&(o?u.matchType(o.type)||(h=u.fillBefore(Oe.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:h};if(r==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=lD(t,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Je(t,r+1,Math.max(n,i.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=lD(t,r);if(i.childCount<=1&&r>0){let s=t.size-r<=r+i.size;this.unplaced=new Je(hp(t,r-1,1),r-1,s?r-1:n)}else this.unplaced=new Je(hp(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:i,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let m=0;m1||l==0||m.content.size)&&(h=y,c.push(BH(m.mark(d.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?f:-1)))}let p=u==a.childCount;p||(f=-1),this.placed=dp(this.placed,r,Oe.from(c)),this.frontier[r].match=h,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=a;m1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],s=r=0;a--){let{match:l,type:u}=this.frontier[a],c=uD(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:r,fit:o,move:s?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=dp(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let i=t.node(n),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(n));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=dp(this.placed,this.depth,Oe.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(Oe.empty,!0);r.childCount&&(this.placed=dp(this.placed,this.frontier.length,r))}}function hp(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(hp(e.firstChild.content,t-1,r)))}function dp(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(dp(e.lastChild.content,t-1,r)))}function lD(e,t){for(let r=0;r1&&(n=n.replaceChild(0,BH(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(Oe.empty,!0)))),e.copy(n)}function uD(e,t,r,n,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!r.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!$_e(r,s.content,o)?a:null}function $_e(e,t,r){for(let n=r;n0;d--,f--){let p=i.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(d)>-1?a=d:i.before(d)==f&&o.splice(1,0,-d)}let l=o.indexOf(a),u=[],c=n.openStart;for(let d=n.content,f=0;;f++){let p=d.firstChild;if(u.push(p),f==n.openStart)break;d=p.content}for(let d=c-1;d>=0;d--){let f=u[d],p=L_e(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))c=d;else if(p||!f.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let f=(d+c+1)%(n.openStart+1),p=u[f];if(p)for(let m=0;m=0&&(e.replace(t,r,n),!(e.steps.length>h));d--){let f=o[d];f<0||(t=i.before(f),r=s.after(f))}}function jH(e,t,r,n,i){if(tn){let s=i.contentMatchAt(0),o=s.fillBefore(e).append(e);e=o.append(s.matchFragment(o).fillBefore(Oe.empty,!0))}return e}function F_e(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let i=A_e(e.doc,t,n.type);i!=null&&(t=r=i)}e.replaceRange(t,r,new Je(Oe.from(n),0,0))}function O_e(e,t,r){let n=e.doc.resolve(t),i=e.doc.resolve(r),s=zH(n,i);for(let o=0;o0&&(l||n.node(a-1).canReplace(n.index(a-1),i.indexAfter(a-1))))return e.delete(n.before(a),i.after(a))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o)return e.delete(n.before(o),r);e.delete(t,r)}function zH(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let i=n;i>=0;i--){let s=e.start(i);if(st.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&r.push(i)}return r}class Qh extends li{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return an.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return an.fromReplace(t,this.pos,this.pos+1,new Je(Oe.from(i),0,r.isLeaf?0:1))}getMap(){return Zi.empty}invert(t){return new Qh(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new Qh(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Qh(r.pos,r.attr,r.value)}}li.jsonID("attr",Qh);class $g extends li{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return an.ok(n)}getMap(){return Zi.empty}invert(t){return new $g(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new $g(r.attr,r.value)}}li.jsonID("docAttr",$g);let Ed=class extends Error{};Ed=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};Ed.prototype=Object.create(Error.prototype);Ed.prototype.constructor=Ed;Ed.prototype.name="TransformError";class I_e{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Hp}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new Ed(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=Je.empty){let i=I1(this.doc,t,r,n);return i&&this.step(i),this}replaceWith(t,r,n){return this.replace(t,r,new Je(Oe.from(n),0,0))}delete(t,r){return this.replace(t,r,Je.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return P_e(this,t,r,n),this}replaceRangeWith(t,r,n){return F_e(this,t,r,n),this}deleteRange(t,r){return O_e(this,t,r),this}lift(t,r){return m_e(this,t,r),this}join(t,r=1){return T_e(this,t,r),this}wrap(t,r){return b_e(this,t,r),this}setBlockType(t,r=t,n,i=null){return x_e(this,t,r,n,i),this}setNodeMarkup(t,r,n=null,i){return E_e(this,t,r,n,i),this}setNodeAttribute(t,r,n){return this.step(new Qh(t,r,n)),this}setDocAttribute(t,r){return this.step(new $g(t,r)),this}addNodeMark(t,r){return this.step(new gl(t,r)),this}removeNodeMark(t,r){if(!(r instanceof Sr)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new Dd(t,r)),this}split(t,r=1,n){return C_e(this,t,r,n),this}addMark(t,r,n){return f_e(this,t,r,n),this}removeMark(t,r,n){return p_e(this,t,r,n),this}clearIncompatible(t,r,n){return IH(this,t,r,n),this}}const cD=Object.create(null);class Vt{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new M_e(t.min(r),t.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let r=0;r=0;s--){let o=r<0?xh(t.node(0),t.node(s),t.before(s+1),t.index(s),r,n):xh(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,r,n);if(o)return o}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new ao(t.node(0))}static atStart(t){return xh(t,t,0,0,1)||new ao(t)}static atEnd(t){return xh(t,t,t.content.size,t.childCount,-1)||new ao(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=cD[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in cD)throw new RangeError("Duplicate use of selection JSON ID "+t);return cD[t]=r,r.prototype.jsonID=t,r}getBookmark(){return Bt.between(this.$anchor,this.$head).getBookmark()}}Vt.prototype.visible=!0;class M_e{constructor(t,r){this.$from=t,this.$to=r}}let tN=!1;function rN(e){!tN&&!e.parent.inlineContent&&(tN=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Bt extends Vt{constructor(t,r=t){rN(t),rN(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return Vt.near(n);let i=t.resolve(r.map(this.anchor));return new Bt(i.parent.inlineContent?i:n,n)}replace(t,r=Je.empty){if(super.replace(t,r),r==Je.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof Bt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new M1(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Bt(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let i=t.resolve(r);return new this(i,n==r?i:t.resolve(n))}static between(t,r,n){let i=t.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let s=Vt.findFrom(r,n,!0)||Vt.findFrom(r,-n,!0);if(s)r=s.$head;else return Vt.near(r,n)}return t.parent.inlineContent||(i==0?t=r:(t=(Vt.findFrom(t,-n,!0)||Vt.findFrom(t,n,!0)).$anchor,t.pos0?0:1);i>0?o=0;o+=i){let a=t.child(o);if(a.isAtom){if(!s&&mt.isSelectable(a))return mt.create(e,r-(i<0?a.nodeSize:0))}else{let l=xh(e,a,r+i,i<0?a.childCount:0,i,s);if(l)return l}r+=a.nodeSize*i}return null}function nN(e,t,r){let n=e.steps.length-1;if(n{o==null&&(o=c)}),e.setSelection(Vt.near(e.doc.resolve(o),r))}const iN=1,Dy=2,sN=4;class R_e extends I_e{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Dy,this}ensureMarks(t){return Sr.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Dy)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~Dy,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Sr.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let i=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(r);s=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(t,s)),this.selection.empty||this.setSelection(Vt.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=sN,this}get scrolledIntoView(){return(this.updated&sN)>0}}function oN(e,t){return!t||!e?e:e.bind(t)}class fp{constructor(t,r,n){this.name=t,this.init=oN(r.init,n),this.apply=oN(r.apply,n)}}const B_e=[new fp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new fp("selection",{init(e,t){return e.selection||Vt.atStart(t.doc)},apply(e){return e.selection}}),new fp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new fp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class hD{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=B_e.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new fp(n.key,n.spec.state,n))})}}class jh{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[n],s=i.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(i,this[i.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new hD(t.schema,t.plugins),s=new jh(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=qu.fromJSON(t.schema,r.doc);else if(o.name=="selection")s.selection=Vt.fromJSON(s.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){s[o.name]=u.fromJSON.call(l,t,r[a],s);return}}s[o.name]=o.init(t,s)}}),s}}function HH(e,t,r){for(let n in e){let i=e[n];i instanceof Function?i=i.bind(t):n=="handleDOMEvents"&&(i=HH(i,t,{})),r[n]=i}return r}class Ko{constructor(t){this.spec=t,this.props={},t.props&&HH(t.props,this,this.props),this.key=t.key?t.key.key:UH("plugin")}getState(t){return t[this.key]}}const dD=Object.create(null);function UH(e){return e in dD?e+"$"+ ++dD[e]:(dD[e]=0,e+"$")}class Hc{constructor(t="key"){this.key=UH(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const On=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Lg=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let ST=null;const ia=function(e,t,r){let n=ST||(ST=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},j_e=function(){ST=null},mc=function(e,t,r,n){return r&&(aN(e,t,r,n,-1)||aN(e,t,r,n,1))},z_e=/^(img|br|input|textarea|hr)$/i;function aN(e,t,r,n,i){for(;;){if(e==r&&t==n)return!0;if(t==(i<0?0:xs(e))){let s=e.parentNode;if(!s||s.nodeType!=1||am(e)||z_e.test(e.nodeName)||e.contentEditable=="false")return!1;t=On(e)+(i<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?xs(e):0}else return!1}}function xs(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function H_e(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=xs(e)}else if(e.parentNode&&!am(e))t=On(e),e=e.parentNode;else return null}}function U_e(e,t){for(;;){if(e.nodeType==3&&t2),ps=Cd||(jo?/Mac/.test(jo.platform):!1),q_e=jo?/Win/.test(jo.platform):!1,Qs=/Android \d/.test(uu),lm=!!lN&&"webkitFontSmoothing"in lN.documentElement.style,K_e=lm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function J_e(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ta(e,t){return typeof e=="number"?e:e[t]}function X_e(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function uN(e,t,r){let n=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let o=r||e.dom;o;o=Lg(o)){if(o.nodeType!=1)continue;let a=o,l=a==s.body,u=l?J_e(s):X_e(a),c=0,h=0;if(t.topu.bottom-ta(n,"bottom")&&(h=t.bottom-t.top>u.bottom-u.top?t.top+ta(i,"top")-u.top:t.bottom-u.bottom+ta(i,"bottom")),t.leftu.right-ta(n,"right")&&(c=t.right-u.right+ta(i,"right")),c||h)if(l)s.defaultView.scrollBy(c,h);else{let d=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),c&&(a.scrollLeft+=c);let p=a.scrollLeft-d,m=a.scrollTop-f;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function Y_e(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,i;for(let s=(t.left+t.right)/2,o=r+1;o=r-20){n=a,i=l.top;break}}return{refDOM:n,refTop:i,stack:GH(e.dom)}}function GH(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=Lg(n));return t}function Q_e({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;qH(r,n==0?0:n-t)}function qH(e,t){for(let r=0;r=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let m=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!r&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=h+1)}}return!r&&l&&(r=l,i=u,n=0),r&&r.nodeType==3?e$e(r,i):!r||n&&r.nodeType==1?{node:e,offset:s}:KH(r,i)}function e$e(e,t){let r=e.nodeValue.length,n=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function m_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function t$e(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(n,i,s)}function n$e(e,t,r,n){let i=-1;for(let s=t,o=!1;s!=e.dom;){let a=e.docView.nearestDesc(s,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!o&&l.left>n.left||l.top>n.top?i=a.posBefore:(!o&&l.right-1?i:e.docView.posFromDOM(t,r,-1)}function JH(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&i++}let u;lm&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(a=n$e(e,n,i,t))}a==null&&(a=r$e(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function cN(e){return e.top=0&&i==n.nodeValue.length?(l--,c=1):r<0?l--:u++,qf(Za(ia(n,l,u),c),c<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(r<0||i==xs(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return fD(l.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(r<0||i==xs(n))){let l=n.childNodes[i-1],u=l.nodeType==3?ia(l,xs(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return qf(Za(u,1),!1)}if(s==null&&i=0)}function qf(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function fD(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function YH(e,t,r){let n=e.state,i=e.root.activeElement;n!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),i!=e.dom&&i&&i.focus()}}function o$e(e,t,r){let n=t.selection,i=r=="up"?n.$from:n.$to;return YH(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=XH(e,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=ia(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(r=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const a$e=/[\u0590-\u08ac]/;function l$e(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,s=!i,o=i==n.parent.content.size,a=e.domSelection();return a?!a$e.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?s:o:YH(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:h}=e.domSelectionRange(),d=a.caretBidiLevel;a.modify("move",r,"character");let f=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:p,focusOffset:m}=e.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==m;try{a.collapse(c,h),l&&(l!=c||u!=h)&&a.extend&&a.extend(l,u)}catch{}return d!=null&&(a.caretBidiLevel=d),y}):n.pos==n.start()||n.pos==n.end()}let hN=null,dN=null,fN=!1;function u$e(e,t,r){return hN==t&&dN==r?fN:(hN=t,dN=r,fN=r=="up"||r=="down"?o$e(e,t,r):l$e(e,t,r))}const Es=0,pN=1,Ou=2,zo=3;class um{constructor(t,r,n,i){this.parent=t,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=Es,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rOn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&r==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!r||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))n=!1;else return s}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||o instanceof ZH){i=t-s;break}s=a}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof QH&&s.side>=0;n--);if(r<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&r&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?On(s.dom)+1:0}}else{let s,o=!0;for(;s=n=c&&r<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,c);t=o;for(let h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=On(d.dom)+1;break}t-=d.size}i==-1&&(i=0)}if(i>-1&&(u>r||a==this.children.length-1)){r=u;for(let c=a+1;cf&&or){let f=a;a=l,l=f}let d=document.createRange();d.setEnd(l.node,l.offset),d.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(d)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,i=0;i=n:tn){let a=n+s.border,l=o-s.border;if(t>=a&&r<=l){this.dirty=t==n||r==o?Ou:pN,t==a&&r==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=zo:s.markDirty(t-a,r-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Ou:zo}n=o}this.dirty=Ou}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?Ou:pN;r.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=r,this.widget=r,s=this}matchesWidget(t){return this.dirty==Es&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class c$e extends um{constructor(t,r,n,i){super(t,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class yc extends um{constructor(t,r,n,i){super(t,[],n,i),this.mark=r}static create(t,r,n,i){let s=i.nodeViews[r.type.name],o=s&&s(r,i,n);return(!o||!o.dom)&&(o=jc.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new yc(t,r,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&zo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=zo&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=Es){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(s=AT(s,0,t,n));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),c=u&&u.dom,h=u&&u.contentDOM;if(r.isText){if(!c)c=document.createTextNode(r.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:h}=jc.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!h&&!r.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),r.type.spec.draggable&&(c.draggable=!0));let d=c;return c=rU(c,n,r),u?l=new h$e(t,r,n,i,c,h||null,d,u,s,o+1):r.isText?new R1(t,r,n,i,c,d,s):new kl(t,r,n,i,c,h||null,d,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Oe.empty)}return t}matchesNode(t,r,n){return this.dirty==Es&&t.eq(this.node)&&N0(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,i=r,s=t.composing?this.localCompositionInfo(t,r):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new f$e(this,o&&o.node,t);m$e(this.node,this.innerDeco,(u,c,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,n,t):u.type.side>=0&&!h&&l.syncToMarks(c==this.node.childCount?Sr.none:this.node.child(c).marks,n,t),l.placeWidget(u,t,i)},(u,c,h,d)=>{l.syncToMarks(u.marks,n,t);let f;l.findNodeMatch(u,c,h,d)||a&&t.state.selection.from>i&&t.state.selection.to-1&&l.updateNodeAt(u,c,h,f,t)||l.updateNextNode(u,c,h,t,d,i)||l.addNode(u,c,h,t,i),i+=u.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ou)&&(o&&this.protectLocalComposition(t,o),eU(this.contentDOM,this.children,t),Cd&&y$e(this.dom))}localCompositionInfo(t,r){let{from:n,to:i}=t.state.selection;if(!(t.state.selection instanceof Bt)||nr+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=v$e(this.node.content,o,n-r,i-r);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new c$e(this,s,r,i);t.input.compositionNodes.push(o),this.children=AT(this.children,n,n+i.length,t,o)}update(t,r,n,i){return this.dirty==zo||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,i),!0)}updateInner(t,r,n,i){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Es}updateOuterDeco(t){if(N0(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=tU(this.dom,this.nodeDOM,TT(this.outerDeco,this.node,r),TT(t,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function gN(e,t,r,n,i){rU(n,t,e);let s=new kl(void 0,e,t,r,n,n,n,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class R1 extends kl{constructor(t,r,n,i,s,o,a){super(t,r,n,i,s,null,o,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,i){return this.dirty==zo||this.dirty!=Es&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=Es||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Es,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let i=this.node.cut(t,r),s=document.createTextNode(i.text);return new R1(this.parent,i,this.outerDeco,this.innerDeco,s,s,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=zo)}get domAtom(){return!1}isText(t){return this.node.text==t}}class ZH extends um{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Es&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class h$e extends kl{constructor(t,r,n,i,s,o,a,l,u,c){super(t,r,n,i,s,o,a,u,c),this.spec=l}update(t,r,n,i){if(this.dirty==zo)return!1;if(this.spec.update){let s=this.spec.update(t,r,n);return s&&this.updateInner(t,r,n,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,i){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function eU(e,t,r){let n=e.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,t.length);for(;i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=yc.create(this.top,t[s],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(t,r,n,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,r,n))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let u=r.children[n-1];if(u instanceof yc)r=u,n=u.children.length;else{a=u,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function g$e(e,t){return e.type.side-t.type.side}function m$e(e,t,r,n){let i=t.locals(e),s=0;if(i.length==0){for(let u=0;us;)a.push(i[o++]);let p=s+d.nodeSize;if(d.isText){let y=p;o!y.inline):a.slice();n(d,m,t.forChild(s,d),f),s=p}}function y$e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function v$e(e,t,r,n){for(let i=0,s=0;i=r){if(s>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let u=a=0&&u+t.length+a>=r)return a+u;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return-1}function AT(e,t,r,n,i){let s=[];for(let o=0,a=0;o=r||c<=t?s.push(l):(ur&&s.push(l.slice(r-u,l.size,n)))}return s}function y_(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let i=e.docView.nearestDesc(r.focusNode),s=i&&i.size==0,o=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let a=n.resolve(o),l,u;if(N1(r)){for(l=o;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&&mt.isSelectable(h)&&i.parent&&!(h.isInline&&W_e(r.focusNode,r.focusOffset,i.dom))){let d=i.posBefore;u=new mt(o==d?a:n.resolve(d))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let h=o,d=o;for(let f=0;f{(r.anchorNode!=n||r.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!nU(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function x$e(e){let t=e.domSelection(),r=document.createRange();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?r.setStart(n.parentNode,On(n)+1):r.setStart(n,0),r.collapse(!0),t.removeAllRanges(),t.addRange(r),!i&&!e.state.selection.visible&&Vi&&Al<=11&&(n.disabled=!0,n.disabled=!1)}function iU(e,t){if(t instanceof mt){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(xN(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else xN(e)}function xN(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function v_(e,t,r,n){return e.someProp("createSelectionBetween",i=>i(e,t,r))||Bt.between(t,r,n)}function wN(e){return e.editable&&!e.hasFocus()?!1:sU(e)}function sU(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function w$e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return mc(t.node,t.offset,r.anchorNode,r.anchorOffset)}function kT(e,t){let{$anchor:r,$head:n}=e.selection,i=t>0?r.max(n):r.min(n),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&Vt.findFrom(s,t)}function nl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function SN(e,t,r){let n=e.state.selection;if(n instanceof Bt)if(r.indexOf("s")>-1){let{$head:i}=n,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return nl(e,new Bt(n.$anchor,o))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=kT(e.state,t);return i&&i instanceof mt?nl(e,i):!1}else if(!(ps&&r.indexOf("m")>-1)){let i=n.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=e.docView.descAt(a))&&!o.contentDOM?mt.isSelectable(s)?nl(e,new mt(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):lm?nl(e,new Bt(e.state.doc.resolve(t<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof mt&&n.node.isInline)return nl(e,new Bt(t>0?n.$to:n.$from));{let i=kT(e.state,t);return i?nl(e,i):!1}}}function R0(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Wp(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function gh(e,t){return t<0?S$e(e):D$e(e)}function S$e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i,s,o=!1;for(go&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(Wp(a,-1))i=r,s=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(oU(r))break;{let a=r.previousSibling;for(;a&&Wp(a,-1);)i=r.parentNode,s=On(a),a=a.previousSibling;if(a)r=a,n=R0(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}o?_T(e,r,n):i&&_T(e,i,s)}function D$e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i=R0(r),s,o;for(;;)if(n{e.state==i&&ya(e)},50)}function DN(e,t){let r=e.state.doc.resolve(t);if(!(ri||q_e)&&r.parent.inlineContent){let i=e.coordsAtPos(t);if(t>r.start()){let s=e.coordsAtPos(t-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function EN(e,t,r){let n=e.state.selection;if(n instanceof Bt&&!n.empty||r.indexOf("s")>-1||ps&&r.indexOf("m")>-1)return!1;let{$from:i,$to:s}=n;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=kT(e.state,t);if(o&&o instanceof mt)return nl(e,o)}if(!i.parent.inlineContent){let o=t<0?i:s,a=n instanceof ao?Vt.near(o,t):Vt.findFrom(o,t);return a?nl(e,a):!1}return!1}function CN(e,t){if(!(e.state.selection instanceof Bt))return!0;let{$head:r,$anchor:n,empty:i}=e.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let o=e.state.tr;return t<0?o.delete(r.pos-s.nodeSize,r.pos):o.delete(r.pos,r.pos+s.nodeSize),e.dispatch(o),!0}return!1}function TN(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function T$e(e){if(!Si||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;TN(e,n,"true"),setTimeout(()=>TN(e,n,"false"),20)}return!1}function A$e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function k$e(e,t){let r=t.keyCode,n=A$e(t);if(r==8||ps&&r==72&&n=="c")return CN(e,-1)||gh(e,-1);if(r==46&&!t.shiftKey||ps&&r==68&&n=="c")return CN(e,1)||gh(e,1);if(r==13||r==27)return!0;if(r==37||ps&&r==66&&n=="c"){let i=r==37?DN(e,e.state.selection.from)=="ltr"?-1:1:-1;return SN(e,i,n)||gh(e,i)}else if(r==39||ps&&r==70&&n=="c"){let i=r==39?DN(e,e.state.selection.from)=="ltr"?1:-1:1;return SN(e,i,n)||gh(e,i)}else{if(r==38||ps&&r==80&&n=="c")return EN(e,-1,n)||gh(e,-1);if(r==40||ps&&r==78&&n=="c")return T$e(e)||EN(e,1,n)||gh(e,1);if(n==(ps?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function aU(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let r=[],{content:n,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,s--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=e.someProp("clipboardSerializer")||jc.fromSchema(e.state.schema),a=fU(),l=a.createElement("div");l.appendChild(o.serializeFragment(n,{document:a}));let u=l.firstChild,c,h=0;for(;u&&u.nodeType==1&&(c=dU[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=a.createElement(c[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(r)}`);let d=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` + +`);return{dom:l,text:d,slice:t}}function lU(e,t,r,n,i){let s=i.parent.type.spec.code,o,a;if(!r&&!t)return null;let l=t&&(n||s||!r);if(l){if(e.someProp("transformPastedText",d=>{t=d(t,s||n,e)}),s)return t?new Je(Oe.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0):Je.empty;let h=e.someProp("clipboardTextParser",d=>d(t,i,n,e));if(h)a=h;else{let d=i.marks(),{schema:f}=e.state,p=jc.fromSchema(f);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=o.appendChild(document.createElement("p"));m&&y.appendChild(p.serializeNode(f.text(m,d)))})}}else e.someProp("transformPastedHTML",h=>{r=h(r,e)}),o=P$e(r),lm&&F$e(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let h=+c[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Tl.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!_$e.test(d.parentNode.nodeName)?{ignore:!0}:null}})),c)a=O$e(AN(a,+c[1],+c[2]),c[4]);else if(a=Je.maxOpen($$e(a.content,i),!0),a.openStart||a.openEnd){let h=0,d=0;for(let f=a.content.firstChild;h{a=h(a,e)}),a}const _$e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function $$e(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),s,o=[];if(e.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&s.length&&cU(l,s,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=hU(o[o.length-1],s.length));let c=uU(a,l);o.push(c),i=i.matchType(c.type),s=l}}),o)return Oe.from(o)}return e}function uU(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,Oe.from(e));return e}function cU(e,t,r,n,i){if(i1&&(s=0),i=r&&(a=t<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(Oe.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(a))}function AN(e,t,r){return tr}).createHTML(e):e}function P$e(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=fU().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),i;if((i=n&&dU[n[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"").reverse().join("")),r.innerHTML=L$e(e),i)for(let s=0;s=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;i=Oe.from(l.create(n[a+1],i)),s++,o++}return new Je(i,s,o)}const Di={},Ei={},I$e={touchstart:!0,touchmove:!0};class M$e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function N$e(e){for(let t in Di){let r=Di[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{B$e(e,n)&&!b_(e,n)&&(e.editable||!(n.type in Ei))&&r(e,n)},I$e[t]?{passive:!0}:void 0)}Si&&e.dom.addEventListener("input",()=>null),LT(e)}function ml(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function R$e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function LT(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>b_(e,n))})}function b_(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function B$e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function j$e(e,t){!b_(e,t)&&Di[t.type]&&(e.editable||!(t.type in Ei))&&Di[t.type](e,t)}Ei.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!gU(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Qs&&ri&&r.keyCode==13)))if(e.domObserver.selectionChanged(e.domSelectionRange())?e.domObserver.flush():r.keyCode!=229&&e.domObserver.forceFlush(),Cd&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",i=>i(e,Tu(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||k$e(e,r)?r.preventDefault():ml(e,"key")};Ei.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Ei.keypress=(e,t)=>{let r=t;if(gU(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||ps&&r.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof Bt)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,n.$from.pos,n.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),r.preventDefault()}};function B1(e){return{left:e.clientX,top:e.clientY}}function z$e(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function x_(e,t,r,n,i){if(n==-1)return!1;let s=e.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,a=>o>s.depth?a(e,r,s.nodeAfter,s.before(o),i,!0):a(e,r,s.node(o),s.before(o),i,!1)))return!0;return!1}function Zh(e,t,r){if(e.focused||e.focus(),e.state.selection.eq(t))return;let n=e.state.tr.setSelection(t);n.setMeta("pointer",!0),e.dispatch(n)}function H$e(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&&mt.isSelectable(n)?(Zh(e,new mt(r)),!0):!1}function U$e(e,t){if(t==-1)return!1;let r=e.state.selection,n,i;r instanceof mt&&(n=r.node);let s=e.state.doc.resolve(t);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(mt.isSelectable(a)){n&&r.$from.depth>0&&o>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?i=s.before(r.$from.depth):i=s.before(o);break}}return i!=null?(Zh(e,mt.create(e.state.doc,i)),!0):!1}function W$e(e,t,r,n,i){return x_(e,"handleClickOn",t,r,n)||e.someProp("handleClick",s=>s(e,t,n))||(i?U$e(e,r):H$e(e,r))}function V$e(e,t,r,n){return x_(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",i=>i(e,t,n))}function G$e(e,t,r,n){return x_(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",i=>i(e,t,n))||q$e(e,r,n)}function q$e(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?(Zh(e,Bt.create(n,0,n.content.size)),!0):!1;let i=n.resolve(t);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)Zh(e,Bt.create(n,a+1,a+1+o.content.size));else if(mt.isSelectable(o))Zh(e,mt.create(n,a));else continue;return!0}}function w_(e){return B0(e)}const pU=ps?"metaKey":"ctrlKey";Di.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=w_(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&z$e(r,e.input.lastClick)&&!r[pU]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:s};let o=e.posAtCoords(B1(r));o&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new K$e(e,o,r,!!n)):(s=="doubleClick"?V$e:G$e)(e,o.pos,o.inside,r)?r.preventDefault():ml(e,"pointer"))};class K$e{constructor(t,r,n,i){this.view=t,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[pU],this.allowDefault=n.shiftKey;let s,o;if(r.inside>-1)s=t.state.doc.nodeAt(r.inside),o=r.inside;else{let c=t.state.doc.resolve(r.pos);s=c.parent,o=c.depth?c.before():0}const a=i?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=t.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof mt&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&go&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ml(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ya(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(B1(t))),this.updateAllowDefault(t),this.allowDefault||!r?ml(this.view,"pointer"):W$e(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Si&&this.mightDrag&&!this.mightDrag.node.isAtom||ri&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Zh(this.view,Vt.near(this.view.state.doc.resolve(r.pos))),t.preventDefault()):ml(this.view,"pointer")}move(t){this.updateAllowDefault(t),ml(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Di.touchstart=e=>{e.input.lastTouch=Date.now(),w_(e),ml(e,"pointer")};Di.touchmove=e=>{e.input.lastTouch=Date.now(),ml(e,"pointer")};Di.contextmenu=e=>w_(e);function gU(e,t){return e.composing?!0:Si&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const J$e=Qs?5e3:-1;Ei.compositionstart=Ei.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$to;if(t.selection instanceof Bt&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),B0(e,!0),e.markCursor=null;else if(B0(e,!t.selection.empty),go&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let i=n.focusNode,s=n.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=e.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}e.input.composing=!0}mU(e,J$e)};Ei.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,mU(e,20))};function mU(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>B0(e),t))}function yU(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Y$e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function X$e(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let r=H_e(t.focusNode,t.focusOffset),n=U_e(t.focusNode,t.focusOffset);if(r&&n&&r!=n){let i=n.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(r==s||n==s)return s;if(!i||!i.isText(n.nodeValue))return n;if(e.input.compositionNode==n){let o=r.pmViewDesc;if(!(!o||!o.isText(r.nodeValue)))return n}}return r||n}function Y$e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function B0(e,t=!1){if(!(Qs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),yU(e),t||e.docView&&e.docView.dirty){let r=y_(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Q$e(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const Pg=Vi&&Al<15||Cd&&K_e<604;Di.copy=Ei.cut=(e,t)=>{let r=t,n=e.state.selection,i=r.type=="cut";if(n.empty)return;let s=Pg?null:r.clipboardData,o=n.content(),{dom:a,text:l}=aU(e,o);s?(r.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):Q$e(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Z$e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function e3e(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Fg(e,n.value,null,i,t):Fg(e,n.textContent,n.innerHTML,i,t)},50)}function Fg(e,t,r,n,i){let s=lU(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,s||Je.empty)))return!0;if(!s)return!1;let o=Z$e(s),a=o?e.state.tr.replaceSelectionWith(o,n):e.state.tr.replaceSelection(s);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function vU(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let r=e.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}Ei.paste=(e,t)=>{let r=t;if(e.composing&&!Qs)return;let n=Pg?null:r.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&Fg(e,vU(n),n.getData("text/html"),i,r)?r.preventDefault():e3e(e,r)};class bU{constructor(t,r,n){this.slice=t,this.move=r,this.node=n}}const xU=ps?"altKey":"ctrlKey";Di.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(B1(r)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof mt?i.to-1:i.to))){if(n&&n.mightDrag)o=mt.create(e.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let h=e.docView.nearestDesc(r.target,!0);h&&h.node.type.spec.draggable&&h!=e.docView&&(o=mt.create(e.state.doc,h.posBefore))}}let a=(o||e.state.selection).content(),{dom:l,text:u,slice:c}=aU(e,a);(!r.dataTransfer.files.length||!ri||VH>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(Pg?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",Pg||r.dataTransfer.setData("text/plain",u),e.dragging=new bU(c,!r[xU],o)};Di.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Ei.dragover=Ei.dragenter=(e,t)=>t.preventDefault();Ei.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let i=e.posAtCoords(B1(r));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",p=>{o=p(o,e)}):o=lU(e,vU(r.dataTransfer),Pg?null:r.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&!r[xU]);if(e.someProp("handleDrop",p=>p(e,r,o||Je.empty,a))){r.preventDefault();return}if(!o)return;r.preventDefault();let l=o?k_e(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let u=e.state.tr;if(a){let{node:p}=n;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(l),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=u.doc;if(h?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(d))return;let f=u.doc.resolve(c);if(h&&mt.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new mt(f));else{let p=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,y,b,v)=>p=v),u.setSelection(v_(e,f,u.doc.resolve(p)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};Di.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ya(e)},20))};Di.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Di.beforeinput=(e,t)=>{if(ri&&Qs&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,Tu(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in Ei)Di[e]=Ei[e];function Og(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class j0{constructor(t,r){this.toDOM=t,this.spec=r||Ku,this.side=this.spec.side||0}map(t,r,n,i){let{pos:s,deleted:o}=t.mapResult(r.from+i,this.side<0?-1:1);return o?null:new ro(s-n,s-n,this)}valid(){return!0}eq(t){return this==t||t instanceof j0&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Og(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class _l{constructor(t,r){this.attrs=t,this.spec=r||Ku}map(t,r,n,i){let s=t.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,o=t.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new ro(s,o,this)}valid(t,r){return r.from=t&&(!s||s(a.spec))&&n.push(a.copy(a.from+i,a.to+i))}for(let o=0;ot){let a=this.children[o]+1;this.children[o+2].findInner(t-a,r-a,n,i+a,s)}}map(t,r,n){return this==Yn||t.maps.length==0?this:this.mapInner(t,r,0,0,n||Ku)}mapInner(t,r,n,i,s){let o;for(let a=0;a{let u=l+n,c;if(c=SU(r,a,u)){for(i||(i=this.children.slice());sa&&h.to=t){this.children[a]==t&&(n=this.children[a+2]);break}let s=t+1,o=s+r.content.size;for(let a=0;as&&l.type instanceof _l){let u=Math.max(s,l.from)-s,c=Math.min(o,l.to)-s;ui.map(t,r,Ku));return al.from(n)}forChild(t,r){if(r.isLeaf)return Dn.empty;let n=[];for(let i=0;ir instanceof Dn)?t:t.reduce((r,n)=>r.concat(n instanceof Dn?n:n.members),[]))}}forEachSet(t){for(let r=0;r{let y=m-p-(f-d);for(let b=0;bv+c-h)continue;let E=a[b]+c-h;f>=E?a[b+1]=d<=E?-2:-1:d>=c&&y&&(a[b]+=y,a[b+1]+=y)}h+=y}),c=r.maps[u].map(c,-1)}let l=!1;for(let u=0;u=n.content.size){l=!0;continue}let d=r.map(e[u+1]+s,-1),f=d-i,{index:p,offset:m}=n.content.findIndex(h),y=n.maybeChild(p);if(y&&m==h&&m+y.nodeSize==f){let b=a[u+2].mapInner(r,y,c+1,e[u]+s+1,o);b!=Yn?(a[u]=h,a[u+1]=f,a[u+2]=b):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=r3e(a,e,t,r,i,s,o),c=z0(u,n,0,o);t=c.local;for(let h=0;hr&&o.to{let u=SU(e,a,l+r);if(u){s=!0;let c=z0(u,a,r+l+1,n);c!=Yn&&i.push(l,l+a.nodeSize,c)}});let o=wU(s?DU(e):e,-r).sort(Ju);for(let a=0;a0;)t++;e.splice(t,0,r)}function gD(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=Yn&&t.push(n)}),e.cursorWrapper&&t.push(Dn.create(e.state.doc,[e.cursorWrapper.deco])),al.from(t)}const n3e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},i3e=Vi&&Al<=11;class s3e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class o3e{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new s3e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),i3e&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,n3e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let r=0;rthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(wN(this.view)){if(this.suppressingSelectionUpdates)return ya(this.view);if(Vi&&Al<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&mc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let r=new Set,n;for(let s=t.focusNode;s;s=Lg(s))r.add(s);for(let s=t.anchorNode;s;s=Lg(s))if(r.has(s)){n=s;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}selectionChanged(t){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&wN(this.view)&&!this.ignoreSelectionChange(t)}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),i=this.selectionChanged(n),s=-1,o=-1,a=!1,l=[];if(t.editable)for(let c=0;ch.nodeName=="BR");if(c.length==2){let[h,d]=c;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of c){let f=d.parentNode;f&&f.nodeName=="LI"&&(!h||u3e(t,h)!=f)&&d.remove()}}}let u=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||i)&&(s>-1&&(t.docView.markDirty(s,o),a3e(t)),this.handleDOMChange(s,o,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||ya(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;ci;y--){let b=n.childNodes[y-1],v=b.pmViewDesc;if(b.nodeName=="BR"&&!v){s=y;break}if(!v||v.size)break}let h=e.state.doc,d=e.someProp("domParser")||Tl.fromSchema(e.state.schema),f=h.resolve(o),p=null,m=d.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:h3e,context:f});if(u&&u[0].pos!=null){let y=u[0].pos,b=u[1]&&u[1].pos;b==null&&(b=y),p={anchor:y+o,head:b+o}}return{doc:m,sel:p,from:o,to:a}}function h3e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Si&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||Si&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const d3e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function f3e(e,t,r,n,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,P=y_(e,O);if(P&&!e.state.selection.eq(P)){if(ri&&Qs&&e.input.lastKeyCode===13&&Date.now()-100F(e,Tu(13,"Enter"))))return;let I=e.state.tr.setSelection(P);O=="pointer"?I.setMeta("pointer",!0):O=="key"&&I.scrollIntoView(),s&&I.setMeta("composition",s),e.dispatch(I)}return}let o=e.state.doc.resolve(t),a=o.sharedDepth(r);t=o.before(a+1),r=e.state.doc.resolve(r).after(a+1);let l=e.state.selection,u=c3e(e,t,r),c=e.state.doc,h=c.slice(u.from,u.to),d,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Qs)&&i.some(O=>O.nodeType==1&&!d3e.test(O.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",O=>O(e,Tu(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(n&&l instanceof Bt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let O=FN(e,e.state.doc,u.sel);if(O&&!O.eq(e.state.selection)){let P=e.state.tr.setSelection(O);s&&P.setMeta("composition",s),e.dispatch(P)}}return}e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),Vi&&Al<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=u.doc.resolveNoCache(p.start-u.from),y=u.doc.resolveNoCache(p.endB-u.from),b=c.resolve(p.start),v=m.sameParent(y)&&m.parent.inlineContent&&b.end()>=p.endA,E;if((Cd&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!v&&m.posO(e,Tu(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&g3e(c,p.start,p.endA,m,y)&&e.someProp("handleKeyDown",O=>O(e,Tu(8,"Backspace")))){Qs&&ri&&e.domObserver.suppressSelectionUpdates();return}ri&&Qs&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),Qs&&!v&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,y=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(O){return O(e,Tu(13,"Enter"))})},20));let D=p.start,C=p.endA,w,T,k;if(v){if(m.pos==y.pos)Vi&&Al<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ya(e),20)),w=e.state.tr.delete(D,C),T=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&(k=p3e(m.parent.content.cut(m.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start()))))w=e.state.tr,k.type=="add"?w.addMark(D,C,k.mark):w.removeMark(D,C,k.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let O=m.parent.textBetween(m.parentOffset,y.parentOffset);if(e.someProp("handleTextInput",P=>P(e,D,C,O)))return;w=e.state.tr.insertText(O,D,C)}}if(w||(w=e.state.tr.replace(D,C,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let O=FN(e,w.doc,u.sel);O&&!(ri&&Qs&&e.composing&&O.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:v_(e,t.resolve(r.anchor),t.resolve(r.head))}function p3e(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,i=r,s=n,o,a,l;for(let c=0;cc.mark(a.addToSet(c.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cr||mD(o,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,i++,t=!1;if(r){let s=e.node(n).maybeChild(e.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function m3e(e,t,r,n,i){let s=e.findDiffStart(t,r);if(s==null)return null;let{a:o,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,s&&s=a?s-n:0;s-=l,s&&s=56320&&t<=57343&&r>=55296&&r<=56319}class y3e{constructor(t,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new M$e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(BN),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=NN(this),MN(this),this.nodeViews=RN(this),this.docView=gN(this.state.doc,IN(this),gD(this),this.dom,this),this.domObserver=new o3e(this,(n,i,s,o)=>f3e(this,n,i,s,o)),this.domObserver.start(),N$e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&<(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(BN),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){var n;let i=this.state,s=!1,o=!1;t.storedMarks&&this.composing&&(yU(this),o=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=r.plugins;if(a||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=RN(this);b3e(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(a||r.handleDOMEvents!=this._props.handleDOMEvents)&<(this),this.editable=NN(this),MN(this);let l=gD(this),u=IN(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",h=s||!this.docView.matchesNode(t.doc,u,l);(h||!t.selection.eq(i.selection))&&(o=!0);let d=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Y_e(this);if(o){this.domObserver.stop();let f=h&&(Vi||ri)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&v3e(i.selection,t.selection);if(h){let p=ri?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=X$e(this)),(s||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=gN(t.doc,u,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&w$e(this))?ya(this,f):(iU(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&Q_e(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof mt){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&uN(this,r.getBoundingClientRect(),t)}else uN(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r0&&this.state.doc.nodeAt(s))==n.node&&(i=s)}this.dragging=new bU(t.slice,t.move,i<0?void 0:mt.create(this.state.doc,i))}someProp(t,r){let n=this._props&&this._props[t],i;if(n!=null&&(i=r?r(n):n))return i;for(let o=0;or.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return i$e(this,t)}coordsAtPos(t,r=1){return XH(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let i=this.docView.posFromDOM(t,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,r){return u$e(this,r||this.state,t)}pasteHTML(t,r){return Fg(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return Fg(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(R$e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],gD(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,j_e())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return j$e(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?Si&&this.root.nodeType===11&&V_e(this.dom.ownerDocument)==this.dom&&l3e(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function IN(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[ro.node(0,e.state.doc.content.size,t)]}function MN(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:ro.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function NN(e){return!e.someProp("editable",t=>t(e.state)===!1)}function v3e(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function RN(e){let t=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n[i])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function b3e(e,t){let r=0,n=0;for(let i in e){if(e[i]!=t[i])return!0;r++}for(let i in t)n++;return r!=n}function BN(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Wl={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:"'"},H0={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},x3e=typeof navigator<"u"&&/Mac/.test(navigator.platform),w3e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var In=0;In<10;In++)Wl[48+In]=Wl[96+In]=String(In);for(var In=1;In<=24;In++)Wl[In+111]="F"+In;for(var In=65;In<=90;In++)Wl[In]=String.fromCharCode(In+32),H0[In]=String.fromCharCode(In);for(var yD in Wl)H0.hasOwnProperty(yD)||(H0[yD]=Wl[yD]);function S3e(e){var t=x3e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||w3e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?H0:Wl)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const D3e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function E3e(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;a127)&&(s=Wl[n.keyCode])&&s!=i){let a=t[vD(s,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}const k3e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function EU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const _3e=(e,t,r)=>{let n=EU(e,r);if(!n)return!1;let i=E_(n);if(!i){let o=n.blockRange(),a=o&&pf(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(kU(e,i,t,-1))return!0;if(n.parent.content.size==0&&(Td(s,"end")||mt.isSelectable(s)))for(let o=n.depth;;o--){let a=I1(e.doc,n.before(o),n.after(o),Je.empty);if(a&&a.slice.size1)break}return s.isAtom&&i.depth==n.depth-1?(t&&t(e.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},$3e=(e,t,r)=>{let n=EU(e,r);if(!n)return!1;let i=E_(n);return i?CU(e,i,t):!1},L3e=(e,t,r)=>{let n=TU(e,r);if(!n)return!1;let i=C_(n);return i?CU(e,i,t):!1};function CU(e,t,r){let n=t.nodeBefore,i=n,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=t.nodeAfter,a=o,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=I1(e.doc,s,l,Je.empty);if(!u||u.from!=s||u instanceof En&&u.slice.size>=l-s)return!1;if(r){let c=e.tr.step(u);c.setSelection(Bt.create(c.doc,s)),r(c.scrollIntoView())}return!0}function Td(e,t,r=!1){for(let n=e;n;n=t=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const P3e=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;s=E_(n)}let o=s&&s.nodeBefore;return!o||!mt.isSelectable(o)?!1:(t&&t(e.tr.setSelection(mt.create(e.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function E_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function TU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=TU(e,r);if(!n)return!1;let i=C_(n);if(!i)return!1;let s=i.nodeAfter;if(kU(e,i,t,1))return!0;if(n.parent.content.size==0&&(Td(s,"start")||mt.isSelectable(s))){let o=I1(e.doc,n.before(),n.after(),Je.empty);if(o&&o.slice.size{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let r=e.selection,n=r instanceof mt,i;if(n){if(r.node.isTextblock||!zc(e.doc,r.from))return!1;i=r.from}else if(i=O1(e.doc,r.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);n&&s.setSelection(mt.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},M3e=(e,t)=>{let r=e.selection,n;if(r instanceof mt){if(r.node.isTextblock||!zc(e.doc,r.to))return!1;n=r.to}else if(n=O1(e.doc,r.to,1),n==null)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},N3e=(e,t)=>{let{$from:r,$to:n}=e.selection,i=r.blockRange(n),s=i&&pf(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},R3e=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function AU(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),o=AU(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(t){let a=r.after(),l=e.tr.replaceWith(a,a,o.createAndFill());l.setSelection(Vt.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},j3e=(e,t)=>{let r=e.selection,{$from:n,$to:i}=r;if(r instanceof ao||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=AU(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let o=(!n.parentOffset&&i.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(Yh(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),i=n&&pf(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)},H3e=(e,t)=>{let{$from:r,to:n}=e.selection,i,s=r.sharedDepth(n);return s==0?!1:(i=r.before(s),t&&t(e.tr.setSelection(mt.create(e.doc,i))),!0)};function U3e(e,t,r){let n=t.nodeBefore,i=t.nodeAfter,s=t.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&t.parent.canReplace(s-1,s)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||zc(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function kU(e,t,r,n){let i=t.nodeBefore,s=t.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&U3e(e,t,r))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(r){let f=t.pos+s.nodeSize,p=Oe.empty;for(let b=o.length-1;b>=0;b--)p=Oe.from(o[b].create(null,p));p=Oe.from(i.copy(p));let m=e.tr.step(new kn(t.pos-1,f,t.pos,f,new Je(p,1,0),o.length,!0)),y=f+2*o.length;zc(m.doc,y)&&m.join(y),r(m.scrollIntoView())}return!0}let c=s.type.spec.isolating||n>0&&l?null:Vt.findFrom(t,1),h=c&&c.$from.blockRange(c.$to),d=h&&pf(h);if(d!=null&&d>=t.depth)return r&&r(e.tr.lift(h,d).scrollIntoView()),!0;if(u&&Td(s,"start",!0)&&Td(i,"end")){let f=i,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let m=s,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(r){let b=Oe.empty;for(let E=p.length-1;E>=0;E--)b=Oe.from(p[E].copy(b));let v=e.tr.step(new kn(t.pos-p.length,t.pos+s.nodeSize,t.pos+y,t.pos+s.nodeSize-y,new Je(b,p.length,0),0,!0));r(v.scrollIntoView())}return!0}}return!1}function _U(e){return function(t,r){let n=t.selection,i=e<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(r&&r(t.tr.setSelection(Bt.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const W3e=_U(-1),V3e=_U(1);function G3e(e,t=null){return function(r,n){let{$from:i,$to:s}=r.selection,o=i.blockRange(s),a=o&&MH(o,e,t);return a?(n&&n(r.tr.wrap(o,a).scrollIntoView()),!0):!1}}function jN(e,t=null){return function(r,n){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let c=r.doc.resolve(u),h=c.index();i=c.parent.canReplaceWith(h,h+1,e)}})}if(!i)return!1;if(n){let s=r.tr;for(let o=0;o=2&&i.node(o.depth-1).type.compatibleContent(e)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let c=r.doc.resolve(o.start-2);l=new F0(c,c,o.depth),o.endIndex=0;c--)s=Oe.from(r[c].type.create(r[c].attrs,s));e.step(new kn(t.start-(n?2:0),t.end,t.start,t.end,new Je(s,0,0),r.length,!0));let o=0;for(let c=0;co.childCount>0&&o.firstChild.type==e);return s?r?n.node(s.depth-1).type==e?X3e(t,r,e,s):Y3e(t,r,s):!0:!1}}function X3e(e,t,r,n){let i=e.tr,s=n.end,o=n.$to.end(n.depth);sm;p--)f-=i.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(r.start),o=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(a?0:1),c+1,o.content.append(l?Oe.empty:Oe.from(i))))return!1;let h=s.pos,d=h+o.nodeSize;return n.step(new kn(h-(a?1:0),d+(l?1:0),h+1,d-1,new Je((a?Oe.empty:Oe.from(i.copy(Oe.empty))).append(l?Oe.empty:Oe.from(i.copy(Oe.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}function Q3e(e){return function(t,r){let{$from:n,$to:i}=t.selection,s=n.blockRange(i,u=>u.childCount>0&&u.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=e)return!1;if(r){let u=l.lastChild&&l.lastChild.type==a.type,c=Oe.from(u?e.create():null),h=new Je(Oe.from(e.create(null,Oe.from(a.type.create(null,c)))),u?3:1,0),d=s.start,f=s.end;r(t.tr.step(new kn(d-(u?3:1),f,d,f,h,1,!0)).scrollIntoView())}return!0}}function j1(e){const{state:t,transaction:r}=e;let{selection:n}=r,{doc:i}=r,{storedMarks:s}=r;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,s=r.storedMarks,r}}}class z1{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:r,state:n}=this,{view:i}=r,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>{const h=l(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a=[],l=!!t,u=t||s.tr,c=()=>(!l&&r&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),a.every(d=>d===!0)),h={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...m)=>{const y=this.buildProps(u,r),b=f(...m)(y);return a.push(b),h}])),run:c};return h}createCan(t){const{rawCommands:r,state:n}=this,i=!1,s=t||n.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a={tr:t,editor:i,view:o,state:j1({state:s,transaction:t}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(t,r),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}}class Z3e{constructor(){this.callbacks={}}on(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),this}emit(t,...r){const n=this.callbacks[t];return n&&n.forEach(i=>i.apply(this,r)),this}off(t,r){const n=this.callbacks[t];return n&&(r?this.callbacks[t]=n.filter(i=>i!==r):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function st(e,t,r){return e.config[t]===void 0&&e.parent?st(e.parent,t,r):typeof e.config[t]=="function"?e.config[t].bind({...r,parent:e.parent?st(e.parent,t,r):null}):e.config[t]}function H1(e){const t=e.filter(i=>i.type==="extension"),r=e.filter(i=>i.type==="node"),n=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:r,markExtensions:n}}function $U(e){const t=[],{nodeExtensions:r,markExtensions:n}=H1(e),i=[...r,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=st(o,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(h=>{Object.entries(c.attributes).forEach(([d,f])=>{t.push({type:h,name:d,attribute:{...s,...f}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=st(o,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([c,h])=>{const d={...s,...h};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,t.push({type:o.name,name:c,attribute:d})})}),t}function _n(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Uc(...e){return e.filter(t=>!!t).reduce((t,r)=>{const n={...t};return Object.entries(r).forEach(([i,s])=>{if(!n[i]){n[i]=s;return}if(i==="class"){const a=s?s.split(" "):[],l=n[i]?n[i].split(" "):[],u=a.filter(c=>!l.includes(c));n[i]=[...l,...u].join(" ")}else if(i==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],l=n[i]?n[i].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[h,d]=c.split(":").map(f=>f.trim());u.set(h,d)}),a.forEach(c=>{const[h,d]=c.split(":").map(f=>f.trim());u.set(h,d)}),n[i]=Array.from(u.entries()).map(([c,h])=>`${c}: ${h}`).join("; ")}else n[i]=s}),n},{})}function PT(e,t){return t.filter(r=>r.type===e.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(e.attrs)||{}:{[r.name]:e.attrs[r.name]}).reduce((r,n)=>Uc(r,n),{})}function LU(e){return typeof e=="function"}function Qt(e,t=void 0,...r){return LU(e)?t?e.bind(t)(...r):e(...r):e}function eLe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function tLe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function zN(e,t){return"style"in e?e:{...e,getAttrs:r=>{const n=e.getAttrs?e.getAttrs(r):e.attrs;if(n===!1)return!1;const i=t.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(r):tLe(r.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...n,...i}}}}function HN(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>t==="attrs"&&eLe(r)?!1:r!=null))}function rLe(e,t){var r;const n=$U(e),{nodeExtensions:i,markExtensions:s}=H1(e),o=(r=i.find(u=>st(u,"topNode")))===null||r===void 0?void 0:r.name,a=Object.fromEntries(i.map(u=>{const c=n.filter(b=>b.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:t},d=e.reduce((b,v)=>{const E=st(v,"extendNodeSchema",h);return{...b,...E?E(u):{}}},{}),f=HN({...d,content:Qt(st(u,"content",h)),marks:Qt(st(u,"marks",h)),group:Qt(st(u,"group",h)),inline:Qt(st(u,"inline",h)),atom:Qt(st(u,"atom",h)),selectable:Qt(st(u,"selectable",h)),draggable:Qt(st(u,"draggable",h)),code:Qt(st(u,"code",h)),whitespace:Qt(st(u,"whitespace",h)),defining:Qt(st(u,"defining",h)),isolating:Qt(st(u,"isolating",h)),attrs:Object.fromEntries(c.map(b=>{var v;return[b.name,{default:(v=b==null?void 0:b.attribute)===null||v===void 0?void 0:v.default}]}))}),p=Qt(st(u,"parseHTML",h));p&&(f.parseDOM=p.map(b=>zN(b,c)));const m=st(u,"renderHTML",h);m&&(f.toDOM=b=>m({node:b,HTMLAttributes:PT(b,c)}));const y=st(u,"renderText",h);return y&&(f.toText=y),[u.name,f]})),l=Object.fromEntries(s.map(u=>{const c=n.filter(y=>y.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:t},d=e.reduce((y,b)=>{const v=st(b,"extendMarkSchema",h);return{...y,...v?v(u):{}}},{}),f=HN({...d,inclusive:Qt(st(u,"inclusive",h)),excludes:Qt(st(u,"excludes",h)),group:Qt(st(u,"group",h)),spanning:Qt(st(u,"spanning",h)),code:Qt(st(u,"code",h)),attrs:Object.fromEntries(c.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),p=Qt(st(u,"parseHTML",h));p&&(f.parseDOM=p.map(y=>zN(y,c)));const m=st(u,"renderHTML",h);return m&&(f.toDOM=y=>m({mark:y,HTMLAttributes:PT(y,c)})),[u.name,f]}));return new AH({topNode:o,nodes:a,marks:l})}function bD(e,t){return t.nodes[e]||t.marks[e]||null}function UN(e,t){return Array.isArray(t)?t.some(r=>(typeof r=="string"?r:r.name)===e.name):t}const nLe=(e,t=500)=>{let r="";const n=e.parentOffset;return e.parent.nodesBetween(Math.max(0,n-t),n,(i,s,o,a)=>{var l,u;const c=((u=(l=i.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";r+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,n-s))}),r};function T_(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class iLe{constructor(t){this.find=t.find,this.handler=t.handler}}const sLe=(e,t)=>{if(T_(t))return t.exec(e);const r=t(e);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=e,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function Ey(e){var t;const{editor:r,from:n,to:i,text:s,rules:o,plugin:a}=e,{view:l}=r;if(l.composing)return!1;const u=l.state.doc.resolve(n);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(d=>d.type.spec.code))return!1;let c=!1;const h=nLe(u)+s;return o.forEach(d=>{if(c)return;const f=sLe(h,d.find);if(!f)return;const p=l.state.tr,m=j1({state:l.state,transaction:p}),y={from:n-(f[0].length-s.length),to:i},{commands:b,chain:v,can:E}=new z1({editor:r,state:m});d.handler({state:m,range:y,match:f,commands:b,chain:v,can:E})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:n,to:i,text:s}),l.dispatch(p),c=!0)}),c}function oLe(e){const{editor:t,rules:r}=e,n=new Ko({state:{init(){return null},apply(i,s){const o=i.getMeta(n);if(o)return o;const a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:u,text:c}=a,h=u+c.length;Ey({editor:t,from:u,to:h,text:c,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return Ey({editor:t,from:s,to:o,text:a,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&Ey({editor:t,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?Ey({editor:t,from:o.pos,to:o.pos,text:` +`,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function aLe(e){return Object.prototype.toString.call(e).slice(8,-1)}function Cy(e){return aLe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function U1(e,t){const r={...e};return Cy(e)&&Cy(t)&&Object.keys(t).forEach(n=>{Cy(t[n])&&Cy(e[n])?r[n]=U1(e[n],t[n]):r[n]=t[n]}),r}class _a{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Qt(st(this,"addOptions",{name:this.name}))),this.storage=Qt(st(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new _a(t)}configure(t={}){const r=this.extend({...this.config,addOptions:()=>U1(this.options,t)});return r.name=this.name,r.parent=this.parent,r}extend(t={}){const r=new _a(t);return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=Qt(st(r,"addOptions",{name:r.name})),r.storage=Qt(st(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:t,mark:r}){const{tr:n}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===r.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===r.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),t.view.dispatch(n),!0}return!1}}function lLe(e){return typeof e=="number"}class uLe{constructor(t){this.find=t.find,this.handler=t.handler}}const cLe=(e,t,r)=>{if(T_(t))return[...e.matchAll(t)];const n=t(e,r);return n?n.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function hLe(e){const{editor:t,state:r,from:n,to:i,rule:s,pasteEvent:o,dropEvent:a}=e,{commands:l,chain:u,can:c}=new z1({editor:t,state:r}),h=[];return r.doc.nodesBetween(n,i,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const m=Math.max(n,p),y=Math.min(i,p+f.content.size),b=f.textBetween(m-p,y-p,void 0,"");cLe(b,s.find,o).forEach(E=>{if(E.index===void 0)return;const D=m+E.index+1,C=D+E[0].length,w={from:r.tr.mapping.map(D),to:r.tr.mapping.map(C)},T=s.handler({state:r,range:w,match:E,commands:l,chain:u,can:c,pasteEvent:o,dropEvent:a});h.push(T)})}),h.every(f=>f!==null)}const dLe=e=>{var t;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=r.clipboardData)===null||t===void 0||t.setData("text/html",e),r};function fLe(e){const{editor:t,rules:r}=e;let n=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const l=({state:c,from:h,to:d,rule:f,pasteEvt:p})=>{const m=c.tr,y=j1({state:c,transaction:m});if(!(!hLe({editor:t,state:y,from:Math.max(h-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:a})||!m.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m};return r.map(c=>new Ko({view(h){const d=f=>{var p;n=!((p=h.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?h.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(h,d)=>(s=n===h.dom.parentElement,a=d,!1),paste:(h,d)=>{var f;const p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=d,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(h,d,f)=>{const p=h[0],m=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,b=p.getMeta("applyPasteRules"),v=!!b;if(!m&&!y&&!v)return;if(v){const{from:C,text:w}=b,T=C+w.length,k=dLe(w);return l({rule:c,state:f,from:C,to:{b:T},pasteEvt:k})}const E=d.doc.content.findDiffStart(f.doc.content),D=d.doc.content.findDiffEnd(f.doc.content);if(!(!lLe(E)||!D||E===D.b))return l({rule:c,state:f,from:E,to:D,pasteEvt:o})}}))}function pLe(e){const t=e.filter((r,n)=>e.indexOf(r)!==n);return Array.from(new Set(t))}class zh{constructor(t,r){this.splittableMarks=[],this.editor=r,this.extensions=zh.resolve(t),this.schema=rLe(this.extensions,r),this.setupExtensions()}static resolve(t){const r=zh.sort(zh.flatten(t)),n=pLe(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(t){return t.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=st(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(t){return t.sort((n,i)=>{const s=st(n,"priority")||100,o=st(i,"priority")||100;return s>o?-1:s{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:bD(r.name,this.schema)},i=st(r,"addCommands",n);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,r=zh.sort([...this.extensions].reverse()),n=[],i=[],s=r.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:t,type:bD(o.name,this.schema)},l=[],u=st(o,"addKeyboardShortcuts",a);let c={};if(o.type==="mark"&&st(o,"exitable",a)&&(c.ArrowRight=()=>_a.handleExit({editor:t,mark:o})),u){const m=Object.fromEntries(Object.entries(u()).map(([y,b])=>[y,()=>b({editor:t})]));c={...c,...m}}const h=T3e(c);l.push(h);const d=st(o,"addInputRules",a);UN(o,t.options.enableInputRules)&&d&&n.push(...d());const f=st(o,"addPasteRules",a);UN(o,t.options.enablePasteRules)&&f&&i.push(...f());const p=st(o,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[oLe({editor:t,rules:n}),...fLe({editor:t,rules:i}),...s]}get attributes(){return $U(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:r}=H1(this.extensions);return Object.fromEntries(r.filter(n=>!!st(n,"addNodeView")).map(n=>{const i=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:t,type:_n(n.name,this.schema)},o=st(n,"addNodeView",s);if(!o)return[];const a=(l,u,c,h,d)=>{const f=PT(l,i);return o()({node:l,view:u,getPos:c,decorations:h,innerDecorations:d,editor:t,extension:n,HTMLAttributes:f})};return[n.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var r;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:bD(t.name,this.schema)};t.type==="mark"&&(!((r=Qt(st(t,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(t.name);const i=st(t,"onBeforeCreate",n),s=st(t,"onCreate",n),o=st(t,"onUpdate",n),a=st(t,"onSelectionUpdate",n),l=st(t,"onTransaction",n),u=st(t,"onFocus",n),c=st(t,"onBlur",n),h=st(t,"onDestroy",n);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),h&&this.editor.on("destroy",h)})}}class mo{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Qt(st(this,"addOptions",{name:this.name}))),this.storage=Qt(st(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new mo(t)}configure(t={}){const r=this.extend({...this.config,addOptions:()=>U1(this.options,t)});return r.name=this.name,r.parent=this.parent,r}extend(t={}){const r=new mo({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=Qt(st(r,"addOptions",{name:r.name})),r.storage=Qt(st(r,"addStorage",{name:r.name,options:r.options})),r}}function PU(e,t,r){const{from:n,to:i}=t,{blockSeparator:s=` + +`,textSerializers:o={}}=r||{};let a="";return e.nodesBetween(n,i,(l,u,c,h)=>{var d;l.isBlock&&u>n&&(a+=s);const f=o==null?void 0:o[l.type.name];if(f)return c&&(a+=f({node:l,pos:u,parent:c,index:h,range:t})),!1;l.isText&&(a+=(d=l==null?void 0:l.text)===null||d===void 0?void 0:d.slice(Math.max(n,u)-u,i-u))}),a}function FU(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,r])=>[t,r.spec.toText]))}const gLe=mo.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Ko({key:new Hc("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:r}=e,{doc:n,selection:i}=t,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=FU(r);return PU(n,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),mLe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var r;e.isDestroyed||(t.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),yLe=(e=!1)=>({commands:t})=>t.setContent("",e),vLe=()=>({state:e,tr:t,dispatch:r})=>{const{selection:n}=t,{ranges:i}=n;return r&&i.forEach(({$from:s,$to:o})=>{e.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=t,h=u.resolve(c.map(l)),d=u.resolve(c.map(l+a.nodeSize)),f=h.blockRange(d);if(!f)return;const p=pf(f);if(a.type.isTextblock){const{defaultType:m}=h.parent.contentMatchAt(h.index());t.setNodeMarkup(f.start,m)}(p||p===0)&&t.lift(f,p)})}),!0},bLe=e=>t=>e(t),xLe=()=>({state:e,dispatch:t})=>j3e(e,t),wLe=(e,t)=>({editor:r,tr:n})=>{const{state:i}=r,s=i.doc.slice(e.from,e.to);n.deleteRange(e.from,e.to);const o=n.mapping.map(t);return n.insert(o,s.content),n.setSelection(new Bt(n.doc.resolve(o-1))),!0},SLe=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,n=r.$anchor.node();if(n.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===n.type){if(t){const a=i.before(s),l=i.after(s);e.delete(a,l).scrollIntoView()}return!0}return!1},DLe=e=>({tr:t,state:r,dispatch:n})=>{const i=_n(e,r.schema),s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(n){const l=s.before(o),u=s.after(o);t.delete(l,u).scrollIntoView()}return!0}return!1},ELe=e=>({tr:t,dispatch:r})=>{const{from:n,to:i}=e;return r&&t.delete(n,i),!0},CLe=()=>({state:e,dispatch:t})=>k3e(e,t),TLe=()=>({commands:e})=>e.keyboardShortcut("Enter"),ALe=()=>({state:e,dispatch:t})=>B3e(e,t);function U0(e,t,r={strict:!0}){const n=Object.keys(t);return n.length?n.every(i=>r.strict?t[i]===e[i]:T_(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function FT(e,t,r={}){return e.find(n=>n.type===t&&U0(n.attrs,r))}function kLe(e,t,r={}){return!!FT(e,t,r)}function A_(e,t,r={}){if(!e||!t)return;let n=e.parent.childAfter(e.parentOffset);if((!n.node||!n.node.marks.some(u=>u.type===t))&&(n=e.parent.childBefore(e.parentOffset)),!n.node||!n.node.marks.some(u=>u.type===t))return;const i=FT([...n.node.marks],t,r);if(!i)return;let s=n.index,o=e.start()+n.offset,a=s+1,l=o+n.node.nodeSize;for(FT([...n.node.marks],t,r);s>0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,o-=e.parent.child(s).nodeSize;for(;a({tr:r,state:n,dispatch:i})=>{const s=cu(e,n.schema),{doc:o,selection:a}=r,{$from:l,from:u,to:c}=a;if(i){const h=A_(l,s,t);if(h&&h.from<=u&&h.to>=c){const d=Bt.create(o,h.from,h.to);r.setSelection(d)}}return!0},$Le=e=>t=>{const r=typeof e=="function"?e(t):e;for(let n=0;n({editor:r,view:n,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const o=()=>{k_()&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),t!=null&&t.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!OU(r.state.selection))return o(),!0;const a=IU(i.doc,e)||r.state.selection,l=r.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},PLe=(e,t)=>r=>e.every((n,i)=>t(n,{...r,index:i})),FLe=(e,t)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},e,t),MU=e=>{const t=e.childNodes;for(let r=t.length-1;r>=0;r-=1){const n=t[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?e.removeChild(n):n.nodeType===1&&MU(n)}return e};function Ty(e){const t=`${e}`,r=new window.DOMParser().parseFromString(t,"text/html").body;return MU(r)}function W0(e,t,r){r={slice:!0,parseOptions:{},...r};const n=typeof e=="object"&&e!==null,i=typeof e=="string";if(n)try{if(Array.isArray(e)&&e.length>0)return Oe.fromArray(e.map(a=>t.nodeFromJSON(a)));const o=t.nodeFromJSON(e);return r.errorOnInvalidContent&&o.check(),o}catch(s){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),W0("",t,r)}if(i){if(r.errorOnInvalidContent){let o=!1,a="";const l=new AH({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(r.slice?Tl.fromSchema(l).parseSlice(Ty(e),r.parseOptions):Tl.fromSchema(l).parse(Ty(e),r.parseOptions),r.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=Tl.fromSchema(t);return r.slice?s.parseSlice(Ty(e),r.parseOptions).content:s.parse(Ty(e),r.parseOptions)}return W0("",t,r)}function OLe(e,t,r){const n=e.steps.length-1;if(n{o===0&&(o=c)}),e.setSelection(Vt.near(e.doc.resolve(o),r))}const ILe=e=>!("type"in e),MLe=(e,t,r)=>({tr:n,dispatch:i,editor:s})=>{var o;if(i){r={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let a;try{a=W0(t,s.schema,{parseOptions:{preserveWhitespace:"full",...r.parseOptions},errorOnInvalidContent:(o=r.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(p){return s.emit("contentError",{editor:s,error:p,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:u}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,h=!0;if((ILe(a)?a:[a]).forEach(p=>{p.check(),c=c?p.isText&&p.marks.length===0:!1,h=h?p.isBlock:!1}),l===u&&h){const{parent:p}=n.doc.resolve(l);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(l-=1,u+=1)}let f;c?(Array.isArray(t)?f=t.map(p=>p.text||"").join(""):typeof t=="object"&&t&&t.text?f=t.text:f=t,n.insertText(f,l,u)):(f=a,n.replaceWith(l,u,f)),r.updateSelection&&OLe(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:l,text:f}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:l,text:f})}return!0},NLe=()=>({state:e,dispatch:t})=>I3e(e,t),RLe=()=>({state:e,dispatch:t})=>M3e(e,t),BLe=()=>({state:e,dispatch:t})=>_3e(e,t),jLe=()=>({state:e,dispatch:t})=>F3e(e,t),zLe=()=>({state:e,dispatch:t,tr:r})=>{try{const n=O1(e.doc,e.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),t&&t(r),!0)}catch{return!1}},HLe=()=>({state:e,dispatch:t,tr:r})=>{try{const n=O1(e.doc,e.selection.$from.pos,1);return n==null?!1:(r.join(n,2),t&&t(r),!0)}catch{return!1}},ULe=()=>({state:e,dispatch:t})=>$3e(e,t),WLe=()=>({state:e,dispatch:t})=>L3e(e,t);function NU(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function VLe(e){const t=e.split(/-(?!$)/);let r=t[t.length-1];r==="Space"&&(r=" ");let n,i,s,o;for(let a=0;a({editor:t,view:r,tr:n,dispatch:i})=>{const s=VLe(e).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{r.someProp("handleKeyDown",u=>u(r,a))});return l==null||l.steps.forEach(u=>{const c=u.map(n.mapping);c&&i&&n.maybeStep(c)}),!0};function Ig(e,t,r={}){const{from:n,to:i,empty:s}=e.selection,o=t?_n(t,e.schema):null,a=[];e.doc.nodesBetween(n,i,(h,d)=>{if(h.isText)return;const f=Math.max(n,d),p=Math.min(i,d+h.nodeSize);a.push({node:h,from:f,to:p})});const l=i-n,u=a.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>U0(h.node.attrs,r,{strict:!1}));return s?!!u.length:u.reduce((h,d)=>h+d.to-d.from,0)>=l}const qLe=(e,t={})=>({state:r,dispatch:n})=>{const i=_n(e,r.schema);return Ig(r,i,t)?N3e(r,n):!1},KLe=()=>({state:e,dispatch:t})=>z3e(e,t),JLe=e=>({state:t,dispatch:r})=>{const n=_n(e,t.schema);return J3e(n)(t,r)},XLe=()=>({state:e,dispatch:t})=>R3e(e,t);function W1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function WN(e,t){const r=typeof t=="string"?[t]:t;return Object.keys(e).reduce((n,i)=>(r.includes(i)||(n[i]=e[i]),n),{})}const YLe=(e,t)=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=W1(typeof e=="string"?e:e.name,n.schema);return a?(a==="node"&&(s=_n(e,n.schema)),a==="mark"&&(o=cu(e,n.schema)),i&&r.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{s&&s===u.type&&r.setNodeMarkup(c,void 0,WN(u.attrs,t)),o&&u.marks.length&&u.marks.forEach(h=>{o===h.type&&r.addMark(c,c+u.nodeSize,o.create(WN(h.attrs,t)))})})}),!0):!1},QLe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),ZLe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),ePe=()=>({state:e,dispatch:t})=>P3e(e,t),tPe=()=>({state:e,dispatch:t})=>O3e(e,t),rPe=()=>({state:e,dispatch:t})=>H3e(e,t),nPe=()=>({state:e,dispatch:t})=>V3e(e,t),iPe=()=>({state:e,dispatch:t})=>W3e(e,t);function OT(e,t,r={},n={}){return W0(e,t,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}const sPe=(e,t=!1,r={},n={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{var l,u;const{doc:c}=s;if(r.preserveWhitespace!=="full"){const h=OT(e,i.schema,r,{errorOnInvalidContent:(l=n.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&s.replaceWith(0,c.content.size,h).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:(u=n.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function __(e,t){const r=cu(t,e.schema),{from:n,to:i,empty:s}=e.selection,o=[];s?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(n,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function oPe(e){for(let t=0;t0;r-=1){const n=e.node(r);if(t(n))return{pos:r>0?e.before(r):0,start:e.start(r),depth:r,node:n}}}function $_(e){return t=>aPe(t.$from,e)}function lPe(e,t){const r=jc.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}function uPe(e,t){const r={from:0,to:e.content.size};return PU(e,r,t)}function cPe(e,t){const r=_n(t,e.schema),{from:n,to:i}=e.selection,s=[];e.doc.nodesBetween(n,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===r.name);return o?{...o.attrs}:{}}function hPe(e,t){const r=W1(typeof t=="string"?t:t.name,e.schema);return r==="node"?cPe(e,t):r==="mark"?__(e,t):{}}function RU(e,t,r){const n=[];return e===t?r.resolve(e).marks().forEach(i=>{const s=r.resolve(e),o=A_(s,i.type);o&&n.push({mark:i,...o})}):r.nodesBetween(e,t,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),n}function ov(e,t,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=e.find(s=>s.type===t&&s.name===n);return i?i.attribute.keepOnSplit:!1}))}function IT(e,t,r={}){const{empty:n,ranges:i}=e.selection,s=t?cu(t,e.schema):null;if(n)return!!(e.storedMarks||e.selection.$from.marks()).filter(h=>s?s.name===h.type.name:!0).find(h=>U0(h.attrs,r,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:h,$to:d})=>{const f=h.pos,p=d.pos;e.doc.nodesBetween(f,p,(m,y)=>{if(!m.isText&&!m.marks.length)return;const b=Math.max(f,y),v=Math.min(p,y+m.nodeSize),E=v-b;o+=E,a.push(...m.marks.map(D=>({mark:D,from:b,to:v})))})}),o===0)return!1;const l=a.filter(h=>s?s.name===h.mark.type.name:!0).filter(h=>U0(h.mark.attrs,r,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),u=a.filter(h=>s?h.mark.type!==s&&h.mark.type.excludes(s):!0).reduce((h,d)=>h+d.to-d.from,0);return(l>0?l+u:l)>=o}function dPe(e,t,r={}){if(!t)return Ig(e,null,r)||IT(e,null,r);const n=W1(t,e.schema);return n==="node"?Ig(e,t,r):n==="mark"?IT(e,t,r):!1}function VN(e,t){const{nodeExtensions:r}=H1(t),n=r.find(o=>o.name===e);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},s=Qt(st(n,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function L_(e,{checkChildren:t=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((n=e.text)!==null&&n!==void 0?n:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(s=>{i!==!1&&(L_(s,{ignoreWhitespace:r,checkChildren:t})||(i=!1))}),i}return!1}function fPe(e,t,r){var n;const{selection:i}=t;let s=null;if(OU(i)&&(s=i.$cursor),s){const a=(n=e.storedMarks)!==null&&n!==void 0?n:s.marks();return!!r.isInSet(a)||!a.some(l=>l.type.excludes(r))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(r):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,h,d)=>{if(u)return!1;if(c.isInline){const f=!d||d.type.allowsMarkType(r),p=!!r.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(r));u=f&&p}return!u}),u})}const pPe=(e,t={})=>({tr:r,state:n,dispatch:i})=>{const{selection:s}=r,{empty:o,ranges:a}=s,l=cu(e,n.schema);if(i)if(o){const u=__(n,l);r.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{const c=u.$from.pos,h=u.$to.pos;n.doc.nodesBetween(c,h,(d,f)=>{const p=Math.max(f,c),m=Math.min(f+d.nodeSize,h);d.marks.find(b=>b.type===l)?d.marks.forEach(b=>{l===b.type&&r.addMark(p,m,l.create({...b.attrs,...t}))}):r.addMark(p,m,l.create(t))})});return fPe(n,r,l)},gPe=(e,t)=>({tr:r})=>(r.setMeta(e,t),!0),mPe=(e,t={})=>({state:r,dispatch:n,chain:i})=>{const s=_n(e,r.schema);return s.isTextblock?i().command(({commands:o})=>jN(s,t)(r)?!0:o.clearNodes()).command(({state:o})=>jN(s,t)(o,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},yPe=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,i=Mu(e,0,n.content.size),s=mt.create(n,i);t.setSelection(s)}return!0},vPe=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,o=Bt.atStart(n).from,a=Bt.atEnd(n).to,l=Mu(i,o,a),u=Mu(s,o,a),c=Bt.create(n,l,u);t.setSelection(c)}return!0},bPe=e=>({state:t,dispatch:r})=>{const n=_n(e,t.schema);return Q3e(n)(t,r)};function GN(e,t){const r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(r){const n=r.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(n)}}const xPe=({keepMarks:e=!0}={})=>({tr:t,state:r,dispatch:n,editor:i})=>{const{selection:s,doc:o}=t,{$from:a,$to:l}=s,u=i.extensionManager.attributes,c=ov(u,a.node().type.name,a.node().attrs);if(s instanceof mt&&s.node.isBlock)return!a.parentOffset||!Yh(o,a.pos)?!1:(n&&(e&&GN(r,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,d=a.depth===0?void 0:oPe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=h&&d?[{type:d,attrs:c}]:void 0,p=Yh(t.doc,t.mapping.map(a.pos),1,f);if(!f&&!p&&Yh(t.doc,t.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(p=!0,f=d?[{type:d,attrs:c}]:void 0),n){if(p&&(s instanceof Bt&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,f),d&&!h&&!a.parentOffset&&a.parent.type!==d)){const m=t.mapping.map(a.before()),y=t.doc.resolve(m);a.node(-1).canReplaceWith(y.index(),y.index()+1,d)&&t.setNodeMarkup(t.mapping.map(a.before()),d)}e&&GN(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return p},wPe=(e,t={})=>({tr:r,state:n,dispatch:i,editor:s})=>{var o;const a=_n(e,n.schema),{$from:l,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const h=l.node(-1);if(h.type!==a)return!1;const d=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let b=Oe.empty;const v=l.index(-1)?1:l.index(-2)?2:3;for(let k=l.depth-v;k>=l.depth-3;k-=1)b=Oe.from(l.node(k).copy(b));const E=l.indexAfter(-1){if(T>-1)return!1;k.isTextblock&&k.content.size===0&&(T=O+1)}),T>-1&&r.setSelection(Bt.near(r.doc.resolve(T))),r.scrollIntoView()}return!0}const f=u.pos===l.end()?h.contentMatchAt(0).defaultType:null,p={...ov(d,h.type.name,h.attrs),...t},m={...ov(d,l.node().type.name,l.node().attrs),...t};r.delete(l.pos,u.pos);const y=f?[{type:a,attrs:p},{type:f,attrs:m}]:[{type:a,attrs:p}];if(!Yh(r.doc,l.pos,2))return!1;if(i){const{selection:b,storedMarks:v}=n,{splittableMarks:E}=s.extensionManager,D=v||b.$to.parentOffset&&b.$from.marks();if(r.split(l.pos,2,y).scrollIntoView(),!D||!i)return!0;const C=D.filter(w=>E.includes(w.type.name));r.ensureMarks(C)}return!0},xD=(e,t)=>{const r=$_(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&zc(e.doc,r.pos)&&e.join(r.pos),!0},wD=(e,t)=>{const r=$_(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&zc(e.doc,n)&&e.join(n),!0},SPe=(e,t,r,n={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:h,splittableMarks:d}=i.extensionManager,f=_n(e,o.schema),p=_n(t,o.schema),{selection:m,storedMarks:y}=o,{$from:b,$to:v}=m,E=b.blockRange(v),D=y||m.$to.parentOffset&&m.$from.marks();if(!E)return!1;const C=$_(w=>VN(w.type.name,h))(m);if(E.depth>=1&&C&&E.depth-C.depth<=1){if(C.node.type===f)return u.liftListItem(p);if(VN(C.node.type.name,h)&&f.validContent(C.node.content)&&a)return l().command(()=>(s.setNodeMarkup(C.pos,f),!0)).command(()=>xD(s,f)).command(()=>wD(s,f)).run()}return!r||!D||!a?l().command(()=>c().wrapInList(f,n)?!0:u.clearNodes()).wrapInList(f,n).command(()=>xD(s,f)).command(()=>wD(s,f)).run():l().command(()=>{const w=c().wrapInList(f,n),T=D.filter(k=>d.includes(k.type.name));return s.ensureMarks(T),w?!0:u.clearNodes()}).wrapInList(f,n).command(()=>xD(s,f)).command(()=>wD(s,f)).run()},DPe=(e,t={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:s=!1}=r,o=cu(e,n.schema);return IT(n,o,t)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,t)},EPe=(e,t,r={})=>({state:n,commands:i})=>{const s=_n(e,n.schema),o=_n(t,n.schema),a=Ig(n,s,r);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...r})},CPe=(e,t={})=>({state:r,commands:n})=>{const i=_n(e,r.schema);return Ig(r,i,t)?n.lift(i):n.wrapIn(i,t)},TPe=()=>({state:e,dispatch:t})=>{const r=e.plugins;for(let n=0;n=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,e.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},APe=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,{empty:n,ranges:i}=r;return n||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},kPe=(e,t={})=>({tr:r,state:n,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=t,{selection:a}=r,l=cu(e,n.schema),{$from:u,empty:c,ranges:h}=a;if(!i)return!0;if(c&&o){let{from:d,to:f}=a;const p=(s=u.marks().find(y=>y.type===l))===null||s===void 0?void 0:s.attrs,m=A_(u,l,p);m&&(d=m.from,f=m.to),r.removeMark(d,f,l)}else h.forEach(d=>{r.removeMark(d.$from.pos,d.$to.pos,l)});return r.removeStoredMark(l),!0},_Pe=(e,t={})=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=W1(typeof e=="string"?e:e.name,n.schema);return a?(a==="node"&&(s=_n(e,n.schema)),a==="mark"&&(o=cu(e,n.schema)),i&&r.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;n.doc.nodesBetween(u,c,(h,d)=>{s&&s===h.type&&r.setNodeMarkup(d,void 0,{...h.attrs,...t}),o&&h.marks.length&&h.marks.forEach(f=>{if(o===f.type){const p=Math.max(d,u),m=Math.min(d+h.nodeSize,c);r.addMark(p,m,o.create({...f.attrs,...t}))}})})}),!0):!1},$Pe=(e,t={})=>({state:r,dispatch:n})=>{const i=_n(e,r.schema);return G3e(i,t)(r,n)},LPe=(e,t={})=>({state:r,dispatch:n})=>{const i=_n(e,r.schema);return q3e(i,t)(r,n)};var PPe=Object.freeze({__proto__:null,blur:mLe,clearContent:yLe,clearNodes:vLe,command:bLe,createParagraphNear:xLe,cut:wLe,deleteCurrentNode:SLe,deleteNode:DLe,deleteRange:ELe,deleteSelection:CLe,enter:TLe,exitCode:ALe,extendMarkRange:_Le,first:$Le,focus:LLe,forEach:PLe,insertContent:FLe,insertContentAt:MLe,joinBackward:BLe,joinDown:RLe,joinForward:jLe,joinItemBackward:zLe,joinItemForward:HLe,joinTextblockBackward:ULe,joinTextblockForward:WLe,joinUp:NLe,keyboardShortcut:GLe,lift:qLe,liftEmptyBlock:KLe,liftListItem:JLe,newlineInCode:XLe,resetAttributes:YLe,scrollIntoView:QLe,selectAll:ZLe,selectNodeBackward:ePe,selectNodeForward:tPe,selectParentNode:rPe,selectTextblockEnd:nPe,selectTextblockStart:iPe,setContent:sPe,setMark:pPe,setMeta:gPe,setNode:mPe,setNodeSelection:yPe,setTextSelection:vPe,sinkListItem:bPe,splitBlock:xPe,splitListItem:wPe,toggleList:SPe,toggleMark:DPe,toggleNode:EPe,toggleWrap:CPe,undoInputRule:TPe,unsetAllMarks:APe,unsetMark:kPe,updateAttributes:_Pe,wrapIn:$Pe,wrapInList:LPe});const FPe=mo.create({name:"commands",addCommands(){return{...PPe}}}),OPe=mo.create({name:"drop",addProseMirrorPlugins(){return[new Ko({key:new Hc("tiptapDrop"),props:{handleDrop:(e,t,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:r,moved:n})}}})]}}),IPe=mo.create({name:"editable",addProseMirrorPlugins(){return[new Ko({key:new Hc("editable"),props:{editable:()=>this.editor.options.editable}})]}}),MPe=mo.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Ko({key:new Hc("focusEvents"),props:{handleDOMEvents:{focus:(t,r)=>{e.isFocused=!0;const n=e.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1},blur:(t,r)=>{e.isFocused=!1;const n=e.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1}}}})]}}),NPe=mo.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:h}=l,{pos:d,parent:f}=h,p=h.parent.isTextblock&&d>0?a.doc.resolve(d-1):h,m=p.parent.type.spec.isolating,y=h.pos-h.parentOffset,b=m&&p.parent.childCount===1?y===h.pos:Vt.atStart(u).from===d;return!c||!f.type.isTextblock||f.textContent.length||!b||b&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},s={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return k_()||NU()?s:i},addProseMirrorPlugins(){return[new Ko({key:new Hc("clearDocument"),appendTransaction:(e,t,r)=>{const n=e.some(m=>m.docChanged)&&!t.doc.eq(r.doc),i=e.some(m=>m.getMeta("preventClearDocument"));if(!n||i)return;const{empty:s,from:o,to:a}=t.selection,l=Vt.atStart(t.doc).from,u=Vt.atEnd(t.doc).to;if(s||!(o===l&&a===u)||!L_(r.doc))return;const d=r.tr,f=j1({state:r,transaction:d}),{commands:p}=new z1({editor:this.editor,state:f});if(p.clearNodes(),!!d.steps.length)return d}})]}}),RPe=mo.create({name:"paste",addProseMirrorPlugins(){return[new Ko({key:new Hc("tiptapPaste"),props:{handlePaste:(e,t,r)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:r})}}})]}}),BPe=mo.create({name:"tabindex",addProseMirrorPlugins(){return[new Ko({key:new Hc("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Au{get name(){return this.node.type.name}constructor(t,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=r,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(t);return new Au(r,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Au(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Au(t,this.editor)}get children(){const t=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,s=r.isAtom&&!r.isText,o=this.pos+n+(s?0:1),a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new Au(a,this.editor,i,i?r:null);i&&(l.actualDepth=this.depth+1),t.push(new Au(a,this.editor,i,i?r:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===t)if(Object.keys(r).length>0){const s=i.node.attrs,o=Object.keys(r);for(let a=0;a{n&&i.length>0||(o.node.type.name===t&&s.every(l=>r[l]===o.node.attrs[l])&&i.push(o),!(n&&i.length>0)&&(i=i.concat(o.querySelectorAll(t,r,n))))}),i}setAttribute(t){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(r)}}const jPe=`.ProseMirror { position: relative; } @@ -2128,9 +2498,9 @@ img.ProseMirror-separator { .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 -}`;function OPe(e,t,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}class NPe extends G3e{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:n,moved:i})=>this.options.onDrop(r,n,i)),this.on("paste",({event:r,slice:n})=>this.options.onPaste(r,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=OPe(FPe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,r=!0){this.setOptions({editable:t}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,r){const n=_U(r)?r(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(t).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;n=r.filter(a=>!a.key.startsWith(o))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var t,r;const i=[...this.options.enableCoreExtensions?[kPe,lLe.configure({blockSeparator:(r=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),APe,_Pe,$Pe,PPe,TPe,LPe].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Bh(i,this)}createCommandManager(){this.commandManager=new U1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let t;try{t=FA(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(o=>o.name!=="collaboration"),this.createExtensionManager()}}),t=FA(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=FU(t,this.options.autofocus);this.view=new c3e(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Rh.create({doc:t,selection:r||void 0})}),this.view.dom.setAttribute("role","textbox"),this.view.dom.getAttribute("aria-label")||this.view.dom.setAttribute("aria-label","Rich-Text Editor");const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const r=this.state.apply(t),n=!this.state.selection.eq(r.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:r}),this.view.updateState(r),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),s=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return iPe(this.state,t)}isActive(t,r){const n=typeof t=="string"?t:null,i=typeof t=="string"?r:t;return sPe(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return tPe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:r=` +}`;function zPe(e,t,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}class HPe extends Z3e{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:n,moved:i})=>this.options.onDrop(r,n,i)),this.on("paste",({event:r,slice:n})=>this.options.onPaste(r,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=zPe(jPe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,r=!0){this.setOptions({editable:t}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,r){const n=LU(r)?r(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(t).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;n=r.filter(a=>!a.key.startsWith(o))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var t,r;const i=[...this.options.enableCoreExtensions?[IPe,gLe.configure({blockSeparator:(r=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),FPe,MPe,NPe,BPe,OPe,RPe].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new zh(i,this)}createCommandManager(){this.commandManager=new z1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let t;try{t=OT(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(o=>o.name!=="collaboration"),this.createExtensionManager()}}),t=OT(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=IU(t,this.options.autofocus);this.view=new y3e(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:jh.create({doc:t,selection:r||void 0})}),this.view.dom.setAttribute("role","textbox"),this.view.dom.getAttribute("aria-label")||this.view.dom.setAttribute("aria-label","Rich-Text Editor");const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const r=this.state.apply(t),n=!this.state.selection.eq(r.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:r}),this.view.updateState(r),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),s=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return hPe(this.state,t)}isActive(t,r){const n=typeof t=="string"?t:null,i=typeof t=="string"?r:t;return dPe(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return lPe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:r=` -`,textSerializers:n={}}=t||{};return rPe(this.state.doc,{blockSeparator:r,textSerializers:{...LU(this.schema),...n}})}get isEmpty(){return $_(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,r))||null}$nodes(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,r))||null}$pos(t){const r=this.state.doc.resolve(t);return new Cu(r,this)}get $doc(){return this.$pos(0)}}function Mg(e){return new Y3e({find:e.find,handler:({state:t,range:r,match:n})=>{const i=Jt(e.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:s}=t,o=n[n.length-1],a=n[0];if(o){const l=a.search(/\S/),u=r.from+a.indexOf(o),c=u+o.length;if(MU(r.from,r.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===e.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;cr.from&&s.delete(r.from+l,u);const d=r.from+l+o.length;s.addMark(r.from+l,d,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}class Cd{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(st(this,"addOptions",{name:this.name}))),this.storage=Jt(st(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Cd(t)}configure(t={}){const r=this.extend({...this.config,addOptions:()=>V1(this.options,t)});return r.name=this.name,r.parent=this.parent,r}extend(t={}){const r=new Cd(t);return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=Jt(st(r,"addOptions",{name:r.name})),r.storage=Jt(st(r,"addStorage",{name:r.name,options:r.options})),r}}function Ig(e){return new rLe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:i})=>{const s=Jt(e.getAttributes,void 0,n,i);if(s===!1||s===null)return null;const{tr:o}=t,a=n[n.length-1],l=n[0];let u=r.to;if(a){const c=l.search(/\S/),h=r.from+l.indexOf(a),d=h+a.length;if(MU(r.from,r.to,t.doc).filter(p=>p.mark.type.excluded.find(y=>y===e.type&&y!==p.mark.type)).filter(p=>p.to>h).length)return null;dr.from&&o.delete(r.from+c,h),u=r.from+c+a.length,o.addMark(r.from+c,u,e.type.create(s||{})),o.removeStoredMark(e.type)}}})}function MPe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var IU={exports:{}},DD={};/** +`,textSerializers:n={}}=t||{};return uPe(this.state.doc,{blockSeparator:r,textSerializers:{...FU(this.schema),...n}})}get isEmpty(){return L_(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,r))||null}$nodes(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,r))||null}$pos(t){const r=this.state.doc.resolve(t);return new Au(r,this)}get $doc(){return this.$pos(0)}}function Mg(e){return new iLe({find:e.find,handler:({state:t,range:r,match:n})=>{const i=Qt(e.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:s}=t,o=n[n.length-1],a=n[0];if(o){const l=a.search(/\S/),u=r.from+a.indexOf(o),c=u+o.length;if(RU(r.from,r.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===e.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;cr.from&&s.delete(r.from+l,u);const d=r.from+l+o.length;s.addMark(r.from+l,d,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}class Ad{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Qt(st(this,"addOptions",{name:this.name}))),this.storage=Qt(st(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ad(t)}configure(t={}){const r=this.extend({...this.config,addOptions:()=>U1(this.options,t)});return r.name=this.name,r.parent=this.parent,r}extend(t={}){const r=new Ad(t);return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=Qt(st(r,"addOptions",{name:r.name})),r.storage=Qt(st(r,"addStorage",{name:r.name,options:r.options})),r}}function Ng(e){return new uLe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:i})=>{const s=Qt(e.getAttributes,void 0,n,i);if(s===!1||s===null)return null;const{tr:o}=t,a=n[n.length-1],l=n[0];let u=r.to;if(a){const c=l.search(/\S/),h=r.from+l.indexOf(a),d=h+a.length;if(RU(r.from,r.to,t.doc).filter(p=>p.mark.type.excluded.find(y=>y===e.type&&y!==p.mark.type)).filter(p=>p.to>h).length)return null;dr.from&&o.delete(r.from+c,h),u=r.from+c+a.length,o.addMark(r.from+c,u,e.type.create(s||{})),o.removeStoredMark(e.type)}}})}function UPe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BU={exports:{}},SD={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -2138,7 +2508,7 @@ img.ProseMirror-separator { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var VI;function IPe(){if(VI)return DD;VI=1;var e=pt;function t(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(h,d){var f=d(),p=n({inst:{value:f,getSnapshot:d}}),m=p[0].inst,y=p[1];return s(function(){m.value=f,m.getSnapshot=d,l(m)&&y({inst:m})},[h,f,d]),i(function(){return l(m)&&y({inst:m}),h(function(){l(m)&&y({inst:m})})},[h]),o(f),f}function l(h){var d=h.getSnapshot;h=h.value;try{var f=d();return!r(h,f)}catch{return!0}}function u(h,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return DD.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,DD}IU.exports=IPe();var L_=IU.exports;const RPe=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},BPe=({contentComponent:e})=>{const t=L_.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return pt.createElement(pt.Fragment,null,Object.values(t))};function jPe(){const e=new Set;let t={};return{subscribe(r){return e.add(r),()=>{e.delete(r)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(r,n){t={...t,[r]:OT.createPortal(n.reactElement,n.element,r)},e.forEach(i=>i())},removeRenderer(r){const n={...t};delete n[r],t=n,e.forEach(i=>i())}}}class zPe extends pt.Component{constructor(t){var r;super(t),this.editorContentRef=pt.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((r=t.editor)===null||r===void 0)&&r.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const r=this.editorContentRef.current;r.append(...t.options.element.childNodes),t.setOptions({element:r}),t.contentComponent=jPe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const r=document.createElement("div");r.append(...t.options.element.childNodes),t.setOptions({element:r})}render(){const{editor:t,innerRef:r,...n}=this.props;return pt.createElement(pt.Fragment,null,pt.createElement("div",{ref:RPe(r,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&pt.createElement(BPe,{contentComponent:t.contentComponent}))}}const HPe=z.forwardRef((e,t)=>{const r=pt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return pt.createElement(zPe,{key:r,innerRef:t,...e})}),UPe=pt.memo(HPe);var WPe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!(o==="_owner"&&t.$$typeof)&&!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},VPe=MPe(WPe),RU={exports:{}},ED={};/** + */var qN;function WPe(){if(qN)return SD;qN=1;var e=gt;function t(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(h,d){var f=d(),p=n({inst:{value:f,getSnapshot:d}}),m=p[0].inst,y=p[1];return s(function(){m.value=f,m.getSnapshot=d,l(m)&&y({inst:m})},[h,f,d]),i(function(){return l(m)&&y({inst:m}),h(function(){l(m)&&y({inst:m})})},[h]),o(f),f}function l(h){var d=h.getSnapshot;h=h.value;try{var f=d();return!r(h,f)}catch{return!0}}function u(h,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return SD.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,SD}BU.exports=WPe();var P_=BU.exports;const VPe=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},GPe=({contentComponent:e})=>{const t=P_.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return gt.createElement(gt.Fragment,null,Object.values(t))};function qPe(){const e=new Set;let t={};return{subscribe(r){return e.add(r),()=>{e.delete(r)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(r,n){t={...t,[r]:IA.createPortal(n.reactElement,n.element,r)},e.forEach(i=>i())},removeRenderer(r){const n={...t};delete n[r],t=n,e.forEach(i=>i())}}}class KPe extends gt.Component{constructor(t){var r;super(t),this.editorContentRef=gt.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((r=t.editor)===null||r===void 0)&&r.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const r=this.editorContentRef.current;r.append(...t.options.element.childNodes),t.setOptions({element:r}),t.contentComponent=qPe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const r=document.createElement("div");r.append(...t.options.element.childNodes),t.setOptions({element:r})}render(){const{editor:t,innerRef:r,...n}=this.props;return gt.createElement(gt.Fragment,null,gt.createElement("div",{ref:VPe(r,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&>.createElement(GPe,{contentComponent:t.contentComponent}))}}const JPe=z.forwardRef((e,t)=>{const r=gt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return gt.createElement(KPe,{key:r,innerRef:t,...e})}),XPe=gt.memo(JPe);var YPe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!(o==="_owner"&&t.$$typeof)&&!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},QPe=UPe(YPe),jU={exports:{}},DD={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -2146,8 +2516,8 @@ img.ProseMirror-separator { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var GI;function GPe(){if(GI)return ED;GI=1;var e=pt,t=L_;function r(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,a=e.useMemo,l=e.useDebugValue;return ED.useSyncExternalStoreWithSelector=function(u,c,h,d,f){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function b(w){if(!v){if(v=!0,E=w,w=d(w),f!==void 0&&m.hasValue){var A=m.value;if(f(A,w))return D=A}return D=w}if(A=D,n(E,w))return A;var $=d(w);return f!==void 0&&f(A,$)?A:(E=w,D=$)}var v=!1,E,D,C=h===void 0?null:h;return[function(){return b(c())},C===null?void 0:function(){return b(C())}]},[c,h,d,f]);var y=i(u,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},ED}RU.exports=GPe();var qPe=RU.exports;class KPe{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const r=()=>{this.transactionNumber+=1,this.subscribers.forEach(i=>i())},n=this.editor;return n.on("transaction",r),()=>{n.off("transaction",r)}}}}function JPe(e){var t;const[r]=z.useState(()=>new KPe(e.editor)),n=qPe.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:VPe);return z.useEffect(()=>r.watch(e.editor),[e.editor,r]),z.useDebugValue(n),n}const XPe=!1,NA=typeof window>"u",YPe=NA||!!(typeof window<"u"&&window.next);class QPe{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return NA||YPe?null:this.createEditor();if(this.options.current.immediatelyRender&&NA&&XPe)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...n)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)===null||s===void 0?void 0:s.call(i,...n)},onBlur:(...n)=>{var i,s;return(s=(i=this.options.current).onBlur)===null||s===void 0?void 0:s.call(i,...n)},onCreate:(...n)=>{var i,s;return(s=(i=this.options.current).onCreate)===null||s===void 0?void 0:s.call(i,...n)},onDestroy:(...n)=>{var i,s;return(s=(i=this.options.current).onDestroy)===null||s===void 0?void 0:s.call(i,...n)},onFocus:(...n)=>{var i,s;return(s=(i=this.options.current).onFocus)===null||s===void 0?void 0:s.call(i,...n)},onSelectionUpdate:(...n)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)===null||s===void 0?void 0:s.call(i,...n)},onTransaction:(...n)=>{var i,s;return(s=(i=this.options.current).onTransaction)===null||s===void 0?void 0:s.call(i,...n)},onUpdate:(...n)=>{var i,s;return(s=(i=this.options.current).onUpdate)===null||s===void 0?void 0:s.call(i,...n)},onContentError:(...n)=>{var i,s;return(s=(i=this.options.current).onContentError)===null||s===void 0?void 0:s.call(i,...n)},onDrop:(...n)=>{var i,s;return(s=(i=this.options.current).onDrop)===null||s===void 0?void 0:s.call(i,...n)},onPaste:(...n)=>{var i,s;return(s=(i=this.options.current).onPaste)===null||s===void 0?void 0:s.call(i,...n)}};return new NPe(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((n,i)=>n===t[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===t&&this.setEditor(null))},1)}}function ZPe(e={},t=[]){const r=z.useRef(e);r.current=e;const[n]=z.useState(()=>new QPe(r)),i=L_.useSyncExternalStore(n.subscribe,n.getEditor,n.getServerSnapshot);return z.useDebugValue(i),z.useEffect(n.onRender(t)),JPe({editor:i,selector:({transactionNumber:s})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&s===0?0:s+1}),i}const eFe=z.createContext({editor:null});eFe.Consumer;const tFe=z.createContext({onDragStart:void 0}),rFe=()=>z.useContext(tFe);pt.forwardRef((e,t)=>{const{onDragStart:r}=rFe(),n=e.as||"div";return pt.createElement(n,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});const nFe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,iFe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,sFe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,oFe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,aFe=Ta.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",zc(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Mg({find:nFe,type:this.type}),Mg({find:sFe,type:this.type})]},addPasteRules(){return[Ig({find:iFe,type:this.type}),Ig({find:oFe,type:this.type})]}}),lFe=Cd.create({name:"doc",topNode:!0,content:"block+"});/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:BU,setPrototypeOf:qI,isFrozen:uFe,getPrototypeOf:cFe,getOwnPropertyDescriptor:hFe}=Object;let{freeze:Si,seal:$s,create:jU}=Object,{apply:MA,construct:IA}=typeof Reflect<"u"&&Reflect;Si||(Si=function(t){return t});$s||($s=function(t){return t});MA||(MA=function(t,r,n){return t.apply(r,n)});IA||(IA=function(t,r){return new t(...r)});const Ty=is(Array.prototype.forEach),KI=is(Array.prototype.pop),Gf=is(Array.prototype.push),lv=is(String.prototype.toLowerCase),CD=is(String.prototype.toString),JI=is(String.prototype.match),qf=is(String.prototype.replace),dFe=is(String.prototype.indexOf),fFe=is(String.prototype.trim),Hs=is(Object.prototype.hasOwnProperty),hi=is(RegExp.prototype.test),Kf=pFe(TypeError);function is(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:lv;qI&&qI(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(uFe(t)||(t[n]=s),i=s)}e[i]=!0}return e}function gFe(e){for(let t=0;t/gm),xFe=$s(/\${[\w\W]*}/gm),wFe=$s(/^data-[\-\w.\u00B7-\uFFFF]/),SFe=$s(/^aria-[\-\w]+$/),zU=$s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),DFe=$s(/^(?:\w+script|data):/i),EFe=$s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),HU=$s(/^html$/i),CFe=$s(/^[a-z][.\w]*(-[.\w]+)+$/i);var eR=Object.freeze({__proto__:null,MUSTACHE_EXPR:vFe,ERB_EXPR:bFe,TMPLIT_EXPR:xFe,DATA_ATTR:wFe,ARIA_ATTR:SFe,IS_ALLOWED_URI:zU,IS_SCRIPT_OR_DATA:DFe,ATTR_WHITESPACE:EFe,DOCTYPE_NAME:HU,CUSTOM_ELEMENT:CFe});const Xf={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},AFe=function(){return typeof window>"u"?null:window},TFe=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function UU(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:AFe();const t=Ne=>UU(Ne);if(t.version="3.1.7",t.removed=[],!e||!e.document||e.document.nodeType!==Xf.document)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:f}=e,p=l.prototype,m=Jf(p,"cloneNode"),y=Jf(p,"remove"),b=Jf(p,"nextSibling"),v=Jf(p,"childNodes"),E=Jf(p,"parentNode");if(typeof o=="function"){const Ne=r.createElement("template");Ne.content&&Ne.content.ownerDocument&&(r=Ne.content.ownerDocument)}let D,C="";const{implementation:w,createNodeIterator:A,createDocumentFragment:$,getElementsByTagName:O}=r,{importNode:P}=n;let N={};t.isSupported=typeof BU=="function"&&typeof E=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:L,TMPLIT_EXPR:k,DATA_ATTR:T,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:U}=eR;let{IS_ALLOWED_URI:V}=eR,K=null;const J=Rt({},[...XI,...AD,...TD,...kD,...YI]);let G=null;const Y=Rt({},[...QI,..._D,...ZI,...ky]);let Q=Object.seal(jU(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,le=null,be=!0,ce=!0,xe=!1,ke=!0,Re=!1,$t=!0,mt=!1,W=!1,ye=!1,pe=!1,re=!1,ee=!1,ue=!0,De=!1;const Ce="user-content-";let fe=!0,Ee=!1,je={},ae=null;const ve=Rt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ae=null;const ze=Rt({},["audio","video","img","source","image","track"]);let at=null;const bt=Rt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",At="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ht=nt,Ft=!1,rr=null;const sn=Rt({},[ft,At,nt],CD);let Ai=null;const Tn=["application/xhtml+xml","text/html"],us="text/html";let fr=null,Yr=null;const oi=r.createElement("form"),Ti=function(oe){return oe instanceof RegExp||oe instanceof Function},ki=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Yr&&Yr===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=bu(oe),Ai=Tn.indexOf(oe.PARSER_MEDIA_TYPE)===-1?us:oe.PARSER_MEDIA_TYPE,fr=Ai==="application/xhtml+xml"?CD:lv,K=Hs(oe,"ALLOWED_TAGS")?Rt({},oe.ALLOWED_TAGS,fr):J,G=Hs(oe,"ALLOWED_ATTR")?Rt({},oe.ALLOWED_ATTR,fr):Y,rr=Hs(oe,"ALLOWED_NAMESPACES")?Rt({},oe.ALLOWED_NAMESPACES,CD):sn,at=Hs(oe,"ADD_URI_SAFE_ATTR")?Rt(bu(bt),oe.ADD_URI_SAFE_ATTR,fr):bt,Ae=Hs(oe,"ADD_DATA_URI_TAGS")?Rt(bu(ze),oe.ADD_DATA_URI_TAGS,fr):ze,ae=Hs(oe,"FORBID_CONTENTS")?Rt({},oe.FORBID_CONTENTS,fr):ve,X=Hs(oe,"FORBID_TAGS")?Rt({},oe.FORBID_TAGS,fr):{},le=Hs(oe,"FORBID_ATTR")?Rt({},oe.FORBID_ATTR,fr):{},je=Hs(oe,"USE_PROFILES")?oe.USE_PROFILES:!1,be=oe.ALLOW_ARIA_ATTR!==!1,ce=oe.ALLOW_DATA_ATTR!==!1,xe=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=oe.SAFE_FOR_TEMPLATES||!1,$t=oe.SAFE_FOR_XML!==!1,mt=oe.WHOLE_DOCUMENT||!1,pe=oe.RETURN_DOM||!1,re=oe.RETURN_DOM_FRAGMENT||!1,ee=oe.RETURN_TRUSTED_TYPE||!1,ye=oe.FORCE_BODY||!1,ue=oe.SANITIZE_DOM!==!1,De=oe.SANITIZE_NAMED_PROPS||!1,fe=oe.KEEP_CONTENT!==!1,Ee=oe.IN_PLACE||!1,V=oe.ALLOWED_URI_REGEXP||zU,ht=oe.NAMESPACE||nt,Q=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&Ti(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Q.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&Ti(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Q.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(ce=!1),re&&(pe=!0),je&&(K=Rt({},YI),G=[],je.html===!0&&(Rt(K,XI),Rt(G,QI)),je.svg===!0&&(Rt(K,AD),Rt(G,_D),Rt(G,ky)),je.svgFilters===!0&&(Rt(K,TD),Rt(G,_D),Rt(G,ky)),je.mathMl===!0&&(Rt(K,kD),Rt(G,ZI),Rt(G,ky))),oe.ADD_TAGS&&(K===J&&(K=bu(K)),Rt(K,oe.ADD_TAGS,fr)),oe.ADD_ATTR&&(G===Y&&(G=bu(G)),Rt(G,oe.ADD_ATTR,fr)),oe.ADD_URI_SAFE_ATTR&&Rt(at,oe.ADD_URI_SAFE_ATTR,fr),oe.FORBID_CONTENTS&&(ae===ve&&(ae=bu(ae)),Rt(ae,oe.FORBID_CONTENTS,fr)),fe&&(K["#text"]=!0),mt&&Rt(K,["html","head","body"]),K.table&&(Rt(K,["tbody"]),delete X.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Kf('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Kf('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=oe.TRUSTED_TYPES_POLICY,C=D.createHTML("")}else D===void 0&&(D=TFe(f,i)),D!==null&&typeof C=="string"&&(C=D.createHTML(""));Si&&Si(oe),Yr=oe}},Vi=Rt({},["mi","mo","mn","ms","mtext"]),mo=Rt({},["annotation-xml"]),Fs=Rt({},["title","style","font","a","script"]),se=Rt({},[...AD,...TD,...mFe]),de=Rt({},[...kD,...yFe]),ge=function(oe){let Pe=E(oe);(!Pe||!Pe.tagName)&&(Pe={namespaceURI:ht,tagName:"template"});const Ke=lv(oe.tagName),yt=lv(Pe.tagName);return rr[oe.namespaceURI]?oe.namespaceURI===At?Pe.namespaceURI===nt?Ke==="svg":Pe.namespaceURI===ft?Ke==="svg"&&(yt==="annotation-xml"||Vi[yt]):!!se[Ke]:oe.namespaceURI===ft?Pe.namespaceURI===nt?Ke==="math":Pe.namespaceURI===At?Ke==="math"&&mo[yt]:!!de[Ke]:oe.namespaceURI===nt?Pe.namespaceURI===At&&!mo[yt]||Pe.namespaceURI===ft&&!Vi[yt]?!1:!de[Ke]&&(Fs[Ke]||!se[Ke]):!!(Ai==="application/xhtml+xml"&&rr[oe.namespaceURI]):!1},we=function(oe){Gf(t.removed,{element:oe});try{E(oe).removeChild(oe)}catch{y(oe)}},Ve=function(oe,Pe){try{Gf(t.removed,{attribute:Pe.getAttributeNode(oe),from:Pe})}catch{Gf(t.removed,{attribute:null,from:Pe})}if(Pe.removeAttribute(oe),oe==="is"&&!G[oe])if(pe||re)try{we(Pe)}catch{}else try{Pe.setAttribute(oe,"")}catch{}},rt=function(oe){let Pe=null,Ke=null;if(ye)oe=""+oe;else{const xr=JI(oe,/^[\r\n\t ]+/);Ke=xr&&xr[0]}Ai==="application/xhtml+xml"&&ht===nt&&(oe=''+oe+"");const yt=D?D.createHTML(oe):oe;if(ht===nt)try{Pe=new d().parseFromString(yt,Ai)}catch{}if(!Pe||!Pe.documentElement){Pe=w.createDocument(ht,"template",null);try{Pe.documentElement.innerHTML=Ft?C:yt}catch{}}const qt=Pe.body||Pe.documentElement;return oe&&Ke&&qt.insertBefore(r.createTextNode(Ke),qt.childNodes[0]||null),ht===nt?O.call(Pe,mt?"html":"body")[0]:mt?Pe.documentElement:qt},ct=function(oe){return A.call(oe.ownerDocument||oe,oe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},He=function(oe){return oe instanceof h&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof c)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},Ge=function(oe){return typeof a=="function"&&oe instanceof a},Ue=function(oe,Pe,Ke){N[oe]&&Ty(N[oe],yt=>{yt.call(t,Pe,Ke,Yr)})},it=function(oe){let Pe=null;if(Ue("beforeSanitizeElements",oe,null),He(oe))return we(oe),!0;const Ke=fr(oe.nodeName);if(Ue("uponSanitizeElement",oe,{tagName:Ke,allowedTags:K}),oe.hasChildNodes()&&!Ge(oe.firstElementChild)&&hi(/<[/\w]/g,oe.innerHTML)&&hi(/<[/\w]/g,oe.textContent)||oe.nodeType===Xf.progressingInstruction||$t&&oe.nodeType===Xf.comment&&hi(/<[/\w]/g,oe.data))return we(oe),!0;if(!K[Ke]||X[Ke]){if(!X[Ke]&&St(Ke)&&(Q.tagNameCheck instanceof RegExp&&hi(Q.tagNameCheck,Ke)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(Ke)))return!1;if(fe&&!ae[Ke]){const yt=E(oe)||oe.parentNode,qt=v(oe)||oe.childNodes;if(qt&&yt){const xr=qt.length;for(let Lr=xr-1;Lr>=0;--Lr){const Ur=m(qt[Lr],!0);Ur.__removalCount=(oe.__removalCount||0)+1,yt.insertBefore(Ur,b(oe))}}}return we(oe),!0}return oe instanceof l&&!ge(oe)||(Ke==="noscript"||Ke==="noembed"||Ke==="noframes")&&hi(/<\/no(script|embed|frames)/i,oe.innerHTML)?(we(oe),!0):(Re&&oe.nodeType===Xf.text&&(Pe=oe.textContent,Ty([F,L,k],yt=>{Pe=qf(Pe,yt," ")}),oe.textContent!==Pe&&(Gf(t.removed,{element:oe.cloneNode()}),oe.textContent=Pe)),Ue("afterSanitizeElements",oe,null),!1)},xt=function(oe,Pe,Ke){if(ue&&(Pe==="id"||Pe==="name")&&(Ke in r||Ke in oi))return!1;if(!(ce&&!le[Pe]&&hi(T,Pe))){if(!(be&&hi(M,Pe))){if(!G[Pe]||le[Pe]){if(!(St(oe)&&(Q.tagNameCheck instanceof RegExp&&hi(Q.tagNameCheck,oe)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(oe))&&(Q.attributeNameCheck instanceof RegExp&&hi(Q.attributeNameCheck,Pe)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(Pe))||Pe==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&hi(Q.tagNameCheck,Ke)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(Ke))))return!1}else if(!at[Pe]){if(!hi(V,qf(Ke,B,""))){if(!((Pe==="src"||Pe==="xlink:href"||Pe==="href")&&oe!=="script"&&dFe(Ke,"data:")===0&&Ae[oe])){if(!(xe&&!hi(R,qf(Ke,B,"")))){if(Ke)return!1}}}}}}return!0},St=function(oe){return oe!=="annotation-xml"&&JI(oe,U)},Gt=function(oe){Ue("beforeSanitizeAttributes",oe,null);const{attributes:Pe}=oe;if(!Pe)return;const Ke={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G};let yt=Pe.length;for(;yt--;){const qt=Pe[yt],{name:xr,namespaceURI:Lr,value:Ur}=qt,Un=fr(xr);let pr=xr==="value"?Ur:fFe(Ur);if(Ke.attrName=Un,Ke.attrValue=pr,Ke.keepAttr=!0,Ke.forceKeepAttr=void 0,Ue("uponSanitizeAttribute",oe,Ke),pr=Ke.attrValue,Ke.forceKeepAttr||(Ve(xr,oe),!Ke.keepAttr))continue;if(!ke&&hi(/\/>/i,pr)){Ve(xr,oe);continue}Re&&Ty([F,L,k],Qt=>{pr=qf(pr,Qt," ")});const Lt=fr(oe.nodeName);if(xt(Lt,Un,pr)){if(De&&(Un==="id"||Un==="name")&&(Ve(xr,oe),pr=Ce+pr),$t&&hi(/((--!?|])>)|<\/(style|title)/i,pr)){Ve(xr,oe);continue}if(D&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Lr)switch(f.getAttributeType(Lt,Un)){case"TrustedHTML":{pr=D.createHTML(pr);break}case"TrustedScriptURL":{pr=D.createScriptURL(pr);break}}try{Lr?oe.setAttributeNS(Lr,xr,pr):oe.setAttribute(xr,pr),He(oe)?we(oe):KI(t.removed)}catch{}}}Ue("afterSanitizeAttributes",oe,null)},Ut=function Ne(oe){let Pe=null;const Ke=ct(oe);for(Ue("beforeSanitizeShadowDOM",oe,null);Pe=Ke.nextNode();)Ue("uponSanitizeShadowNode",Pe,null),!it(Pe)&&(Pe.content instanceof s&&Ne(Pe.content),Gt(Pe));Ue("afterSanitizeShadowDOM",oe,null)};return t.sanitize=function(Ne){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=null,Ke=null,yt=null,qt=null;if(Ft=!Ne,Ft&&(Ne=""),typeof Ne!="string"&&!Ge(Ne))if(typeof Ne.toString=="function"){if(Ne=Ne.toString(),typeof Ne!="string")throw Kf("dirty is not a string, aborting")}else throw Kf("toString is not a function");if(!t.isSupported)return Ne;if(W||ki(oe),t.removed=[],typeof Ne=="string"&&(Ee=!1),Ee){if(Ne.nodeName){const Ur=fr(Ne.nodeName);if(!K[Ur]||X[Ur])throw Kf("root node is forbidden and cannot be sanitized in-place")}}else if(Ne instanceof a)Pe=rt(""),Ke=Pe.ownerDocument.importNode(Ne,!0),Ke.nodeType===Xf.element&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Pe=Ke:Pe.appendChild(Ke);else{if(!pe&&!Re&&!mt&&Ne.indexOf("<")===-1)return D&&ee?D.createHTML(Ne):Ne;if(Pe=rt(Ne),!Pe)return pe?null:ee?C:""}Pe&&ye&&we(Pe.firstChild);const xr=ct(Ee?Ne:Pe);for(;yt=xr.nextNode();)it(yt)||(yt.content instanceof s&&Ut(yt.content),Gt(yt));if(Ee)return Ne;if(pe){if(re)for(qt=$.call(Pe.ownerDocument);Pe.firstChild;)qt.appendChild(Pe.firstChild);else qt=Pe;return(G.shadowroot||G.shadowrootmode)&&(qt=P.call(n,qt,!0)),qt}let Lr=mt?Pe.outerHTML:Pe.innerHTML;return mt&&K["!doctype"]&&Pe.ownerDocument&&Pe.ownerDocument.doctype&&Pe.ownerDocument.doctype.name&&hi(HU,Pe.ownerDocument.doctype.name)&&(Lr=" -`+Lr),Re&&Ty([F,L,k],Ur=>{Lr=qf(Lr,Ur," ")}),D&&ee?D.createHTML(Lr):Lr},t.setConfig=function(){let Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ki(Ne),W=!0},t.clearConfig=function(){Yr=null,W=!1},t.isValidAttribute=function(Ne,oe,Pe){Yr||ki({});const Ke=fr(Ne),yt=fr(oe);return xt(Ke,yt,Pe)},t.addHook=function(Ne,oe){typeof oe=="function"&&(N[Ne]=N[Ne]||[],Gf(N[Ne],oe))},t.removeHook=function(Ne){if(N[Ne])return KI(N[Ne])},t.removeHooks=function(Ne){N[Ne]&&(N[Ne]=[])},t.removeAllHooks=function(){N={}},t}var kFe=UU();const _Fe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,$Fe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,LFe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,PFe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,FFe=Ta.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",zc(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Mg({find:_Fe,type:this.type}),Mg({find:LFe,type:this.type})]},addPasteRules(){return[Ig({find:$Fe,type:this.type}),Ig({find:PFe,type:this.type})]}}),OFe=Cd.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",zc(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),NFe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,MFe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,IFe=Ta.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",zc(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Mg({find:NFe,type:this.type})]},addPasteRules(){return[Ig({find:MFe,type:this.type})]}}),RFe=Cd.create({name:"text",group:"inline"}),BFe=Ta.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",zc(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const r=k_(e,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),jFe=Ta.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",zc(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),zFe=({editor:e})=>e?j.jsxs("ul",{className:"menu-bar",children:[j.jsx("li",{children:j.jsx(wt,{variant:e.isActive("bold")?"filled":"ghost",onClick:()=>e.chain().focus().toggleBold().run(),disabled:!e.can().chain().focus().toggleBold().run(),type:"button",children:j.jsx("b",{children:"B"})})}),j.jsx("li",{children:j.jsx(wt,{variant:e.isActive("italic")?"filled":"ghost",onClick:()=>e.chain().focus().toggleItalic().run(),disabled:!e.can().chain().focus().toggleItalic().run(),type:"button",children:j.jsx("i",{children:"I"})})}),j.jsx("li",{children:j.jsx(wt,{variant:e.isActive("underline")?"filled":"ghost",onClick:()=>e.chain().focus().toggleUnderline().run(),disabled:!e.can().chain().focus().toggleUnderline().run(),type:"button",children:j.jsx("u",{children:"U"})})}),j.jsx("li",{children:j.jsx(wt,{variant:e.isActive("strike")?"filled":"ghost",onClick:()=>e.chain().focus().toggleStrike().run(),disabled:!e.can().chain().focus().toggleStrike().run(),type:"button",children:j.jsx("s",{children:"S"})})})]}):null,HFe=({label:e,richTextValue:t,handleRichTextChange:r})=>{const n=ZPe({extensions:[BFe,lFe,OFe,RFe,aFe,IFe,FFe,jFe],editorProps:{attributes:{class:"text-editor"}},content:t,injectCSS:!1,parseOptions:{preserveWhitespace:!1},onUpdate(i){const s=kFe.sanitize(i.editor.getHTML().replaceAll(" ",""));r(s==="

"?"":s)}});return z.useEffect(()=>{t==""&&(n==null||n.commands.setContent(t,!0))},[t]),j.jsxs("div",{className:"editor-container",children:[e&&j.jsx("label",{children:e}),j.jsxs("div",{className:"text-container",children:[j.jsx(UPe,{editor:n}),j.jsx(zFe,{editor:n})]})]})},UFe=({className:e,onColorPick:t,selectedColor:r})=>{const{t:n}=Yt(),[i,s]=z.useState(!1),[o,a]=z.useState("");return j.jsxs(j.Fragment,{children:[j.jsxs(wt,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectColor"),j.jsx(gs,{placement:"left",children:n("playgroundSelectColor")})]}),j.jsx($d,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},drawerHeader:j.jsxs("div",{className:"flex gap-fix-3xl",children:[j.jsx("span",{className:"my-auto",children:n("playgroundSelectColor")}),j.jsx(Gr,{type:"search",variant:"floating",label:n("search"),value:o,onChange:l=>a(l.target.value)})]}),className:"select-icon-dialog",children:j.jsx("div",{className:"grid-cols-3 md:grid-cols-5 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:[...HK,"none"].filter(l=>l.includes(o)).map(l=>j.jsx("button",{onClick:()=>t(l),children:j.jsxs(Mi,{"data-interactive":"elevation",style:{backgroundColor:"var(--db-adaptive-bg-default)"},className:`flex-row min-h-siz-lg gap-fix-md justify-between items-center db-${l}`,spacing:"small",children:[l,r===l&&j.jsx(Ld,{icon:"done",children:"Selected color"})]})},`color-button-${l}`))})})]})},Hc=({settings:e})=>{const{t}=Yt(),{actions:{setProp:r,setCustom:n,setHidden:i},props:s}=Vo(a=>({props:a.data.props})),o=(a,l,u)=>{u==="custom"?n(c=>c[a]=l):u==="hidden"?i(l):r(c=>c[a]=l)};return s?j.jsx("div",{className:"flex flex-col gap-fix-md",children:e.filter(a=>!a.isHidden||!a.isHidden(s)).map(a=>{var l,u,c,h;return j.jsxs(z.Fragment,{children:[(a.type==="text"||a.type==="number")&&j.jsx(Gr,{type:a.type,min:a.type==="number"&&((l=a.numberOptions)==null?void 0:l.min)||void 0,max:a.type==="number"&&((u=a.numberOptions)==null?void 0:u.max)||void 0,step:a.type==="number"&&((c=a.numberOptions)==null?void 0:c.step)||void 0,dataList:a.dataList,label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType)}),a.type==="textarea"&&j.jsx(wp,{label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType)}),a.type==="richtext"&&j.jsx(HFe,{label:t(a.key),richTextValue:s[a.key],handleRichTextChange:d=>o(a.key,d,a.changeType)}),a.type==="select"&&j.jsx(Iu,{label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType),children:(h=a.selectOptions)==null?void 0:h.map(d=>j.jsx("option",{value:d.value,children:t(d.label||d.value||"")},`select-${a.key}-${d.label||d.value}`))}),a.type==="switch"&&j.jsx(hJ,{label:t(a.key),checked:s[a.key],onChange:d=>o(a.key,d.target.checked,a.changeType)}),a.type==="icon"&&j.jsxs("div",{className:"flex gap-fix-md items-center",children:[j.jsxs("div",{className:"flex flex-col",children:[j.jsx(ur,{size:"small",icon:"none",children:t(a.key)}),j.jsx("span",{children:s[a.key]})]}),j.jsx(Ld,{icon:s[a.key]}),j.jsx(O2e,{className:"ml-auto",selectedIcon:s[a.key],onIconPick:d=>{o(a.key,d,a.changeType)}})]}),a.type==="color"&&j.jsxs("div",{className:"flex gap-fix-md items-center",children:[j.jsxs("div",{className:`flex flex-col rounded p-fix-xs ${s[a.key]!=="none"?`db-${s[a.key]}`:""}`,children:[j.jsx(ur,{size:"small",icon:"none",children:t(a.key)}),j.jsx("span",{children:s[a.key]})]}),j.jsx(UFe,{className:"ml-auto",selectedColor:s[a.key],onColorPick:d=>{o(a.key,d,a.changeType)}})]})]},`setting-${a.key}`)})}):j.jsx(ur,{semantic:"warning",children:t("playgroundCopyError")})},Uc=(e,t,r)=>`drag-container${e?" selected":""}${t?" hovered":""}${r?` ${r}`:""}`,WFe=(e,t)=>e.tope.left{const{previewContainer:r}=ji(),[n,i]=z.useState(),[s,o]=z.useState(!1),[a,l]=z.useState(!1);return z.useEffect(()=>{if(n&&r){const u=n.getBoundingClientRect();o(WFe(u,r)),l(VFe(u,r))}},[n,r]),j.jsx("span",{ref:u=>{u&&(t(u),i(u))},className:"drag-button flex py-fix-3xs pl-fix-3xs","data-icon-after":"dots_drag_and_drop","data-outside-y":s,"data-outside-x":a,children:e})},P_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=Vo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs(wt,{className:`${Uc(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[e.children,j.jsx(Wc,{componentName:s,drag:r})]})},GFe=()=>j.jsx(Hc,{settings:[{key:"children",type:"text"},{key:"variant",type:"select",selectOptions:[{label:"outlined",value:"outlined"},{label:"brand",value:"brand"},{label:"filled",value:"filled"},{label:"ghost",value:"ghost"}]},{key:"disabled",type:"switch"},{key:"size",type:"select",selectOptions:[{label:"small",value:"small"},{label:"medium",value:"medium"}]},{key:"noText",type:"switch"},{key:"width",type:"select",selectOptions:[{label:"auto",value:"auto"},{label:"full",value:"full"}]},{key:"icon",type:"icon"}]});P_.craft={props:{variant:"outlined",children:"Test",size:"medium",disabled:!1,noText:!1,width:"auto",icon:"none"},related:{settings:GFe}};const cm=({children:e,className:t})=>{const{connectors:{connect:r},id:n}=Vo(),{selected:i}=ii(s=>{const[o]=s.events.selected;return{selected:n===o}});return j.jsx("div",{className:`drop-container ${t||""}${i?" selected":""}`,ref:s=>{s&&r(s)},children:e})};cm.craft={rules:{canMoveIn:e=>e.every(()=>!0),canDrag:()=>!1}};const F_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=Vo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs(Mi,{className:`${Uc(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[j.jsx(hf,{id:"card-children",is:cm,canvas:!0,children:e.children}),j.jsx(Wc,{componentName:s,drag:r})]})},qFe=()=>j.jsx(Hc,{settings:[{key:"spacing",type:"select",selectOptions:[{value:"none"},{value:"small"},{value:"medium"}]},{key:"elevationLevel",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"}]},{key:"behaviour",type:"select",selectOptions:[{value:"default"},{value:"interactive"}]}]});F_.craft={props:{spacing:"small",behaviour:"default",elevationLevel:"1"},related:{settings:qFe}};const KFe=({display:e,direction:t,gap:r,width:n,cells:i,padding:s,color:o})=>{let a="";return e==="grid"?(a+=" grid",t==="column"?a+=` grid-cols-${i||4}`:a+=` grid-rows-${i||4}`):(a+=" flex",t==="column"?a+=" flex-col":a+=" flex-row"),r&&r!=="none"&&(a+=` gap-fix-${r}`),n==="fit"?a+=" w-fit":a+=" w-full",s!=="none"&&(a+=` p-fix-${s}`),o&&o!=="none"&&(a+=` db-${o}`),a},O_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=Vo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs("div",{className:`${Uc(o,i,`${KFe(e)}${e.className||""}`)}`,ref:a=>{a&&t(a)},children:[j.jsx(hf,{id:"drop-container",is:cm,canvas:!0,children:e.children}),j.jsx(Wc,{componentName:s,drag:r})]})},JFe=()=>j.jsx(Hc,{settings:[{key:"padding",type:"select",selectOptions:[{value:"none"},{value:"3xs"},{value:"2xs"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"},{value:"2xl"},{value:"3xl"}]},{key:"width",type:"select",selectOptions:[{value:"full"},{value:"fit"}]},{key:"display",type:"select",selectOptions:[{value:"flex"},{value:"grid"}]},{key:"direction",type:"select",selectOptions:[{value:"row"},{value:"column"}]},{key:"cells",type:"number",numberOptions:{min:1,max:8},isHidden:e=>(e==null?void 0:e.display)==="flex"},{key:"gap",type:"select",selectOptions:[{value:"none"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"}]},{key:"color",type:"color"}]});O_.craft={props:{display:"flex",direction:"row",gap:"md",width:"full",cells:4,padding:"none",color:"none"},related:{settings:JFe}};const N_=({text:e,className:t})=>{const{t:r}=Yt(),{connectors:{connect:n,drag:i},id:s,hovered:o,name:a}=Vo(u=>({name:u.data.custom.displayName||u.data.name,hovered:u.data.custom.hover})),{selected:l}=ii(u=>{const[c]=u.events.selected;return{selected:s===c}});return j.jsxs("div",{className:`${Uc(l,o,t)}`,"data-hint":e&&(e==null?void 0:e.length)>0?void 0:r("pgEditMe"),ref:u=>{u&&n(u)},children:[e&&j.jsx("div",{dangerouslySetInnerHTML:{__html:e||""}}),j.jsx(Wc,{componentName:a,drag:i})]})},XFe=()=>j.jsx(Hc,{settings:[{key:"text",type:"richtext"}]});N_.craft={props:{},related:{settings:XFe}};const WU=e=>j.jsx(cm,{className:"w-full h-full flex flex-col",...e,children:e.children}),M_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=Vo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs(Ph,{className:`${Uc(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[e.children,j.jsx(Wc,{componentName:s,drag:r})]})},YFe=()=>j.jsx(Hc,{settings:[{key:"href",type:"text"},{key:"children",type:"text"},{key:"content",type:"select",selectOptions:[{value:"internal"},{value:"external"}]},{key:"variant",type:"select",selectOptions:[{value:"adaptive"},{value:"brand"},{value:"inline"}]},{key:"size",type:"select",selectOptions:[{value:"medium"},{value:"small"}]}]});M_.craft={props:{children:"Link",content:"internal",variant:"adaptive",size:"medium"},related:{settings:YFe}};const VU=({create:e,open:t,onClose:r})=>{const{t:n}=Yt(),{currentId:i,nodeTrees:s}=ji(f=>f),[o,a]=z.useState(""),[l,u]=z.useState(""),[c,h]=z.useState(),{actions:d}=ii();return z.useEffect(()=>{if(t)if(e)a(""),u("");else{const f=s[i];f&&(a(i),u(f.name))}},[e,i,s,t]),z.useEffect(()=>{o.length===0?h(!0):h(e?!!s[o]||o.length===0||l.length===0:o===i&&l===s[i].name)},[e,i,o,l,s]),j.jsx(j.Fragment,{children:j.jsxs($d,{backdrop:"weak",open:t,onClose:r,drawerHeader:n(e?"add":"pgEdit"),children:[j.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md",children:[j.jsx(Gr,{label:n("id"),placeholder:n("id"),variant:"floating",value:o,customValidity:o.length===0||e&&s[o]?"invalid":"no-validation",onChange:f=>a(f.target.value)}),j.jsx(oo,{margin:"none"}),j.jsx(Gr,{label:n("name"),placeholder:n("name"),variant:"floating",value:l,onChange:f=>u(f.target.value)})]}),j.jsxs("div",{className:"flex gap-fix-md absolute bottom-fix-xs inset-x-fix-lg",children:[!e&&j.jsx(wt,{width:"full",disabled:Object.entries(s).length<2,onClick:()=>{const f={...s};delete f[i],ji.setState({nodeTrees:f,currentId:Object.keys(s)[0]}),r&&r()},children:n("delete")}),j.jsx(wt,{width:"full",variant:"brand",disabled:c,onClick:()=>{const f={...s},p=o||gn();e?(f[p]={isPage:!0,serializedJson:"",name:l||"Unknown"},d.deserialize('{"ROOT":{"type":{"resolvedName":"Root"},"isCanvas":true,"props":{"id":"canvas"},"displayName":"Root","custom":{"hover":false},"hidden":false,"nodes":[],"linkedNodes":{}}}')):(delete f[i],f[p]={...s[i],name:l||"Unknown"}),ji.setState({nodeTrees:f,currentId:p}),u(""),a(""),r&&r()},children:n(e?"add":"change")})]})]})})},QFe=(e,t,r,n)=>{const i=t.node(r).toNodeTree(),s={};Object.keys(i.nodes).forEach(l=>{s[l]=gn()});const o=Object.entries(s).map(([l,u])=>{const c=t.node(l).toSerializedNode();c.parent&&(c.parent=s[c.parent]),c.nodes=c.nodes.map(d=>s[d]),c.linkedNodes=Object.entries(c.linkedNodes).reduce((d,[f,p])=>({...d,[f]:s[p]}),{});const h=t.parseSerializedNode(c).toNode();return h.id=u,h}),a=o.reduce((l,u)=>({...l,[u.id]:u}),{});e.addNodeTree({nodes:a,rootNodeId:o[0].id},n)},GU=({node:e})=>{const{selected:t,actions:r,allNodes:n,query:i}=ii(f=>{const[p]=f.events.selected;let m;if(p){const y=f.nodes[p];m={id:p,data:y.data,settings:y.related&&y.related.settings}}return{selected:m,allNodes:f.nodes}}),[s,o]=z.useState(!1);if(!e)return null;const{id:a,data:l}=e;let u=[...l.nodes,...Object.values(l.linkedNodes)];if(u.length===1&&n[u[0]].data.name==="DropContainer"){const f=n[u[0]].data;u=[...f.nodes,...Object.values(f.linkedNodes)]}const h=l.custom.displayName||l.name,d=j.jsxs("div",{className:` + */var KN;function ZPe(){if(KN)return DD;KN=1;var e=gt,t=P_;function r(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,a=e.useMemo,l=e.useDebugValue;return DD.useSyncExternalStoreWithSelector=function(u,c,h,d,f){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function b(w){if(!v){if(v=!0,E=w,w=d(w),f!==void 0&&m.hasValue){var T=m.value;if(f(T,w))return D=T}return D=w}if(T=D,n(E,w))return T;var k=d(w);return f!==void 0&&f(T,k)?T:(E=w,D=k)}var v=!1,E,D,C=h===void 0?null:h;return[function(){return b(c())},C===null?void 0:function(){return b(C())}]},[c,h,d,f]);var y=i(u,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},DD}jU.exports=ZPe();var eFe=jU.exports;class tFe{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const r=()=>{this.transactionNumber+=1,this.subscribers.forEach(i=>i())},n=this.editor;return n.on("transaction",r),()=>{n.off("transaction",r)}}}}function rFe(e){var t;const[r]=z.useState(()=>new tFe(e.editor)),n=eFe.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:QPe);return z.useEffect(()=>r.watch(e.editor),[e.editor,r]),z.useDebugValue(n),n}const nFe=!1,MT=typeof window>"u",iFe=MT||!!(typeof window<"u"&&window.next);class sFe{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return MT||iFe?null:this.createEditor();if(this.options.current.immediatelyRender&&MT&&nFe)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...n)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)===null||s===void 0?void 0:s.call(i,...n)},onBlur:(...n)=>{var i,s;return(s=(i=this.options.current).onBlur)===null||s===void 0?void 0:s.call(i,...n)},onCreate:(...n)=>{var i,s;return(s=(i=this.options.current).onCreate)===null||s===void 0?void 0:s.call(i,...n)},onDestroy:(...n)=>{var i,s;return(s=(i=this.options.current).onDestroy)===null||s===void 0?void 0:s.call(i,...n)},onFocus:(...n)=>{var i,s;return(s=(i=this.options.current).onFocus)===null||s===void 0?void 0:s.call(i,...n)},onSelectionUpdate:(...n)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)===null||s===void 0?void 0:s.call(i,...n)},onTransaction:(...n)=>{var i,s;return(s=(i=this.options.current).onTransaction)===null||s===void 0?void 0:s.call(i,...n)},onUpdate:(...n)=>{var i,s;return(s=(i=this.options.current).onUpdate)===null||s===void 0?void 0:s.call(i,...n)},onContentError:(...n)=>{var i,s;return(s=(i=this.options.current).onContentError)===null||s===void 0?void 0:s.call(i,...n)},onDrop:(...n)=>{var i,s;return(s=(i=this.options.current).onDrop)===null||s===void 0?void 0:s.call(i,...n)},onPaste:(...n)=>{var i,s;return(s=(i=this.options.current).onPaste)===null||s===void 0?void 0:s.call(i,...n)}};return new HPe(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((n,i)=>n===t[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===t&&this.setEditor(null))},1)}}function oFe(e={},t=[]){const r=z.useRef(e);r.current=e;const[n]=z.useState(()=>new sFe(r)),i=P_.useSyncExternalStore(n.subscribe,n.getEditor,n.getServerSnapshot);return z.useDebugValue(i),z.useEffect(n.onRender(t)),rFe({editor:i,selector:({transactionNumber:s})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&s===0?0:s+1}),i}const aFe=z.createContext({editor:null});aFe.Consumer;const lFe=z.createContext({onDragStart:void 0}),uFe=()=>z.useContext(lFe);gt.forwardRef((e,t)=>{const{onDragStart:r}=uFe(),n=e.as||"div";return gt.createElement(n,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});const cFe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,hFe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,dFe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,fFe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,pFe=_a.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Uc(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Mg({find:cFe,type:this.type}),Mg({find:dFe,type:this.type})]},addPasteRules(){return[Ng({find:hFe,type:this.type}),Ng({find:fFe,type:this.type})]}}),gFe=Ad.create({name:"doc",topNode:!0,content:"block+"});/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:zU,setPrototypeOf:JN,isFrozen:mFe,getPrototypeOf:yFe,getOwnPropertyDescriptor:vFe}=Object;let{freeze:Ci,seal:Fs,create:HU}=Object,{apply:NT,construct:RT}=typeof Reflect<"u"&&Reflect;Ci||(Ci=function(t){return t});Fs||(Fs=function(t){return t});NT||(NT=function(t,r,n){return t.apply(r,n)});RT||(RT=function(t,r){return new t(...r)});const Ay=ls(Array.prototype.forEach),XN=ls(Array.prototype.pop),Kf=ls(Array.prototype.push),av=ls(String.prototype.toLowerCase),ED=ls(String.prototype.toString),YN=ls(String.prototype.match),Jf=ls(String.prototype.replace),bFe=ls(String.prototype.indexOf),xFe=ls(String.prototype.trim),Vs=ls(Object.prototype.hasOwnProperty),pi=ls(RegExp.prototype.test),Xf=wFe(TypeError);function ls(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:av;JN&&JN(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(mFe(t)||(t[n]=s),i=s)}e[i]=!0}return e}function SFe(e){for(let t=0;t/gm),AFe=Fs(/\${[\w\W]*}/gm),kFe=Fs(/^data-[\-\w.\u00B7-\uFFFF]/),_Fe=Fs(/^aria-[\-\w]+$/),UU=Fs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$Fe=Fs(/^(?:\w+script|data):/i),LFe=Fs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),WU=Fs(/^html$/i),PFe=Fs(/^[a-z][.\w]*(-[.\w]+)+$/i);var rR=Object.freeze({__proto__:null,MUSTACHE_EXPR:CFe,ERB_EXPR:TFe,TMPLIT_EXPR:AFe,DATA_ATTR:kFe,ARIA_ATTR:_Fe,IS_ALLOWED_URI:UU,IS_SCRIPT_OR_DATA:$Fe,ATTR_WHITESPACE:LFe,DOCTYPE_NAME:WU,CUSTOM_ELEMENT:PFe});const Qf={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},FFe=function(){return typeof window>"u"?null:window},OFe=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function VU(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:FFe();const t=Ie=>VU(Ie);if(t.version="3.1.7",t.removed=[],!e||!e.document||e.document.nodeType!==Qf.document)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:f}=e,p=l.prototype,m=Yf(p,"cloneNode"),y=Yf(p,"remove"),b=Yf(p,"nextSibling"),v=Yf(p,"childNodes"),E=Yf(p,"parentNode");if(typeof o=="function"){const Ie=r.createElement("template");Ie.content&&Ie.content.ownerDocument&&(r=Ie.content.ownerDocument)}let D,C="";const{implementation:w,createNodeIterator:T,createDocumentFragment:k,getElementsByTagName:O}=r,{importNode:P}=n;let I={};t.isSupported=typeof zU=="function"&&typeof E=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:L,TMPLIT_EXPR:_,DATA_ATTR:A,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:U}=rR;let{IS_ALLOWED_URI:V}=rR,K=null;const J=jt({},[...QN,...CD,...TD,...AD,...ZN]);let G=null;const Y=jt({},[...eR,...kD,...tR,...ky]);let Q=Object.seal(HU(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,le=null,be=!0,ce=!0,xe=!1,ke=!0,Re=!1,Pt=!0,yt=!1,W=!1,ye=!1,pe=!1,re=!1,ee=!1,ue=!0,De=!1;const Ce="user-content-";let fe=!0,Ee=!1,je={},ae=null;const ve=jt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Te=null;const ze=jt({},["audio","video","img","source","image","track"]);let at=null;const xt=jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",kt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ht=nt,It=!1,sr=null;const ln=jt({},[pt,kt,nt],ED);let _i=null;const $n=["application/xhtml+xml","text/html"],ds="text/html";let mr=null,Zr=null;const ui=r.createElement("form"),$i=function(oe){return oe instanceof RegExp||oe instanceof Function},Li=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Zr&&Zr===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=wu(oe),_i=$n.indexOf(oe.PARSER_MEDIA_TYPE)===-1?ds:oe.PARSER_MEDIA_TYPE,mr=_i==="application/xhtml+xml"?ED:av,K=Vs(oe,"ALLOWED_TAGS")?jt({},oe.ALLOWED_TAGS,mr):J,G=Vs(oe,"ALLOWED_ATTR")?jt({},oe.ALLOWED_ATTR,mr):Y,sr=Vs(oe,"ALLOWED_NAMESPACES")?jt({},oe.ALLOWED_NAMESPACES,ED):ln,at=Vs(oe,"ADD_URI_SAFE_ATTR")?jt(wu(xt),oe.ADD_URI_SAFE_ATTR,mr):xt,Te=Vs(oe,"ADD_DATA_URI_TAGS")?jt(wu(ze),oe.ADD_DATA_URI_TAGS,mr):ze,ae=Vs(oe,"FORBID_CONTENTS")?jt({},oe.FORBID_CONTENTS,mr):ve,X=Vs(oe,"FORBID_TAGS")?jt({},oe.FORBID_TAGS,mr):{},le=Vs(oe,"FORBID_ATTR")?jt({},oe.FORBID_ATTR,mr):{},je=Vs(oe,"USE_PROFILES")?oe.USE_PROFILES:!1,be=oe.ALLOW_ARIA_ATTR!==!1,ce=oe.ALLOW_DATA_ATTR!==!1,xe=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=oe.SAFE_FOR_TEMPLATES||!1,Pt=oe.SAFE_FOR_XML!==!1,yt=oe.WHOLE_DOCUMENT||!1,pe=oe.RETURN_DOM||!1,re=oe.RETURN_DOM_FRAGMENT||!1,ee=oe.RETURN_TRUSTED_TYPE||!1,ye=oe.FORCE_BODY||!1,ue=oe.SANITIZE_DOM!==!1,De=oe.SANITIZE_NAMED_PROPS||!1,fe=oe.KEEP_CONTENT!==!1,Ee=oe.IN_PLACE||!1,V=oe.ALLOWED_URI_REGEXP||UU,ht=oe.NAMESPACE||nt,Q=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&$i(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Q.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&$i(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Q.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(ce=!1),re&&(pe=!0),je&&(K=jt({},ZN),G=[],je.html===!0&&(jt(K,QN),jt(G,eR)),je.svg===!0&&(jt(K,CD),jt(G,kD),jt(G,ky)),je.svgFilters===!0&&(jt(K,TD),jt(G,kD),jt(G,ky)),je.mathMl===!0&&(jt(K,AD),jt(G,tR),jt(G,ky))),oe.ADD_TAGS&&(K===J&&(K=wu(K)),jt(K,oe.ADD_TAGS,mr)),oe.ADD_ATTR&&(G===Y&&(G=wu(G)),jt(G,oe.ADD_ATTR,mr)),oe.ADD_URI_SAFE_ATTR&&jt(at,oe.ADD_URI_SAFE_ATTR,mr),oe.FORBID_CONTENTS&&(ae===ve&&(ae=wu(ae)),jt(ae,oe.FORBID_CONTENTS,mr)),fe&&(K["#text"]=!0),yt&&jt(K,["html","head","body"]),K.table&&(jt(K,["tbody"]),delete X.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xf('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xf('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=oe.TRUSTED_TYPES_POLICY,C=D.createHTML("")}else D===void 0&&(D=OFe(f,i)),D!==null&&typeof C=="string"&&(C=D.createHTML(""));Ci&&Ci(oe),Zr=oe}},Ki=jt({},["mi","mo","mn","ms","mtext"]),bo=jt({},["annotation-xml"]),Ms=jt({},["title","style","font","a","script"]),se=jt({},[...CD,...TD,...DFe]),de=jt({},[...AD,...EFe]),ge=function(oe){let Pe=E(oe);(!Pe||!Pe.tagName)&&(Pe={namespaceURI:ht,tagName:"template"});const Ke=av(oe.tagName),vt=av(Pe.tagName);return sr[oe.namespaceURI]?oe.namespaceURI===kt?Pe.namespaceURI===nt?Ke==="svg":Pe.namespaceURI===pt?Ke==="svg"&&(vt==="annotation-xml"||Ki[vt]):!!se[Ke]:oe.namespaceURI===pt?Pe.namespaceURI===nt?Ke==="math":Pe.namespaceURI===kt?Ke==="math"&&bo[vt]:!!de[Ke]:oe.namespaceURI===nt?Pe.namespaceURI===kt&&!bo[vt]||Pe.namespaceURI===pt&&!Ki[vt]?!1:!de[Ke]&&(Ms[Ke]||!se[Ke]):!!(_i==="application/xhtml+xml"&&sr[oe.namespaceURI]):!1},we=function(oe){Kf(t.removed,{element:oe});try{E(oe).removeChild(oe)}catch{y(oe)}},Ve=function(oe,Pe){try{Kf(t.removed,{attribute:Pe.getAttributeNode(oe),from:Pe})}catch{Kf(t.removed,{attribute:null,from:Pe})}if(Pe.removeAttribute(oe),oe==="is"&&!G[oe])if(pe||re)try{we(Pe)}catch{}else try{Pe.setAttribute(oe,"")}catch{}},rt=function(oe){let Pe=null,Ke=null;if(ye)oe=""+oe;else{const Dr=YN(oe,/^[\r\n\t ]+/);Ke=Dr&&Dr[0]}_i==="application/xhtml+xml"&&ht===nt&&(oe=''+oe+"");const vt=D?D.createHTML(oe):oe;if(ht===nt)try{Pe=new d().parseFromString(vt,_i)}catch{}if(!Pe||!Pe.documentElement){Pe=w.createDocument(ht,"template",null);try{Pe.documentElement.innerHTML=It?C:vt}catch{}}const Xt=Pe.body||Pe.documentElement;return oe&&Ke&&Xt.insertBefore(r.createTextNode(Ke),Xt.childNodes[0]||null),ht===nt?O.call(Pe,yt?"html":"body")[0]:yt?Pe.documentElement:Xt},ct=function(oe){return T.call(oe.ownerDocument||oe,oe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},He=function(oe){return oe instanceof h&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof c)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},Ge=function(oe){return typeof a=="function"&&oe instanceof a},Ue=function(oe,Pe,Ke){I[oe]&&Ay(I[oe],vt=>{vt.call(t,Pe,Ke,Zr)})},it=function(oe){let Pe=null;if(Ue("beforeSanitizeElements",oe,null),He(oe))return we(oe),!0;const Ke=mr(oe.nodeName);if(Ue("uponSanitizeElement",oe,{tagName:Ke,allowedTags:K}),oe.hasChildNodes()&&!Ge(oe.firstElementChild)&&pi(/<[/\w]/g,oe.innerHTML)&&pi(/<[/\w]/g,oe.textContent)||oe.nodeType===Qf.progressingInstruction||Pt&&oe.nodeType===Qf.comment&&pi(/<[/\w]/g,oe.data))return we(oe),!0;if(!K[Ke]||X[Ke]){if(!X[Ke]&&Et(Ke)&&(Q.tagNameCheck instanceof RegExp&&pi(Q.tagNameCheck,Ke)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(Ke)))return!1;if(fe&&!ae[Ke]){const vt=E(oe)||oe.parentNode,Xt=v(oe)||oe.childNodes;if(Xt&&vt){const Dr=Xt.length;for(let Or=Dr-1;Or>=0;--Or){const Vr=m(Xt[Or],!0);Vr.__removalCount=(oe.__removalCount||0)+1,vt.insertBefore(Vr,b(oe))}}}return we(oe),!0}return oe instanceof l&&!ge(oe)||(Ke==="noscript"||Ke==="noembed"||Ke==="noframes")&&pi(/<\/no(script|embed|frames)/i,oe.innerHTML)?(we(oe),!0):(Re&&oe.nodeType===Qf.text&&(Pe=oe.textContent,Ay([F,L,_],vt=>{Pe=Jf(Pe,vt," ")}),oe.textContent!==Pe&&(Kf(t.removed,{element:oe.cloneNode()}),oe.textContent=Pe)),Ue("afterSanitizeElements",oe,null),!1)},wt=function(oe,Pe,Ke){if(ue&&(Pe==="id"||Pe==="name")&&(Ke in r||Ke in ui))return!1;if(!(ce&&!le[Pe]&&pi(A,Pe))){if(!(be&&pi(M,Pe))){if(!G[Pe]||le[Pe]){if(!(Et(oe)&&(Q.tagNameCheck instanceof RegExp&&pi(Q.tagNameCheck,oe)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(oe))&&(Q.attributeNameCheck instanceof RegExp&&pi(Q.attributeNameCheck,Pe)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(Pe))||Pe==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&pi(Q.tagNameCheck,Ke)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(Ke))))return!1}else if(!at[Pe]){if(!pi(V,Jf(Ke,B,""))){if(!((Pe==="src"||Pe==="xlink:href"||Pe==="href")&&oe!=="script"&&bFe(Ke,"data:")===0&&Te[oe])){if(!(xe&&!pi(R,Jf(Ke,B,"")))){if(Ke)return!1}}}}}}return!0},Et=function(oe){return oe!=="annotation-xml"&&YN(oe,U)},Jt=function(oe){Ue("beforeSanitizeAttributes",oe,null);const{attributes:Pe}=oe;if(!Pe)return;const Ke={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G};let vt=Pe.length;for(;vt--;){const Xt=Pe[vt],{name:Dr,namespaceURI:Or,value:Vr}=Xt,Gn=mr(Dr);let yr=Dr==="value"?Vr:xFe(Vr);if(Ke.attrName=Gn,Ke.attrValue=yr,Ke.keepAttr=!0,Ke.forceKeepAttr=void 0,Ue("uponSanitizeAttribute",oe,Ke),yr=Ke.attrValue,Ke.forceKeepAttr||(Ve(Dr,oe),!Ke.keepAttr))continue;if(!ke&&pi(/\/>/i,yr)){Ve(Dr,oe);continue}Re&&Ay([F,L,_],tr=>{yr=Jf(yr,tr," ")});const Ft=mr(oe.nodeName);if(wt(Ft,Gn,yr)){if(De&&(Gn==="id"||Gn==="name")&&(Ve(Dr,oe),yr=Ce+yr),Pt&&pi(/((--!?|])>)|<\/(style|title)/i,yr)){Ve(Dr,oe);continue}if(D&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Or)switch(f.getAttributeType(Ft,Gn)){case"TrustedHTML":{yr=D.createHTML(yr);break}case"TrustedScriptURL":{yr=D.createScriptURL(yr);break}}try{Or?oe.setAttributeNS(Or,Dr,yr):oe.setAttribute(Dr,yr),He(oe)?we(oe):XN(t.removed)}catch{}}}Ue("afterSanitizeAttributes",oe,null)},Gt=function Ie(oe){let Pe=null;const Ke=ct(oe);for(Ue("beforeSanitizeShadowDOM",oe,null);Pe=Ke.nextNode();)Ue("uponSanitizeShadowNode",Pe,null),!it(Pe)&&(Pe.content instanceof s&&Ie(Pe.content),Jt(Pe));Ue("afterSanitizeShadowDOM",oe,null)};return t.sanitize=function(Ie){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=null,Ke=null,vt=null,Xt=null;if(It=!Ie,It&&(Ie=""),typeof Ie!="string"&&!Ge(Ie))if(typeof Ie.toString=="function"){if(Ie=Ie.toString(),typeof Ie!="string")throw Xf("dirty is not a string, aborting")}else throw Xf("toString is not a function");if(!t.isSupported)return Ie;if(W||Li(oe),t.removed=[],typeof Ie=="string"&&(Ee=!1),Ee){if(Ie.nodeName){const Vr=mr(Ie.nodeName);if(!K[Vr]||X[Vr])throw Xf("root node is forbidden and cannot be sanitized in-place")}}else if(Ie instanceof a)Pe=rt(""),Ke=Pe.ownerDocument.importNode(Ie,!0),Ke.nodeType===Qf.element&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Pe=Ke:Pe.appendChild(Ke);else{if(!pe&&!Re&&!yt&&Ie.indexOf("<")===-1)return D&&ee?D.createHTML(Ie):Ie;if(Pe=rt(Ie),!Pe)return pe?null:ee?C:""}Pe&&ye&&we(Pe.firstChild);const Dr=ct(Ee?Ie:Pe);for(;vt=Dr.nextNode();)it(vt)||(vt.content instanceof s&&Gt(vt.content),Jt(vt));if(Ee)return Ie;if(pe){if(re)for(Xt=k.call(Pe.ownerDocument);Pe.firstChild;)Xt.appendChild(Pe.firstChild);else Xt=Pe;return(G.shadowroot||G.shadowrootmode)&&(Xt=P.call(n,Xt,!0)),Xt}let Or=yt?Pe.outerHTML:Pe.innerHTML;return yt&&K["!doctype"]&&Pe.ownerDocument&&Pe.ownerDocument.doctype&&Pe.ownerDocument.doctype.name&&pi(WU,Pe.ownerDocument.doctype.name)&&(Or=" +`+Or),Re&&Ay([F,L,_],Vr=>{Or=Jf(Or,Vr," ")}),D&&ee?D.createHTML(Or):Or},t.setConfig=function(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Li(Ie),W=!0},t.clearConfig=function(){Zr=null,W=!1},t.isValidAttribute=function(Ie,oe,Pe){Zr||Li({});const Ke=mr(Ie),vt=mr(oe);return wt(Ke,vt,Pe)},t.addHook=function(Ie,oe){typeof oe=="function"&&(I[Ie]=I[Ie]||[],Kf(I[Ie],oe))},t.removeHook=function(Ie){if(I[Ie])return XN(I[Ie])},t.removeHooks=function(Ie){I[Ie]&&(I[Ie]=[])},t.removeAllHooks=function(){I={}},t}var IFe=VU();const MFe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,NFe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,RFe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,BFe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,jFe=_a.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Uc(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Mg({find:MFe,type:this.type}),Mg({find:RFe,type:this.type})]},addPasteRules(){return[Ng({find:NFe,type:this.type}),Ng({find:BFe,type:this.type})]}}),zFe=Ad.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Uc(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),HFe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,UFe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,WFe=_a.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Uc(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Mg({find:HFe,type:this.type})]},addPasteRules(){return[Ng({find:UFe,type:this.type})]}}),VFe=Ad.create({name:"text",group:"inline"}),GFe=_a.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Uc(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const r=__(e,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),qFe=_a.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Uc(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),KFe=({editor:e})=>e?j.jsxs("ul",{className:"menu-bar",children:[j.jsx("li",{children:j.jsx(Dt,{variant:e.isActive("bold")?"filled":"ghost",onClick:()=>e.chain().focus().toggleBold().run(),disabled:!e.can().chain().focus().toggleBold().run(),type:"button",children:j.jsx("b",{children:"B"})})}),j.jsx("li",{children:j.jsx(Dt,{variant:e.isActive("italic")?"filled":"ghost",onClick:()=>e.chain().focus().toggleItalic().run(),disabled:!e.can().chain().focus().toggleItalic().run(),type:"button",children:j.jsx("i",{children:"I"})})}),j.jsx("li",{children:j.jsx(Dt,{variant:e.isActive("underline")?"filled":"ghost",onClick:()=>e.chain().focus().toggleUnderline().run(),disabled:!e.can().chain().focus().toggleUnderline().run(),type:"button",children:j.jsx("u",{children:"U"})})}),j.jsx("li",{children:j.jsx(Dt,{variant:e.isActive("strike")?"filled":"ghost",onClick:()=>e.chain().focus().toggleStrike().run(),disabled:!e.can().chain().focus().toggleStrike().run(),type:"button",children:j.jsx("s",{children:"S"})})})]}):null,JFe=({label:e,richTextValue:t,handleRichTextChange:r})=>{const n=oFe({extensions:[GFe,gFe,zFe,VFe,pFe,WFe,jFe,qFe],editorProps:{attributes:{class:"text-editor"}},content:t,injectCSS:!1,parseOptions:{preserveWhitespace:!1},onUpdate(i){const s=IFe.sanitize(i.editor.getHTML().replaceAll(" ",""));r(s==="

"?"":s)}});return z.useEffect(()=>{t==""&&(n==null||n.commands.setContent(t,!0))},[t]),j.jsxs("div",{className:"editor-container",children:[e&&j.jsx("label",{children:e}),j.jsxs("div",{className:"text-container",children:[j.jsx(XPe,{editor:n}),j.jsx(KFe,{editor:n})]})]})},XFe=({className:e,onColorPick:t,selectedColor:r})=>{const{t:n}=er(),[i,s]=z.useState(!1),[o,a]=z.useState("");return j.jsxs(j.Fragment,{children:[j.jsxs(Dt,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectColor"),j.jsx(vs,{placement:"left",children:n("playgroundSelectColor")})]}),j.jsx(Pd,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},drawerHeader:j.jsxs("div",{className:"flex gap-fix-3xl",children:[j.jsx("span",{className:"my-auto",children:n("playgroundSelectColor")}),j.jsx(Kr,{type:"search",variant:"floating",label:n("search"),value:o,onChange:l=>a(l.target.value)})]}),className:"select-icon-dialog",children:j.jsx("div",{className:"grid-cols-3 md:grid-cols-5 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:[...WK,"none"].filter(l=>l.includes(o)).map(l=>j.jsx("button",{onClick:()=>t(l),children:j.jsxs(Bi,{"data-interactive":"elevation",style:{backgroundColor:"var(--db-adaptive-bg-default)"},className:`flex-row min-h-siz-lg gap-fix-md justify-between items-center db-${l}`,spacing:"small",children:[l,r===l&&j.jsx(Fd,{icon:"done",children:"Selected color"})]})},`color-button-${l}`))})})]})},Wc=({settings:e})=>{const{t}=er(),{actions:{setProp:r,setCustom:n,setHidden:i},props:s}=qo(a=>({props:a.data.props})),o=(a,l,u)=>{u==="custom"?n(c=>c[a]=l):u==="hidden"?i(l):r(c=>c[a]=l)};return s?j.jsx("div",{className:"flex flex-col gap-fix-md",children:e.filter(a=>!a.isHidden||!a.isHidden(s)).map(a=>{var l,u,c,h;return j.jsxs(z.Fragment,{children:[(a.type==="text"||a.type==="number")&&j.jsx(Kr,{type:a.type,min:a.type==="number"&&((l=a.numberOptions)==null?void 0:l.min)||void 0,max:a.type==="number"&&((u=a.numberOptions)==null?void 0:u.max)||void 0,step:a.type==="number"&&((c=a.numberOptions)==null?void 0:c.step)||void 0,dataList:a.dataList,label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType)}),a.type==="textarea"&&j.jsx(Dp,{label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType)}),a.type==="richtext"&&j.jsx(JFe,{label:t(a.key),richTextValue:s[a.key],handleRichTextChange:d=>o(a.key,d,a.changeType)}),a.type==="select"&&j.jsx(Bu,{label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType),children:(h=a.selectOptions)==null?void 0:h.map(d=>j.jsx("option",{value:d.value,children:t(d.label||d.value||"")},`select-${a.key}-${d.label||d.value}`))}),a.type==="switch"&&j.jsx(fJ,{label:t(a.key),checked:s[a.key],onChange:d=>o(a.key,d.target.checked,a.changeType)}),a.type==="icon"&&j.jsxs("div",{className:"flex gap-fix-md items-center",children:[j.jsxs("div",{className:"flex flex-col",children:[j.jsx(dr,{size:"small",icon:"none",children:t(a.key)}),j.jsx("span",{children:s[a.key]})]}),j.jsx(Fd,{icon:s[a.key]}),j.jsx(z2e,{className:"ml-auto",selectedIcon:s[a.key],onIconPick:d=>{o(a.key,d,a.changeType)}})]}),a.type==="color"&&j.jsxs("div",{className:"flex gap-fix-md items-center",children:[j.jsxs("div",{className:`flex flex-col rounded p-fix-xs ${s[a.key]!=="none"?`db-${s[a.key]}`:""}`,children:[j.jsx(dr,{size:"small",icon:"none",children:t(a.key)}),j.jsx("span",{children:s[a.key]})]}),j.jsx(XFe,{className:"ml-auto",selectedColor:s[a.key],onColorPick:d=>{o(a.key,d,a.changeType)}})]})]},`setting-${a.key}`)})}):j.jsx(dr,{semantic:"warning",children:t("playgroundCopyError")})},Vc=(e,t,r)=>`drag-container${e?" selected":""}${t?" hovered":""}${r?` ${r}`:""}`,YFe=(e,t)=>e.tope.left{const{previewContainer:r}=Ui(),[n,i]=z.useState(),[s,o]=z.useState(!1),[a,l]=z.useState(!1);return z.useEffect(()=>{if(n&&r){const u=n.getBoundingClientRect();o(YFe(u,r)),l(QFe(u,r))}},[n,r]),j.jsx("span",{ref:u=>{u&&(t(u),i(u))},className:"drag-button flex py-fix-3xs pl-fix-3xs","data-icon-after":"dots_drag_and_drop","data-outside-y":s,"data-outside-x":a,children:e})},F_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=qo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ai(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs(Dt,{className:`${Vc(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[e.children,j.jsx(Gc,{componentName:s,drag:r})]})},ZFe=()=>j.jsx(Wc,{settings:[{key:"children",type:"text"},{key:"variant",type:"select",selectOptions:[{label:"outlined",value:"outlined"},{label:"brand",value:"brand"},{label:"filled",value:"filled"},{label:"ghost",value:"ghost"}]},{key:"disabled",type:"switch"},{key:"size",type:"select",selectOptions:[{label:"small",value:"small"},{label:"medium",value:"medium"}]},{key:"noText",type:"switch"},{key:"width",type:"select",selectOptions:[{label:"auto",value:"auto"},{label:"full",value:"full"}]},{key:"icon",type:"icon"}]});F_.craft={props:{variant:"outlined",children:"Test",size:"medium",disabled:!1,noText:!1,width:"auto",icon:"none"},related:{settings:ZFe}};const cm=({children:e,className:t})=>{const{connectors:{connect:r},id:n}=qo(),{selected:i}=ai(s=>{const[o]=s.events.selected;return{selected:n===o}});return j.jsx("div",{className:`drop-container ${t||""}${i?" selected":""}`,ref:s=>{s&&r(s)},children:e})};cm.craft={rules:{canMoveIn:e=>e.every(()=>!0),canDrag:()=>!1}};const O_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=qo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ai(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs(Bi,{className:`${Vc(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[j.jsx(ff,{id:"card-children",is:cm,canvas:!0,children:e.children}),j.jsx(Gc,{componentName:s,drag:r})]})},eOe=()=>j.jsx(Wc,{settings:[{key:"spacing",type:"select",selectOptions:[{value:"none"},{value:"small"},{value:"medium"}]},{key:"elevationLevel",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"}]},{key:"behaviour",type:"select",selectOptions:[{value:"default"},{value:"interactive"}]}]});O_.craft={props:{spacing:"small",behaviour:"default",elevationLevel:"1"},related:{settings:eOe}};const tOe=({display:e,direction:t,gap:r,width:n,cells:i,padding:s,color:o})=>{let a="";return e==="grid"?(a+=" grid",t==="column"?a+=` grid-cols-${i||4}`:a+=` grid-rows-${i||4}`):(a+=" flex",t==="column"?a+=" flex-col":a+=" flex-row"),r&&r!=="none"&&(a+=` gap-fix-${r}`),n==="fit"?a+=" w-fit":a+=" w-full",s!=="none"&&(a+=` p-fix-${s}`),o&&o!=="none"&&(a+=` db-${o}`),a},I_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=qo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ai(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs("div",{className:`${Vc(o,i,`${tOe(e)}${e.className||""}`)}`,ref:a=>{a&&t(a)},children:[j.jsx(ff,{id:"drop-container",is:cm,canvas:!0,children:e.children}),j.jsx(Gc,{componentName:s,drag:r})]})},rOe=()=>j.jsx(Wc,{settings:[{key:"padding",type:"select",selectOptions:[{value:"none"},{value:"3xs"},{value:"2xs"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"},{value:"2xl"},{value:"3xl"}]},{key:"width",type:"select",selectOptions:[{value:"full"},{value:"fit"}]},{key:"display",type:"select",selectOptions:[{value:"flex"},{value:"grid"}]},{key:"direction",type:"select",selectOptions:[{value:"row"},{value:"column"}]},{key:"cells",type:"number",numberOptions:{min:1,max:8},isHidden:e=>(e==null?void 0:e.display)==="flex"},{key:"gap",type:"select",selectOptions:[{value:"none"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"}]},{key:"color",type:"color"}]});I_.craft={props:{display:"flex",direction:"row",gap:"md",width:"full",cells:4,padding:"none",color:"none"},related:{settings:rOe}};const M_=({text:e,className:t})=>{const{t:r}=er(),{connectors:{connect:n,drag:i},id:s,hovered:o,name:a}=qo(u=>({name:u.data.custom.displayName||u.data.name,hovered:u.data.custom.hover})),{selected:l}=ai(u=>{const[c]=u.events.selected;return{selected:s===c}});return j.jsxs("div",{className:`${Vc(l,o,t)}`,"data-hint":e&&(e==null?void 0:e.length)>0?void 0:r("pgEditMe"),ref:u=>{u&&n(u)},children:[e&&j.jsx("div",{dangerouslySetInnerHTML:{__html:e||""}}),j.jsx(Gc,{componentName:a,drag:i})]})},nOe=()=>j.jsx(Wc,{settings:[{key:"text",type:"richtext"}]});M_.craft={props:{},related:{settings:nOe}};const GU=e=>j.jsx(cm,{className:"w-full h-full flex flex-col",...e,children:e.children}),N_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=qo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ai(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs(Oh,{className:`${Vc(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[e.children,j.jsx(Gc,{componentName:s,drag:r})]})},iOe=()=>j.jsx(Wc,{settings:[{key:"href",type:"text"},{key:"children",type:"text"},{key:"content",type:"select",selectOptions:[{value:"internal"},{value:"external"}]},{key:"variant",type:"select",selectOptions:[{value:"adaptive"},{value:"brand"},{value:"inline"}]},{key:"size",type:"select",selectOptions:[{value:"medium"},{value:"small"}]}]});N_.craft={props:{children:"Link",content:"internal",variant:"adaptive",size:"medium"},related:{settings:iOe}};const qU=({create:e,open:t,onClose:r})=>{const{t:n}=er(),{currentId:i,nodeTrees:s}=Ui(f=>f),[o,a]=z.useState(""),[l,u]=z.useState(""),[c,h]=z.useState(),{actions:d}=ai();return z.useEffect(()=>{if(t)if(e)a(""),u("");else{const f=s[i];f&&(a(i),u(f.name))}},[e,i,s,t]),z.useEffect(()=>{o.length===0?h(!0):h(e?!!s[o]||o.length===0||l.length===0:o===i&&l===s[i].name)},[e,i,o,l,s]),j.jsx(j.Fragment,{children:j.jsxs(Pd,{backdrop:"weak",open:t,onClose:r,drawerHeader:n(e?"add":"pgEdit"),children:[j.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md",children:[j.jsx(Kr,{label:n("id"),placeholder:n("id"),variant:"floating",value:o,customValidity:o.length===0||e&&s[o]?"invalid":"no-validation",onChange:f=>a(f.target.value)}),j.jsx(uo,{margin:"none"}),j.jsx(Kr,{label:n("name"),placeholder:n("name"),variant:"floating",value:l,onChange:f=>u(f.target.value)})]}),j.jsxs("div",{className:"flex gap-fix-md absolute bottom-fix-xs inset-x-fix-lg",children:[!e&&j.jsx(Dt,{width:"full",disabled:Object.entries(s).length<2,onClick:()=>{const f={...s};delete f[i],Ui.setState({nodeTrees:f,currentId:Object.keys(s)[0]}),r&&r()},children:n("delete")}),j.jsx(Dt,{width:"full",variant:"brand",disabled:c,onClick:()=>{const f={...s},p=o||vn();e?(f[p]={isPage:!0,serializedJson:"",name:l||"Unknown"},d.deserialize('{"ROOT":{"type":{"resolvedName":"Root"},"isCanvas":true,"props":{"id":"canvas"},"displayName":"Root","custom":{"hover":false},"hidden":false,"nodes":[],"linkedNodes":{}}}')):(delete f[i],f[p]={...s[i],name:l||"Unknown"}),Ui.setState({nodeTrees:f,currentId:p}),u(""),a(""),r&&r()},children:n(e?"add":"change")})]})]})})},sOe=(e,t,r,n)=>{const i=t.node(r).toNodeTree(),s={};Object.keys(i.nodes).forEach(l=>{s[l]=vn()});const o=Object.entries(s).map(([l,u])=>{const c=t.node(l).toSerializedNode();c.parent&&(c.parent=s[c.parent]),c.nodes=c.nodes.map(d=>s[d]),c.linkedNodes=Object.entries(c.linkedNodes).reduce((d,[f,p])=>({...d,[f]:s[p]}),{});const h=t.parseSerializedNode(c).toNode();return h.id=u,h}),a=o.reduce((l,u)=>({...l,[u.id]:u}),{});e.addNodeTree({nodes:a,rootNodeId:o[0].id},n)},KU=({node:e})=>{const{selected:t,actions:r,allNodes:n,query:i}=ai(f=>{const[p]=f.events.selected;let m;if(p){const y=f.nodes[p];m={id:p,data:y.data,settings:y.related&&y.related.settings}}return{selected:m,allNodes:f.nodes}}),[s,o]=z.useState(!1);if(!e)return null;const{id:a,data:l}=e;let u=[...l.nodes,...Object.values(l.linkedNodes)];if(u.length===1&&n[u[0]].data.name==="DropContainer"){const f=n[u[0]].data;u=[...f.nodes,...Object.values(f.linkedNodes)]}const h=l.custom.displayName||l.name,d=j.jsxs("div",{className:` ${(t==null?void 0:t.id)===a?"db-informational-bg-basic-level-3":""} tree-item - flex items-center justify-between w-full gap-fix-md`,role:"button",onClick:()=>{r.selectNode(a)},children:[u.length===0&&j.jsx(Ld,{className:"w-siz-md",icon:"intermediary_stop"}),j.jsx("span",{className:"break-all w-full",onMouseEnter:()=>r.setCustom(a,f=>{f.hover=!0}),onMouseLeave:()=>r.setCustom(a,f=>{f.hover=!1}),children:h}),j.jsxs("div",{className:"flex gap-fix-3xs",children:[a!=="ROOT"&&j.jsxs(wt,{className:"min-w-siz-md",variant:"ghost",icon:"copy",noText:!0,onClick:()=>{l.parent&&QFe(r,i,a,l.parent)},children:["Copy ",h,"(",a,")"]}),j.jsxs(wt,{className:"min-w-siz-md",variant:"ghost",icon:l.hidden?"visibility_off":"visibility",noText:!0,onClick:()=>{r.setHidden(a,!l.hidden)},children:["Hide ",h,"(",a,")"]})]})]});return u.length>0?j.jsxs("details",{open:s,children:[j.jsxs("summary",{onDoubleClick:()=>o(!s),onClick:f=>{f.preventDefault()},className:"flex items-center",children:[j.jsxs(wt,{variant:"ghost",icon:s?"chevron_down":"chevron_right",noText:!0,onClick:()=>{o(!s)},children:["Open ",l.displayName,"(",a,")"]}),d]}),j.jsx("div",{className:"flex flex-col pl-fix-xs w-full",children:u.map(f=>j.jsx(z.Fragment,{children:j.jsx(GU,{node:n[f]})},`tree-item-${f}`))})]}):d},ZFe=({className:e})=>{const{t}=Yt(),{currentId:r,nodeTrees:n}=ji(a=>a),{nodes:i}=ii(a=>({nodes:a.nodes})),[s,o]=z.useState(!1);return j.jsxs("div",{"data-density":"functional",className:`h-full${e?` ${e}`:""} grow-0 shrink-0 w-[320px] border-r overflow-hidden`,children:[n[r]&&j.jsxs("div",{className:"h-siz-md flex items-center justify-between p-fix-sm",children:[j.jsx("h6",{children:n[r].name}),j.jsx(wt,{"data-tonality":"functional",noText:!0,icon:"edit",variant:"ghost",onClick:()=>o(!0),children:t("pgEdit")}),j.jsx(VU,{open:s,onClose:()=>o(!1)})]}),j.jsx("div",{"data-density":"functional",className:"flex flex-col p-fix-sm h-full overflow-auto",children:j.jsx(GU,{node:i.ROOT})})]})},eOe=({className:e})=>{const{t}=Yt(),{currentId:r,nodeTrees:n,showBorders:i,showSpacings:s}=ji(c=>c),{actions:o,canUndo:a,canRedo:l,query:u}=ii((c,h)=>{const[d]=c.events.selected;let f;return d&&(f={id:d,name:c.nodes[d].data.name,settings:c.nodes[d].related&&c.nodes[d].related.settings}),{selected:f,canUndo:h.history.canUndo(),canRedo:h.history.canRedo()}});return j.jsx("div",{"data-density":"functional",className:`flex h-siz-md db-neutral-bg-basic-transparent-semi px-fix-sm ${e||""}`,children:j.jsxs("div",{className:"flex w-full justify-between m-auto",children:[j.jsxs("div",{className:"flex gap-fix-sm",children:[j.jsxs(wt,{variant:"ghost",noText:!0,icon:"undo",disabled:!a,onClick:()=>{o.history.undo()},children:[t("playgroundUndo"),a&&j.jsx(gs,{placement:"right",children:t("playgroundUndo")})]}),j.jsxs(wt,{variant:"ghost",noText:!0,icon:"fast_forward_empty",disabled:!l,onClick:()=>{o.history.redo()},children:[t("playgroundRedo"),l&&j.jsx(gs,{placement:"bottom",children:t("playgroundRedo")})]})]}),j.jsxs("div",{className:"flex gap-fix-sm",children:[j.jsx(x0,{noText:!0,variant:"ghost",label:"import",accept:"application/JSON",tooltip:"import",onUpload:c=>{try{const h=atob(c.split("base64,")[1]);o.deserialize(h)}catch(h){console.error(h)}}}),j.jsxs(wt,{variant:"ghost",noText:!0,icon:"download",onClick:()=>{twe({[n[r].name]:u.serialize()})},children:[t("export"),j.jsx(gs,{placement:"bottom",children:t("export")})]}),j.jsxs(wt,{variant:"ghost",noText:!0,icon:"resize",onClick:()=>{ji.setState({showSpacings:!s})},children:[t("playgroundShowSpacings"),j.jsx(gs,{placement:"bottom",children:t("playgroundShowSpacings")})]}),j.jsxs(wt,{variant:"ghost",noText:!0,icon:"grid_view",onClick:()=>{ji.setState({showBorders:!i})},children:[t("playgroundShowBorders"),j.jsx(gs,{placement:"left",children:t("playgroundShowBorders")})]})]})]})})};var I_={exports:{}};I_.exports;(function(e){var t=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,u){if(!s[l]){s[l]={};for(var c=0;c>>8,c[h*2+1]=f%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,h=u.length;c>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++),f[y]=E++,b=String(m)}if(b!==""){if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(h=0;h>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++)}for(d=2,h=0;h>1;for(;;)if(w=w<<1,A==u-1){C.push(c(w));break}else A++;return C.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var h=[],d=4,f=4,p=3,m="",y=[],b,v,E,D,C,w,A,$={val:c(0),position:u,index:1};for(b=0;b<3;b+=1)h[b]=b;for(E=0,C=Math.pow(2,2),w=1;w!=C;)D=$.val&$.position,$.position>>=1,$.position==0&&($.position=u,$.val=c($.index++)),E|=(D>0?1:0)*w,w<<=1;switch(E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=$.val&$.position,$.position>>=1,$.position==0&&($.position=u,$.val=c($.index++)),E|=(D>0?1:0)*w,w<<=1;A=r(E);break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=$.val&$.position,$.position>>=1,$.position==0&&($.position=u,$.val=c($.index++)),E|=(D>0?1:0)*w,w<<=1;A=r(E);break;case 2:return""}for(h[3]=A,v=A,y.push(A);;){if($.index>l)return"";for(E=0,C=Math.pow(2,p),w=1;w!=C;)D=$.val&$.position,$.position>>=1,$.position==0&&($.position=u,$.val=c($.index++)),E|=(D>0?1:0)*w,w<<=1;switch(A=E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=$.val&$.position,$.position>>=1,$.position==0&&($.position=u,$.val=c($.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),A=f-1,d--;break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=$.val&$.position,$.position>>=1,$.position==0&&($.position=u,$.val=c($.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),A=f-1,d--;break;case 2:return y.join("")}if(d==0&&(d=Math.pow(2,p),p++),h[A])m=h[A];else if(A===f)m=v+v.charAt(0);else return null;y.push(m),h[f++]=v+m.charAt(0),d--,v=m,d==0&&(d=Math.pow(2,p),p++)}}};return a}();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(I_);var _y=I_.exports;const tOe=({className:e})=>{const t=z.useRef(null),{currentId:r,nodeTrees:n}=ji(),{query:i,actions:s}=ii(),[o,a]=z.useState(),[l,u]=z.useState(0),[c,h]=z.useState(!1);z.useEffect(()=>{t.current&&ji.setState({previewContainer:t.current.getBoundingClientRect()})},[t]);const d=z.useCallback(()=>{const f=_y.compressToBase64(_y.compress(i.serialize())),p=n[r].serializedJson;f!==p&&r===o&&l===Object.keys(n).length&&ji.setState({nodeTrees:{...n,[r]:{...n[r],serializedJson:f}}})},[r,o,l,n,i]);return z.useEffect(()=>{const f=setTimeout(()=>{d(),h(!c)},2e3);return()=>clearTimeout(f)},[c,d]),z.useEffect(()=>{if(r&&n&&n[r]&&s){if(r!==o&&(l===0||l===Object.keys(n).length)){const f=n[r].serializedJson,p=f.length===0?void 0:_y.decompress(_y.decompressFromBase64(f));p&&s.deserialize(p)}a(r),u(Object.keys(n).length)}},[s,r,n,o,l]),j.jsx("div",{ref:t,className:`${e||""} p-fix-3xs h-full overflow-y-auto overflow-x-hidden`,children:j.jsx(x2e,{children:j.jsx(hf,{id:"canvas",is:WU,canvas:!0})})})},rOe=()=>{const{selected:e,actions:t}=ii(o=>{const[a]=o.events.selected;let l;if(a){const u=o.nodes[a];l={id:a,data:u.data,settings:u.related&&u.related.settings}}return{selected:l}}),[r,n]=z.useState(),[i,s]=z.useState();return z.useEffect(()=>{if(e&&e.data.name==="DropContainer"&&e.data.parent&&t){const o=e.data.parent;t.selectNode(o)}else e&&r!==e.id?(n(e.id),s(e.data.custom.displayName||e.data.name)):e||(s(""),n(void 0))},[r,e,t]),e?j.jsx("div",{className:"flex flex-col h-full overflow-y-auto",children:j.jsxs("div",{className:"flex flex-col p-fix-sm gap-fix-md h-full",children:[j.jsx(Gr,{variant:"floating",label:"Displayname",value:i,onChange:o=>{const a=o.target.value;s(a),t.setCustom(e.id,l=>{l.displayName=a})}}),e.settings?z.createElement(e.settings):j.jsx(ur,{semantic:"warning",children:"No settings"}),j.jsx(wt,{variant:"brand",icon:"bin",width:"full",disabled:!e||e.data.name==="Root",onClick:()=>{e&&t.delete(e.id)},children:"Delete"})]})}):null},nOe=z.forwardRef((e,t)=>e.size==="1"?j.jsx("h1",{ref:t,...e,children:e.children}):e.size==="2"?j.jsx("h2",{ref:t,...e,children:e.children}):e.size==="3"?j.jsx("h3",{ref:t,...e,children:e.children}):e.size==="5"?j.jsx("h5",{ref:t,...e,children:e.children}):e.size==="6"?j.jsx("h6",{ref:t,...e,children:e.children}):j.jsx("h4",{ref:t,...e,children:e.children})),R_=({headline:e,size:t,className:r,variant:n})=>{const{t:i}=Yt(),{connectors:{connect:s,drag:o},id:a,hovered:l,name:u}=Vo(h=>({name:h.data.custom.displayName||h.data.name,hovered:h.data.custom.hover})),{selected:c}=ii(h=>{const[d]=h.events.selected;return{selected:a===d}});return j.jsxs(nOe,{className:`${Uc(c,l,r)}`,"data-hint":e?void 0:i("pgEditMe"),"data-variant":n,ref:h=>{h&&s(h)},size:t,children:[e,j.jsx(Wc,{componentName:u,drag:o})]})},iOe=()=>j.jsx(Hc,{settings:[{key:"headline",type:"textarea"},{key:"size",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"}]},{key:"variant",type:"select",selectOptions:[{value:"black"},{value:"light"}]}]});R_.craft={props:{size:"4",variant:"black"},related:{settings:iOe}};const B_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=Vo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs("div",{className:`db-divider text-[0] ${Uc(o,i,e.className)}`,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,ref:a=>{a&&t(a)},children:["Divider",j.jsx(Wc,{componentName:s,drag:r})]})},sOe=()=>j.jsx(Hc,{settings:[{key:"emphasis",type:"select",selectOptions:[{value:"weak"},{value:"strong"}]},{key:"variant",type:"select",selectOptions:[{value:"horizontal"},{value:"vertical"}]},{key:"margin",type:"select",selectOptions:[{value:"auto"},{value:"none"}]}]});B_.craft={props:{emphasis:"weak",variant:"horizontal",margin:"auto"},related:{settings:sOe}};const oOe=[{headline:"general",components:[{name:"container",component:j.jsx(O_,{}),assetPath:"assets/components/flex.svg"},{name:"text",component:j.jsx(N_,{})},{name:"headline",component:j.jsx(R_,{})}]},{headline:"action",components:[{name:"button",component:j.jsx(P_,{children:"Test"}),assetPath:"assets/components/button.svg"},{name:"link",component:j.jsx(M_,{}),assetPath:"assets/components/link.svg"}]},{headline:"layout",components:[{name:"card",component:j.jsx(F_,{})},{name:"divider",component:j.jsx(B_,{}),assetPath:"assets/components/divider.svg"}]}],aOe=({component:e,assetPath:t,name:r})=>{const{connectors:n}=ii();return j.jsx("div",{ref:i=>{i&&n.create(i,e)},children:j.jsxs(Mi,{className:"items-center cursor-grab p-fix-xs",spacing:"small",children:[j.jsx("img",{className:"max-h-siz-md",alt:r,src:t||"assets/components/component.svg"}),j.jsx("span",{className:"break-all",children:r})]})})},lOe=()=>{const{t:e}=Yt(),[t,r]=z.useState("");return j.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-md h-full overflow-y-auto","data-density":"functional",children:[j.jsx(Gr,{type:"search",variant:"floating",label:e("search"),placeholder:e("search"),onChange:n=>r(n.target.value)}),oOe.filter(({components:n})=>n.some(({name:i})=>e(i).includes(t))).map(({headline:n,components:i})=>j.jsxs(z.Fragment,{children:[j.jsx("h6",{children:e(n)}),j.jsx("div",{className:"grid grid-cols-2 gap-fix-sm",children:i.filter(({name:s})=>e(s).includes(t)).map(({name:s,component:o,assetPath:a})=>j.jsx(z.Fragment,{children:j.jsx(aOe,{name:e(s),component:o,assetPath:a})},`${n}-${s}`))})]},n))]})},uOe=({className:e})=>{const t=z.useRef(null),{t:r}=Yt(),{selected:n}=ii(i=>{const[s]=i.events.selected;let o;if(s){const a=i.nodes[s];o={id:s,data:a.data,settings:a.related&&a.related.settings}}return{selected:o}});return z.useEffect(()=>{t.current&&n&&t.current.click()},[n,t]),j.jsx("div",{"data-density":"functional",className:`border-l flex flex-col grow-0 shrink-0 w-[320px] overflow-hidden ${e||""}`,children:j.jsxs(B5,{alignment:"center",className:"h-full",width:"full",children:[j.jsxs(UT,{children:[j.jsx(Bv,{children:r("components")}),j.jsx(Bv,{disabled:!n,ref:t,children:r("customize")})]}),j.jsx(zv,{children:j.jsx(lOe,{})}),j.jsx(zv,{children:j.jsx(rOe,{})})]})})},cOe=()=>{const{t:e}=Yt(),{currentId:t,nodeTrees:r}=ji(s=>s),[n,i]=z.useState(!1);return j.jsxs(j.Fragment,{children:[j.jsxs(R5,{children:[Object.entries(r).map(([s,o])=>j.jsx(RE,{active:s===t,children:j.jsx("a",{onClick:()=>ji.setState({currentId:s}),children:o.name})},s)),j.jsx(RE,{icon:"plus",children:j.jsx("a",{onClick:()=>{i(!0)},children:e("add")})})]}),j.jsx(VU,{create:!0,open:n,onClose:()=>i(!1)})]})},hOe=()=>{const{showBorders:e,showSpacings:t}=ji(n=>n),{t:r}=Yt();return j.jsx(F2e,{indicator:{success:"var(--db-successful-bg-inverted-contrast-high-default)",error:"var(--db-critical-bg-inverted-contrast-high-default)"},resolver:{Button:P_,Card:F_,Container:O_,DropContainer:cm,Text:N_,Root:WU,Link:M_,Headline:R_,Divider:B_},children:j.jsx(x1,{name:r("playground"),navigation:j.jsx(cOe,{}),children:j.jsxs("div",{className:`flex h-full w-full${e?" show-borders":""}${t?" show-spacings":""}`,children:[j.jsx(ZFe,{}),j.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[j.jsx(eOe,{}),j.jsx(oo,{margin:"none"}),j.jsx(tOe,{})]}),j.jsx(uOe,{})]})})})},dOe=[{path:"/",element:j.jsx(Zwe,{}),label:"landing"},{path:"/customization",element:j.jsx(wwe,{}),label:"customization"},{path:"/editor",element:j.jsx(_xe,{}),label:"editor"},{path:"/playground",element:j.jsx(hOe,{}),label:"playground"},{path:"/demo",element:j.jsx(X2,{}),label:"demo"}],fOe=Qq(TE([j.jsx(AE,{path:"/",element:j.jsx(Xne,{}),errorElement:j.jsx(fie,{}),children:dOe.map(e=>j.jsx(AE,{path:e.path,element:e.element},`route-${e.path}`))})]),{basename:Ab});$D.createRoot(document.getElementById("root")).render(j.jsx(aK,{router:fOe})); + flex items-center justify-between w-full gap-fix-md`,role:"button",onClick:()=>{r.selectNode(a)},children:[u.length===0&&j.jsx(Fd,{className:"w-siz-md",icon:"intermediary_stop"}),j.jsx("span",{className:"break-all w-full",onMouseEnter:()=>r.setCustom(a,f=>{f.hover=!0}),onMouseLeave:()=>r.setCustom(a,f=>{f.hover=!1}),children:h}),j.jsxs("div",{className:"flex gap-fix-3xs",children:[a!=="ROOT"&&j.jsxs(Dt,{className:"min-w-siz-md",variant:"ghost",icon:"copy",noText:!0,onClick:()=>{l.parent&&sOe(r,i,a,l.parent)},children:["Copy ",h,"(",a,")"]}),j.jsxs(Dt,{className:"min-w-siz-md",variant:"ghost",icon:l.hidden?"visibility_off":"visibility",noText:!0,onClick:()=>{r.setHidden(a,!l.hidden)},children:["Hide ",h,"(",a,")"]})]})]});return u.length>0?j.jsxs("details",{open:s,children:[j.jsxs("summary",{onDoubleClick:()=>o(!s),onClick:f=>{f.preventDefault()},className:"flex items-center",children:[j.jsxs(Dt,{variant:"ghost",icon:s?"chevron_down":"chevron_right",noText:!0,onClick:()=>{o(!s)},children:["Open ",l.displayName,"(",a,")"]}),d]}),j.jsx("div",{className:"flex flex-col pl-fix-xs w-full",children:u.map(f=>j.jsx(z.Fragment,{children:j.jsx(KU,{node:n[f]})},`tree-item-${f}`))})]}):d},oOe=({className:e})=>{const{t}=er(),{currentId:r,nodeTrees:n}=Ui(a=>a),{nodes:i}=ai(a=>({nodes:a.nodes})),[s,o]=z.useState(!1);return j.jsxs("div",{"data-density":"functional",className:`h-full${e?` ${e}`:""} grow-0 shrink-0 w-[320px] border-r overflow-hidden`,children:[n[r]&&j.jsxs("div",{className:"h-siz-md flex items-center justify-between p-fix-sm",children:[j.jsx("h6",{children:n[r].name}),j.jsx(Dt,{"data-tonality":"functional",noText:!0,icon:"edit",variant:"ghost",onClick:()=>o(!0),children:t("pgEdit")}),j.jsx(qU,{open:s,onClose:()=>o(!1)})]}),j.jsx("div",{"data-density":"functional",className:"flex flex-col p-fix-sm h-full overflow-auto",children:j.jsx(KU,{node:i.ROOT})})]})},aOe=({className:e})=>{const{t}=er(),{currentId:r,nodeTrees:n,showBorders:i,showSpacings:s}=Ui(c=>c),{actions:o,canUndo:a,canRedo:l,query:u}=ai((c,h)=>{const[d]=c.events.selected;let f;return d&&(f={id:d,name:c.nodes[d].data.name,settings:c.nodes[d].related&&c.nodes[d].related.settings}),{selected:f,canUndo:h.history.canUndo(),canRedo:h.history.canRedo()}});return j.jsx("div",{"data-density":"functional",className:`flex h-siz-md db-neutral-bg-basic-transparent-semi px-fix-sm ${e||""}`,children:j.jsxs("div",{className:"flex w-full justify-between m-auto",children:[j.jsxs("div",{className:"flex gap-fix-sm",children:[j.jsxs(Dt,{variant:"ghost",noText:!0,icon:"undo",disabled:!a,onClick:()=>{o.history.undo()},children:[t("playgroundUndo"),a&&j.jsx(vs,{placement:"right",children:t("playgroundUndo")})]}),j.jsxs(Dt,{variant:"ghost",noText:!0,icon:"fast_forward_empty",disabled:!l,onClick:()=>{o.history.redo()},children:[t("playgroundRedo"),l&&j.jsx(vs,{placement:"bottom",children:t("playgroundRedo")})]})]}),j.jsxs("div",{className:"flex gap-fix-sm",children:[j.jsx(b0,{noText:!0,variant:"ghost",label:"import",accept:"application/JSON",tooltip:"import",onUpload:c=>{try{const h=atob(c.split("base64,")[1]);o.deserialize(h)}catch(h){console.error(h)}}}),j.jsxs(Dt,{variant:"ghost",noText:!0,icon:"download",onClick:()=>{lwe({[n[r].name]:u.serialize()})},children:[t("export"),j.jsx(vs,{placement:"bottom",children:t("export")})]}),j.jsxs(Dt,{variant:"ghost",noText:!0,icon:"resize",onClick:()=>{Ui.setState({showSpacings:!s})},children:[t("playgroundShowSpacings"),j.jsx(vs,{placement:"bottom",children:t("playgroundShowSpacings")})]}),j.jsxs(Dt,{variant:"ghost",noText:!0,icon:"grid_view",onClick:()=>{Ui.setState({showBorders:!i})},children:[t("playgroundShowBorders"),j.jsx(vs,{placement:"left",children:t("playgroundShowBorders")})]})]})]})})};var R_={exports:{}};R_.exports;(function(e){var t=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,u){if(!s[l]){s[l]={};for(var c=0;c>>8,c[h*2+1]=f%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,h=u.length;c>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++),f[y]=E++,b=String(m)}if(b!==""){if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(h=0;h>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++)}for(d=2,h=0;h>1;for(;;)if(w=w<<1,T==u-1){C.push(c(w));break}else T++;return C.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var h=[],d=4,f=4,p=3,m="",y=[],b,v,E,D,C,w,T,k={val:c(0),position:u,index:1};for(b=0;b<3;b+=1)h[b]=b;for(E=0,C=Math.pow(2,2),w=1;w!=C;)D=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),E|=(D>0?1:0)*w,w<<=1;switch(E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),E|=(D>0?1:0)*w,w<<=1;T=r(E);break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),E|=(D>0?1:0)*w,w<<=1;T=r(E);break;case 2:return""}for(h[3]=T,v=T,y.push(T);;){if(k.index>l)return"";for(E=0,C=Math.pow(2,p),w=1;w!=C;)D=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),E|=(D>0?1:0)*w,w<<=1;switch(T=E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),T=f-1,d--;break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),T=f-1,d--;break;case 2:return y.join("")}if(d==0&&(d=Math.pow(2,p),p++),h[T])m=h[T];else if(T===f)m=v+v.charAt(0);else return null;y.push(m),h[f++]=v+m.charAt(0),d--,v=m,d==0&&(d=Math.pow(2,p),p++)}}};return a}();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(R_);var _y=R_.exports;const lOe=({className:e})=>{const t=z.useRef(null),{currentId:r,nodeTrees:n}=Ui(),{query:i,actions:s}=ai(),[o,a]=z.useState(),[l,u]=z.useState(0),[c,h]=z.useState(!1);z.useEffect(()=>{t.current&&Ui.setState({previewContainer:t.current.getBoundingClientRect()})},[t]);const d=z.useCallback(()=>{const f=_y.compressToBase64(_y.compress(i.serialize())),p=n[r].serializedJson;f!==p&&r===o&&l===Object.keys(n).length&&Ui.setState({nodeTrees:{...n,[r]:{...n[r],serializedJson:f}}})},[r,o,l,n,i]);return z.useEffect(()=>{const f=setTimeout(()=>{d(),h(!c)},2e3);return()=>clearTimeout(f)},[c,d]),z.useEffect(()=>{if(r&&n&&n[r]&&s){if(r!==o&&(l===0||l===Object.keys(n).length)){const f=n[r].serializedJson,p=f.length===0?void 0:_y.decompress(_y.decompressFromBase64(f));p&&s.deserialize(p)}a(r),u(Object.keys(n).length)}},[s,r,n,o,l]),j.jsx("div",{ref:t,className:`${e||""} p-fix-3xs h-full overflow-y-auto overflow-x-hidden`,children:j.jsx(A2e,{children:j.jsx(ff,{id:"canvas",is:GU,canvas:!0})})})},uOe=()=>{const{selected:e,actions:t}=ai(o=>{const[a]=o.events.selected;let l;if(a){const u=o.nodes[a];l={id:a,data:u.data,settings:u.related&&u.related.settings}}return{selected:l}}),[r,n]=z.useState(),[i,s]=z.useState();return z.useEffect(()=>{if(e&&e.data.name==="DropContainer"&&e.data.parent&&t){const o=e.data.parent;t.selectNode(o)}else e&&r!==e.id?(n(e.id),s(e.data.custom.displayName||e.data.name)):e||(s(""),n(void 0))},[r,e,t]),e?j.jsx("div",{className:"flex flex-col h-full overflow-y-auto",children:j.jsxs("div",{className:"flex flex-col p-fix-sm gap-fix-md h-full",children:[j.jsx(Kr,{variant:"floating",label:"Displayname",value:i,onChange:o=>{const a=o.target.value;s(a),t.setCustom(e.id,l=>{l.displayName=a})}}),e.settings?z.createElement(e.settings):j.jsx(dr,{semantic:"warning",children:"No settings"}),j.jsx(Dt,{variant:"brand",icon:"bin",width:"full",disabled:!e||e.data.name==="Root",onClick:()=>{e&&t.delete(e.id)},children:"Delete"})]})}):null},cOe=z.forwardRef((e,t)=>e.size==="1"?j.jsx("h1",{ref:t,...e,children:e.children}):e.size==="2"?j.jsx("h2",{ref:t,...e,children:e.children}):e.size==="3"?j.jsx("h3",{ref:t,...e,children:e.children}):e.size==="5"?j.jsx("h5",{ref:t,...e,children:e.children}):e.size==="6"?j.jsx("h6",{ref:t,...e,children:e.children}):j.jsx("h4",{ref:t,...e,children:e.children})),B_=({headline:e,size:t,className:r,variant:n})=>{const{t:i}=er(),{connectors:{connect:s,drag:o},id:a,hovered:l,name:u}=qo(h=>({name:h.data.custom.displayName||h.data.name,hovered:h.data.custom.hover})),{selected:c}=ai(h=>{const[d]=h.events.selected;return{selected:a===d}});return j.jsxs(cOe,{className:`${Vc(c,l,r)}`,"data-hint":e?void 0:i("pgEditMe"),"data-variant":n,ref:h=>{h&&s(h)},size:t,children:[e,j.jsx(Gc,{componentName:u,drag:o})]})},hOe=()=>j.jsx(Wc,{settings:[{key:"headline",type:"textarea"},{key:"size",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"}]},{key:"variant",type:"select",selectOptions:[{value:"black"},{value:"light"}]}]});B_.craft={props:{size:"4",variant:"black"},related:{settings:hOe}};const j_=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=qo(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=ai(a=>{const[l]=a.events.selected;return{selected:n===l}});return j.jsxs("div",{className:`db-divider text-[0] ${Vc(o,i,e.className)}`,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,ref:a=>{a&&t(a)},children:["Divider",j.jsx(Gc,{componentName:s,drag:r})]})},dOe=()=>j.jsx(Wc,{settings:[{key:"emphasis",type:"select",selectOptions:[{value:"weak"},{value:"strong"}]},{key:"variant",type:"select",selectOptions:[{value:"horizontal"},{value:"vertical"}]},{key:"margin",type:"select",selectOptions:[{value:"auto"},{value:"none"}]}]});j_.craft={props:{emphasis:"weak",variant:"horizontal",margin:"auto"},related:{settings:dOe}};const fOe=[{headline:"general",components:[{name:"container",component:j.jsx(I_,{}),assetPath:"assets/components/flex.svg"},{name:"text",component:j.jsx(M_,{})},{name:"headline",component:j.jsx(B_,{})}]},{headline:"action",components:[{name:"button",component:j.jsx(F_,{children:"Test"}),assetPath:"assets/components/button.svg"},{name:"link",component:j.jsx(N_,{}),assetPath:"assets/components/link.svg"}]},{headline:"layout",components:[{name:"card",component:j.jsx(O_,{})},{name:"divider",component:j.jsx(j_,{}),assetPath:"assets/components/divider.svg"}]}],pOe=({component:e,assetPath:t,name:r})=>{const{connectors:n}=ai();return j.jsx("div",{ref:i=>{i&&n.create(i,e)},children:j.jsxs(Bi,{className:"items-center cursor-grab p-fix-xs",spacing:"small",children:[j.jsx("img",{className:"max-h-siz-md",alt:r,src:t||"assets/components/component.svg"}),j.jsx("span",{className:"break-all",children:r})]})})},gOe=()=>{const{t:e}=er(),[t,r]=z.useState("");return j.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-md h-full overflow-y-auto","data-density":"functional",children:[j.jsx(Kr,{type:"search",variant:"floating",label:e("search"),placeholder:e("search"),onChange:n=>r(n.target.value)}),fOe.filter(({components:n})=>n.some(({name:i})=>e(i).includes(t))).map(({headline:n,components:i})=>j.jsxs(z.Fragment,{children:[j.jsx("h6",{children:e(n)}),j.jsx("div",{className:"grid grid-cols-2 gap-fix-sm",children:i.filter(({name:s})=>e(s).includes(t)).map(({name:s,component:o,assetPath:a})=>j.jsx(z.Fragment,{children:j.jsx(pOe,{name:e(s),component:o,assetPath:a})},`${n}-${s}`))})]},n))]})},mOe=({className:e})=>{const t=z.useRef(null),{t:r}=er(),{selected:n}=ai(i=>{const[s]=i.events.selected;let o;if(s){const a=i.nodes[s];o={id:s,data:a.data,settings:a.related&&a.related.settings}}return{selected:o}});return z.useEffect(()=>{t.current&&n&&t.current.click()},[n,t]),j.jsx("div",{"data-density":"functional",className:`border-l flex flex-col grow-0 shrink-0 w-[320px] overflow-hidden ${e||""}`,children:j.jsxs(z5,{alignment:"center",className:"h-full",width:"full",children:[j.jsxs(WA,{children:[j.jsx(Rv,{children:r("components")}),j.jsx(Rv,{disabled:!n,ref:t,children:r("customize")})]}),j.jsx(jv,{children:j.jsx(gOe,{})}),j.jsx(jv,{children:j.jsx(uOe,{})})]})})},yOe=()=>{const{t:e}=er(),{currentId:t,nodeTrees:r}=Ui(s=>s),[n,i]=z.useState(!1);return j.jsxs(j.Fragment,{children:[j.jsxs(j5,{children:[Object.entries(r).map(([s,o])=>j.jsx(NE,{active:s===t,children:j.jsx("a",{onClick:()=>Ui.setState({currentId:s}),children:o.name})},s)),j.jsx(NE,{icon:"plus",children:j.jsx("a",{onClick:()=>{i(!0)},children:e("add")})})]}),j.jsx(qU,{create:!0,open:n,onClose:()=>i(!1)})]})},vOe=()=>{const{showBorders:e,showSpacings:t}=Ui(n=>n),{t:r}=er();return j.jsx(j2e,{indicator:{success:"var(--db-successful-bg-inverted-contrast-high-default)",error:"var(--db-critical-bg-inverted-contrast-high-default)"},resolver:{Button:F_,Card:O_,Container:I_,DropContainer:cm,Text:M_,Root:GU,Link:N_,Headline:B_,Divider:j_},children:j.jsx(b1,{name:r("playground"),navigation:j.jsx(yOe,{}),children:j.jsxs("div",{className:`flex h-full w-full${e?" show-borders":""}${t?" show-spacings":""}`,children:[j.jsx(oOe,{}),j.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[j.jsx(aOe,{}),j.jsx(uo,{margin:"none"}),j.jsx(lOe,{})]}),j.jsx(mOe,{})]})})})},bOe=[{path:"/",element:j.jsx(oSe,{}),label:"landing"},{path:"/customization",element:j.jsx(kwe,{}),label:"customization"},{path:"/editor",element:j.jsx($xe,{}),label:"editor"},{path:"/playground",element:j.jsx(vOe,{}),label:"playground"},{path:"/demo",element:j.jsx(Y2,{}),label:"demo"}],xOe=eK(TE([j.jsx(CE,{path:"/",element:j.jsx(Yne,{}),errorElement:j.jsx(pie,{}),children:bOe.map(e=>j.jsx(CE,{path:e.path,element:e.element},`route-${e.path}`))})]),{basename:Cb});_D.createRoot(document.getElementById("root")).render(j.jsx(uK,{router:xOe})); diff --git a/main/customization.html b/main/customization.html index 674b8625..062e1e06 100644 --- a/main/customization.html +++ b/main/customization.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/demo.html b/main/demo.html index 674b8625..062e1e06 100644 --- a/main/demo.html +++ b/main/demo.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/index.html b/main/index.html index 674b8625..062e1e06 100644 --- a/main/index.html +++ b/main/index.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/playground.html b/main/playground.html index 674b8625..062e1e06 100644 --- a/main/playground.html +++ b/main/playground.html @@ -5,7 +5,7 @@ Theme Builder - +